import{r as E,j as m,S as An,R as dt,K as na}from"./app-DZfefqwY.js";import{u as ra}from"./use-mobile-CMSTbj2b.js";import{r as ia,d as W}from"./dayjs.min-B19V7QlL.js";import{c as tn,u as Lt,P as ve,a as O,b as dr,d as ur,e as sa,h as oa,f as la,R as aa,F as ca,D as cs,g as da,r as Wn}from"./Combination-DhfBqwqd.js";import{u as Re,S as ua,c as ds,a as fa}from"./index-CV198bpU.js";import{c as us,u as fs,a as nn,R as hs,A as gs,C as ps,b as ms,d as ha}from"./index-qwd1lJ5c.js";import{P as vt}from"./index-BoRLjs_N.js";import{c as je}from"./createLucideIcon-DVe2WYpF.js";import{C as ga}from"./check-Bt232fhB.js";import{c as vs}from"./utils-58Hq6hiM.js";import{C as ys}from"./calendar-B1bcnlRN.js";import{M as pa}from"./Modal-BYXFqMaN.js";import{M as ma}from"./menu-layout-CSmnbXX0.js";/* empty css            */import"./InputGroup-UkLLamB2.js";import"./iconBase-Bk-4DJ7c.js";import"./circle-alert-C-OnHBie.js";import"./x-DUKJD8Z_.js";import"./AppLayout-DeG2WwBX.js";import"./index-wh97_X4O.js";var It={exports:{}},va=It.exports,ii;function ya(){return ii||(ii=1,function(t,e){(function(n,r){t.exports=r(ia())})(va,function(n){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=r(n),s={name:"id",weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),weekStart:1,formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},ordinal:function(o){return o+"."}};return i.default.locale(s,null,!0),s})}(It)),It.exports}ya();/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ba=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ea=je("ChevronLeft",ba);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sa=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wa=je("ChevronRight",Sa);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ca=[["path",{d:"M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055",key:"1fi1da"}],["path",{d:"m22 3-5 5",key:"12jva0"}],["path",{d:"m17 3 5 5",key:"k36vhe"}]],si=je("FilterX",Ca);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Aa=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Da=je("Filter",Aa);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xa=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Ra=je("MapPin",xa);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _a=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],rn=je("Star",_a);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ta=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Ma=je("Tag",Ta);var Dn="rovingFocusGroup.onEntryFocus",Ia={bubbles:!1,cancelable:!0},sn="RovingFocusGroup",[Vn,bs,ka]=us(sn),[Na,Es]=tn(sn,[ka]),[Oa,Pa]=Na(sn),Ss=E.forwardRef((t,e)=>m.jsx(Vn.Provider,{scope:t.__scopeRovingFocusGroup,children:m.jsx(Vn.Slot,{scope:t.__scopeRovingFocusGroup,children:m.jsx(Ha,{...t,ref:e})})}));Ss.displayName=sn;var Ha=E.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:d,preventScrollOnEntryFocus:c=!1,...f}=t,u=E.useRef(null),h=Re(e,u),p=fs(s),[v=null,y]=dr({prop:o,defaultProp:l,onChange:a}),[S,w]=E.useState(!1),D=ur(d),C=bs(n),x=E.useRef(!1),[R,I]=E.useState(0);return E.useEffect(()=>{const A=u.current;if(A)return A.addEventListener(Dn,D),()=>A.removeEventListener(Dn,D)},[D]),m.jsx(Oa,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:v,onItemFocus:E.useCallback(A=>y(A),[y]),onItemShiftTab:E.useCallback(()=>w(!0),[]),onFocusableItemAdd:E.useCallback(()=>I(A=>A+1),[]),onFocusableItemRemove:E.useCallback(()=>I(A=>A-1),[]),children:m.jsx(ve.div,{tabIndex:S||R===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:O(t.onMouseDown,()=>{x.current=!0}),onFocus:O(t.onFocus,A=>{const F=!x.current;if(A.target===A.currentTarget&&F&&!S){const z=new CustomEvent(Dn,Ia);if(A.currentTarget.dispatchEvent(z),!z.defaultPrevented){const G=C().filter(ne=>ne.focusable),k=G.find(ne=>ne.active),M=G.find(ne=>ne.id===v),We=[k,M,...G].filter(Boolean).map(ne=>ne.ref.current);As(We,c)}}x.current=!1}),onBlur:O(t.onBlur,()=>w(!1))})})}),ws="RovingFocusGroupItem",Cs=E.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,...o}=t,l=Lt(),a=s||l,d=Pa(ws,n),c=d.currentTabStopId===a,f=bs(n),{onFocusableItemAdd:u,onFocusableItemRemove:h}=d;return E.useEffect(()=>{if(r)return u(),()=>h()},[r,u,h]),m.jsx(Vn.ItemSlot,{scope:n,id:a,focusable:r,active:i,children:m.jsx(ve.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...o,ref:e,onMouseDown:O(t.onMouseDown,p=>{r?d.onItemFocus(a):p.preventDefault()}),onFocus:O(t.onFocus,()=>d.onItemFocus(a)),onKeyDown:O(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){d.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const v=Ba(p,d.orientation,d.dir);if(v!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let S=f().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")S.reverse();else if(v==="prev"||v==="next"){v==="prev"&&S.reverse();const w=S.indexOf(p.currentTarget);S=d.loop?Fa(S,w+1):S.slice(w+1)}setTimeout(()=>As(S))}})})})});Cs.displayName=ws;var ja={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function La(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Ba(t,e,n){const r=La(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ja[r]}function As(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function Fa(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Ua=Ss,za=Cs,Gn=["Enter"," "],Wa=["ArrowDown","PageUp","Home"],Ds=["ArrowUp","PageDown","End"],Va=[...Wa,...Ds],Ga={ltr:[...Gn,"ArrowRight"],rtl:[...Gn,"ArrowLeft"]},Ya={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yt="Menu",[ut,qa,$a]=us(yt),[Le,xs]=tn(yt,[$a,nn,Es]),on=nn(),Rs=Es(),[Qa,Be]=Le(yt),[Za,bt]=Le(yt),_s=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:i,onOpenChange:s,modal:o=!0}=t,l=on(e),[a,d]=E.useState(null),c=E.useRef(!1),f=ur(s),u=fs(i);return E.useEffect(()=>{const h=()=>{c.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>c.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),m.jsx(hs,{...l,children:m.jsx(Qa,{scope:e,open:n,onOpenChange:f,content:a,onContentChange:d,children:m.jsx(Za,{scope:e,onClose:E.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:u,modal:o,children:r})})})};_s.displayName=yt;var Ka="MenuAnchor",fr=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=on(n);return m.jsx(gs,{...i,...r,ref:e})});fr.displayName=Ka;var hr="MenuPortal",[Xa,Ts]=Le(hr,{forceMount:void 0}),Ms=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:i}=t,s=Be(hr,e);return m.jsx(Xa,{scope:e,forceMount:n,children:m.jsx(vt,{present:n||s.open,children:m.jsx(sa,{asChild:!0,container:i,children:r})})})};Ms.displayName=hr;var te="MenuContent",[Ja,gr]=Le(te),Is=E.forwardRef((t,e)=>{const n=Ts(te,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Be(te,t.__scopeMenu),o=bt(te,t.__scopeMenu);return m.jsx(ut.Provider,{scope:t.__scopeMenu,children:m.jsx(vt,{present:r||s.open,children:m.jsx(ut.Slot,{scope:t.__scopeMenu,children:o.modal?m.jsx(ec,{...i,ref:e}):m.jsx(tc,{...i,ref:e})})})})}),ec=E.forwardRef((t,e)=>{const n=Be(te,t.__scopeMenu),r=E.useRef(null),i=Re(e,r);return E.useEffect(()=>{const s=r.current;if(s)return oa(s)},[]),m.jsx(pr,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:O(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),tc=E.forwardRef((t,e)=>{const n=Be(te,t.__scopeMenu);return m.jsx(pr,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),pr=E.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:a,onEscapeKeyDown:d,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:u,onDismiss:h,disableOutsideScroll:p,...v}=t,y=Be(te,n),S=bt(te,n),w=on(n),D=Rs(n),C=qa(n),[x,R]=E.useState(null),I=E.useRef(null),A=Re(e,I,y.onContentChange),F=E.useRef(0),z=E.useRef(""),G=E.useRef(0),k=E.useRef(null),M=E.useRef("right"),Y=E.useRef(0),We=p?aa:E.Fragment,ne=p?{as:ua,allowPinchZoom:!0}:void 0,nt=N=>{var Ve,ni;const ee=z.current+N,le=C().filter(fe=>!fe.disabled),be=document.activeElement,wn=(Ve=le.find(fe=>fe.ref.current===be))==null?void 0:Ve.textValue,Cn=le.map(fe=>fe.textValue),ti=hc(Cn,ee,wn),rt=(ni=le.find(fe=>fe.textValue===ti))==null?void 0:ni.ref.current;(function fe(ri){z.current=ri,window.clearTimeout(F.current),ri!==""&&(F.current=window.setTimeout(()=>fe(""),1e3))})(ee),rt&&setTimeout(()=>rt.focus())};E.useEffect(()=>()=>window.clearTimeout(F.current),[]),la();const oe=E.useCallback(N=>{var le,be;return M.current===((le=k.current)==null?void 0:le.side)&&pc(N,(be=k.current)==null?void 0:be.area)},[]);return m.jsx(Ja,{scope:n,searchRef:z,onItemEnter:E.useCallback(N=>{oe(N)&&N.preventDefault()},[oe]),onItemLeave:E.useCallback(N=>{var ee;oe(N)||((ee=I.current)==null||ee.focus(),R(null))},[oe]),onTriggerLeave:E.useCallback(N=>{oe(N)&&N.preventDefault()},[oe]),pointerGraceTimerRef:G,onPointerGraceIntentChange:E.useCallback(N=>{k.current=N},[]),children:m.jsx(We,{...ne,children:m.jsx(ca,{asChild:!0,trapped:i,onMountAutoFocus:O(s,N=>{var ee;N.preventDefault(),(ee=I.current)==null||ee.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:m.jsx(cs,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:u,onDismiss:h,children:m.jsx(Ua,{asChild:!0,...D,dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:R,onEntryFocus:O(a,N=>{S.isUsingKeyboardRef.current||N.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(ps,{role:"menu","aria-orientation":"vertical","data-state":qs(y.open),"data-radix-menu-content":"",dir:S.dir,...w,...v,ref:A,style:{outline:"none",...v.style},onKeyDown:O(v.onKeyDown,N=>{const le=N.target.closest("[data-radix-menu-content]")===N.currentTarget,be=N.ctrlKey||N.altKey||N.metaKey,wn=N.key.length===1;le&&(N.key==="Tab"&&N.preventDefault(),!be&&wn&&nt(N.key));const Cn=I.current;if(N.target!==Cn||!Va.includes(N.key))return;N.preventDefault();const rt=C().filter(Ve=>!Ve.disabled).map(Ve=>Ve.ref.current);Ds.includes(N.key)&&rt.reverse(),uc(rt)}),onBlur:O(t.onBlur,N=>{N.currentTarget.contains(N.target)||(window.clearTimeout(F.current),z.current="")}),onPointerMove:O(t.onPointerMove,ft(N=>{const ee=N.target,le=Y.current!==N.clientX;if(N.currentTarget.contains(ee)&&le){const be=N.clientX>Y.current?"right":"left";M.current=be,Y.current=N.clientX}}))})})})})})})});Is.displayName=te;var nc="MenuGroup",mr=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return m.jsx(ve.div,{role:"group",...r,ref:e})});mr.displayName=nc;var rc="MenuLabel",ks=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return m.jsx(ve.div,{...r,ref:e})});ks.displayName=rc;var Bt="MenuItem",oi="menu.itemSelect",ln=E.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,s=E.useRef(null),o=bt(Bt,t.__scopeMenu),l=gr(Bt,t.__scopeMenu),a=Re(e,s),d=E.useRef(!1),c=()=>{const f=s.current;if(!n&&f){const u=new CustomEvent(oi,{bubbles:!0,cancelable:!0});f.addEventListener(oi,h=>r==null?void 0:r(h),{once:!0}),da(f,u),u.defaultPrevented?d.current=!1:o.onClose()}};return m.jsx(Ns,{...i,ref:a,disabled:n,onClick:O(t.onClick,c),onPointerDown:f=>{var u;(u=t.onPointerDown)==null||u.call(t,f),d.current=!0},onPointerUp:O(t.onPointerUp,f=>{var u;d.current||(u=f.currentTarget)==null||u.click()}),onKeyDown:O(t.onKeyDown,f=>{const u=l.searchRef.current!=="";n||u&&f.key===" "||Gn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});ln.displayName=Bt;var Ns=E.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=t,o=gr(Bt,n),l=Rs(n),a=E.useRef(null),d=Re(e,a),[c,f]=E.useState(!1),[u,h]=E.useState("");return E.useEffect(()=>{const p=a.current;p&&h((p.textContent??"").trim())},[s.children]),m.jsx(ut.ItemSlot,{scope:n,disabled:r,textValue:i??u,children:m.jsx(za,{asChild:!0,...l,focusable:!r,children:m.jsx(ve.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:d,onPointerMove:O(t.onPointerMove,ft(p=>{r?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:O(t.onPointerLeave,ft(p=>o.onItemLeave(p))),onFocus:O(t.onFocus,()=>f(!0)),onBlur:O(t.onBlur,()=>f(!1))})})})}),ic="MenuCheckboxItem",Os=E.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...i}=t;return m.jsx(Bs,{scope:t.__scopeMenu,checked:n,children:m.jsx(ln,{role:"menuitemcheckbox","aria-checked":Ft(n)?"mixed":n,...i,ref:e,"data-state":yr(n),onSelect:O(i.onSelect,()=>r==null?void 0:r(Ft(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Os.displayName=ic;var Ps="MenuRadioGroup",[sc,oc]=Le(Ps,{value:void 0,onValueChange:()=>{}}),Hs=E.forwardRef((t,e)=>{const{value:n,onValueChange:r,...i}=t,s=ur(r);return m.jsx(sc,{scope:t.__scopeMenu,value:n,onValueChange:s,children:m.jsx(mr,{...i,ref:e})})});Hs.displayName=Ps;var js="MenuRadioItem",Ls=E.forwardRef((t,e)=>{const{value:n,...r}=t,i=oc(js,t.__scopeMenu),s=n===i.value;return m.jsx(Bs,{scope:t.__scopeMenu,checked:s,children:m.jsx(ln,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":yr(s),onSelect:O(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});Ls.displayName=js;var vr="MenuItemIndicator",[Bs,lc]=Le(vr,{checked:!1}),Fs=E.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...i}=t,s=lc(vr,n);return m.jsx(vt,{present:r||Ft(s.checked)||s.checked===!0,children:m.jsx(ve.span,{...i,ref:e,"data-state":yr(s.checked)})})});Fs.displayName=vr;var ac="MenuSeparator",Us=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return m.jsx(ve.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});Us.displayName=ac;var cc="MenuArrow",zs=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=on(n);return m.jsx(ms,{...i,...r,ref:e})});zs.displayName=cc;var dc="MenuSub",[ay,Ws]=Le(dc),st="MenuSubTrigger",Vs=E.forwardRef((t,e)=>{const n=Be(st,t.__scopeMenu),r=bt(st,t.__scopeMenu),i=Ws(st,t.__scopeMenu),s=gr(st,t.__scopeMenu),o=E.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:a}=s,d={__scopeMenu:t.__scopeMenu},c=E.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return E.useEffect(()=>c,[c]),E.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),a(null)}},[l,a]),m.jsx(fr,{asChild:!0,...d,children:m.jsx(Ns,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":qs(n.open),...t,ref:ds(e,i.onTriggerChange),onClick:f=>{var u;(u=t.onClick)==null||u.call(t,f),!(t.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:O(t.onPointerMove,ft(f=>{s.onItemEnter(f),!f.defaultPrevented&&!t.disabled&&!n.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:O(t.onPointerLeave,ft(f=>{var h,p;c();const u=(h=n.content)==null?void 0:h.getBoundingClientRect();if(u){const v=(p=n.content)==null?void 0:p.dataset.side,y=v==="right",S=y?-5:5,w=u[y?"left":"right"],D=u[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+S,y:f.clientY},{x:w,y:u.top},{x:D,y:u.top},{x:D,y:u.bottom},{x:w,y:u.bottom}],side:v}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:O(t.onKeyDown,f=>{var h;const u=s.searchRef.current!=="";t.disabled||u&&f.key===" "||Ga[r.dir].includes(f.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),f.preventDefault())})})})});Vs.displayName=st;var Gs="MenuSubContent",Ys=E.forwardRef((t,e)=>{const n=Ts(te,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Be(te,t.__scopeMenu),o=bt(te,t.__scopeMenu),l=Ws(Gs,t.__scopeMenu),a=E.useRef(null),d=Re(e,a);return m.jsx(ut.Provider,{scope:t.__scopeMenu,children:m.jsx(vt,{present:r||s.open,children:m.jsx(ut.Slot,{scope:t.__scopeMenu,children:m.jsx(pr,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:d,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var f;o.isUsingKeyboardRef.current&&((f=a.current)==null||f.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:O(t.onFocusOutside,c=>{c.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:O(t.onEscapeKeyDown,c=>{o.onClose(),c.preventDefault()}),onKeyDown:O(t.onKeyDown,c=>{var h;const f=c.currentTarget.contains(c.target),u=Ya[o.dir].includes(c.key);f&&u&&(s.onOpenChange(!1),(h=l.trigger)==null||h.focus(),c.preventDefault())})})})})})});Ys.displayName=Gs;function qs(t){return t?"open":"closed"}function Ft(t){return t==="indeterminate"}function yr(t){return Ft(t)?"indeterminate":t?"checked":"unchecked"}function uc(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function fc(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function hc(t,e,n){const i=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=fc(t,Math.max(s,0));i.length===1&&(o=o.filter(d=>d!==n));const a=o.find(d=>d.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}function gc(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const l=e[s].x,a=e[s].y,d=e[o].x,c=e[o].y;a>r!=c>r&&n<(d-l)*(r-a)/(c-a)+l&&(i=!i)}return i}function pc(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return gc(n,e)}function ft(t){return e=>e.pointerType==="mouse"?t(e):void 0}var mc=_s,vc=fr,yc=Ms,bc=Is,Ec=mr,Sc=ks,wc=ln,Cc=Os,Ac=Hs,Dc=Ls,xc=Fs,Rc=Us,_c=zs,Tc=Vs,Mc=Ys,br="DropdownMenu",[Ic,cy]=tn(br,[xs]),Z=xs(),[kc,$s]=Ic(br),Qs=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:o,modal:l=!0}=t,a=Z(e),d=E.useRef(null),[c=!1,f]=dr({prop:i,defaultProp:s,onChange:o});return m.jsx(kc,{scope:e,triggerId:Lt(),triggerRef:d,contentId:Lt(),open:c,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(u=>!u),[f]),modal:l,children:m.jsx(mc,{...a,open:c,onOpenChange:f,dir:r,modal:l,children:n})})};Qs.displayName=br;var Zs="DropdownMenuTrigger",Ks=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=t,s=$s(Zs,n),o=Z(n);return m.jsx(vc,{asChild:!0,...o,children:m.jsx(ve.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:ds(e,s.triggerRef),onPointerDown:O(t.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:O(t.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Ks.displayName=Zs;var Nc="DropdownMenuPortal",Xs=t=>{const{__scopeDropdownMenu:e,...n}=t,r=Z(e);return m.jsx(yc,{...r,...n})};Xs.displayName=Nc;var Js="DropdownMenuContent",eo=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=$s(Js,n),s=Z(n),o=E.useRef(!1);return m.jsx(bc,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:e,onCloseAutoFocus:O(t.onCloseAutoFocus,l=>{var a;o.current||(a=i.triggerRef.current)==null||a.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:O(t.onInteractOutside,l=>{const a=l.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,c=a.button===2||d;(!i.modal||c)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eo.displayName=Js;var Oc="DropdownMenuGroup",Pc=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(Ec,{...i,...r,ref:e})});Pc.displayName=Oc;var Hc="DropdownMenuLabel",jc=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(Sc,{...i,...r,ref:e})});jc.displayName=Hc;var Lc="DropdownMenuItem",Bc=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(wc,{...i,...r,ref:e})});Bc.displayName=Lc;var Fc="DropdownMenuCheckboxItem",to=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(Cc,{...i,...r,ref:e})});to.displayName=Fc;var Uc="DropdownMenuRadioGroup",zc=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(Ac,{...i,...r,ref:e})});zc.displayName=Uc;var Wc="DropdownMenuRadioItem",Vc=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(Dc,{...i,...r,ref:e})});Vc.displayName=Wc;var Gc="DropdownMenuItemIndicator",no=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(xc,{...i,...r,ref:e})});no.displayName=Gc;var Yc="DropdownMenuSeparator",qc=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(Rc,{...i,...r,ref:e})});qc.displayName=Yc;var $c="DropdownMenuArrow",Qc=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(_c,{...i,...r,ref:e})});Qc.displayName=$c;var Zc="DropdownMenuSubTrigger",Kc=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(Tc,{...i,...r,ref:e})});Kc.displayName=Zc;var Xc="DropdownMenuSubContent",Jc=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z(n);return m.jsx(Mc,{...i,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jc.displayName=Xc;var ed=Qs,td=Ks,nd=Xs,rd=eo,id=to,sd=no,[an,dy]=tn("Tooltip",[nn]),cn=nn(),ro="TooltipProvider",od=700,Yn="tooltip.open",[ld,Er]=an(ro),io=t=>{const{__scopeTooltip:e,delayDuration:n=od,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=t,[o,l]=E.useState(!0),a=E.useRef(!1),d=E.useRef(0);return E.useEffect(()=>{const c=d.current;return()=>window.clearTimeout(c)},[]),m.jsx(ld,{scope:e,isOpenDelayed:o,delayDuration:n,onOpen:E.useCallback(()=>{window.clearTimeout(d.current),l(!1)},[]),onClose:E.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:E.useCallback(c=>{a.current=c},[]),disableHoverableContent:i,children:s})};io.displayName=ro;var dn="Tooltip",[ad,un]=an(dn),so=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:o,delayDuration:l}=t,a=Er(dn,t.__scopeTooltip),d=cn(e),[c,f]=E.useState(null),u=Lt(),h=E.useRef(0),p=o??a.disableHoverableContent,v=l??a.delayDuration,y=E.useRef(!1),[S=!1,w]=dr({prop:r,defaultProp:i,onChange:I=>{I?(a.onOpen(),document.dispatchEvent(new CustomEvent(Yn))):a.onClose(),s==null||s(I)}}),D=E.useMemo(()=>S?y.current?"delayed-open":"instant-open":"closed",[S]),C=E.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,w(!0)},[w]),x=E.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),R=E.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,w(!0),h.current=0},v)},[v,w]);return E.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),m.jsx(hs,{...d,children:m.jsx(ad,{scope:e,contentId:u,open:S,stateAttribute:D,trigger:c,onTriggerChange:f,onTriggerEnter:E.useCallback(()=>{a.isOpenDelayed?R():C()},[a.isOpenDelayed,R,C]),onTriggerLeave:E.useCallback(()=>{p?x():(window.clearTimeout(h.current),h.current=0)},[x,p]),onOpen:C,onClose:x,disableHoverableContent:p,children:n})})};so.displayName=dn;var qn="TooltipTrigger",oo=E.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=un(qn,n),s=Er(qn,n),o=cn(n),l=E.useRef(null),a=Re(e,l,i.onTriggerChange),d=E.useRef(!1),c=E.useRef(!1),f=E.useCallback(()=>d.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),m.jsx(gs,{asChild:!0,...o,children:m.jsx(ve.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:a,onPointerMove:O(t.onPointerMove,u=>{u.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:O(t.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:O(t.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:O(t.onFocus,()=>{d.current||i.onOpen()}),onBlur:O(t.onBlur,i.onClose),onClick:O(t.onClick,i.onClose)})})});oo.displayName=qn;var cd="TooltipPortal",[uy,dd]=an(cd,{forceMount:void 0}),Ze="TooltipContent",lo=E.forwardRef((t,e)=>{const n=dd(Ze,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=t,o=un(Ze,t.__scopeTooltip);return m.jsx(vt,{present:r||o.open,children:o.disableHoverableContent?m.jsx(ao,{side:i,...s,ref:e}):m.jsx(ud,{side:i,...s,ref:e})})}),ud=E.forwardRef((t,e)=>{const n=un(Ze,t.__scopeTooltip),r=Er(Ze,t.__scopeTooltip),i=E.useRef(null),s=Re(e,i),[o,l]=E.useState(null),{trigger:a,onClose:d}=n,c=i.current,{onPointerInTransitChange:f}=r,u=E.useCallback(()=>{l(null),f(!1)},[f]),h=E.useCallback((p,v)=>{const y=p.currentTarget,S={x:p.clientX,y:p.clientY},w=pd(S,y.getBoundingClientRect()),D=md(S,w),C=vd(v.getBoundingClientRect()),x=bd([...D,...C]);l(x),f(!0)},[f]);return E.useEffect(()=>()=>u(),[u]),E.useEffect(()=>{if(a&&c){const p=y=>h(y,c),v=y=>h(y,a);return a.addEventListener("pointerleave",p),c.addEventListener("pointerleave",v),()=>{a.removeEventListener("pointerleave",p),c.removeEventListener("pointerleave",v)}}},[a,c,h,u]),E.useEffect(()=>{if(o){const p=v=>{const y=v.target,S={x:v.clientX,y:v.clientY},w=(a==null?void 0:a.contains(y))||(c==null?void 0:c.contains(y)),D=!yd(S,o);w?u():D&&(u(),d())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[a,c,o,d,u]),m.jsx(ao,{...t,ref:s})}),[fd,hd]=an(dn,{isInside:!1}),ao=E.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...l}=t,a=un(Ze,n),d=cn(n),{onClose:c}=a;return E.useEffect(()=>(document.addEventListener(Yn,c),()=>document.removeEventListener(Yn,c)),[c]),E.useEffect(()=>{if(a.trigger){const f=u=>{const h=u.target;h!=null&&h.contains(a.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[a.trigger,c]),m.jsx(cs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:m.jsxs(ps,{"data-state":a.stateAttribute,...d,...l,ref:e,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(fa,{children:r}),m.jsx(fd,{scope:n,isInside:!0,children:m.jsx(ha,{id:a.contentId,role:"tooltip",children:i||r})})]})})});lo.displayName=Ze;var co="TooltipArrow",gd=E.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=cn(n);return hd(co,n).isInside?null:m.jsx(ms,{...i,...r,ref:e})});gd.displayName=co;function pd(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function md(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function vd(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function yd(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const l=e[s].x,a=e[s].y,d=e[o].x,c=e[o].y;a>r!=c>r&&n<(d-l)*(r-a)/(c-a)+l&&(i=!i)}return i}function bd(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Ed(e)}function Ed(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var Sd=io,wd=so,Cd=oo,Ad=lo;const Dd=({categories:t,activeSlugs:e,onToggle:n,onClear:r,onSelectAll:i})=>{const s=e.length>0&&e.length<t.length;return m.jsxs(ed,{children:[m.jsx(td,{asChild:!0,children:m.jsx("button",{className:`inline-flex items-center gap-2 rounded border px-3 py-1 text-sm hover:bg-gray-50 ${s?"border-blue-500 bg-blue-50 text-blue-700":"bg-white"}`,children:m.jsx(Sd,{children:m.jsxs(wd,{children:[m.jsx(Cd,{asChild:!0,children:m.jsx("div",{className:"flex items-center gap-2",children:s?m.jsx("button",{type:"button",onClick:o=>{o.stopPropagation(),r==null||r()},className:"rounded p-0.5 hover:bg-red-50",title:"Hapus filter",children:m.jsx(si,{className:"w-4 h-4 text-red-600"})}):m.jsx(Da,{className:"w-4 h-4"})})}),m.jsx(Ad,{sideOffset:4,className:"rounded bg-black text-white text-xs px-2 py-1",children:s?"Hapus filter":"Semua kategori ditampilkan"})]})})})}),m.jsx(nd,{children:m.jsxs(rd,{sideOffset:6,className:"min-w-[220px] rounded border bg-white p-2 shadow-md z-50",children:[m.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[m.jsx("button",{onClick:()=>i==null?void 0:i(),className:"text-xs rounded border px-2 py-0.5 hover:bg-gray-50",title:"Pilih semua kategori",children:"Pilih semua"}),m.jsx("button",{onClick:()=>r==null?void 0:r(),className:"text-xs rounded border px-2 py-0.5 hover:bg-gray-50",title:"Kosongkan filter (tampilkan semua)",children:"Kosongkan"})]}),m.jsx("div",{className:"max-h-60 overflow-auto",children:t.map(o=>{const l=e.includes(o.slug);return m.jsxs(id,{checked:l,onCheckedChange:()=>n(o.slug),className:"flex justify-between cursor-pointer select-none items-center gap-2 rounded px-2 py-1 text-sm outline-none data-[highlighted]:bg-gray-100",children:[m.jsxs("div",{title:o.name,className:"flex gap-2 items-center",children:[m.jsx("span",{className:"inline-block h-2 w-2 rounded-full",style:{backgroundColor:o.color}}),o.name]}),m.jsx(sd,{children:m.jsx(ga,{className:"inline-block w-5 h-5 text-green-600"})})]},o.id)})}),m.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[m.jsx("span",{className:"text-xs text-gray-500",title:t.filter(o=>e.includes(o.slug)).map(o=>o.name).join(", "),children:e.length===0?"Tidak ada Filter":`Dipilih: ${e.length}`}),m.jsxs("button",{onClick:()=>r==null?void 0:r(),className:"text-xs text-red-600 hover:underline inline-flex items-center gap-1",title:"Hapus filter",children:[m.jsx(si,{className:"w-3 h-3"})," Clear"]})]})]})})]})},xd=({title:t,isMobile:e,onToday:n,onPrev:r,onNext:i,onViewMonth:s,onViewListDay:o,isListDay:l,categories:a,activeSlugs:d,onToggleCategory:c,onClearCategories:f,onSelectAllCategories:u})=>m.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-2 py-2 overflow-x-auto",children:[m.jsxs("div",{className:"flex items-center gap-2 ",children:[m.jsx("button",{onClick:n,className:"rounded border px-3 py-1 text-xs md:text-sm hover:bg-gray-50",children:"Today"}),m.jsx("button",{onClick:s,className:"rounded border px-2 py-1 text-xs md:text-sm hover:bg-gray-50 bg-white","aria-pressed":!l,children:m.jsx(ys,{className:vs("w-4 h-4",l?"text-gray-500":"text-blue-500")})})]}),!e&&m.jsxs("div",{className:"flex items-center gap-2 justify-center",children:[m.jsx("button",{onClick:r,className:"rounded border px-2 py-1 text-xs md:text-sm hover:bg-gray-50","aria-label":"Previous",children:m.jsx("span",{className:"w-4 h-4",children:"‹"})}),m.jsx("div",{className:"text-sm md:text-lg font-semibold flex-1 text-center truncate",children:t}),m.jsx("button",{onClick:i,className:"rounded border px-2 py-1 text-xs md:text-sm hover:bg-gray-50","aria-label":"Next",children:m.jsx("span",{className:"w-4 h-4",children:"›"})})]}),m.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[m.jsx("button",{onClick:o,className:`rounded border px-3 py-1 text-xs md:text-sm bg-white hover:bg-gray-50 ${l&&"text-blue-500"}`,"aria-pressed":l,children:"Acara"}),m.jsx(Dd,{categories:a,activeSlugs:d,onToggle:c,onClear:f,onSelectAll:u})]})]});W.locale("id");const Rd=t=>{if(!(t!=null&&t.start))return"-";try{const e=W(t.start),n=t.end?W(t.end):null,i=e.format("dddd, DD MMMM YYYY");if(t.allDay)if(n&&!e.isSame(n,"day")){const o=n.subtract(1,"day").format("dddd, DD MMMM YYYY");return`${i} - ${o} (seharian)`}else return`${i} (seharian)`;else{const s=e.format("HH.mm");if(n){const o=n.format("HH.mm");if(e.isSame(n,"day"))return`${i}
pukul ${s} - ${o}`;{const l=n.format("DD MMMM YYYY"),a=n.format("HH.mm");return`${i} pukul ${s} - ${l} pukul ${a}`}}else return`${i}
pukul ${s}`}}catch(e){return console.error("Error formatting event date/time:",e),"Format tanggal tidak valid"}},_d=({open:t,onOpenChange:e,event:n})=>{var o,l,a,d,c,f,u,h,p;const r=!!((o=n==null?void 0:n.extendedProps)!=null&&o.isImportant),i=((a=(l=n==null?void 0:n.extendedProps)==null?void 0:l.category)==null?void 0:a.color)??"#e5e7eb",s=((c=(d=n==null?void 0:n.extendedProps)==null?void 0:d.category)==null?void 0:c.name)??((f=n==null?void 0:n.extendedProps)!=null&&f.isHoliday?"Libur Nasional":null);return m.jsx(pa,{size:"md",title:s,header:!!s,isOpen:t,onClose:()=>e(!1),className:"px-4",footer:m.jsx("button",{onClick:()=>e(!1),className:"px-4 py-2 text-sm font-medium rounded-md bg-red-600 text-white hover:bg-red-700",children:"Kembali"}),children:m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[m.jsx("span",{className:"inline-block h-3 w-3 rounded-full",style:{backgroundColor:i}}),m.jsx("span",{className:"text-gray-600",children:n==null?void 0:n.title}),r&&m.jsxs("span",{className:"ml-auto inline-flex items-center gap-1 rounded bg-yellow-100 text-yellow-700 px-2 py-0.5 text-xs",children:[m.jsx(rn,{size:14})," Penting"]})]}),m.jsxs("div",{className:"grid grid-cols-1 gap-3 text-sm",children:[m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx(ys,{className:"mt-0.5 h-4 w-4 text-gray-500"}),m.jsxs("div",{children:[m.jsx("div",{className:"font-medium",children:"Waktu"}),m.jsx("div",{className:"text-gray-700 whitespace-pre-line",children:Rd(n)})]})]}),((u=n==null?void 0:n.extendedProps)==null?void 0:u.location)&&m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx(Ra,{className:"mt-0.5 h-4 w-4 text-gray-500"}),m.jsxs("div",{children:[m.jsx("div",{className:"font-medium",children:"Lokasi"}),m.jsx("div",{className:"text-gray-700",children:n.extendedProps.location})]})]}),m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx(Ma,{className:"mt-0.5 h-4 w-4 text-gray-500"}),m.jsxs("div",{children:[m.jsx("div",{className:"font-medium",children:"Status"}),m.jsx("div",{className:"text-gray-700",children:((h=n==null?void 0:n.extendedProps)==null?void 0:h.status)==="wajib"?"Wajib":"Opsional"})]})]})]}),((p=n==null?void 0:n.extendedProps)==null?void 0:p.description)&&m.jsx("div",{className:"rounded-md bg-gray-50 p-3 text-sm text-gray-700 whitespace-pre-wrap",children:n.extendedProps.description})]})})};W.locale("id");const Td=()=>typeof route<"u"?route:typeof window<"u"&&window.route?window.route:null,Md=({nouid:t,initialEvents:e,initialFilters:n})=>{const[r,i]=E.useState(""),[s,o]=E.useState(e),[l]=E.useState(n.search??""),[a,d]=E.useState(n.categories??[]),[c,f]=E.useState({dates:new Set,names:new Map}),u=E.useRef(null),h=E.useRef(null),p=E.useRef(!1),v=E.useMemo(()=>(Array.isArray(s)?s:[]).filter(x=>{var A;const R=a!=null&&a.length?a.includes(((A=x.extendedProps.category)==null?void 0:A.slug)??""):!0,I=l?[x.title,x.extendedProps.description,x.extendedProps.location].filter(Boolean).some(F=>(F??"").toLowerCase().includes(l.toLowerCase())):!0;return R&&I}),[s,a,l]),y=E.useMemo(()=>{const C=new Set;return v.forEach(x=>{var R;(R=x.extendedProps)!=null&&R.isImportant&&x.start&&C.add(W(x.start).format("YYYY-MM-DD"))}),C},[v]),S=E.useCallback((C,x,R,I)=>{const A=R.length?[...R].sort():[],F=A.length?A.join(","):"ALL",z=I||"",G=u.current;if(G&&G.start===C&&G.end===x&&G.catsKey===F&&G.search===z)return;u.current={start:C,end:x,catsKey:F,search:z};const k=Td();if(!k){console.warn("Route function not available");return}if(typeof An>"u"||!An.get){console.warn("Router not available");return}try{const M={preserveScroll:!0,preserveState:!0,replace:!0},Y=k("calendar.index",{nouid:t});if(!Y||typeof Y!="string"){console.warn("Invalid URL generated:",Y);return}An.get(Y,{start:C,end:x,search:I,categories:A},M)}catch(M){console.warn("Failed to fetch calendar data:",M)}},[t]),w=async(C,x)=>{try{const R=W(C).year(),I=W(x).year(),A=Array.from(new Set([R,I])),z=(await Promise.all(A.map(async M=>{const Y=await fetch(`https://api-harilibur.vercel.app/api?year=${M}`);return Y.ok?await Y.json():[]}))).flat(),G=new Set,k=new Map;z.forEach(M=>{if(!((M==null?void 0:M.is_national_holiday)??(M==null?void 0:M.isNationalHoliday)??!0))return;const We=(M==null?void 0:M.holiday_date)||(M==null?void 0:M.tanggal)||(M==null?void 0:M.date)||(M==null?void 0:M.iso),ne=(M==null?void 0:M.holiday_name)||(M==null?void 0:M.keterangan)||(M==null?void 0:M.name)||(M==null?void 0:M.summary)||"Libur Nasional",nt=We?W(We):null;if(nt&&nt.isValid()){const oe=nt.format("YYYY-MM-DD");G.add(oe),k.has(oe)||k.set(oe,ne)}}),f({dates:G,names:k})}catch{}},D=C=>{var A;if(!C)return;const x=(A=C.view)==null?void 0:A.title;if(x&&i(x),!C.start||!C.end||!t)return;const R=W(C.start).format("YYYY-MM-DD"),I=W(C.end).format("YYYY-MM-DD");if(h.current={start:R,end:I},w(R,I),!p.current){p.current=!0;return}setTimeout(()=>{S(R,I,a,l)},200)};return E.useEffect(()=>{o(e)},[e]),E.useEffect(()=>{if(!t||!h.current)return;const C=setTimeout(()=>{h.current&&S(h.current.start,h.current.end,a,l)},200);return()=>clearTimeout(C)},[a,l,S,t]),{title:r,filteredEvents:v,holidayData:c,importantDates:y,activeCats:a,search:l,setActiveCats:d,handleDatesSet:D,rangeRef:h}};W.locale("id");const Id=t=>{try{return Array.isArray(t)?t.filter(e=>!e||typeof e!="object"?(console.warn("mapEventsToFullCalendar: invalid event object",e),!1):e.start!==null&&e.start!==void 0).map(e=>{var n,r;try{const i=((r=(n=e.extendedProps)==null?void 0:n.category)==null?void 0:r.color)??"#d1d5db";let s=e.end;if(e.allDay&&e.end){const l=W(e.end);l.isValid()&&(s=l.add(1,"day").format("YYYY-MM-DD"))}return{id:String(e.id||""),title:e.title||"",start:e.start,end:s??void 0,allDay:!!e.allDay,display:"block",backgroundColor:i,borderColor:i,extendedProps:e.extendedProps||{}}}catch(i){return console.error("Error processing event:",e,i),null}}).filter(e=>e!==null):(console.warn("mapEventsToFullCalendar: events is not an array",t),[])}catch(e){return console.error("Error in mapEventsToFullCalendar:",e),[]}},kd=(t,e,n)=>{try{if(!e||!n)return[];const r=W(e),i=W(n);return!r.isValid()||!i.isValid()?(console.warn("Invalid date range:",{rangeStart:e,rangeEnd:n}),[]):Array.from(t.entries()).filter(([s])=>{const o=W(s);return o.isValid()&&(o.isSame(r)||o.isAfter(r))&&o.isBefore(i)}).map(([s,o])=>({id:`holiday-${s}`,title:o||"Libur Nasional",start:s,allDay:!0,display:"block",backgroundColor:"#fee2e2",borderColor:"#fecaca",textColor:"#991b1b",extendedProps:{isHoliday:!0,holidayName:o}}))}catch(r){return console.error("Error in mapHolidaysToFullCalendar:",r),[]}},Nd=(t,e)=>{try{if(!t||!(t instanceof Date))return console.warn("getDayCellClassNames: invalid date",t),[];const n=W(t).format("YYYY-MM-DD"),r=[];return e.has(n)&&r.push("fc-holiday-day"),W(t).day()===0&&r.push("fc-sunday-day"),r}catch(n){return console.error("Error in getDayCellClassNames:",n),[]}},Od=t=>{var e;try{const n=[];t!=null&&t.isImportant&&n.push("is-important"),t!=null&&t.isHoliday&&n.push("is-holiday");const r=(e=t==null?void 0:t.category)==null?void 0:e.slug;return r&&n.push(`cat-${r}`),n}catch(n){return console.error("Error in getEventClassNames:",n),[]}};var fn,T,uo,fo,Ke,ke,li,ho,go,Ut={},po=[],Pd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Ee(t,e){for(var n in e)t[n]=e[n];return t}function mo(t){var e=t.parentNode;e&&e.removeChild(t)}function g(t,e,n){var r,i,s,o={};for(s in e)s=="key"?r=e[s]:s=="ref"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?fn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)o[s]===void 0&&(o[s]=t.defaultProps[s]);return kt(t,o,r,i,null)}function kt(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++uo};return i==null&&T.vnode!=null&&T.vnode(s),s}function Q(){return{current:null}}function j(t){return t.children}function Hd(t,e,n,r,i){var s;for(s in n)s==="children"||s==="key"||s in e||zt(t,s,null,n[s],r);for(s in e)i&&typeof e[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||n[s]===e[s]||zt(t,s,e[s],n[s],r)}function ai(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Pd.test(e)?n:n+"px"}function zt(t,e,n,r,i){var s;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ai(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||ai(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r||t.addEventListener(e,s?di:ci,s):t.removeEventListener(e,s?di:ci,s);else if(e!=="dangerouslySetInnerHTML"){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e.indexOf("-")==-1?t.removeAttribute(e):t.setAttribute(e,n))}}function ci(t){Ke=!0;try{return this.l[t.type+!1](T.event?T.event(t):t)}finally{Ke=!1}}function di(t){Ke=!0;try{return this.l[t.type+!0](T.event?T.event(t):t)}finally{Ke=!1}}function X(t,e){this.props=t,this.context=e}function ht(t,e){if(e==null)return t.__?ht(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?ht(t):null}function vo(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return vo(t)}}function jd(t){Ke?setTimeout(t):ho(t)}function $n(t){(!t.__d&&(t.__d=!0)&&ke.push(t)&&!Wt.__r++||li!==T.debounceRendering)&&((li=T.debounceRendering)||jd)(Wt)}function Wt(){var t,e,n,r,i,s,o,l;for(ke.sort(function(a,d){return a.__v.__b-d.__v.__b});t=ke.shift();)t.__d&&(e=ke.length,r=void 0,i=void 0,o=(s=(n=t).__v).__e,(l=n.__P)&&(r=[],(i=Ee({},s)).__v=s.__v+1,Sr(l,s,i,n.__n,l.ownerSVGElement!==void 0,s.__h!=null?[o]:null,r,o??ht(s),s.__h),wo(r,s),s.__e!=o&&vo(s)),ke.length>e&&ke.sort(function(a,d){return a.__v.__b-d.__v.__b}));Wt.__r=0}function yo(t,e,n,r,i,s,o,l,a,d){var c,f,u,h,p,v,y,S=r&&r.__k||po,w=S.length;for(n.__k=[],c=0;c<e.length;c++)if((h=n.__k[c]=(h=e[c])==null||typeof h=="boolean"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"?kt(null,h,null,null,h):Array.isArray(h)?kt(j,{children:h},null,null,null):h.__b>0?kt(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null){if(h.__=n,h.__b=n.__b+1,(u=S[c])===null||u&&h.key==u.key&&h.type===u.type)S[c]=void 0;else for(f=0;f<w;f++){if((u=S[f])&&h.key==u.key&&h.type===u.type){S[f]=void 0;break}u=null}Sr(t,h,u=u||Ut,i,s,o,l,a,d),p=h.__e,(f=h.ref)&&u.ref!=f&&(y||(y=[]),u.ref&&y.push(u.ref,null,h),y.push(f,h.__c||p,h)),p!=null?(v==null&&(v=p),typeof h.type=="function"&&h.__k===u.__k?h.__d=a=bo(h,a,t):a=Eo(t,h,u,S,p,a),typeof n.type=="function"&&(n.__d=a)):a&&u.__e==a&&a.parentNode!=t&&(a=ht(u))}for(n.__e=v,c=w;c--;)S[c]!=null&&(typeof n.type=="function"&&S[c].__e!=null&&S[c].__e==n.__d&&(n.__d=So(r).nextSibling),Ao(S[c],S[c]));if(y)for(c=0;c<y.length;c++)Co(y[c],y[++c],y[++c])}function bo(t,e,n){for(var r,i=t.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=t,e=typeof r.type=="function"?bo(r,e,n):Eo(n,r,r,i,r.__e,e));return e}function Vt(t,e){return e=e||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(n){Vt(n,e)}):e.push(t)),e}function Eo(t,e,n,r,i,s){var o,l,a;if(e.__d!==void 0)o=e.__d,e.__d=void 0;else if(n==null||i!=s||i.parentNode==null)e:if(s==null||s.parentNode!==t)t.appendChild(i),o=null;else{for(l=s,a=0;(l=l.nextSibling)&&a<r.length;a+=1)if(l==i)break e;t.insertBefore(i,s),o=s}return o!==void 0?o:i.nextSibling}function So(t){var e,n,r;if(t.type==null||typeof t.type=="string")return t.__e;if(t.__k){for(e=t.__k.length-1;e>=0;e--)if((n=t.__k[e])&&(r=So(n)))return r}return null}function Sr(t,e,n,r,i,s,o,l,a){var d,c,f,u,h,p,v,y,S,w,D,C,x,R,I,A=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(a=n.__h,l=e.__e=n.__e,e.__h=null,s=[l]),(d=T.__b)&&d(e);try{e:if(typeof A=="function"){if(y=e.props,S=(d=A.contextType)&&r[d.__c],w=d?S?S.props.value:d.__:r,n.__c?v=(c=e.__c=n.__c).__=c.__E:("prototype"in A&&A.prototype.render?e.__c=c=new A(y,w):(e.__c=c=new X(y,w),c.constructor=A,c.render=Bd),S&&S.sub(c),c.props=y,c.state||(c.state={}),c.context=w,c.__n=r,f=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),A.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ee({},c.__s)),Ee(c.__s,A.getDerivedStateFromProps(y,c.__s))),u=c.props,h=c.state,c.__v=e,f)A.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(A.getDerivedStateFromProps==null&&y!==u&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(y,w),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(y,c.__s,w)===!1||e.__v===n.__v){for(e.__v!==n.__v&&(c.props=y,c.state=c.__s,c.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(F){F&&(F.__=e)}),D=0;D<c._sb.length;D++)c.__h.push(c._sb[D]);c._sb=[],c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(y,c.__s,w),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(u,h,p)})}if(c.context=w,c.props=y,c.__P=t,C=T.__r,x=0,"prototype"in A&&A.prototype.render){for(c.state=c.__s,c.__d=!1,C&&C(e),d=c.render(c.props,c.state,c.context),R=0;R<c._sb.length;R++)c.__h.push(c._sb[R]);c._sb=[]}else do c.__d=!1,C&&C(e),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++x<25);c.state=c.__s,c.getChildContext!=null&&(r=Ee(Ee({},r),c.getChildContext())),f||c.getSnapshotBeforeUpdate==null||(p=c.getSnapshotBeforeUpdate(u,h)),I=d!=null&&d.type===j&&d.key==null?d.props.children:d,yo(t,Array.isArray(I)?I:[I],e,n,r,i,s,o,l,a),c.base=e.__e,e.__h=null,c.__h.length&&o.push(c),v&&(c.__E=c.__=null),c.__e=!1}else s==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Ld(n.__e,e,n,r,i,s,o,a);(d=T.diffed)&&d(e)}catch(F){e.__v=null,(a||s!=null)&&(e.__e=l,e.__h=!!a,s[s.indexOf(l)]=null),T.__e(F,e,n)}}function wo(t,e){T.__c&&T.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(r){r.call(n)})}catch(r){T.__e(r,n.__v)}})}function Ld(t,e,n,r,i,s,o,l){var a,d,c,f=n.props,u=e.props,h=e.type,p=0;if(h==="svg"&&(i=!0),s!=null){for(;p<s.length;p++)if((a=s[p])&&"setAttribute"in a==!!h&&(h?a.localName===h:a.nodeType===3)){t=a,s[p]=null;break}}if(t==null){if(h===null)return document.createTextNode(u);t=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,u.is&&u),s=null,l=!1}if(h===null)f===u||l&&t.data===u||(t.data=u);else{if(s=s&&fn.call(t.childNodes),d=(f=n.props||Ut).dangerouslySetInnerHTML,c=u.dangerouslySetInnerHTML,!l){if(s!=null)for(f={},p=0;p<t.attributes.length;p++)f[t.attributes[p].name]=t.attributes[p].value;(c||d)&&(c&&(d&&c.__html==d.__html||c.__html===t.innerHTML)||(t.innerHTML=c&&c.__html||""))}if(Hd(t,u,f,i,l),c)e.__k=[];else if(p=e.props.children,yo(t,Array.isArray(p)?p:[p],e,n,r,i&&h!=="foreignObject",s,o,s?s[0]:n.__k&&ht(n,0),l),s!=null)for(p=s.length;p--;)s[p]!=null&&mo(s[p]);l||("value"in u&&(p=u.value)!==void 0&&(p!==t.value||h==="progress"&&!p||h==="option"&&p!==f.value)&&zt(t,"value",p,f.value,!1),"checked"in u&&(p=u.checked)!==void 0&&p!==t.checked&&zt(t,"checked",p,f.checked,!1))}return t}function Co(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(r){T.__e(r,n)}}function Ao(t,e,n){var r,i;if(T.unmount&&T.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Co(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){T.__e(s,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Ao(r[i],e,n||typeof t.type!="function");n||t.__e==null||mo(t.__e),t.__=t.__e=t.__d=void 0}function Bd(t,e,n){return this.constructor(t,n)}function gt(t,e,n){var r,i,s;T.__&&T.__(t,e),i=(r=!1)?null:e.__k,s=[],Sr(e,t=e.__k=g(j,null,[t]),i||Ut,Ut,e.ownerSVGElement!==void 0,i?null:e.firstChild?fn.call(e.childNodes):null,s,i?i.__e:e.firstChild,r),wo(s,t)}function Fd(t,e){var n={__c:e="__cC"+go++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=[],(s={})[e]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(l){l.__e=!0,$n(l)})},this.sub=function(o){i.push(o);var l=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),l&&l.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}fn=po.slice,T={__e:function(t,e,n,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),o=i.__d),o)return i.__E=i}catch(l){t=l}throw t}},uo=0,fo=function(t){return t!=null&&t.constructor===void 0},Ke=!1,X.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ee({},this.state),typeof t=="function"&&(t=t(Ee({},n),this.props)),t&&Ee(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),$n(this))},X.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),$n(this))},X.prototype.render=j,ke=[],ho=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wt.__r=0,go=0;var ce,xn,ui,Do=[],Rn=[],fi=T.__b,hi=T.__r,gi=T.diffed,pi=T.__c,mi=T.unmount;function Ud(){for(var t;t=Do.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Nt),t.__H.__h.forEach(Qn),t.__H.__h=[]}catch(e){t.__H.__h=[],T.__e(e,t.__v)}}T.__b=function(t){ce=null,fi&&fi(t)},T.__r=function(t){hi&&hi(t);var e=(ce=t.__c).__H;e&&(xn===ce?(e.__h=[],ce.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Rn,n.__N=n.i=void 0})):(e.__h.forEach(Nt),e.__h.forEach(Qn),e.__h=[])),xn=ce},T.diffed=function(t){gi&&gi(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Do.push(e)!==1&&ui===T.requestAnimationFrame||((ui=T.requestAnimationFrame)||zd)(Ud)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Rn&&(n.__=n.__V),n.i=void 0,n.__V=Rn})),xn=ce=null},T.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Nt),n.__h=n.__h.filter(function(r){return!r.__||Qn(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],T.__e(r,n.__v)}}),pi&&pi(t,e)},T.unmount=function(t){mi&&mi(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Nt(r)}catch(i){e=i}}),n.__H=void 0,e&&T.__e(e,n.__v))};var vi=typeof requestAnimationFrame=="function";function zd(t){var e,n=function(){clearTimeout(r),vi&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);vi&&(e=requestAnimationFrame(n))}function Nt(t){var e=ce,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),ce=e}function Qn(t){var e=ce;t.__c=t.__(),ce=e}function Wd(t,e){for(var n in e)t[n]=e[n];return t}function yi(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function bi(t){this.props=t}(bi.prototype=new X).isPureReactComponent=!0,bi.prototype.shouldComponentUpdate=function(t,e){return yi(this.props,t)||yi(this.state,e)};var Ei=T.__b;T.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Ei&&Ei(t)};var Vd=T.__e;T.__e=function(t,e,n,r){if(t.then){for(var i,s=e;s=s.__;)if((i=s.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}Vd(t,e,n,r)};var Si=T.unmount;function xo(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=Wd({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return xo(r,e,n)})),t}function Ro(t,e,n){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Ro(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function _n(){this.__u=0,this.t=null,this.__b=null}function _o(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function At(){this.u=null,this.o=null}T.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Si&&Si(t)},(_n.prototype=new X).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=_o(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(l):l())};n.__R=o;var l=function(){if(!--r.__u){if(r.state.__a){var d=r.state.__a;r.__v.__k[0]=Ro(d,d.__c.__P,d.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}},a=e.__h===!0;r.__u++||a||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(o,o)},_n.prototype.componentWillUnmount=function(){this.t=[]},_n.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=xo(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&g(j,null,t.fallback);return i&&(i.__h=null),[g(j,null,e.__a?null:t.children),i]};var wi=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function Gd(t){return this.getChildContext=function(){return t.context},t.children}function Yd(t){var e=this,n=t.i;e.componentWillUnmount=function(){gt(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),e.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.i.removeChild(r)}}),gt(g(Gd,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function qd(t,e){var n=g(Yd,{__v:t,i:e});return n.containerInfo=e,n}(At.prototype=new X).__a=function(t){var e=this,n=_o(e.__v),r=e.o.get(t);return r[0]++,function(i){var s=function(){e.props.revealOrder?(r.push(i),wi(e,t,r)):i()};n?n(s):s()}},At.prototype.render=function(t){this.u=null,this.o=new Map;var e=Vt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},At.prototype.componentDidUpdate=At.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){wi(t,n,e)})};var $d=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Qd=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Zd=typeof document<"u",Kd=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};X.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(X.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ci=T.event;function Xd(){}function Jd(){return this.cancelBubble}function eu(){return this.defaultPrevented}T.event=function(t){return Ci&&(t=Ci(t)),t.persist=Xd,t.isPropagationStopped=Jd,t.isDefaultPrevented=eu,t.nativeEvent=t};var Ai={configurable:!0,get:function(){return this.class}},Di=T.vnode;T.vnode=function(t){var e=t.type,n=t.props,r=n;if(typeof e=="string"){var i=e.indexOf("-")===-1;for(var s in r={},n){var o=n[s];Zd&&s==="children"&&e==="noscript"||s==="value"&&"defaultValue"in n&&o==null||(s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&o===!0?o="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+e)&&!Kd(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&Qd.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=o)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Vt(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=Vt(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),t.props=r,n.class!=n.className&&(Ai.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",Ai))}t.$$typeof=$d,Di&&Di(t)};var xi=T.__r;T.__r=function(t){xi&&xi(t),t.__c};const To=[],Zn=new Map;function hn(t){To.push(t),Zn.forEach(e=>{Io(e,t)})}function tu(t){t.isConnected&&t.getRootNode&&Mo(t.getRootNode())}function Mo(t){let e=Zn.get(t);if(!e||!e.isConnected){if(e=t.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");const n=ru();n&&(e.nonce=n);const r=t===document?document.head:t,i=t===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(e,i)}Zn.set(t,e),nu(e)}}function nu(t){for(const e of To)Io(t,e)}function Io(t,e){const{sheet:n}=t,r=n.cssRules.length;e.split("}").forEach((i,s)=>{i=i.trim(),i&&n.insertRule(i+"}",r+s)})}let Tn;function ru(){return Tn===void 0&&(Tn=iu()),Tn}function iu(){const t=document.querySelector('meta[name="csp-nonce"]');if(t&&t.hasAttribute("content"))return t.getAttribute("content");const e=document.querySelector("script[nonce]");return e&&e.nonce||""}typeof document<"u"&&Mo(document);var su=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';hn(su);class wr{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:n}=this;n[e]=(n[e]||0)+1,this.clearTimeout()}resume(e="",n){let{pauseDepths:r}=this;e in r&&(n?delete r[e]:(r[e]-=1,r[e]<=0&&delete r[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Cr(t){t.parentNode&&t.parentNode.removeChild(t)}function q(t,e){if(t.closest)return t.closest(e);if(!document.documentElement.contains(t))return null;do{if(ou(t,e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}function ou(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector).call(t,e)}function lu(t,e){let n=t instanceof HTMLElement?[t]:t,r=[];for(let i=0;i<n.length;i+=1){let s=n[i].querySelectorAll(e);for(let o=0;o<s.length;o+=1)r.push(s[o])}return r}const au=/(top|left|right|bottom|width|height)$/i;function ot(t,e){for(let n in e)ko(t,n,e[n])}function ko(t,e,n){n==null?t.style[e]="":typeof n=="number"&&au.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function No(t){var e,n;return(n=(e=t.composedPath)===null||e===void 0?void 0:e.call(t)[0])!==null&&n!==void 0?n:t.target}let Ri=0;function Ce(){return Ri+=1,"fc-dom-"+Ri}function gn(t){t.preventDefault()}function cu(t,e){return n=>{let r=q(n.target,t);r&&e.call(r,n,r)}}function Oo(t,e,n,r){let i=cu(n,r);return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}}function du(t,e,n,r){let i;return Oo(t,"mouseover",e,(s,o)=>{if(o!==i){i=o,n(s,o);let l=a=>{i=null,r(a,o),o.removeEventListener("mouseleave",l)};o.addEventListener("mouseleave",l)}})}const _i=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function uu(t,e){let n=r=>{e(r),_i.forEach(i=>{t.removeEventListener(i,n)})};_i.forEach(r=>{t.addEventListener(r,n)})}function Po(t){return Object.assign({onClick:t},Ho(t))}function Ho(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let Ti=0;function Fe(){return Ti+=1,String(Ti)}function Ar(){document.body.classList.add("fc-not-allowed")}function Dr(){document.body.classList.remove("fc-not-allowed")}function fu(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",gn)}function hu(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",gn)}function gu(t){t.addEventListener("contextmenu",gn)}function pu(t){t.removeEventListener("contextmenu",gn)}function mu(t){let e=[],n=[],r,i;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),r=0;r<n.length;r+=1)i=n[r],typeof i=="string"?e.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&e.push({func:i});return e}function vu(t,e,n){let r,i;for(r=0;r<n.length;r+=1)if(i=yu(t,e,n[r]),i)return i;return 0}function yu(t,e,n){return n.func?n.func(t,e):bu(t[n.field],e[n.field])*(n.order||1)}function bu(t,e){return!t&&!e?0:e==null?-1:t==null?1:typeof t=="string"||typeof e=="string"?String(t).localeCompare(String(e)):t-e}function qe(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}function lt(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((r,i,s)=>r.replace("$"+s,i||""),t):n}function Eu(t,e){return t-e}function Ot(t){return t%1===0}function Su(t){let e=t.querySelector(".fc-scrollgrid-shrink-frame"),n=t.querySelector(".fc-scrollgrid-shrink-cushion");if(!e)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return t.getBoundingClientRect().width-e.getBoundingClientRect().width+n.getBoundingClientRect().width}const Mi=["years","months","days","milliseconds"],wu=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function P(t,e){return typeof t=="string"?Cu(t):typeof t=="object"&&t?Ii(t):typeof t=="number"?Ii({[e||"milliseconds"]:t}):null}function Cu(t){let e=wu.exec(t);if(e){let n=e[1]?-1:1;return{years:0,months:0,days:n*(e[2]?parseInt(e[2],10):0),milliseconds:n*((e[3]?parseInt(e[3],10):0)*60*60*1e3+(e[4]?parseInt(e[4],10):0)*60*1e3+(e[5]?parseInt(e[5],10):0)*1e3+(e[6]?parseInt(e[6],10):0))}}return null}function Ii(t){let e={years:t.years||t.year||0,months:t.months||t.month||0,days:t.days||t.day||0,milliseconds:(t.hours||t.hour||0)*60*60*1e3+(t.minutes||t.minute||0)*60*1e3+(t.seconds||t.second||0)*1e3+(t.milliseconds||t.millisecond||t.ms||0)},n=t.weeks||t.week;return n&&(e.days+=n*7,e.specifiedWeeks=!0),e}function Au(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function Kn(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function Du(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function xu(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function Ru(t){return $e(t)/365}function _u(t){return $e(t)/30}function $e(t){return re(t)/864e5}function re(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function xr(t,e){let n=null;for(let r=0;r<Mi.length;r+=1){let i=Mi[r];if(e[i]){let s=t[i]/e[i];if(!Ot(s)||n!==null&&n!==s)return null;n=s}else if(t[i])return null}return n}function Xn(t){let e=t.milliseconds;if(e){if(e%1e3!==0)return{unit:"millisecond",value:e};if(e%(1e3*60)!==0)return{unit:"second",value:e/1e3};if(e%(1e3*60*60)!==0)return{unit:"minute",value:e/(1e3*60)};if(e)return{unit:"hour",value:e/(1e3*60*60)}}return t.days?t.specifiedWeeks&&t.days%7===0?{unit:"week",value:t.days/7}:{unit:"day",value:t.days}:t.months?{unit:"month",value:t.months}:t.years?{unit:"year",value:t.years}:{unit:"millisecond",value:0}}function Ae(t,e,n){if(t===e)return!0;let r=t.length,i;if(r!==e.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(t[i],e[i]):t[i]===e[i]))return!1;return!0}const Tu=["sun","mon","tue","wed","thu","fri","sat"];function ki(t,e){let n=Se(t);return n[2]+=e*7,K(n)}function V(t,e){let n=Se(t);return n[2]+=e,K(n)}function De(t,e){let n=Se(t);return n[6]+=e,K(n)}function Mu(t,e){return _e(t,e)/7}function _e(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function Iu(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function ku(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function Nu(t,e){return(e.valueOf()-t.valueOf())/1e3}function Ou(t,e){let n=L(t),r=L(e);return{years:0,months:0,days:Math.round(_e(n,r)),milliseconds:e.valueOf()-r.valueOf()-(t.valueOf()-n.valueOf())}}function Pu(t,e){let n=Gt(t,e);return n!==null&&n%7===0?n/7:null}function Gt(t,e){return we(t)===we(e)?Math.round(_e(t,e)):null}function L(t){return K([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function Hu(t){return K([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function ju(t){return K([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function Lu(t){return K([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function Bu(t,e,n){let r=t.getUTCFullYear(),i=Mn(t,r,e,n);if(i<1)return Mn(t,r-1,e,n);let s=Mn(t,r+1,e,n);return s>=1?Math.min(i,s):i}function Mn(t,e,n,r){let i=K([e,0,1+Fu(e,n,r)]),s=L(t),o=Math.round(_e(i,s));return Math.floor(o/7)+1}function Fu(t,e,n){let r=7+e-n;return-((7+K([t,0,r]).getUTCDay()-e)%7)+r-1}function Ni(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function Oi(t){return new Date(t[0],t[1]||0,t[2]==null?1:t[2],t[3]||0,t[4]||0,t[5]||0)}function Se(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function K(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function jo(t){return!isNaN(t.valueOf())}function we(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}function Lo(t,e,n=!1){let r=t.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(e==null?r=r.replace("Z",""):e!==0&&(r=r.replace("Z",Rr(e,!0)))),r}function Et(t){return t.toISOString().replace(/T.*$/,"")}function Uu(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function zu(t){return qe(t.getUTCHours(),2)+":"+qe(t.getUTCMinutes(),2)+":"+qe(t.getUTCSeconds(),2)}function Rr(t,e=!1){let n=t<0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),s=Math.round(r%60);return e?`${n+qe(i,2)}:${qe(s,2)}`:`GMT${n}${i}${s?`:${qe(s,2)}`:""}`}function _(t,e,n){let r,i;return function(...s){if(!r)i=t.apply(this,s);else if(!Ae(r,s)){let o=t.apply(this,s);(!e||!e(o,i))&&(i=o)}return r=s,i}}function Pt(t,e,n){let r,i;return s=>(r?ie(r,s)||(i=t.call(this,s)):i=t.call(this,s),r=s,i)}const In={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},Yt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Dt=/\s*([ap])\.?m\.?/i,Wu=/,/g,Vu=/\s+/g,Gu=/\u200e/g,Yu=/UTC|GMT/;class qu{constructor(e){let n={},r={},i=9;for(let s in e)s in In?(r[s]=e[s],In[s]<9&&(i=Math.min(In[s],i))):(n[s]=e[s],s in Yt&&(i=Math.min(Yt[s],i)));this.standardDateProps=n,this.extendedSettings=r,this.smallestUnitNum=i,this.buildFormattingFunc=_(Pi)}format(e,n){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,n)(e)}formatRange(e,n,r,i){let{standardDateProps:s,extendedSettings:o}=this,l=Ju(e.marker,n.marker,r.calendarSystem);if(!l)return this.format(e,r);let a=l;a>1&&(s.year==="numeric"||s.year==="2-digit")&&(s.month==="numeric"||s.month==="2-digit")&&(s.day==="numeric"||s.day==="2-digit")&&(a=1);let d=this.format(e,r),c=this.format(n,r);if(d===c)return d;let f=ef(s,a),u=Pi(f,o,r),h=u(e),p=u(n),v=tf(d,h,c,p),y=o.separator||i||r.defaultSeparator||"";return v?v.before+h+y+p+v.after:d+y+c}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function Pi(t,e,n){let r=Object.keys(t).length;return r===1&&t.timeZoneName==="short"?i=>Rr(i.timeZoneOffset):r===0&&e.week?i=>Xu(n.computeWeekNumber(i.marker),n.weekText,n.weekTextLong,n.locale,e.week):$u(t,e,n)}function $u(t,e,n){t=Object.assign({},t),e=Object.assign({},e),Qu(t,e),t.timeZone="UTC";let r=new Intl.DateTimeFormat(n.locale.codes,t),i;if(e.omitZeroMinute){let s=Object.assign({},t);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return s=>{let{marker:o}=s,l;i&&!o.getUTCMinutes()?l=i:l=r;let a=l.format(o);return Zu(a,s,t,e,n)}}function Qu(t,e){t.timeZoneName&&(t.hour||(t.hour="2-digit"),t.minute||(t.minute="2-digit")),t.timeZoneName==="long"&&(t.timeZoneName="short"),e.omitZeroMinute&&(t.second||t.millisecond)&&delete e.omitZeroMinute}function Zu(t,e,n,r,i){return t=t.replace(Gu,""),n.timeZoneName==="short"&&(t=Ku(t,i.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":Rr(e.timeZoneOffset))),r.omitCommas&&(t=t.replace(Wu,"").trim()),r.omitZeroMinute&&(t=t.replace(":00","")),r.meridiem===!1?t=t.replace(Dt,"").trim():r.meridiem==="narrow"?t=t.replace(Dt,(s,o)=>o.toLocaleLowerCase()):r.meridiem==="short"?t=t.replace(Dt,(s,o)=>`${o.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(t=t.replace(Dt,s=>s.toLocaleLowerCase())),t=t.replace(Vu," "),t=t.trim(),t}function Ku(t,e){let n=!1;return t=t.replace(Yu,()=>(n=!0,e)),n||(t+=` ${e}`),t}function Xu(t,e,n,r,i){let s=[];return i==="long"?s.push(n):(i==="short"||i==="narrow")&&s.push(e),(i==="long"||i==="short")&&s.push(" "),s.push(r.simpleNumberFormat.format(t)),r.options.direction==="rtl"&&s.reverse(),s.join("")}function Ju(t,e,n){return n.getMarkerYear(t)!==n.getMarkerYear(e)?5:n.getMarkerMonth(t)!==n.getMarkerMonth(e)?4:n.getMarkerDay(t)!==n.getMarkerDay(e)?2:we(t)!==we(e)?1:0}function ef(t,e){let n={};for(let r in t)(!(r in Yt)||Yt[r]<=e)&&(n[r]=t[r]);return n}function tf(t,e,n,r){let i=0;for(;i<t.length;){let s=t.indexOf(e,i);if(s===-1)break;let o=t.substr(0,s);i=s+e.length;let l=t.substr(i),a=0;for(;a<n.length;){let d=n.indexOf(r,a);if(d===-1)break;let c=n.substr(0,d);a=d+r.length;let f=n.substr(a);if(o===c&&l===f)return{before:o,after:l}}}return null}function Hi(t,e){let n=e.markerToArray(t.marker);return{marker:t.marker,timeZoneOffset:t.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function qt(t,e,n,r){let i=Hi(t,n.calendarSystem),s=e?Hi(e,n.calendarSystem):null;return{date:i,start:i,end:s,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class nf{constructor(e){this.cmdStr=e}format(e,n,r){return n.cmdFormatter(this.cmdStr,qt(e,null,n,r))}formatRange(e,n,r,i){return r.cmdFormatter(this.cmdStr,qt(e,n,r,i))}}class rf{constructor(e){this.func=e}format(e,n,r){return this.func(qt(e,null,n,r))}formatRange(e,n,r,i){return this.func(qt(e,n,r,i))}}function B(t){return typeof t=="object"&&t?new qu(t):typeof t=="string"?new nf(t):typeof t=="function"?new rf(t):null}const ji={navLinkDayClick:b,navLinkWeekClick:b,duration:P,bootstrapFontAwesome:b,buttonIcons:b,customButtons:b,defaultAllDayEventDuration:P,defaultTimedEventDuration:P,nextDayThreshold:P,scrollTime:P,scrollTimeReset:Boolean,slotMinTime:P,slotMaxTime:P,dayPopoverFormat:B,slotDuration:P,snapDuration:P,headerToolbar:b,footerToolbar:b,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:B,dayHeaderClassNames:b,dayHeaderContent:b,dayHeaderDidMount:b,dayHeaderWillUnmount:b,dayCellClassNames:b,dayCellContent:b,dayCellDidMount:b,dayCellWillUnmount:b,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:b,weekNumbers:Boolean,weekNumberClassNames:b,weekNumberContent:b,weekNumberDidMount:b,weekNumberWillUnmount:b,editable:Boolean,viewClassNames:b,viewDidMount:b,viewWillUnmount:b,nowIndicator:Boolean,nowIndicatorSnap:b,nowIndicatorClassNames:b,nowIndicatorContent:b,nowIndicatorDidMount:b,nowIndicatorWillUnmount:b,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:b,locale:b,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:b,eventOrder:mu,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:b,contentHeight:b,direction:String,weekNumberFormat:B,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:b,initialDate:b,now:b,eventDataTransform:b,stickyHeaderDates:b,stickyFooterScrollbar:b,viewHeight:b,defaultAllDay:Boolean,eventSourceFailure:b,eventSourceSuccess:b,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:b,eventConstraint:b,eventAllow:b,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:b,eventContent:b,eventDidMount:b,eventWillUnmount:b,selectConstraint:b,selectOverlap:b,selectAllow:b,droppable:Boolean,unselectCancel:String,slotLabelFormat:b,slotLaneClassNames:b,slotLaneContent:b,slotLaneDidMount:b,slotLaneWillUnmount:b,slotLabelClassNames:b,slotLabelContent:b,slotLabelDidMount:b,slotLabelWillUnmount:b,dayMaxEvents:b,dayMaxEventRows:b,dayMinWidth:Number,slotLabelInterval:P,allDayText:String,allDayClassNames:b,allDayContent:b,allDayDidMount:b,allDayWillUnmount:b,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:B,rerenderDelay:Number,moreLinkText:b,moreLinkHint:b,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:b,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:P,hiddenDays:b,fixedWeekCount:Boolean,validRange:b,visibleRange:b,titleFormat:b,eventInteractive:Boolean,noEventsText:String,viewHint:b,navLinkHint:b,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:b,moreLinkClassNames:b,moreLinkContent:b,moreLinkDidMount:b,moreLinkWillUnmount:b,monthStartFormat:B,handleCustomRendering:b,customRenderingMetaMap:b,customRenderingReplaces:Boolean},at={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"},nowIndicatorSnap:"auto"},Li={datesSet:b,eventsSet:b,eventAdd:b,eventChange:b,eventRemove:b,windowResize:b,eventClick:b,eventMouseEnter:b,eventMouseLeave:b,select:b,unselect:b,loading:b,_unmount:b,_beforeprint:b,_afterprint:b,_noEventDrop:b,_noEventResize:b,_resize:b,_scrollRequest:b},Bi={buttonText:b,buttonHints:b,views:b,plugins:b,initialEvents:b,events:b,eventSources:b},Me={headerToolbar:Ie,footerToolbar:Ie,buttonText:Ie,buttonHints:Ie,buttonIcons:Ie,dateIncrement:Ie,plugins:xt,events:xt,eventSources:xt,resources:xt};function Ie(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?ie(t,e):t===e}function xt(t,e){return Array.isArray(t)&&Array.isArray(e)?Ae(t,e):t===e}const sf={type:String,component:b,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:b,usesMinMaxTime:Boolean,classNames:b,content:b,didMount:b,willUnmount:b};function kn(t){return Tr(t,Me)}function _r(t,e){let n={},r={};for(let i in e)i in t&&(n[i]=e[i](t[i]));for(let i in t)i in e||(r[i]=t[i]);return{refined:n,extra:r}}function b(t){return t}const{hasOwnProperty:$t}=Object.prototype;function Tr(t,e){let n={};if(e){for(let r in e)if(e[r]===Ie){let i=[];for(let s=t.length-1;s>=0;s-=1){let o=t[s][r];if(typeof o=="object"&&o)i.unshift(o);else if(o!==void 0){n[r]=o;break}}i.length&&(n[r]=Tr(i))}}for(let r=t.length-1;r>=0;r-=1){let i=t[r];for(let s in i)s in n||(n[s]=i[s])}return n}function Pe(t,e){let n={};for(let r in t)e(t[r],r)&&(n[r]=t[r]);return n}function me(t,e){let n={};for(let r in t)n[r]=e(t[r],r);return n}function Bo(t){let e={};for(let n of t)e[n]=!0;return e}function Mr(t){let e=[];for(let n in t)e.push(t[n]);return e}function ie(t,e){if(t===e)return!0;for(let n in t)if($t.call(t,n)&&!(n in e))return!1;for(let n in e)if($t.call(e,n)&&t[n]!==e[n])return!1;return!0}const of=/^on[A-Z]/;function lf(t,e){const n=af(t,e);for(let r of n)if(!of.test(r))return!1;return!0}function af(t,e){let n=[];for(let r in t)$t.call(t,r)&&(r in e||n.push(r));for(let r in e)$t.call(e,r)&&t[r]!==e[r]&&n.push(r);return n}function Nn(t,e,n={}){if(t===e)return!0;for(let r in e)if(!(r in t&&cf(t[r],e[r],n[r])))return!1;for(let r in t)if(!(r in e))return!1;return!0}function cf(t,e,n){return t===e||n===!0?!0:n?n(t,e):!1}function df(t,e=0,n,r=1){let i=[];n==null&&(n=Object.keys(t).length);for(let s=e;s<n;s+=r){let o=t[s];o!==void 0&&i.push(o)}return i}let Fo={};function uf(t,e){Fo[t]=e}function ff(t){return new Fo[t]}class hf{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return K(e)}markerToArray(e){return Se(e)}}uf("gregory",hf);const gf=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function pf(t){let e=gf.exec(t);if(e){let n=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?+`0.${e[12]}`*1e3:0));if(jo(n)){let r=null;return e[13]&&(r=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:r}}}return null}class mf{constructor(e){let n=this.timeZone=e.timeZone,r=n!=="local"&&n!=="UTC";e.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(n)),this.canComputeOffset=!!(!r||this.namedTimeZoneImpl),this.calendarSystem=ff(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay=="number"&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation=="function"&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText!=null?e.weekText:e.locale.options.weekText,this.weekTextLong=(e.weekTextLong!=null?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let n=this.createMarkerMeta(e);return n===null?null:n.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):K(Ni(new Date))}createMarkerMeta(e){if(typeof e=="string")return this.parse(e);let n=null;return typeof e=="number"?n=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(n=this.timestampToMarker(e))):Array.isArray(e)&&(n=K(e)),n===null||!jo(n)?null:{marker:n,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let n=pf(e);if(n===null)return null;let{marker:r}=n,i=null;return n.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-n.timeZoneOffset*60*1e3):i=n.timeZoneOffset),{marker:r,isTimeUnspecified:n.isTimeUnspecified,forcedTzo:i}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n.years,r[1]+=n.months,r[2]+=n.days,r[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]-=n.years,r[1]-=n.months,r[2]-=n.days,r[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n,this.calendarSystem.arrayToMarker(r)}addMonths(e,n){let r=this.calendarSystem.markerToArray(e);return r[1]+=n,this.calendarSystem.arrayToMarker(r)}diffWholeYears(e,n){let{calendarSystem:r}=this;return we(e)===we(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)&&r.getMarkerMonth(e)===r.getMarkerMonth(n)?r.getMarkerYear(n)-r.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:r}=this;return we(e)===we(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)?r.getMarkerMonth(n)-r.getMarkerMonth(e)+(r.getMarkerYear(n)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let r=this.diffWholeYears(e,n);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,n),r!==null?{unit:"month",value:r}:(r=Pu(e,n),r!==null?{unit:"week",value:r}:(r=Gt(e,n),r!==null?{unit:"day",value:r}:(r=Iu(e,n),Ot(r)?{unit:"hour",value:r}:(r=ku(e,n),Ot(r)?{unit:"minute",value:r}:(r=Nu(e,n),Ot(r)?{unit:"second",value:r}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,r){let i;return r.years&&(i=this.diffWholeYears(e,n),i!==null)?i/Ru(r):r.months&&(i=this.diffWholeMonths(e,n),i!==null)?i/_u(r):r.days&&(i=Gt(e,n),i!==null)?i/$e(r):(n.valueOf()-e.valueOf())/re(r)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?L(e):n==="hour"?Hu(e):n==="minute"?ju(e):n==="second"?Lu(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):Bu(e,this.weekDow,this.weekDoy)}format(e,n,r={}){return n.format({marker:e,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,n,r,i={}){return i.isEndExclusive&&(n=De(n,-1)),r.formatRange({marker:e,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(e)},{marker:n,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(n)},this,i.defaultSeparator)}formatIso(e,n={}){let r=null;return n.omitTimeZoneOffset||(n.forcedTzo!=null?r=n.forcedTzo:r=this.offsetForMarker(e)),Lo(e,r,n.omitTime)}timestampToMarker(e){return this.timeZone==="local"?K(Ni(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):K(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-Oi(Se(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Se(e)):null}toDate(e,n){return this.timeZone==="local"?Oi(Se(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Se(e))*1e3*60):new Date(e.valueOf()-(n||0))}}class St{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let n,r;if(typeof e=="object"&&e){n=Object.assign({},this.iconClasses);for(r in e)n[r]=this.applyIconOverridePrefix(e[r]);this.iconClasses=n}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let n=this.iconOverridePrefix;return n&&e.indexOf(n)!==0&&(e=n+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,n){let r;return n&&this.rtlIconClasses?r=this.rtlIconClasses[e]||this.iconClasses[e]:r=this.iconClasses[e],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(e){let n;return this.iconOverrideCustomButtonOption&&(n=e[this.iconOverrideCustomButtonOption],n)?`${this.baseIconClass} ${this.applyIconOverridePrefix(n)}`:""}}St.prototype.classes={};St.prototype.iconClasses={};St.prototype.baseIconClass="";St.prototype.iconOverridePrefix="";function Qt(t){t();let e=T.debounceRendering,n=[];function r(i){n.push(i)}for(T.debounceRendering=r,gt(g(vf,{}),document.createElement("div"));n.length;)n.shift()();T.debounceRendering=e}class vf extends X{render(){return g("div",{})}componentDidMount(){this.setState({})}}function Uo(t){let e=Fd(t),n=e.Provider;return e.Provider=function(){let r=!this.getChildContext,i=n.apply(this,arguments);if(r){let s=[];this.shouldComponentUpdate=o=>{this.props.value!==o.value&&s.forEach(l=>{l.context=o.value,l.forceUpdate()})},this.sub=o=>{s.push(o);let l=o.componentWillUnmount;o.componentWillUnmount=()=>{s.splice(s.indexOf(o),1),l&&l.call(o)}}}return i},e}class yf{constructor(e,n,r,i){this.execFunc=e,this.emitter=n,this.scrollTime=r,this.scrollTimeReset=i,this.handleScrollRequest=s=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},s),this.drain()},n.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const ye=Uo({});function bf(t,e,n,r,i,s,o,l,a,d,c,f,u,h){return{dateEnv:i,nowManager:s,options:n,pluginHooks:l,emitter:c,dispatch:a,getCurrentData:d,calendarApi:f,viewSpec:t,viewApi:e,dateProfileGenerator:r,theme:o,isRtl:n.direction==="rtl",addResizeHandler(p){c.on("_resize",p)},removeResizeHandler(p){c.off("_resize",p)},createScrollResponder(p){return new yf(p,c,P(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:u,unregisterInteractiveComponent:h}}class Ue extends X{shouldComponentUpdate(e,n){return!Nn(this.props,e,this.propEquality)||!Nn(this.state,n,this.stateEquality)}safeSetState(e){Nn(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}Ue.addPropsEquality=Ef;Ue.addStateEquality=Sf;Ue.contextType=ye;Ue.prototype.propEquality={};Ue.prototype.stateEquality={};class H extends Ue{}H.contextType=ye;function Ef(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function Sf(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function de(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class Ir extends H{constructor(){super(...arguments),this.id=Fe(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:n}=this.context,{generatorName:r}=this.props;(!n.customRenderingReplaces||!Jn(r,n))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&de(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:r}=n,{customGenerator:i,defaultGenerator:s,renderProps:o}=e,l=zo(e,[],this.handleEl);let a=!1,d,c=[],f;if(i!=null){const u=typeof i=="function"?i(o,g):i;if(u===!0)a=!0;else{const h=u&&typeof u=="object";h&&"html"in u?l.dangerouslySetInnerHTML={__html:u.html}:h&&"domNodes"in u?c=Array.prototype.slice.call(u.domNodes):(h?fo(u):typeof u!="function")?d=u:f=u}}else a=!Jn(e.generatorName,r);return a&&s&&(d=s(o)),this.queuedDomNodes=c,this.currentGeneratorMeta=f,g(e.elTag,l,d)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var n;const{props:r,context:i}=this,{handleCustomRendering:s,customRenderingMetaMap:o}=i.options;if(s){const l=(n=this.currentGeneratorMeta)!==null&&n!==void 0?n:o==null?void 0:o[r.generatorName];l&&s(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:l},r),{elClasses:(r.elClasses||[]).filter(wf)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,r=this.base;if(!Ae(e,n)){n.forEach(Cr);for(let i of e)r.appendChild(i);this.currentDomNodes=e}}}Ir.addPropsEquality({elClasses:Ae,elStyle:ie,elAttrs:lf,renderProps:ie});function Jn(t,e){var n;return!!(e.handleCustomRendering&&t&&(!((n=e.customRenderingMetaMap)===null||n===void 0)&&n[t]))}function zo(t,e,n){const r=Object.assign(Object.assign({},t.elAttrs),{ref:n});return(t.elClasses||e)&&(r.className=(t.elClasses||[]).concat(e||[]).concat(r.className||[]).filter(Boolean).join(" ")),t.elStyle&&(r.style=t.elStyle),r}function wf(t){return!!t}const Wo=Uo(0);class $ extends X{constructor(){super(...arguments),this.InnerContent=Cf.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(de(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=Af(e.classNameGenerator,e.renderProps);if(e.children){const r=zo(e,n,this.handleEl),i=e.children(this.InnerContent,e.renderProps,r);return e.elTag?g(e.elTag,r,i):i}else return g(Ir,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(n),renderId:this.context}))}componentDidMount(){var e,n;this.el?(n=(e=this.props).didMount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,n;(n=(e=this.props).willUnmount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}$.contextType=Wo;function Cf(t,e){const n=t.props;return g(Ir,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context},e))}function Af(t,e){const n=typeof t=="function"?t(e):t||[];return typeof n=="string"?[n]:n}class pt extends H{render(){let{props:e,context:n}=this,{options:r}=n,i={view:n.viewApi};return g($,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:[...Vo(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:i,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount},()=>e.children)}}function Vo(t){return[`fc-${t.type}-view`,"fc-view"]}function Df(t,e){let n=null,r=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(r=e.createMarker(t.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function Fi(t,e){let n=[],{start:r}=e,i,s;for(t.sort(xf),i=0;i<t.length;i+=1)s=t[i],s.start>r&&n.push({start:r,end:s.start}),s.end>r&&(r=s.end);return r<e.end&&n.push({start:r,end:e.end}),n}function xf(t,e){return t.start.valueOf()-e.start.valueOf()}function xe(t,e){let{start:n,end:r}=t,i=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(r===null?r=e.end:r=new Date(Math.min(r.valueOf(),e.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function Rf(t,e){return(t.start===null?null:t.start.valueOf())===(e.start===null?null:e.start.valueOf())&&(t.end===null?null:t.end.valueOf())===(e.end===null?null:e.end.valueOf())}function kr(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function pn(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function ge(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function _f(t,e){return e.start!=null&&t<e.start?e.start:e.end!=null&&t>=e.end?new Date(e.end.valueOf()-1):t}function Go(t){let e=Math.floor(_e(t.start,t.end))||1,n=L(t.start),r=V(n,e);return{start:n,end:r}}function Nr(t,e=P(0)){let n=null,r=null;if(t.end){r=L(t.end);let i=t.end.valueOf()-r.valueOf();i&&i>=re(e)&&(r=V(r,1))}return t.start&&(n=L(t.start),r&&r<=n&&(r=V(n,1))),{start:n,end:r}}function Tf(t){let e=Nr(t);return _e(e.start,e.end)>1}function Ye(t,e,n,r){return r==="year"?P(n.diffWholeYears(t,e),"year"):r==="month"?P(n.diffWholeMonths(t,e),"month"):Ou(t,e)}class Yo{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,n,r){let{dateEnv:i}=this.props,s=i.subtract(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(s,-1,r)}buildNext(e,n,r){let{dateEnv:i}=this.props,s=i.add(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(s,1,r)}build(e,n,r=!0){let{props:i}=this,s,o,l,a,d,c;return s=this.buildValidRange(),s=this.trimHiddenDays(s),r&&(e=_f(e,s)),o=this.buildCurrentRangeInfo(e,n),l=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,l),a=this.trimHiddenDays(a),d=a,i.showNonCurrentDates||(d=xe(d,o.range)),d=this.adjustActiveRange(d),d=xe(d,s),c=kr(o.range,s),ge(a,e)||(e=a.start),{currentDate:e,validRange:s,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:l,activeRange:d,renderRange:a,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:c,dateIncrement:this.buildDateIncrement(o.duration)}}buildValidRange(){let e=this.props.validRangeInput,n=typeof e=="function"?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(n)||{start:null,end:null}}buildCurrentRangeInfo(e,n){let{props:r}=this,i=null,s=null,o=null,l;return r.duration?(i=r.duration,s=r.durationUnit,o=this.buildRangeFromDuration(e,n,i,s)):(l=this.props.dayCount)?(s="day",o=this.buildRangeFromDayCount(e,n,l)):(o=this.buildCustomVisibleRange(e))?s=r.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),s=Xn(i).unit,o=this.buildRangeFromDuration(e,n,i,s)),{duration:i,unit:s,range:o}}getFallbackDuration(){return P({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:r,slotMinTime:i,slotMaxTime:s}=this.props,{start:o,end:l}=e;return r&&($e(i)<0&&(o=L(o),o=n.add(o,i)),$e(s)>1&&(l=L(l),l=V(l,-1),l=n.add(l,s))),{start:o,end:l}}buildRangeFromDuration(e,n,r,i){let{dateEnv:s,dateAlignment:o}=this.props,l,a,d;if(!o){let{dateIncrement:f}=this.props;f&&re(f)<re(r)?o=Xn(f).unit:o=i}$e(r)<=1&&this.isHiddenDay(l)&&(l=this.skipHiddenDays(l,n),l=L(l));function c(){l=s.startOf(e,o),a=s.add(l,r),d={start:l,end:a}}return c(),this.trimHiddenDays(d)||(e=this.skipHiddenDays(e,n),c()),d}buildRangeFromDayCount(e,n,r){let{dateEnv:i,dateAlignment:s}=this.props,o=0,l=e,a;s&&(l=i.startOf(l,s)),l=L(l),l=this.skipHiddenDays(l,n),a=l;do a=V(a,1),this.isHiddenDay(a)||(o+=1);while(o<r);return{start:l,end:a}}buildCustomVisibleRange(e){let{props:n}=this,r=n.visibleRangeInput,i=typeof r=="function"?r.call(n.calendarApi,n.dateEnv.toDate(e)):r,s=this.refineRange(i);return s&&(s.start==null||s.end==null)?null:s}buildRenderRange(e,n,r){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,r;return n||((r=this.props.dateAlignment)?P(1,r):e||P({days:1}))}refineRange(e){if(e){let n=Df(e,this.props.dateEnv);return n&&(n=Nr(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],r=0,i;for(this.props.weekends===!1&&e.push(0,6),i=0;i<7;i+=1)(n[i]=e.indexOf(i)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:r}=e;return n&&(n=this.skipHiddenDays(n)),r&&(r=this.skipHiddenDays(r,-1,!0)),n==null||r==null||n<r?{start:n,end:r}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,r=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(r?n:0)+7)%7];)e=V(e,n);return e}}function Or(t,e,n,r){return{instanceId:Fe(),defId:t,range:e,forcedStartTzo:n??null,forcedEndTzo:r??null}}function Mf(t,e,n,r){for(let i=0;i<r.length;i+=1){let s=r[i].parse(t,n);if(s){let{allDay:o}=t;return o==null&&(o=e,o==null&&(o=s.allDayGuess,o==null&&(o=!1))),{allDay:o,duration:s.duration,typeData:s.typeData,typeId:i}}}return null}function He(t,e,n){let{dateEnv:r,pluginHooks:i,options:s}=n,{defs:o,instances:l}=t;l=Pe(l,a=>!o[a.defId].recurringDef);for(let a in o){let d=o[a];if(d.recurringDef){let{duration:c}=d.recurringDef;c||(c=d.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let f=If(d,c,e,r,i.recurringTypes);for(let u of f){let h=Or(a,{start:u,end:r.add(u,c)});l[h.instanceId]=h}}}return{defs:o,instances:l}}function If(t,e,n,r,i){let o=i[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:r.subtract(n.start,e),end:n.end},r);return t.allDay&&(o=o.map(L)),o}const Ht={id:String,groupId:String,title:String,url:String,interactive:Boolean},qo={start:b,end:b,date:b,allDay:Boolean},kf=Object.assign(Object.assign(Object.assign({},Ht),qo),{extendedProps:b});function $o(t,e,n,r,i=Pr(n),s,o){let{refined:l,extra:a}=Qo(t,n,i),d=Of(e,n),c=Mf(l,d,n.dateEnv,n.pluginHooks.recurringTypes);if(c){let u=er(l,a,e?e.sourceId:"",c.allDay,!!c.duration,n,s);return u.recurringDef={typeId:c.typeId,typeData:c.typeData,duration:c.duration},{def:u,instance:null}}let f=Nf(l,d,n,r);if(f){let u=er(l,a,e?e.sourceId:"",f.allDay,f.hasEnd,n,s),h=Or(u.defId,f.range,f.forcedStartTzo,f.forcedEndTzo);return o&&u.publicId&&o[u.publicId]&&(h.instanceId=o[u.publicId]),{def:u,instance:h}}return null}function Qo(t,e,n=Pr(e)){return _r(t,n)}function Pr(t){return Object.assign(Object.assign(Object.assign({},Zt),kf),t.pluginHooks.eventRefiners)}function er(t,e,n,r,i,s,o){let l={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(o&&t.id?o[t.id]:"")||Fe(),sourceId:n,allDay:r,hasEnd:i,interactive:t.interactive,ui:Kt(t,s),extendedProps:Object.assign(Object.assign({},t.extendedProps||{}),e)};for(let a of s.pluginHooks.eventDefMemberAdders)Object.assign(l,a(t));return Object.freeze(l.ui.classNames),Object.freeze(l.extendedProps),l}function Nf(t,e,n,r){let{allDay:i}=t,s,o=null,l=!1,a,d=null,c=t.start!=null?t.start:t.date;if(s=n.dateEnv.createMarkerMeta(c),s)o=s.marker;else if(!r)return null;return t.end!=null&&(a=n.dateEnv.createMarkerMeta(t.end)),i==null&&(e!=null?i=e:i=(!s||s.isTimeUnspecified)&&(!a||a.isTimeUnspecified)),i&&o&&(o=L(o)),a&&(d=a.marker,i&&(d=L(d)),o&&d<=o&&(d=null)),d?l=!0:r||(l=n.options.forceEventDuration||!1,d=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:l,range:{start:o,end:d},forcedStartTzo:s?s.forcedTzo:null,forcedEndTzo:a?a.forcedTzo:null}}function Of(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}function mt(t,e,n,r,i,s){let o=J(),l=Pr(n);for(let a of t){let d=$o(a,e,n,r,l,i,s);d&&tr(d,o)}return o}function tr(t,e=J()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function Hr(t,e){let n=t.instances[e];if(n){let r=t.defs[n.defId],i=mn(t,s=>Pf(r,s));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return J()}function Pf(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function J(){return{defs:{},instances:{}}}function jr(t,e){return{defs:Object.assign(Object.assign({},t.defs),e.defs),instances:Object.assign(Object.assign({},t.instances),e.instances)}}function mn(t,e){let n=Pe(t.defs,e),r=Pe(t.instances,i=>n[i.defId]);return{defs:n,instances:r}}function Hf(t,e){let{defs:n,instances:r}=t,i={},s={};for(let o in n)e.defs[o]||(i[o]=n[o]);for(let o in r)!e.instances[o]&&i[r[o].defId]&&(s[o]=r[o]);return{defs:i,instances:s}}function jf(t,e){return Array.isArray(t)?mt(t,null,e,!0):typeof t=="object"&&t?mt([t],null,e,!0):t!=null?String(t):null}function Ui(t){return Array.isArray(t)?t:typeof t=="string"?t.split(/\s+/):[]}const Zt={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:b,overlap:b,allow:b,className:Ui,classNames:Ui,color:String,backgroundColor:String,borderColor:String,textColor:String},Lf={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Kt(t,e){let n=jf(t.constraint,e);return{display:t.display||null,startEditable:t.startEditable!=null?t.startEditable:t.editable,durationEditable:t.durationEditable!=null?t.durationEditable:t.editable,constraints:n!=null?[n]:[],overlap:t.overlap!=null?t.overlap:null,allows:t.allow!=null?[t.allow]:[],backgroundColor:t.backgroundColor||t.color||"",borderColor:t.borderColor||t.color||"",textColor:t.textColor||"",classNames:(t.className||[]).concat(t.classNames||[])}}function Zo(t){return t.reduce(Bf,Lf)}function Bf(t,e){return{display:e.display!=null?e.display:t.display,startEditable:e.startEditable!=null?e.startEditable:t.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:t.durationEditable,constraints:t.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:t.overlap,allows:t.allows.concat(e.allows),backgroundColor:e.backgroundColor||t.backgroundColor,borderColor:e.borderColor||t.borderColor,textColor:e.textColor||t.textColor,classNames:t.classNames.concat(e.classNames)}}const Ff={id:String,defaultAllDay:Boolean,url:String,format:String,events:b,eventDataTransform:b,success:b,failure:b};function Ko(t,e,n=Xo(e)){let r;if(typeof t=="string"?r={url:t}:typeof t=="function"||Array.isArray(t)?r={events:t}:typeof t=="object"&&t&&(r=t),r){let{refined:i,extra:s}=_r(r,n),o=Uf(i,e);if(o)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:Fe(),sourceDefId:o.sourceDefId,meta:o.meta,ui:Kt(i,e),extendedProps:s}}return null}function Xo(t){return Object.assign(Object.assign(Object.assign({},Zt),Ff),t.pluginHooks.eventSourceRefiners)}function Uf(t,e){let n=e.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let s=n[r].parseMeta(t);if(s)return{sourceDefId:r,meta:s}}return null}function zf(t,e,n,r,i){switch(e.type){case"RECEIVE_EVENTS":return Wf(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,i);case"RESET_RAW_EVENTS":return Vf(t,n[e.sourceId],e.rawEvents,r.activeRange,i);case"ADD_EVENTS":return Gf(t,e.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return jr(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?He(t,r.activeRange,i):t;case"REMOVE_EVENTS":return Hf(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return el(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return mn(t,s=>!s.sourceId);case"REMOVE_ALL_EVENTS":return J();default:return t}}function Wf(t,e,n,r,i,s){if(e&&n===e.latestFetchId){let o=mt(Jo(i,e,s),e,s);return r&&(o=He(o,r,s)),jr(el(t,e.sourceId),o)}return t}function Vf(t,e,n,r,i){const{defIdMap:s,instanceIdMap:o}=qf(t);let l=mt(Jo(n,e,i),e,i,!1,s,o);return He(l,r,i)}function Jo(t,e,n){let r=n.options.eventDataTransform,i=e?e.eventDataTransform:null;return i&&(t=zi(t,i)),r&&(t=zi(t,r)),t}function zi(t,e){let n;if(!e)n=t;else{n=[];for(let r of t){let i=e(r);i?n.push(i):i==null&&n.push(r)}}return n}function Gf(t,e,n,r){return n&&(e=He(e,n,r)),jr(t,e)}function Wi(t,e,n){let{defs:r}=t,i=me(t.instances,s=>r[s.defId].allDay?s:Object.assign(Object.assign({},s),{range:{start:n.createMarker(e.toDate(s.range.start,s.forcedStartTzo)),end:n.createMarker(e.toDate(s.range.end,s.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:s.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:s.forcedEndTzo}));return{defs:r,instances:i}}function el(t,e){return mn(t,n=>n.sourceId!==e)}function Yf(t,e){return{defs:t.defs,instances:Pe(t.instances,n=>!e[n.instanceId])}}function qf(t){const{defs:e,instances:n}=t,r={},i={};for(let s in e){const o=e[s],{publicId:l}=o;l&&(r[l]=s)}for(let s in n){const o=n[s],l=e[o.defId],{publicId:a}=l;a&&(i[a]=s)}return{defIdMap:r,instanceIdMap:i}}class vn{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){$f(this.handlers,e,n)}off(e,n){Qf(this.handlers,e,n)}trigger(e,...n){let r=this.handlers[e]||[],i=this.options&&this.options[e],s=[].concat(i||[],r);for(let o of s)o.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function $f(t,e,n){(t[e]||(t[e]=[])).push(n)}function Qf(t,e,n){n?t[e]&&(t[e]=t[e].filter(r=>r!==n)):delete t[e]}const Zf={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Kf(t,e){return mt(Xf(t),null,e)}function Xf(t){let e;return t===!0?e=[{}]:Array.isArray(t)?e=t.filter(n=>n.daysOfWeek):typeof t=="object"&&t?e=[t]:e=[],e=e.map(n=>Object.assign(Object.assign({},Zf),n)),e}function tl(t,e,n){n.emitter.trigger("select",Object.assign(Object.assign({},Lr(t,n)),{jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Jf(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function Lr(t,e){let n={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(n,r(t,e));return Object.assign(n,hh(t,e.dateEnv)),n}function Vi(t,e,n){let{dateEnv:r,options:i}=n,s=e;return t?(s=L(s),s=r.add(s,i.defaultAllDayEventDuration)):s=r.add(s,i.defaultTimedEventDuration),s}function Br(t,e,n,r){let i=Xt(t.defs,e),s=J();for(let o in t.defs){let l=t.defs[o];s.defs[o]=eh(l,i[o],n,r)}for(let o in t.instances){let l=t.instances[o],a=s.defs[l.defId];s.instances[o]=th(l,a,i[l.defId],n,r)}return s}function eh(t,e,n,r){let i=n.standardProps||{};i.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},t),i),{ui:Object.assign(Object.assign({},t.ui),i.ui)});n.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),n.extendedProps));for(let o of r.pluginHooks.eventDefMutationAppliers)o(s,n,r);return!s.hasEnd&&r.options.forceEventDuration&&(s.hasEnd=!0),s}function th(t,e,n,r,i){let{dateEnv:s}=i,o=r.standardProps&&r.standardProps.allDay===!0,l=r.standardProps&&r.standardProps.hasEnd===!1,a=Object.assign({},t);return o&&(a.range=Go(a.range)),r.datesDelta&&n.startEditable&&(a.range={start:s.add(a.range.start,r.datesDelta),end:s.add(a.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(a.range={start:s.add(a.range.start,r.startDelta),end:a.range.end}),r.endDelta&&n.durationEditable&&(a.range={start:a.range.start,end:s.add(a.range.end,r.endDelta)}),l&&(a.range={start:a.range.start,end:Vi(e.allDay,a.range.start,i)}),e.allDay&&(a.range={start:L(a.range.start),end:L(a.range.end)}),a.range.end<a.range.start&&(a.range.end=Vi(e.allDay,a.range.start,i)),a}class Ge{constructor(e,n){this.context=e,this.internalEventSource=n}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class U{constructor(e,n,r){this._context=e,this._def=n,this._instance=r||null}setProp(e,n){if(e in qo)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")n=Ht[e](n),this.mutate({standardProps:{publicId:n}});else if(e in Ht)n=Ht[e](n),this.mutate({standardProps:{[e]:n}});else if(e in Zt){let r=Zt[e](n);e==="color"?r={backgroundColor:n,borderColor:n}:e==="editable"?r={startEditable:n,durationEditable:n}:r={[e]:n},this.mutate({standardProps:{ui:r}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:r}=this._context,i=r.createMarker(e);if(i&&this._instance){let s=this._instance.range,o=Ye(s.start,i,r,n.granularity);n.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}}setEnd(e,n={}){let{dateEnv:r}=this._context,i;if(!(e!=null&&(i=r.createMarker(e),!i))&&this._instance)if(i){let s=Ye(this._instance.range.end,i,r,n.granularity);this.mutate({endDelta:s})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,r={}){let{dateEnv:i}=this._context,s={allDay:r.allDay},o=i.createMarker(e),l;if(o&&!(n!=null&&(l=i.createMarker(n),!l))&&this._instance){let a=this._instance.range;r.allDay===!0&&(a=Go(a));let d=Ye(a.start,o,i,r.granularity);if(l){let c=Ye(a.end,l,i,r.granularity);Au(d,c)?this.mutate({datesDelta:d,standardProps:s}):this.mutate({startDelta:d,endDelta:c,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:d,standardProps:s})}}moveStart(e){let n=P(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=P(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=P(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let r={allDay:e},{maintainDuration:i}=n;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=i),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:n}=this._context,r=this._instance,i=B(e);return this._def.hasEnd?n.formatRange(r.range.start,r.range.end,i,{forcedStartTzo:r.forcedStartTzo,forcedEndTzo:r.forcedEndTzo}):n.format(r.range.start,i,{forcedTzo:r.forcedStartTzo})}mutate(e){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:s}=i.getCurrentData(),o=Hr(s,n.instanceId);o=Br(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,i);let a=new U(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:a,event:this,relatedEvents:Ne(o,i,n),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:s})}})}}remove(){let e=this._context,n=nl(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:n}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:n})}})}get source(){let{sourceId:e}=this._def;return e?new Ge(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let n=this._def,{ui:r}=n,{startStr:i,endStr:s}=this,o={allDay:n.allDay};return n.title&&(o.title=n.title),i&&(o.start=i),s&&(o.end=s),n.publicId&&(o.id=n.publicId),n.groupId&&(o.groupId=n.groupId),n.url&&(o.url=n.url),r.display&&r.display!=="auto"&&(o.display=r.display),e.collapseColor&&r.backgroundColor&&r.backgroundColor===r.borderColor?o.color=r.backgroundColor:(r.backgroundColor&&(o.backgroundColor=r.backgroundColor),r.borderColor&&(o.borderColor=r.borderColor)),r.textColor&&(o.textColor=r.textColor),r.classNames.length&&(o.classNames=r.classNames),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(o,n.extendedProps):o.extendedProps=n.extendedProps),o}toJSON(){return this.toPlainObject()}}function nl(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function Ne(t,e,n){let{defs:r,instances:i}=t,s=[],o=n?n.instanceId:"";for(let l in i){let a=i[l],d=r[a.defId];a.instanceId!==o&&s.push(new U(e,d,a))}return s}function nr(t,e,n,r){let i={},s={},o={},l=[],a=[],d=Xt(t.defs,e);for(let c in t.defs){let f=t.defs[c];d[f.defId].display==="inverse-background"&&(f.groupId?(i[f.groupId]=[],o[f.groupId]||(o[f.groupId]=f)):s[c]=[])}for(let c in t.instances){let f=t.instances[c],u=t.defs[f.defId],h=d[u.defId],p=f.range,v=!u.allDay&&r?Nr(p,r):p,y=xe(v,n);y&&(h.display==="inverse-background"?u.groupId?i[u.groupId].push(y):s[f.defId].push(y):h.display!=="none"&&(h.display==="background"?l:a).push({def:u,ui:h,instance:f,range:y,isStart:v.start&&v.start.valueOf()===y.start.valueOf(),isEnd:v.end&&v.end.valueOf()===y.end.valueOf()}))}for(let c in i){let f=i[c],u=Fi(f,n);for(let h of u){let p=o[c],v=d[p.defId];l.push({def:p,ui:v,instance:null,range:h,isStart:!1,isEnd:!1})}}for(let c in s){let f=s[c],u=Fi(f,n);for(let h of u)l.push({def:t.defs[c],ui:d[c],instance:null,range:h,isStart:!1,isEnd:!1})}return{bg:l,fg:a}}function nh(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function Gi(t,e){t.fcSeg=e}function Xe(t){return t.fcSeg||t.parentNode.fcSeg||null}function Xt(t,e){return me(t,n=>rl(n,e))}function rl(t,e){let n=[];return e[""]&&n.push(e[""]),e[t.defId]&&n.push(e[t.defId]),n.push(t.ui),Zo(n)}function Fr(t,e){let n=t.map(rh);return n.sort((r,i)=>vu(r,i,e)),n.map(r=>r._seg)}function rh(t){let{eventRange:e}=t,n=e.def,r=e.instance?e.instance.range:e.range,i=r.start?r.start.valueOf():0,s=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:s,duration:s-i,allDay:Number(n.allDay),_seg:t})}function ih(t,e){let{pluginHooks:n}=e,r=n.isDraggableTransformers,{def:i,ui:s}=t.eventRange,o=s.startEditable;for(let l of r)o=l(o,i,s,e);return o}function sh(t,e){return t.isStart&&t.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function oh(t,e){return t.isEnd&&t.eventRange.ui.durationEditable}function ct(t,e,n,r,i,s,o){let{dateEnv:l,options:a}=n,{displayEventTime:d,displayEventEnd:c}=a,f=t.eventRange.def,u=t.eventRange.instance;d==null&&(d=r!==!1),c==null&&(c=i!==!1);let h=u.range.start,p=u.range.end,v=s||t.start||t.eventRange.range.start,y=o||t.end||t.eventRange.range.end,S=L(h).valueOf()===L(v).valueOf(),w=L(De(p,-1)).valueOf()===L(De(y,-1)).valueOf();return d&&!f.allDay&&(S||w)?(v=S?h:v,y=w?p:y,c&&f.hasEnd?l.formatRange(v,y,e,{forcedStartTzo:s?null:u.forcedStartTzo,forcedEndTzo:o?null:u.forcedEndTzo}):l.format(v,e,{forcedTzo:s?null:u.forcedStartTzo})):""}function pe(t,e,n){let r=t.eventRange.range;return{isPast:r.end<=(n||e.start),isFuture:r.start>=(n||e.end),isToday:e&&ge(e,r.start)}}function lh(t){let e=["fc-event"];return t.isMirror&&e.push("fc-event-mirror"),t.isDraggable&&e.push("fc-event-draggable"),(t.isStartResizable||t.isEndResizable)&&e.push("fc-event-resizable"),t.isDragging&&e.push("fc-event-dragging"),t.isResizing&&e.push("fc-event-resizing"),t.isSelected&&e.push("fc-event-selected"),t.isStart&&e.push("fc-event-start"),t.isEnd&&e.push("fc-event-end"),t.isPast&&e.push("fc-event-past"),t.isToday&&e.push("fc-event-today"),t.isFuture&&e.push("fc-event-future"),e}function il(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function Ur(t,e){let{def:n,instance:r}=t.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:s,options:o}=e,{eventInteractive:l}=o;return l==null&&(l=n.interactive,l==null&&(l=!!s.hasHandlers("eventClick"))),l?Ho(a=>{s.trigger("eventClick",{el:a.target,event:new U(e,n,r),jsEvent:a,view:e.viewApi})}):{}}const ah={start:b,end:b,allDay:Boolean};function ch(t,e,n){let r=dh(t,e),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=e.add(i.start,n)}return r}function dh(t,e){let{refined:n,extra:r}=_r(t,ah),i=n.start?e.createMarkerMeta(n.start):null,s=n.end?e.createMarkerMeta(n.end):null,{allDay:o}=n;return o==null&&(o=i&&i.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:s?s.marker:null},allDay:o},r)}function uh(t,e){return Rf(t.range,e.range)&&t.allDay===e.allDay&&fh(t,e)}function fh(t,e){for(let n in e)if(n!=="range"&&n!=="allDay"&&t[n]!==e[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}function hh(t,e){return Object.assign(Object.assign({},ol(t.range,e,t.allDay)),{allDay:t.allDay})}function sl(t,e,n){return Object.assign(Object.assign({},ol(t,e,n)),{timeZone:e.timeZone})}function ol(t,e,n){return{start:e.toDate(t.start),end:e.toDate(t.end),startStr:e.formatIso(t.start,{omitTime:n}),endStr:e.formatIso(t.end,{omitTime:n})}}function gh(t,e,n){let r=Qo({editable:!1},n),i=er(r.refined,r.extra,"",t.allDay,!0,n);return{def:i,ui:rl(i,e),instance:Or(i.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function ph(t,e,n){let r=!1,i=function(l){r||(r=!0,e(l))},s=function(l){r||(r=!0,n(l))},o=t(i,s);o&&typeof o.then=="function"&&o.then(i,s)}class Yi extends Error{constructor(e,n){super(e),this.response=n}}function mh(t,e,n){t=t.toUpperCase();const r={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,r).then(i=>{if(i.ok)return i.json().then(s=>[s,i],()=>{throw new Yi("Failure parsing JSON",i)});throw new Yi("Request failed",i)})}let On;function ll(){return On==null&&(On=vh()),On}function vh(){if(typeof document>"u")return!0;let t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.innerHTML="<table><tr><td><div></div></td></tr></table>",t.querySelector("table").style.height="100px",t.querySelector("div").style.height="100%",document.body.appendChild(t);let n=t.querySelector("div").offsetHeight>0;return document.body.removeChild(t),n}class yh extends H{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{Qt(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{Qt(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:n}=e,{forPrint:r}=this.state,i=r||n.height==="auto"||n.contentHeight==="auto",s=!i&&n.height!=null?n.height:"",o=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${n.direction}`,e.theme.getClass("root")];return ll()||o.push("fc-liquid-hack"),e.children(o,s,i,r)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class tt{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function bh(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function zr(t){return{[t.component.uid]:t}}const rr={};class ze extends X{constructor(e,n){super(e,n),this.handleRefresh=()=>{let r=this.computeTiming();r.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(r.state),this.clearTimeout(),this.setTimeout(r.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:n}=this;return e.children(n.nowDate,n.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener("visibilitychange",this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}computeTiming(){let{props:e,context:n}=this,r=n.nowManager.getDateMarker(),{nowIndicatorSnap:i}=n.options;i==="auto"&&(i=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let s,o;return i?(s=n.dateEnv.startOf(r,e.unit),o=n.dateEnv.add(s,P(1,e.unit)).valueOf()-r.valueOf()):(s=r,o=1e3*60),o=Math.min(1e3*60*60*24,o),{state:{nowDate:s,todayRange:Eh(s)},waitMs:o}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{const n=this.computeTiming();this.setState(n.state,()=>{this.setTimeout(n.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}ze.contextType=ye;function Eh(t){let e=L(t),n=V(e,1);return{start:e,end:n}}class Sh{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,n){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:n})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,n){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[e]?r.emitter.on(e,n):console.warn(`Unknown listener name '${e}'`)}off(e,n){this.currentDataManager.emitter.off(e,n)}trigger(e,...n){this.currentDataManager.emitter.trigger(e,...n)}changeView(e,n){this.batchRendering(()=>{if(this.unselect(),n)if(n.start&&n.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:n});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let r=this.getCurrentData(),i;n=n||"day",i=r.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:r}=this.getCurrentData(),i=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),s,o;for(let l in n)i.push(l);for(s=0;s<i.length;s+=1)if(o=n[i[s]],o&&o.singleUnit===e)return o;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let n=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.createMarker(e)})}incrementDate(e){let n=this.getCurrentData(),r=P(e);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,r)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:r}=this.getCurrentData();return r.format(r.createMarker(e),B(n))}formatRange(e,n,r){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(e),i.createMarker(n),B(r),r)}formatIso(e,n){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(e),{omitTime:n})}select(e,n){let r;n==null?e.start!=null?r=e:r={start:e,end:null}:r={start:e,end:n};let i=this.getCurrentData(),s=ch(r,i.dateEnv,P({days:1}));s&&(this.dispatch({type:"SELECT_DATES",selection:s}),tl(s,null,i))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),Jf(e,n))}addEvent(e,n){if(e instanceof U){let o=e._def,l=e._instance;return this.getCurrentData().eventStore.defs[o.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:tr({def:o,instance:l})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),i;if(n instanceof Ge)i=n.internalEventSource;else if(typeof n=="boolean")n&&([i]=Mr(r.eventSources));else if(n!=null){let o=this.getEventSourceById(n);if(!o)return console.warn(`Could not find an event source with ID "${n}"`),null;i=o.internalEventSource}let s=$o(e,i,r,!1);if(s){let o=new U(r,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:tr(s)}),this.triggerEventAdd(o),o}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:nl(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:r,instances:i}=n.eventStore;e=String(e);for(let s in r){let o=r[s];if(o.publicId===e){if(o.recurringDef)return new U(n,o,null);for(let l in i){let a=i[l];if(a.defId===o.defId)return new U(n,o,a)}}}return null}getEvents(){let e=this.getCurrentData();return Ne(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,r=[];for(let i in n)r.push(new Ge(e,n[i]));return r}getEventSourceById(e){let n=this.getCurrentData(),r=n.eventSources;e=String(e);for(let i in r)if(r[i].publicId===e)return new Ge(n,r[i]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof Ge)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=Ko(e,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new Ge(n,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=P(e);n&&this.trigger("_scrollRequest",{time:n})}}function wh(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function al(t,e){let n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom?n:!1}function Ch(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}}function Ah(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function Dh(t,e){return{left:t.left-e.left,top:t.top-e.top}}const Pn=J();class xh{constructor(){this.getKeysForEventDefs=_(this._getKeysForEventDefs),this.splitDateSelection=_(this._splitDateSpan),this.splitEventStore=_(this._splitEventStore),this.splitIndividualUi=_(this._splitIndividualUi),this.splitEventDrag=_(this._splitInteraction),this.splitEventResize=_(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),s=this.splitIndividualUi(e.eventUiBases,r),o=this.splitEventStore(e.eventStore,r),l=this.splitEventDrag(e.eventDrag),a=this.splitEventResize(e.eventResize),d={};this.eventUiBuilders=me(n,(c,f)=>this.eventUiBuilders[f]||_(Rh));for(let c in n){let f=n[c],u=o[c]||Pn,h=this.eventUiBuilders[c];d[c]={businessHours:f.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:u,eventUiBases:h(e.eventUiBases[""],f.ui,s[c]),eventSelection:u.instances[e.eventSelection]?e.eventSelection:"",eventDrag:l[c]||null,eventResize:a[c]||null}}return d}_splitDateSpan(e){let n={};if(e){let r=this.getKeysForDateSpan(e);for(let i of r)n[i]=e}return n}_getKeysForEventDefs(e){return me(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:r,instances:i}=e,s={};for(let o in r)for(let l of n[o])s[l]||(s[l]=J()),s[l].defs[o]=r[o];for(let o in i){let l=i[o];for(let a of n[l.defId])s[a]&&(s[a].instances[o]=l)}return s}_splitIndividualUi(e,n){let r={};for(let i in e)if(i)for(let s of n[i])r[s]||(r[s]={}),r[s][i]=e[i];return r}_splitInteraction(e){let n={};if(e){let r=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),i=this._getKeysForEventDefs(e.mutatedEvents),s=this._splitEventStore(e.mutatedEvents,i),o=l=>{n[l]||(n[l]={affectedEvents:r[l]||Pn,mutatedEvents:s[l]||Pn,isEvent:e.isEvent})};for(let l in r)o(l);for(let l in s)o(l)}return n}}function Rh(t,e,n){let r=[];t&&r.push(t),e&&r.push(e);let i={"":Zo(r)};return n&&Object.assign(i,n),i}function Wr(t,e,n,r){return{dow:t.getUTCDay(),isDisabled:!!(r&&(!r.activeRange||!ge(r.activeRange,t))),isOther:!!(r&&!ge(r.currentRange,t)),isToday:!!(e&&ge(e,t)),isPast:!!(n?t<n:e&&t<e.start),isFuture:!!(n?t>n:e&&t>=e.end)}}function yn(t,e){let n=["fc-day",`fc-day-${Tu[t.dow]}`];return t.isDisabled?n.push("fc-day-disabled"):(t.isToday&&(n.push("fc-day-today"),n.push(e.getClass("today"))),t.isPast&&n.push("fc-day-past"),t.isFuture&&n.push("fc-day-future"),t.isOther&&n.push("fc-day-other")),n}const _h=B({year:"numeric",month:"long",day:"numeric"}),Th=B({week:"long"});function Je(t,e,n="day",r=!0){const{dateEnv:i,options:s,calendarApi:o}=t;let l=i.format(e,n==="week"?Th:_h);if(s.navLinks){let a=i.toDate(e);const d=c=>{let f=n==="day"?s.navLinkDayClick:n==="week"?s.navLinkWeekClick:null;typeof f=="function"?f.call(o,i.toDate(e),c):(typeof f=="string"&&(n=f),o.zoomTo(e,n))};return Object.assign({title:lt(s.navLinkHint,[l,a],l),"data-navlink":""},r?Po(d):{onClick:d})}return{"aria-label":l}}let Hn=null;function Mh(){return Hn===null&&(Hn=Ih()),Hn}function Ih(){let t=document.createElement("div");ot(t,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),t.innerHTML="<div></div>",document.body.appendChild(t);let n=t.firstChild.getBoundingClientRect().left>t.getBoundingClientRect().left;return Cr(t),n}let jn;function kh(){return jn||(jn=Nh()),jn}function Nh(){let t=document.createElement("div");t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t);let e=cl(t);return document.body.removeChild(t),e}function cl(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}function Oh(t,e=!1){let n=window.getComputedStyle(t),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,s=parseInt(n.borderTopWidth,10)||0,o=parseInt(n.borderBottomWidth,10)||0,l=cl(t),a=l.y-r-i,d=l.x-s-o,c={borderLeft:r,borderRight:i,borderTop:s,borderBottom:o,scrollbarBottom:d,scrollbarLeft:0,scrollbarRight:0};return Mh()&&n.direction==="rtl"?c.scrollbarLeft=a:c.scrollbarRight=a,e&&(c.paddingLeft=parseInt(n.paddingLeft,10)||0,c.paddingRight=parseInt(n.paddingRight,10)||0,c.paddingTop=parseInt(n.paddingTop,10)||0,c.paddingBottom=parseInt(n.paddingBottom,10)||0),c}function Ph(t,e=!1,n){let r=Vr(t),i=Oh(t,e),s={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return e&&(s.left+=i.paddingLeft,s.right-=i.paddingRight,s.top+=i.paddingTop,s.bottom-=i.paddingBottom),s}function Vr(t){let e=t.getBoundingClientRect();return{left:e.left+window.scrollX,top:e.top+window.scrollY,right:e.right+window.scrollX,bottom:e.bottom+window.scrollY}}function Hh(t){let e=dl(t),n=t.getBoundingClientRect();for(let r of e){let i=al(n,r.getBoundingClientRect());if(i)n=i;else return null}return n}function dl(t){let e=[];for(;t instanceof HTMLElement;){let n=window.getComputedStyle(t);if(n.position==="fixed")break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&e.push(t),t=t.parentNode}return e}class et{constructor(e,n,r,i){this.els=n;let s=this.originClientRect=e.getBoundingClientRect();r&&this.buildElHorizontals(s.left),i&&this.buildElVerticals(s.top)}buildElHorizontals(e){let n=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();n.push(s.left-e),r.push(s.right-e)}this.lefts=n,this.rights=r}buildElVerticals(e){let n=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();n.push(s.top-e),r.push(s.bottom-e)}this.tops=n,this.bottoms=r}leftToIndex(e){let{lefts:n,rights:r}=this,i=n.length,s;for(s=0;s<i;s+=1)if(e>=n[s]&&e<r[s])return s}topToIndex(e){let{tops:n,bottoms:r}=this,i=n.length,s;for(s=0;s<i;s+=1)if(e>=n[s]&&e<r[s])return s}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return Rt(this.tops||[],e.tops||[])&&Rt(this.bottoms||[],e.bottoms||[])&&Rt(this.lefts||[],e.lefts||[])&&Rt(this.rights||[],e.rights||[])}}function Rt(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(Math.round(t[r])!==Math.round(e[r]))return!1;return!0}class Gr{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}}class jh extends Gr{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}}class Lh extends Gr{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(e){window.scroll(window.scrollX,e)}setScrollLeft(e){window.scroll(e,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}}class se extends H{constructor(){super(...arguments),this.uid=Fe()}prepareHits(){}queryHit(e,n,r,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!q(e,".fc-event-mirror")}isValidDateDownEl(e){return!q(e,".fc-event:not(.fc-bg-event)")&&!q(e,".fc-more-link")&&!q(e,"a[data-navlink]")&&!q(e,".fc-popover")}}class ul{constructor(e=n=>n.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let n=[];for(let r of e)this.insertEntry(r,n);return n}insertEntry(e,n){let r=this.findInsertion(e);this.isInsertionValid(r,e)?this.insertEntryAt(e,r):this.handleInvalidInsertion(r,e,n)}isInsertionValid(e,n){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(n)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,n,r){if(this.allowReslicing&&e.touchingEntry){const i=Object.assign(Object.assign({},n),{span:Yr(n.span,e.touchingEntry.span)});r.push(i),this.splitEntry(n,e.touchingEntry,r)}else r.push(n)}splitEntry(e,n,r){let i=e.span,s=n.span;i.start<s.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:s.start}},r),i.end>s.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:s.end,end:i.end}},r)}insertEntryAt(e,n){let{entriesByLevel:r,levelCoords:i}=this;n.lateral===-1?(Ln(i,n.level,n.levelCoord),Ln(r,n.level,[e])):Ln(r[n.level],n.lateral,e),this.stackCnts[Oe(e)]=n.stackCnt}findInsertion(e){let{levelCoords:n,entriesByLevel:r,strictOrder:i,stackCnts:s}=this,o=n.length,l=0,a=-1,d=-1,c=null,f=0;for(let p=0;p<o;p+=1){const v=n[p];if(!i&&v>=l+this.getEntryThickness(e))break;let y=r[p],S,w=sr(y,e.span.start,ir),D=w[0]+w[1];for(;(S=y[D])&&S.span.start<e.span.end;){let C=v+this.getEntryThickness(S);C>l&&(l=C,c=S,a=p,d=D),C===l&&(f=Math.max(f,s[Oe(S)]+1)),D+=1}}let u=0;if(c)for(u=a+1;u<o&&n[u]<l;)u+=1;let h=-1;return u<o&&n[u]===l&&(h=sr(r[u],e.span.end,ir)[0]),{touchingLevel:a,touchingLateral:d,touchingEntry:c,stackCnt:f,levelCoord:l,level:u,lateral:h}}toRects(){let{entriesByLevel:e,levelCoords:n}=this,r=e.length,i=[];for(let s=0;s<r;s+=1){let o=e[s],l=n[s];for(let a of o)i.push(Object.assign(Object.assign({},a),{thickness:this.getEntryThickness(a),levelCoord:l}))}return i}}function ir(t){return t.span.end}function Oe(t){return t.index+":"+t.span.start}function Bh(t){let e=[];for(let n of t){let r=[],i={span:n.span,entries:[n]};for(let s of e)Yr(s.span,i.span)?i={entries:s.entries.concat(i.entries),span:Fh(s.span,i.span)}:r.push(s);r.push(i),e=r}return e}function Fh(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function Yr(t,e){let n=Math.max(t.start,e.start),r=Math.min(t.end,e.end);return n<r?{start:n,end:r}:null}function Ln(t,e,n){t.splice(e,0,n)}function sr(t,e,n){let r=0,i=t.length;if(!i||e<n(t[r]))return[0,0];if(e>n(t[i-1]))return[i,0];for(;r<i;){let s=Math.floor(r+(i-r)/2),o=n(t[s]);if(e<o)i=s;else if(e>o)r=s+1;else return[s,1]}return[r,0]}class Uh{constructor(e,n){this.emitter=new vn}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const qr={};function zh(t,e){return!t||e>10?B({weekday:"short"}):e>1?B({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):B({weekday:"long"})}const fl="fc-col-header-cell";function hl(t){return t.text}class Wh extends H{render(){let{dateEnv:e,options:n,theme:r,viewApi:i}=this.context,{props:s}=this,{date:o,dateProfile:l}=s,a=Wr(o,s.todayRange,null,l),d=[fl].concat(yn(a,r)),c=e.format(o,s.dayHeaderFormat),f=!a.isDisabled&&s.colCnt>1?Je(this.context,o):{},u=e.toDate(o);e.namedTimeZoneImpl&&(u=De(u,36e5));let h=Object.assign(Object.assign(Object.assign({date:u,view:i},s.extraRenderProps),{text:c}),a);return g($,{elTag:"th",elClasses:d,elAttrs:Object.assign({role:"columnheader",colSpan:s.colSpan,"data-date":a.isDisabled?void 0:Et(o)},s.extraDataAttrs),renderProps:h,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:hl,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},p=>g("div",{className:"fc-scrollgrid-sync-inner"},!a.isDisabled&&g(p,{elTag:"a",elAttrs:f,elClasses:["fc-col-header-cell-cushion",s.isSticky&&"fc-sticky"]})))}}const Vh=B({weekday:"long"});class Gh extends H{render(){let{props:e}=this,{dateEnv:n,theme:r,viewApi:i,options:s}=this.context,o=V(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},a=n.format(o,e.dayHeaderFormat),d=Object.assign(Object.assign(Object.assign(Object.assign({date:o},l),{view:i}),e.extraRenderProps),{text:a});return g($,{elTag:"th",elClasses:[fl,...yn(l,r),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:d,generatorName:"dayHeaderContent",customGenerator:s.dayHeaderContent,defaultGenerator:hl,classNameGenerator:s.dayHeaderClassNames,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},c=>g("div",{className:"fc-scrollgrid-sync-inner"},g(c,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":n.format(o,Vh)}})))}}class gl extends H{constructor(){super(...arguments),this.createDayHeaderFormatter=_(Yh)}render(){let{context:e}=this,{dates:n,dateProfile:r,datesRepDistinctDays:i,renderIntro:s}=this.props,o=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return g(ze,{unit:"day"},(l,a)=>g("tr",{role:"row"},s&&s("day"),n.map(d=>i?g(Wh,{key:d.toISOString(),date:d,dateProfile:r,todayRange:a,colCnt:n.length,dayHeaderFormat:o}):g(Gh,{key:d.getUTCDay(),dow:d.getUTCDay(),dayHeaderFormat:o}))))}}function Yh(t,e,n){return t||zh(e,n)}class pl{constructor(e,n){let r=e.start,{end:i}=e,s=[],o=[],l=-1;for(;r<i;)n.isHiddenDay(r)?s.push(l+.5):(l+=1,s.push(l),o.push(r)),r=V(r,1);this.dates=o,this.indices=s,this.cnt=o.length}sliceRange(e){let n=this.getDateDayIndex(e.start),r=this.getDateDayIndex(V(e.end,-1)),i=Math.max(0,n),s=Math.min(this.cnt-1,r);return i=Math.ceil(i),s=Math.floor(s),i<=s?{firstIndex:i,lastIndex:s,isStart:n===i,isEnd:r===s}:null}getDateDayIndex(e){let{indices:n}=this,r=Math.floor(_e(this.dates[0],e));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class ml{constructor(e,n){let{dates:r}=e,i,s,o;if(n){for(s=r[0].getUTCDay(),i=1;i<r.length&&r[i].getUTCDay()!==s;i+=1);o=Math.ceil(r.length/i)}else o=1,i=r.length;this.rowCnt=o,this.colCnt=i,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCnt;n+=1){let r=[];for(let i=0;i<this.colCnt;i+=1)r.push(this.buildCell(n,i));e.push(r)}return e}buildCell(e,n){let r=this.daySeries.dates[e*this.colCnt+n];return{key:r.toISOString(),date:r}}buildHeaderDates(){let e=[];for(let n=0;n<this.colCnt;n+=1)e.push(this.cells[0][n].date);return e}sliceRange(e){let{colCnt:n}=this,r=this.daySeries.sliceRange(e),i=[];if(r){let{firstIndex:s,lastIndex:o}=r,l=s;for(;l<=o;){let a=Math.floor(l/n),d=Math.min((a+1)*n,o+1);i.push({row:a,firstCol:l%n,lastCol:(d-1)%n,isStart:r.isStart&&l===s,isEnd:r.isEnd&&d-1===o}),l=d}}return i}}class vl{constructor(){this.sliceBusinessHours=_(this._sliceBusinessHours),this.sliceDateSelection=_(this._sliceDateSpan),this.sliceEventStore=_(this._sliceEventStore),this.sliceEventDrag=_(this._sliceInteraction),this.sliceEventResize=_(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,r,i,...s){let{eventUiBases:o}=e,l=this.sliceEventStore(e.eventStore,o,n,r,...s);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,r,o,i,...s),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,r,i,...s),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag(e.eventDrag,o,n,r,...s),eventResize:this.sliceEventResize(e.eventResize,o,n,r,...s),eventSelection:e.eventSelection}}sliceNowDate(e,n,r,i,...s){return this._sliceDateSpan({range:{start:e,end:De(e,1)},allDay:!1},n,r,{},i,...s)}_sliceBusinessHours(e,n,r,i,...s){return e?this._sliceEventStore(He(e,_t(n,!!r),i),{},n,r,...s).bg:[]}_sliceEventStore(e,n,r,i,...s){if(e){let o=nr(e,n,_t(r,!!i),i);return{bg:this.sliceEventRanges(o.bg,s),fg:this.sliceEventRanges(o.fg,s)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,r,i,...s){if(!e)return null;let o=nr(e.mutatedEvents,n,_t(r,!!i),i);return{segs:this.sliceEventRanges(o.fg,s),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,r,i,s,...o){if(!e)return[];let l=_t(n,!!r),a=xe(e.range,l);if(a){e=Object.assign(Object.assign({},e),{range:a});let d=gh(e,i,s),c=this.sliceRange(e.range,...o);for(let f of c)f.eventRange=d;return c}return[]}sliceEventRanges(e,n){let r=[];for(let i of e)r.push(...this.sliceEventRange(i,n));return r}sliceEventRange(e,n){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:V(r.start,1)});let i=this.sliceRange(r,...n);for(let s of i)s.eventRange=e,s.isStart=e.isStart&&s.isStart,s.isEnd=e.isEnd&&s.isEnd;return i}}function _t(t,e){let n=t.activeRange;return e?n:{start:De(n.start,t.slotMinTime.milliseconds),end:De(n.end,t.slotMaxTime.milliseconds-864e5)}}function yl(t,e,n){let{instances:r}=t.mutatedEvents;for(let i in r)if(!pn(e.validRange,r[i].range))return!1;return bl({eventDrag:t},n)}function qh(t,e,n){return pn(e.validRange,t.range)?bl({dateSelection:t},n):!1}function bl(t,e){let n=e.getCurrentData(),r=Object.assign({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},t);return(e.pluginHooks.isPropsValid||$h)(r,e)}function $h(t,e,n={},r){return!(t.eventDrag&&!Qh(t,e,n,r)||t.dateSelection&&!Zh(t,e,n,r))}function Qh(t,e,n,r){let i=e.getCurrentData(),s=t.eventDrag,o=s.mutatedEvents,l=o.defs,a=o.instances,d=Xt(l,s.isEvent?t.eventUiBases:{"":i.selectionConfig});r&&(d=me(d,r));let c=Yf(t.eventStore,s.affectedEvents.instances),f=c.defs,u=c.instances,h=Xt(f,t.eventUiBases);for(let p in a){let v=a[p],y=v.range,S=d[v.defId],w=l[v.defId];if(!El(S.constraints,y,c,t.businessHours,e))return!1;let{eventOverlap:D}=e.options,C=typeof D=="function"?D:null;for(let R in u){let I=u[R];if(kr(y,I.range)&&(h[I.defId].overlap===!1&&s.isEvent||S.overlap===!1||C&&!C(new U(e,f[I.defId],I),new U(e,w,v))))return!1}let x=i.eventStore;for(let R of S.allows){let I=Object.assign(Object.assign({},n),{range:v.range,allDay:w.allDay}),A=x.defs[w.defId],F=x.instances[p],z;if(A?z=new U(e,A,F):z=new U(e,w),!R(Lr(I,e),z))return!1}}return!0}function Zh(t,e,n,r){let i=t.eventStore,s=i.defs,o=i.instances,l=t.dateSelection,a=l.range,{selectionConfig:d}=e.getCurrentData();if(r&&(d=r(d)),!El(d.constraints,a,i,t.businessHours,e))return!1;let{selectOverlap:c}=e.options,f=typeof c=="function"?c:null;for(let u in o){let h=o[u];if(kr(a,h.range)&&(d.overlap===!1||f&&!f(new U(e,s[h.defId],h),null)))return!1}for(let u of d.allows){let h=Object.assign(Object.assign({},n),l);if(!u(Lr(h,e),null))return!1}return!0}function El(t,e,n,r,i){for(let s of t)if(!Xh(Kh(s,e,n,r,i),e))return!1;return!0}function Kh(t,e,n,r,i){return t==="businessHours"?Bn(He(r,e,i)):typeof t=="string"?Bn(mn(n,s=>s.groupId===t)):typeof t=="object"&&t?Bn(He(t,e,i)):[]}function Bn(t){let{instances:e}=t,n=[];for(let r in e)n.push(e[r].range);return n}function Xh(t,e){for(let n of t)if(pn(n,e))return!0;return!1}const Tt=/^(visible|hidden)$/;class Sl extends H{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,de(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:n,liquidIsAbsolute:r}=e,i=n&&r,s=["fc-scroller"];return n&&(r?s.push("fc-scroller-liquid-absolute"):s.push("fc-scroller-liquid")),g("div",{ref:this.handleEl,className:s.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:i&&-(e.overcomeLeft||0)||"",right:i&&-(e.overcomeRight||0)||"",bottom:i&&-(e.overcomeBottom||0)||"",marginLeft:!i&&-(e.overcomeLeft||0)||"",marginRight:!i&&-(e.overcomeRight||0)||"",marginBottom:!i&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(Tt.test(this.props.overflowX))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().width>n)return!0;return!1}needsYScrolling(){if(Tt.test(this.props.overflowY))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().height>n)return!0;return!1}getXScrollbarWidth(){return Tt.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return Tt.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class he{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(n,r)=>{let{depths:i,currentMap:s}=this,o=!1,l=!1;n!==null?(o=r in s,s[r]=n,i[r]=(i[r]||0)+1,l=!0):(i[r]-=1,i[r]||(delete s[r],delete this.callbackMap[r],o=!0)),this.masterCallback&&(o&&this.masterCallback(null,String(r)),l&&this.masterCallback(n,String(r)))}}createRef(e){let n=this.callbackMap[e];return n||(n=this.callbackMap[e]=r=>{this.handleValue(r,String(e))}),n}collect(e,n,r){return df(this.currentMap,e,n,r)}getAll(){return Mr(this.currentMap)}}function Jh(t){let e=lu(t,".fc-scrollgrid-shrink"),n=0;for(let r of e)n=Math.max(n,Su(r));return Math.ceil(n)}function wl(t,e){return t.liquid&&e.liquid}function eg(t,e){return e.maxHeight!=null||wl(t,e)}function tg(t,e,n,r){let{expandRows:i}=n;return typeof e.content=="function"?e.content(n):g("table",{role:"presentation",className:[e.tableClassName,t.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,g(r?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(n):e.rowContent))}function ng(t,e){return Ae(t,e,ie)}function rg(t,e){let n=[];for(let r of t){let i=r.span||1;for(let s=0;s<i;s+=1)n.push(g("col",{style:{width:r.width==="shrink"?ig(e):r.width||"",minWidth:r.minWidth||""}}))}return g("colgroup",{},...n)}function ig(t){return t??4}function sg(t){for(let e of t)if(e.width==="shrink")return!0;return!1}function og(t,e){let n=["fc-scrollgrid",e.theme.getClass("table")];return t&&n.push("fc-scrollgrid-liquid"),n}function lg(t,e){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${t.type}`,t.className];return e&&t.liquid&&t.maxHeight==null&&n.push("fc-scrollgrid-section-liquid"),t.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function or(t){return g("div",{className:"fc-scrollgrid-sticky-shim",style:{width:t.clientWidth,minWidth:t.tableMinWidth}})}function Jt(t){let{stickyHeaderDates:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}function Cl(t){let{stickyFooterScrollbar:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}class $r extends H{constructor(){super(...arguments),this.processCols=_(e=>e,ng),this.renderMicroColGroup=_(rg),this.scrollerRefs=new he,this.scrollerElRefs=new he(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:n,context:r}=this,i=e.sections||[],s=this.processCols(e.cols),o=this.renderMicroColGroup(s,n.shrinkWidth),l=og(e.liquid,r);e.collapsibleWidth&&l.push("fc-scrollgrid-collapsible");let a=i.length,d=0,c,f=[],u=[],h=[];for(;d<a&&(c=i[d]).type==="header";)f.push(this.renderSection(c,o,!0)),d+=1;for(;d<a&&(c=i[d]).type==="body";)u.push(this.renderSection(c,o,!1)),d+=1;for(;d<a&&(c=i[d]).type==="footer";)h.push(this.renderSection(c,o,!0)),d+=1;let p=!ll();const v={role:"rowgroup"};return g("table",{role:"grid",className:l.join(" "),style:{height:e.height}},!!(!p&&f.length)&&g("thead",v,...f),!!(!p&&u.length)&&g("tbody",v,...u),!!(!p&&h.length)&&g("tfoot",v,...h),p&&g("tbody",v,...f,...u,...h))}renderSection(e,n,r){return"outerContent"in e?g(j,{key:e.key},e.outerContent):g("tr",{key:e.key,role:"presentation",className:lg(e,this.props.liquid).join(" ")},this.renderChunkTd(e,n,e.chunk,r))}renderChunkTd(e,n,r,i){if("outerContent"in r)return r.outerContent;let{props:s}=this,{forceYScrollbars:o,scrollerClientWidths:l,scrollerClientHeights:a}=this.state,d=eg(s,e),c=wl(s,e),f=s.liquid?o?"scroll":d?"auto":"hidden":"visible",u=e.key,h=tg(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:!s.collapsibleWidth&&l[u]!==void 0?l[u]:null,clientHeight:a[u]!==void 0?a[u]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return g(i?"th":"td",{ref:r.elRef,role:"presentation"},g("div",{className:`fc-scroller-harness${c?" fc-scroller-harness-liquid":""}`},g(Sl,{ref:this.scrollerRefs.createRef(u),elRef:this.scrollerElRefs.createRef(u),overflowY:f,overflowX:s.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},h)))}_handleScrollerEl(e,n){let r=ag(this.props.sections,n);r&&de(r.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return sg(this.props.cols)?Jh(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=kh(),{scrollerRefs:n,scrollerElRefs:r}=this,i=!1,s={},o={};for(let l in n.currentMap){let a=n.currentMap[l];if(a&&a.needsYScrolling()){i=!0;break}}for(let l of this.props.sections){let a=l.key,d=r.currentMap[a];if(d){let c=d.parentNode;s[a]=Math.floor(c.getBoundingClientRect().width-(i?e.y:0)),o[a]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:s,scrollerClientHeights:o}}}$r.addStateEquality({scrollerClientWidths:ie,scrollerClientHeights:ie});function ag(t,e){for(let n of t)if(n.key===e)return n;return null}class bn extends H{constructor(){super(...arguments),this.buildPublicEvent=_((e,n,r)=>new U(e,n,r)),this.handleEl=e=>{this.el=e,de(this.props.elRef,e),e&&Gi(e,this.props.seg)}}render(){const{props:e,context:n}=this,{options:r}=n,{seg:i}=e,{eventRange:s}=i,{ui:o}=s,l={event:this.buildPublicEvent(n,s.def,s.instance),view:n.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&ih(i,n),isStartResizable:!e.disableResizing&&sh(i,n),isEndResizable:!e.disableResizing&&oh(i),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return g($,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...lh(l),...i.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:l,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Gi(this.el,this.props.seg)}}class Qr extends H{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i}=e,{ui:s}=i.eventRange,o=r.eventTimeFormat||e.defaultTimeFormat,l=ct(i,o,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return g(bn,Object.assign({},e,{elTag:"a",elStyle:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},elAttrs:Ur(i,n),defaultGenerator:cg,timeText:l}),(a,d)=>g(j,null,g(a,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:d.textColor}}),!!d.isStartResizable&&g("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!d.isEndResizable&&g("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}Qr.addPropsEquality({seg:ie});function cg(t){return g("div",{className:"fc-event-main-frame"},t.timeText&&g("div",{className:"fc-event-time"},t.timeText),g("div",{className:"fc-event-title-container"},g("div",{className:"fc-event-title fc-sticky"},t.event.title||g(j,null," "))))}const Zr=t=>g(ye.Consumer,null,e=>{let{options:n}=e,r={isAxis:t.isAxis,date:e.dateEnv.toDate(t.date),view:e.viewApi};return g($,{elRef:t.elRef,elTag:t.elTag||"div",elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},t.children)}),dg=B({day:"numeric"});class Kr extends H{constructor(){super(...arguments),this.refineRenderProps=Pt(ug)}render(){let{props:e,context:n}=this,{options:r}=n,i=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:n.viewApi,dateEnv:n.dateEnv,monthStartFormat:r.monthStartFormat});return g($,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),i.isDisabled?{}:{"data-date":Et(e.date)}),elClasses:[...yn(i,n.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:i,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:i.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount},e.children)}}function Xr(t){return!!(t.dayCellContent||Jn("dayCellContent",t))}function ug(t){let{date:e,dateEnv:n,dateProfile:r,isMonthStart:i}=t,s=Wr(e,t.todayRange,null,r),o=t.showDayNumber?n.format(e,i?t.monthStartFormat:dg):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(e),view:t.viewApi},s),{isMonthStart:i,dayNumberText:o}),t.extraRenderProps)}class Al extends H{render(){let{props:e}=this,{seg:n}=e;return g(bn,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:n.eventRange.ui.backgroundColor},defaultGenerator:fg,seg:n,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function fg(t){let{title:e}=t.event;return e&&g("div",{className:"fc-event-title"},t.event.title)}function Dl(t){return g("div",{className:`fc-${t}`})}const xl=t=>g(ye.Consumer,null,e=>{let{dateEnv:n,options:r}=e,{date:i}=t,s=r.weekNumberFormat||t.defaultFormat,o=n.computeWeekNumber(i),l=n.format(i,s),a={num:o,text:l,date:i};return g($,{elRef:t.elRef,elTag:t.elTag,elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:a,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:hg,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},t.children)});function hg(t){return t.text}const Fn=10;class gg extends H{constructor(){super(...arguments),this.state={titleId:Ce()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&de(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const n=No(e);this.rootEl.contains(n)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:n}=this.context,{props:r,state:i}=this,s=["fc-popover",e.getClass("popover")].concat(r.extraClassNames||[]);return qd(g("div",Object.assign({},r.extraAttrs,{id:r.id,className:s.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),g("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},g("span",{className:"fc-popover-title",id:i.titleId},r.title),g("span",{className:"fc-popover-close "+e.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),g("div",{className:"fc-popover-body "+e.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:n,alignGridTop:r}=this.props,{rootEl:i}=this,s=Hh(n);if(s){let o=i.getBoundingClientRect(),l=r?q(n,".fc-scrollgrid").getBoundingClientRect().top:s.top,a=e?s.right-o.width:s.left;l=Math.max(l,Fn),a=Math.min(a,document.documentElement.clientWidth-Fn-o.width),a=Math.max(a,Fn);let d=i.offsetParent.getBoundingClientRect();ot(i,{top:l-d.top,left:a-d.left})}}}class pg extends se{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:n}=this.context,{props:r}=this,{startDate:i,todayRange:s,dateProfile:o}=r,l=n.format(i,e.dayPopoverFormat);return g(Kr,{elRef:this.handleRootEl,date:i,dateProfile:o,todayRange:s},(a,d,c)=>g(gg,{elRef:c.ref,id:r.id,title:l,extraClassNames:["fc-more-popover"].concat(c.className||[]),extraAttrs:c,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},Xr(e)&&g(a,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(e,n,r,i){let{rootEl:s,props:o}=this;return e>=0&&e<r&&n>=0&&n<i?{dateProfile:o.dateProfile,dateSpan:Object.assign({allDay:!o.forceTimed,range:{start:o.startDate,end:o.endDate}},o.extraDateSpan),dayEl:s,rect:{left:0,top:0,right:r,bottom:i},layer:1}:null}}class Rl extends H{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:Ce()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&de(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:r}=this,{moreLinkClick:i}=r.options,s=qi(n).start;function o(l){let{def:a,instance:d,range:c}=l.eventRange;return{event:new U(r,a,d),start:r.dateEnv.toDate(c.start),end:r.dateEnv.toDate(c.end),isStart:l.isStart,isEnd:l.isEnd}}typeof i=="function"&&(i=i({date:s,allDay:!!n.allDayDate,allSegs:n.allSegs.map(o),hiddenSegs:n.hiddenSegs.map(o),jsEvent:e,view:r.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&r.calendarApi.zoomTo(s,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return g(ye.Consumer,null,r=>{let{viewApi:i,options:s,calendarApi:o}=r,{moreLinkText:l}=s,{moreCnt:a}=e,d=qi(e),c=typeof l=="function"?l.call(o,a):`+${a} ${l}`,f=lt(s.moreLinkHint,[a],c),u={num:a,shortText:`+${a}`,text:c,view:i};return g(j,null,!!e.moreCnt&&g($,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),Po(this.handleClick)),{title:f,"aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?n.popoverId:""}),renderProps:u,generatorName:"moreLinkContent",customGenerator:s.moreLinkContent,defaultGenerator:e.defaultGenerator||mg,classNameGenerator:s.moreLinkClassNames,didMount:s.moreLinkDidMount,willUnmount:s.moreLinkWillUnmount},e.children),n.isPopoverOpen&&g(pg,{id:n.popoverId,startDate:d.start,endDate:d.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=q(this.linkEl,".fc-view-harness"))}}function mg(t){return t.text}function qi(t){if(t.allDayDate)return{start:t.allDayDate,end:V(t.allDayDate,1)};let{hiddenSegs:e}=t;return{start:_l(e),end:yg(e)}}function _l(t){return t.reduce(vg).eventRange.range.start}function vg(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function yg(t){return t.reduce(bg).eventRange.range.end}function bg(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class Eg{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let n of this.handlers)n(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}}class Sg extends Eg{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:n}=this;let r=!1;e.isActive?(n.set(e.id,e),r=!0):n.has(e.id)&&(n.delete(e.id),r=!0),r&&this.set(n)}}const wg=[],Tl={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Ml=Object.assign(Object.assign({},Tl),{buttonHints:{prev:"Previous $0",next:"Next $0",today(t,e){return e==="day"?"Today":`This ${t}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(t){return`Show ${t} more event${t===1?"":"s"}`}});function Cg(t){let e=t.length>0?t[0].code:"en",n=wg.concat(t),r={en:Ml};for(let i of n)r[i.code]=i;return{map:r,defaultCode:e}}function Il(t,e){return typeof t=="object"&&!Array.isArray(t)?kl(t.code,[t.code],t):Ag(t,e)}function Ag(t,e){let n=[].concat(t||[]),r=Dg(n,e)||Ml;return kl(t,n,r)}function Dg(t,e){for(let n=0;n<t.length;n+=1){let r=t[n].toLocaleLowerCase().split("-");for(let i=r.length;i>0;i-=1){let s=r.slice(0,i).join("-");if(e[s])return e[s]}}return null}function kl(t,e,n){let r=Tr([Tl,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:t,codes:e,week:i,simpleNumberFormat:new Intl.NumberFormat(t),options:r}}function ue(t){return{id:Fe(),name:t.name,premiumReleaseDate:t.premiumReleaseDate?new Date(t.premiumReleaseDate):void 0,deps:t.deps||[],reducers:t.reducers||[],isLoadingFuncs:t.isLoadingFuncs||[],contextInit:[].concat(t.contextInit||[]),eventRefiners:t.eventRefiners||{},eventDefMemberAdders:t.eventDefMemberAdders||[],eventSourceRefiners:t.eventSourceRefiners||{},isDraggableTransformers:t.isDraggableTransformers||[],eventDragMutationMassagers:t.eventDragMutationMassagers||[],eventDefMutationAppliers:t.eventDefMutationAppliers||[],dateSelectionTransformers:t.dateSelectionTransformers||[],datePointTransforms:t.datePointTransforms||[],dateSpanTransforms:t.dateSpanTransforms||[],views:t.views||{},viewPropsTransformers:t.viewPropsTransformers||[],isPropsValid:t.isPropsValid||null,externalDefTransforms:t.externalDefTransforms||[],viewContainerAppends:t.viewContainerAppends||[],eventDropTransformers:t.eventDropTransformers||[],componentInteractions:t.componentInteractions||[],calendarInteractions:t.calendarInteractions||[],themeClasses:t.themeClasses||{},eventSourceDefs:t.eventSourceDefs||[],cmdFormatter:t.cmdFormatter,recurringTypes:t.recurringTypes||[],namedTimeZonedImpl:t.namedTimeZonedImpl,initialView:t.initialView||"",elementDraggingImpl:t.elementDraggingImpl,optionChangeHandlers:t.optionChangeHandlers||{},scrollGridImpl:t.scrollGridImpl||null,listenerRefiners:t.listenerRefiners||{},optionRefiners:t.optionRefiners||{},propSetHandlers:t.propSetHandlers||{}}}function xg(t,e){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(s){for(let o of s){const l=o.name,a=n[l];a===void 0?(n[l]=o.id,i(o.deps),r=_g(r,o)):a!==o.id&&console.warn(`Duplicate plugin '${l}'`)}}return t&&i(t),i(e),r}function Rg(){let t=[],e=[],n;return(r,i)=>((!n||!Ae(r,t)||!Ae(i,e))&&(n=xg(r,i)),t=r,e=i,n)}function _g(t,e){return{premiumReleaseDate:Tg(t.premiumReleaseDate,e.premiumReleaseDate),reducers:t.reducers.concat(e.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:t.contextInit.concat(e.contextInit),eventRefiners:Object.assign(Object.assign({},t.eventRefiners),e.eventRefiners),eventDefMemberAdders:t.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},t.eventSourceRefiners),e.eventSourceRefiners),isDraggableTransformers:t.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:t.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:t.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:t.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:t.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:t.dateSpanTransforms.concat(e.dateSpanTransforms),views:Object.assign(Object.assign({},t.views),e.views),viewPropsTransformers:t.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||t.isPropsValid,externalDefTransforms:t.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:t.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:t.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:t.calendarInteractions.concat(e.calendarInteractions),componentInteractions:t.componentInteractions.concat(e.componentInteractions),themeClasses:Object.assign(Object.assign({},t.themeClasses),e.themeClasses),eventSourceDefs:t.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(e.recurringTypes),namedTimeZonedImpl:e.namedTimeZonedImpl||t.namedTimeZonedImpl,initialView:t.initialView||e.initialView,elementDraggingImpl:t.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},t.optionChangeHandlers),e.optionChangeHandlers),scrollGridImpl:e.scrollGridImpl||t.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},t.listenerRefiners),e.listenerRefiners),optionRefiners:Object.assign(Object.assign({},t.optionRefiners),e.optionRefiners),propSetHandlers:Object.assign(Object.assign({},t.propSetHandlers),e.propSetHandlers)}}function Tg(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}class Te extends St{}Te.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};Te.prototype.baseIconClass="fc-icon";Te.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"};Te.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};Te.prototype.iconOverrideOption="buttonIcons";Te.prototype.iconOverrideCustomButtonOption="icon";Te.prototype.iconOverridePrefix="fc-icon-";function Mg(t,e){let n={},r;for(r in t)lr(r,n,t,e);for(r in e)lr(r,n,t,e);return n}function lr(t,e,n,r){if(e[t])return e[t];let i=Ig(t,e,n,r);return i&&(e[t]=i),i}function Ig(t,e,n,r){let i=n[t],s=r[t],o=c=>i&&i[c]!==null?i[c]:s&&s[c]!==null?s[c]:null,l=o("component"),a=o("superType"),d=null;if(a){if(a===t)throw new Error("Can't have a custom view type that references itself");d=lr(a,e,n,r)}return!l&&d&&(l=d.component),l?{type:t,component:l,defaults:Object.assign(Object.assign({},d?d.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},d?d.overrides:{}),s?s.rawOptions:{})}:null}function $i(t){return me(t,kg)}function kg(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=Qi(e):n&&!(n.prototype instanceof H)&&(n=Qi(Object.assign(Object.assign({},e),{content:n}))),{superType:e.type,component:n,rawOptions:e}}function Qi(t){return e=>g(ye.Consumer,null,n=>g($,{elTag:"div",elClasses:Vo(n.viewSpec),renderProps:Object.assign(Object.assign({},e),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:t.content,classNameGenerator:t.classNames,didMount:t.didMount,willUnmount:t.willUnmount}))}function Ng(t,e,n,r){let i=$i(t),s=$i(e.views),o=Mg(i,s);return me(o,l=>Og(l,s,e,n,r))}function Og(t,e,n,r,i){let s=t.overrides.duration||t.defaults.duration||r.duration||n.duration,o=null,l="",a="",d={};if(s&&(o=Pg(s),o)){let u=Xn(o);l=u.unit,u.value===1&&(a=l,d=e[l]?e[l].rawOptions:{})}let c=u=>{let h=u.buttonText||{},p=t.defaults.buttonTextKey;return p!=null&&h[p]!=null?h[p]:h[t.type]!=null?h[t.type]:h[a]!=null?h[a]:null},f=u=>{let h=u.buttonHints||{},p=t.defaults.buttonTextKey;return p!=null&&h[p]!=null?h[p]:h[t.type]!=null?h[t.type]:h[a]!=null?h[a]:null};return{type:t.type,component:t.component,duration:o,durationUnit:l,singleUnit:a,optionDefaults:t.defaults,optionOverrides:Object.assign(Object.assign({},d),t.overrides),buttonTextOverride:c(r)||c(n)||t.overrides.buttonText,buttonTextDefault:c(i)||t.defaults.buttonText||c(at)||t.type,buttonTitleOverride:f(r)||f(n)||t.overrides.buttonHint,buttonTitleDefault:f(i)||t.defaults.buttonHint||f(at)}}let Zi={};function Pg(t){let e=JSON.stringify(t),n=Zi[e];return n===void 0&&(n=P(t),Zi[e]=n),n}function Hg(t,e){switch(e.type){case"CHANGE_VIEW_TYPE":t=e.viewType}return t}function jg(t,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return t}}function Lg(t,e,n){let r=t.initialDate;return r!=null?e.createMarker(r):n.getDateMarker()}function Bg(t,e){switch(e.type){case"SET_OPTION":return Object.assign(Object.assign({},t),{[e.optionName]:e.rawOptionValue});default:return t}}function Fg(t,e,n,r){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return r.build(e.dateMarker||n);case"CHANGE_DATE":return r.build(e.dateMarker);case"PREV":if(i=r.buildPrev(t,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(t,n),i.isValid)return i;break}return t}function Ug(t,e,n){let r=e?e.activeRange:null;return Ol({},$g(t,n),r,n)}function zg(t,e,n,r){let i=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return Ol(t,e.sources,i,r);case"REMOVE_EVENT_SOURCE":return Vg(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Pl(t,i,r):t;case"FETCH_EVENT_SOURCES":return Jr(t,e.sourceIds?Bo(e.sourceIds):Hl(t,r),i,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return qg(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function Wg(t,e,n){let r=e?e.activeRange:null;return Jr(t,Hl(t,n),r,!0,n)}function Nl(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function Ol(t,e,n,r){let i={};for(let s of e)i[s.sourceId]=s;return n&&(i=Pl(i,n,r)),Object.assign(Object.assign({},t),i)}function Vg(t,e){return Pe(t,n=>n.sourceId!==e)}function Pl(t,e,n){return Jr(t,Pe(t,r=>Gg(r,e,n)),e,!1,n)}function Gg(t,e,n){return jl(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function Jr(t,e,n,r,i){let s={};for(let o in t){let l=t[o];e[o]?s[o]=Yg(l,n,r,i):s[o]=l}return s}function Yg(t,e,n,r){let{options:i,calendarApi:s}=r,o=r.pluginHooks.eventSourceDefs[t.sourceDefId],l=Fe();return o.fetch({eventSource:t,range:e,isRefetch:n,context:r},a=>{let{rawEvents:d}=a;i.eventSourceSuccess&&(d=i.eventSourceSuccess.call(s,d,a.response)||d),t.success&&(d=t.success.call(s,d,a.response)||d),r.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:l,fetchRange:e,rawEvents:d})},a=>{let d=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(s,a),d=!0),t.failure&&(t.failure(a),d=!0),d||console.warn(a.message,a),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:l,fetchRange:e,error:a})}),Object.assign(Object.assign({},t),{isFetching:!0,latestFetchId:l})}function qg(t,e,n,r){let i=t[e];return i&&n===i.latestFetchId?Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):t}function Hl(t,e){return Pe(t,n=>jl(n,e))}function $g(t,e){let n=Xo(e),r=[].concat(t.eventSources||[]),i=[];t.initialEvents&&r.unshift(t.initialEvents),t.events&&r.unshift(t.events);for(let s of r){let o=Ko(s,e,n);o&&i.push(o)}return i}function jl(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}function Qg(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function Zg(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function Kg(t,e){let n;switch(e.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function Xg(t,e){let n;switch(e.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function Jg(t,e,n,r,i){let s=t.headerToolbar?Ki(t.headerToolbar,t,e,n,r,i):null,o=t.footerToolbar?Ki(t.footerToolbar,t,e,n,r,i):null;return{header:s,footer:o}}function Ki(t,e,n,r,i,s){let o={},l=[],a=!1;for(let d in t){let c=t[d],f=ep(c,e,n,r,i,s);o[d]=f.widgets,l.push(...f.viewsWithButtons),a=a||f.hasTitle}return{sectionWidgets:o,viewsWithButtons:l,hasTitle:a}}function ep(t,e,n,r,i,s){let o=e.direction==="rtl",l=e.customButtons||{},a=n.buttonText||{},d=e.buttonText||{},c=n.buttonHints||{},f=e.buttonHints||{},u=t?t.split(" "):[],h=[],p=!1;return{widgets:u.map(y=>y.split(",").map(S=>{if(S==="title")return p=!0,{buttonName:S};let w,D,C,x,R,I;if(w=l[S])C=A=>{w.click&&w.click.call(A.target,A,A.target)},(x=r.getCustomButtonIconClass(w))||(x=r.getIconClass(S,o))||(R=w.text),I=w.hint||w.text;else if(D=i[S]){h.push(S),C=()=>{s.changeView(S)},(R=D.buttonTextOverride)||(x=r.getIconClass(S,o))||(R=D.buttonTextDefault);let A=D.buttonTextOverride||D.buttonTextDefault;I=lt(D.buttonTitleOverride||D.buttonTitleDefault||e.viewHint,[A,S],A)}else if(s[S])if(C=()=>{s[S]()},(R=a[S])||(x=r.getIconClass(S,o))||(R=d[S]),S==="prevYear"||S==="nextYear"){let A=S==="prevYear"?"prev":"next";I=lt(c[A]||f[A],[d.year||"year","year"],d[S])}else I=A=>lt(c[S]||f[S],[d[A]||A,A],d[S]);return{buttonName:S,buttonClick:C,buttonIcon:x,buttonText:R,buttonHint:I}})),viewsWithButtons:h,hasTitle:p}}class tp{constructor(e,n,r){this.type=e,this.getCurrentData=n,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}let np={ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}};const rp=ue({name:"array-event-source",eventSourceDefs:[np]});let ip={parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:r}=t.context,i=t.eventSource.meta;ph(i.bind(null,sl(t.range,r)),s=>e({rawEvents:s}),n)}};const sp=ue({name:"func-event-source",eventSourceDefs:[ip]}),op={method:String,extraParams:b,startParam:String,endParam:String,timeZoneParam:String};let lp={parseMeta(t){return t.url&&(t.format==="json"||!t.format)?{url:t.url,format:"json",method:(t.method||"GET").toUpperCase(),extraParams:t.extraParams,startParam:t.startParam,endParam:t.endParam,timeZoneParam:t.timeZoneParam}:null},fetch(t,e,n){const{meta:r}=t.eventSource,i=cp(r,t.range,t.context);mh(r.method,r.url,i).then(([s,o])=>{e({rawEvents:s,response:o})},n)}};const ap=ue({name:"json-event-source",eventSourceRefiners:op,eventSourceDefs:[lp]});function cp(t,e,n){let{dateEnv:r,options:i}=n,s,o,l,a,d={};return s=t.startParam,s==null&&(s=i.startParam),o=t.endParam,o==null&&(o=i.endParam),l=t.timeZoneParam,l==null&&(l=i.timeZoneParam),typeof t.extraParams=="function"?a=t.extraParams():a=t.extraParams||{},Object.assign(d,a),d[s]=r.formatIso(e.start),d[o]=r.formatIso(e.end),r.timeZone!=="local"&&(d[l]=r.timeZone),d}const dp={daysOfWeek:b,startTime:P,endTime:P,duration:P,startRecur:b,endRecur:b};let up={parse(t,e){if(t.daysOfWeek||t.startTime||t.endTime||t.startRecur||t.endRecur){let n={daysOfWeek:t.daysOfWeek||null,startTime:t.startTime||null,endTime:t.endTime||null,startRecur:t.startRecur?e.createMarker(t.startRecur):null,endRecur:t.endRecur?e.createMarker(t.endRecur):null,dateEnv:e},r;return t.duration&&(r=t.duration),!r&&t.startTime&&t.endTime&&(r=Du(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:r,typeData:n}}return null},expand(t,e,n){let r=xe(e,{start:t.startRecur,end:t.endRecur});return r?hp(t.daysOfWeek,t.startTime,t.dateEnv,n,r):[]}};const fp=ue({name:"simple-recurring-event",recurringTypes:[up],eventRefiners:dp});function hp(t,e,n,r,i){let s=t?Bo(t):null,o=L(i.start),l=i.end,a=[];for(e&&(e.milliseconds<0?l=V(l,1):e.milliseconds>=1e3*60*60*24&&(o=V(o,-1)));o<l;){let d;(!s||s[o.getUTCDay()])&&(e?d=r.add(o,e):d=o,a.push(r.createMarker(n.toDate(d)))),o=V(o,1)}return a}const gp=ue({name:"change-handler",optionChangeHandlers:{events(t,e){Xi([t],e)},eventSources:Xi}});function Xi(t,e){let n=Mr(e.getCurrentData().eventSources);if(n.length===1&&t.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(t[0])){e.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:t[0]});return}let r=[];for(let i of t){let s=!1;for(let o=0;o<n.length;o+=1)if(n[o]._raw===i){n.splice(o,1),s=!0;break}s||r.push(i)}for(let i of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of r)e.calendarApi.addEventSource(i)}function pp(t,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},sl(t.activeRange,e.dateEnv)),{view:e.viewApi}))}function mp(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Ne(t,e))}const vp=[rp,sp,ap,fp,gp,ue({name:"misc",isLoadingFuncs:[t=>Nl(t.eventSources)],propSetHandlers:{dateProfile:pp,eventStore:mp}})];class yp{constructor(e,n){this.runTaskOption=e,this.drainedOption=n,this.queue=[],this.delayedRunner=new wr(this.drain.bind(this))}request(e,n){this.queue.push(e),this.delayedRunner.request(n)}pause(e){this.delayedRunner.pause(e)}resume(e,n){this.delayedRunner.resume(e,n)}drain(){let{queue:e}=this;for(;e.length;){let n=[],r;for(;r=e.shift();)this.runTask(r),n.push(r);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function bp(t,e,n){let r;return/^(year|month)$/.test(t.currentRangeUnit)?r=t.currentRange:r=t.activeRange,n.formatRange(r.start,r.end,B(e.titleFormat||Ep(t)),{isEndExclusive:t.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function Ep(t){let{currentRangeUnit:e}=t;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let n=Gt(t.currentRange.start,t.currentRange.end);return n!==null&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class Ji{constructor(){this.resetListeners=new Set}handleInput(e,n){const r=this.dateEnv;if(e!==r&&(typeof n=="function"?this.nowFn=n:r||(this.nowAnchorDate=e.toDate(n?e.createMarker(n):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,r))for(const i of this.resetListeners.values())i()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}}class Sp{constructor(e){this.computeCurrentViewData=_(this._computeCurrentViewData),this.organizeRawLocales=_(Cg),this.buildLocale=_(Il),this.buildPluginHooks=Rg(),this.buildDateEnv=_(wp),this.buildTheme=_(Cp),this.parseToolbars=_(Jg),this.buildViewSpecs=_(Ng),this.buildDateProfileGenerator=Pt(Ap),this.buildViewApi=_(Dp),this.buildViewUiProps=Pt(_p),this.buildEventUiBySource=_(xp,ie),this.buildEventUiBases=_(Rp),this.parseContextBusinessHours=Pt(Tp),this.buildTitle=_(bp),this.nowManager=new Ji,this.emitter=new vn,this.actionRunner=new yp(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=u=>{this.actionRunner.request(u)},this.props=e,this.actionRunner.pause(),this.nowManager=new Ji;let n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=r.calendarOptions.initialView||r.pluginHooks.initialView,s=this.computeCurrentViewData(i,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);let o={nowManager:this.nowManager,dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},l=Lg(r.calendarOptions,r.dateEnv,this.nowManager),a=s.dateProfileGenerator.build(l);ge(a.activeRange,l)||(l=a.currentRange.start);for(let u of r.pluginHooks.contextInit)u(o);let d=Ug(r.calendarOptions,a,o),c={dynamicOptionOverrides:n,currentViewType:i,currentDate:l,dateProfile:a,businessHours:this.parseContextBusinessHours(o),eventSources:d,eventUiBases:{},eventStore:J(),renderableEventStore:J(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(o).selectionConfig},f=Object.assign(Object.assign({},o),c);for(let u of r.pluginHooks.reducers)Object.assign(c,u(null,null,f));Un(c,o)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,n){let{props:r}=this;n===void 0?r.optionOverrides=e:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),e),this.optionsForRefining.push(...n)),(n===void 0||n.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:n,state:r,emitter:i}=this,s=Bg(r.dynamicOptionOverrides,e),o=this.computeOptionsData(n.optionOverrides,s,n.calendarApi),l=Hg(r.currentViewType,e),a=this.computeCurrentViewData(l,o,n.optionOverrides,s);n.calendarApi.currentDataManager=this,i.setThisContext(n.calendarApi),i.setOptions(a.options);let d={nowManager:this.nowManager,dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:f}=r;this.data&&this.data.dateProfileGenerator!==a.dateProfileGenerator&&(f=a.dateProfileGenerator.build(c)),c=jg(c,e),f=Fg(f,e,c,a.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!ge(f.currentRange,c))&&(c=f.currentRange.start);let u=zg(r.eventSources,e,f,d),h=zf(r.eventStore,e,u,f,d),v=Nl(u)&&!a.options.progressiveEventRendering&&r.renderableEventStore||h,{eventUiSingleBase:y,selectionConfig:S}=this.buildViewUiProps(d),w=this.buildEventUiBySource(u),D=this.buildEventUiBases(v.defs,y,w),C={dynamicOptionOverrides:s,currentViewType:l,currentDate:c,dateProfile:f,eventSources:u,eventStore:h,renderableEventStore:v,selectionConfig:S,eventUiBases:D,businessHours:this.parseContextBusinessHours(d),dateSelection:Qg(r.dateSelection,e),eventSelection:Zg(r.eventSelection,e),eventDrag:Kg(r.eventDrag,e),eventResize:Xg(r.eventResize,e)},x=Object.assign(Object.assign({},d),C);for(let A of o.pluginHooks.reducers)Object.assign(C,A(r,e,x));let R=Un(r,d),I=Un(C,d);!R&&I?i.trigger("loading",!0):R&&!I&&i.trigger("loading",!1),this.state=C,n.onAction&&n.onAction(e)}updateData(){let{props:e,state:n}=this,r=this.data,i=this.computeOptionsData(e.optionOverrides,n.dynamicOptionOverrides,e.calendarApi),s=this.computeCurrentViewData(n.currentViewType,i,e.optionOverrides,n.dynamicOptionOverrides),o=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(n.dateProfile,s.options,i.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),s),n),l=i.pluginHooks.optionChangeHandlers,a=r&&r.calendarOptions,d=i.calendarOptions;if(a&&a!==d){a.timeZone!==d.timeZone&&(n.eventSources=o.eventSources=Wg(o.eventSources,n.dateProfile,o),n.eventStore=o.eventStore=Wi(o.eventStore,r.dateEnv,o.dateEnv),n.renderableEventStore=o.renderableEventStore=Wi(o.renderableEventStore,r.dateEnv,o.dateEnv));for(let c in l)(this.optionsForHandling.indexOf(c)!==-1||a[c]!==d[c])&&l[c](d[c],o)}this.optionsForHandling=[],e.onData&&e.onData(o)}computeOptionsData(e,n,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:s,localeDefaults:o,availableLocaleData:l,extra:a}=this.processRawCalendarOptions(e,n);es(a);let d=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,s,l,i.defaultRangeSeparator),c=this.buildViewSpecs(s.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,o),f=this.buildTheme(i,s),u=this.parseToolbars(i,this.stableOptionOverrides,f,c,r);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:s,dateEnv:d,viewSpecs:c,theme:f,toolbarConfig:u,localeDefaults:o,availableRawLocales:l.map}}processRawCalendarOptions(e,n){let{locales:r,locale:i}=kn([at,e,n]),s=this.organizeRawLocales(r),o=s.map,l=this.buildLocale(i||s.defaultCode,o).options,a=this.buildPluginHooks(e.plugins||[],vp),d=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ji),Li),Bi),a.listenerRefiners),a.optionRefiners),c={},f=kn([at,l,e,n]),u={},h=this.currentCalendarOptionsInput,p=this.currentCalendarOptionsRefined,v=!1;for(let y in f)this.optionsForRefining.indexOf(y)===-1&&(f[y]===h[y]||Me[y]&&y in h&&Me[y](h[y],f[y]))?u[y]=p[y]:d[y]?(u[y]=d[y](f[y]),v=!0):c[y]=h[y];return v&&(this.currentCalendarOptionsInput=f,this.currentCalendarOptionsRefined=u,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:a,availableLocaleData:s,localeDefaults:l,extra:c}}_computeCurrentViewData(e,n,r,i){let s=n.viewSpecs[e];if(!s)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:o,extra:l}=this.processRawViewOptions(s,n.pluginHooks,n.localeDefaults,r,i);es(l),this.nowManager.handleInput(n.dateEnv,o.now);let a=this.buildDateProfileGenerator({dateProfileGeneratorClass:s.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:s.duration,durationUnit:s.durationUnit,usesMinMaxTime:s.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:o.slotMinTime,slotMaxTime:o.slotMaxTime,showNonCurrentDates:o.showNonCurrentDates,dayCount:o.dayCount,dateAlignment:o.dateAlignment,dateIncrement:o.dateIncrement,hiddenDays:o.hiddenDays,weekends:o.weekends,validRangeInput:o.validRange,visibleRangeInput:o.visibleRange,fixedWeekCount:o.fixedWeekCount}),d=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:s,options:o,dateProfileGenerator:a,viewApi:d}}processRawViewOptions(e,n,r,i,s){let o=kn([at,e.optionDefaults,r,i,e.optionOverrides,s]),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ji),Li),Bi),sf),n.listenerRefiners),n.optionRefiners),a={},d=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,f=!1,u={};for(let h in o)o[h]===d[h]||Me[h]&&Me[h](o[h],d[h])?a[h]=c[h]:(o[h]===this.currentCalendarOptionsInput[h]||Me[h]&&Me[h](o[h],this.currentCalendarOptionsInput[h])?h in this.currentCalendarOptionsRefined&&(a[h]=this.currentCalendarOptionsRefined[h]):l[h]?a[h]=l[h](o[h]):u[h]=o[h],f=!0);return f&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=a),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:u}}}function wp(t,e,n,r,i,s,o,l){let a=Il(e||o.defaultCode,o.map);return new mf({calendarSystem:"gregory",timeZone:t,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:a,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:s.cmdFormatter,defaultSeparator:l})}function Cp(t,e){let n=e.themeClasses[t.themeSystem]||Te;return new n(t)}function Ap(t){let e=t.dateProfileGeneratorClass||Yo;return new e(t)}function Dp(t,e,n){return new tp(t,e,n)}function xp(t){return me(t,e=>e.ui)}function Rp(t,e,n){let r={"":e};for(let i in t){let s=t[i];s.sourceId&&n[s.sourceId]&&(r[i]=n[s.sourceId])}return r}function _p(t){let{options:e}=t;return{eventUiSingleBase:Kt({display:e.eventDisplay,editable:e.editable,startEditable:e.eventStartEditable,durationEditable:e.eventDurationEditable,constraint:e.eventConstraint,overlap:typeof e.eventOverlap=="boolean"?e.eventOverlap:void 0,allow:e.eventAllow,backgroundColor:e.eventBackgroundColor,borderColor:e.eventBorderColor,textColor:e.eventTextColor,color:e.eventColor},t),selectionConfig:Kt({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function Un(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function Tp(t){return Kf(t.options.businessHours,t)}function es(t,e){for(let n in t)console.warn(`Unknown option '${n}'`)}class Mp extends H{render(){let e=this.props.widgetGroups.map(n=>this.renderWidgetGroup(n));return g("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:n}=this,{theme:r}=this.context,i=[],s=!0;for(let o of e){let{buttonName:l,buttonClick:a,buttonText:d,buttonIcon:c,buttonHint:f}=o;if(l==="title")s=!1,i.push(g("h2",{className:"fc-toolbar-title",id:n.titleId},n.title));else{let u=l===n.activeButton,h=!n.isTodayEnabled&&l==="today"||!n.isPrevEnabled&&l==="prev"||!n.isNextEnabled&&l==="next",p=[`fc-${l}-button`,r.getClass("button")];u&&p.push(r.getClass("buttonActive")),i.push(g("button",{type:"button",title:typeof f=="function"?f(n.navUnit):f,disabled:h,"aria-pressed":u,className:p.join(" "),onClick:a},d||(c?g("span",{className:c,role:"img"}):"")))}}if(i.length>1){let o=s&&r.getClass("buttonGroup")||"";return g("div",{className:o},...i)}return i[0]}}class ts extends H{render(){let{model:e,extraClassName:n}=this.props,r=!1,i,s,o=e.sectionWidgets,l=o.center;return o.left?(r=!0,i=o.left):i=o.start,o.right?(r=!0,s=o.right):s=o.end,g("div",{className:[n||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",l||[]),this.renderSection("end",s||[]))}renderSection(e,n){let{props:r}=this;return g(Mp,{key:e,widgetGroups:n,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}}class Ip extends H{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,de(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:n}=this,{aspectRatio:r}=e,i=["fc-view-harness",r||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],s="",o="";return r?n.availableWidth!==null?s=n.availableWidth/r:o=`${1/r*100}%`:s=e.height||"",g("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:s,paddingBottom:o}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class kp extends tt{constructor(e){super(e),this.handleSegClick=(n,r)=>{let{component:i}=this,{context:s}=i,o=Xe(r);if(o&&i.isValidSegDownEl(n.target)){let l=q(n.target,".fc-event-forced-url"),a=l?l.querySelector("a[href]").href:"";s.emitter.trigger("eventClick",{el:r,event:new U(i.context,o.eventRange.def,o.eventRange.instance),jsEvent:n,view:s.viewApi}),a&&!n.defaultPrevented&&(window.location.href=a)}},this.destroy=Oo(e.el,"click",".fc-event",this.handleSegClick)}}class Np extends tt{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{Xe(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",n,r))},this.handleSegLeave=(n,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,r))},this.removeHoverListeners=du(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,r){let{component:i}=this,{context:s}=i,o=Xe(r);(!n||i.isValidSegDownEl(n.target))&&s.emitter.trigger(e,{el:r,event:new U(s,o.eventRange.def,o.eventRange.instance),jsEvent:n,view:s.viewApi})}}class Op extends Ue{constructor(){super(...arguments),this.buildViewContext=_(bf),this.buildViewPropTransformers=_(Hp),this.buildToolbarProps=_(Pp),this.headerRef=Q(),this.footerRef=Q(),this.interactionsStore={},this.state={viewLabelId:Ce()},this.registerInteractiveComponent=(e,n)=>{let r=bh(e,n),o=[kp,Np].concat(this.props.pluginHooks.componentInteractions).map(l=>new l(r));this.interactionsStore[e.uid]=o,rr[e.uid]=r},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let r of n)r.destroy();delete this.interactionsStore[e.uid]}delete rr[e.uid]},this.resizeRunner=new wr(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:n}=this.props;n.handleWindowResize&&e.target===window&&this.resizeRunner.request(n.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:n,options:r}=e,i=!1,s="",o;e.isHeightAuto||e.forPrint?s="":r.height!=null?i=!0:r.contentHeight!=null?s=r.contentHeight:o=Math.max(r.aspectRatio,.5);let l=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),a=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return g(ye.Provider,{value:l},g(ze,{unit:"day"},d=>{let c=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,d,e.viewTitle);return g(j,null,n.header&&g(ts,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:a},c)),g(Ip,{liquid:i,height:s,aspectRatio:o,labeledById:a},this.renderView(e),this.buildAppendContent()),n.footer&&g(ts,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},c)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:n}=e.pluginHooks;for(let r in n)n[r](e[r],e)}componentDidUpdate(e){let{props:n}=this,{propSetHandlers:r}=n.pluginHooks;for(let i in r)n[i]!==e[i]&&r[i](n[i],n)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this,n=e.pluginHooks.viewContainerAppends.map(r=>r(e));return g(j,{},...n)}renderView(e){let{pluginHooks:n}=e,{viewSpec:r}=e,i={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},s=this.buildViewPropTransformers(n.viewPropsTransformers);for(let l of s)Object.assign(i,l.transform(i,e));let o=r.component;return g(o,Object.assign({},i))}}function Pp(t,e,n,r,i,s){let o=n.build(i,void 0,!1),l=n.buildPrev(e,r,!1),a=n.buildNext(e,r,!1);return{title:s,activeButton:t.type,navUnit:t.singleUnit,isTodayEnabled:o.isValid&&!ge(e.currentRange,i),isPrevEnabled:l.isValid,isNextEnabled:a.isValid}}function Hp(t){return t.map(e=>new e)}class jp extends Sh{constructor(e,n={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;Qt(()=>{gt(g(yh,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(i,s,o,l)=>(this.setClassNames(i),this.setHeight(s),g(Wo.Provider,{value:this.customContentRenderId},g(Op,Object.assign({isHeightAuto:o,forPrint:l},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,gt(null,this.el),this.setClassNames([]),this.setHeight(""))},tu(e),this.el=e,this.renderRunner=new wr(this.handleRenderRequest),new Sp({optionOverrides:n,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){Qt(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,n){this.currentDataManager.resetOptions(e,n)}setClassNames(e){if(!Ae(e,this.currentClassNames)){let{classList:n}=this.el;for(let r of this.currentClassNames)n.remove(r);for(let r of e)n.add(r);this.currentClassNames=e}}setHeight(e){ko(this.el,"height",e)}}const Lp=parseInt(String(dt.version).split(".")[0]),Bp=Lp<18;class Ll extends E.Component{constructor(){super(...arguments),this.elRef=E.createRef(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){const e=[];for(const n of this.state.customRenderingMap.values())e.push(dt.createElement(Fp,{key:n.id,customRendering:n}));return dt.createElement("div",{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;const e=new Sg;this.handleCustomRendering=e.handle.bind(e),this.calendar=new jp(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on("_beforeprint",()=>{Wn.flushSync(()=>{})});let n;e.subscribe(r=>{const i=Date.now(),s=!n;(Bp||s||this.isUpdating||this.isUnmounting||i-n<100?Bl:Wn.flushSync)(()=>{this.setState({customRenderingMap:r},()=>{n=i,s?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}Ll.act=Bl;class Fp extends E.PureComponent{render(){const{customRendering:e}=this.props,{generatorMeta:n}=e,r=typeof n=="function"?n(e.renderProps):n;return Wn.createPortal(r,e.containerEl)}}function Bl(t){t()}var Up={code:"id",week:{dow:1,doy:7},buttonText:{prev:"mundur",next:"maju",today:"hari ini",year:"Tahun",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sehari penuh",moreLinkText:"lebih",noEventsText:"Tidak ada acara untuk ditampilkan"};class zp extends se{constructor(){super(...arguments),this.headerElRef=Q()}renderSimpleLayout(e,n){let{props:r,context:i}=this,s=[],o=Jt(i.options);return e&&s.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),s.push({type:"body",key:"body",liquid:!0,chunk:{content:n}}),g(pt,{elClasses:["fc-daygrid"],viewSpec:i.viewSpec},g($r,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:s}))}renderHScrollLayout(e,n,r,i){let s=this.context.pluginHooks.scrollGridImpl;if(!s)throw new Error("No ScrollGrid implementation");let{props:o,context:l}=this,a=!o.forPrint&&Jt(l.options),d=!o.forPrint&&Cl(l.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:n}]}),d&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:or}]}),g(pt,{elClasses:["fc-daygrid"],viewSpec:l.viewSpec},g(s,{liquid:!o.isHeightAuto&&!o.forPrint,forPrint:o.forPrint,collapsibleWidth:o.forPrint,colGroups:[{cols:[{span:r,minWidth:i}]}],sections:c}))}}function jt(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.row].push(r);return n}function Mt(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.firstCol].push(r);return n}function ns(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.row].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}const Fl=B({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ul(t){let{display:e}=t.eventRange.ui;return e==="list-item"||e==="auto"&&!t.eventRange.def.allDay&&t.firstCol===t.lastCol&&t.isStart&&t.isEnd}class zl extends H{render(){let{props:e}=this;return g(Qr,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Fl,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class Wl extends H{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i}=e,s=r.eventTimeFormat||Fl,o=ct(i,s,n,!0,e.defaultDisplayEventEnd);return g(bn,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:Ur(e.seg,n),defaultGenerator:Wp,timeText:o,isResizing:!1,isDateSelecting:!1}))}}function Wp(t){return g(j,null,g("div",{className:"fc-daygrid-event-dot",style:{borderColor:t.borderColor||t.backgroundColor}}),t.timeText&&g("div",{className:"fc-event-time"},t.timeText),g("div",{className:"fc-event-title"},t.event.title||g(j,null," ")))}class Vp extends H{constructor(){super(...arguments),this.compileSegs=_(Gp)}render(){let{props:e}=this,{allSegs:n,invisibleSegs:r}=this.compileSegs(e.singlePlacements);return g(Rl,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,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 g(j,null,n.map(s=>{let o=s.eventRange.instance.instanceId;return g("div",{className:"fc-daygrid-event-harness",key:o,style:{visibility:i[o]?"hidden":""}},Ul(s)?g(Wl,Object.assign({seg:s,isDragging:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},pe(s,e.todayRange))):g(zl,Object.assign({seg:s,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},pe(s,e.todayRange))))}))}})}}function Gp(t){let e=[],n=[];for(let r of t)e.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:e,invisibleSegs:n}}const Yp=B({week:"narrow"});class qp extends se{constructor(){super(...arguments),this.rootElRef=Q(),this.state={dayNumberId:Ce()},this.handleRootEl=e=>{de(this.rootElRef,e),de(this.props.elRef,e)}}render(){let{context:e,props:n,state:r,rootElRef:i}=this,{options:s,dateEnv:o}=e,{date:l,dateProfile:a}=n;const d=n.showDayNumber&&Qp(l,a.currentRange,o);return g(Kr,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...n.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},n.extraDataAttrs),n.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:$p,date:l,dateProfile:a,todayRange:n.todayRange,showDayNumber:n.showDayNumber,isMonthStart:d,extraRenderProps:n.extraRenderProps},(c,f)=>g("div",{ref:n.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:n.minHeight}},n.showWeekNumber&&g(xl,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Je(e,l,"week"),date:l,defaultFormat:Yp}),!f.isDisabled&&(n.showDayNumber||Xr(s)||n.forceDayTop)?g("div",{className:"fc-daygrid-day-top"},g(c,{elTag:"a",elClasses:["fc-daygrid-day-number",d&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Je(e,l)),{id:r.dayNumberId})})):n.showDayNumber?g("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},g("a",{className:"fc-daygrid-day-number"}," ")):void 0,g("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,g("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},g(Vp,{allDayDate:l,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:i,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),g("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}}function $p(t){return t.dayNumberText||g(j,null," ")}function Qp(t,e,n){const{start:r,end:i}=e,s=De(i,-1),o=n.getYear(r),l=n.getMonth(r),a=n.getYear(s),d=n.getMonth(s);return!(o===a&&l===d)&&(t.valueOf()===r.valueOf()||n.getDay(t)===1&&t.valueOf()<i.valueOf())}function Vl(t){return t.eventRange.instance.instanceId+":"+t.firstCol}function Gl(t){return Vl(t)+":"+t.lastCol}function Zp(t,e,n,r,i,s,o){let l=new Jp(S=>{let w=t[S.index].eventRange.instance.instanceId+":"+S.span.start+":"+(S.span.end-1);return i[w]||1});l.allowReslicing=!0,l.strictOrder=r,e===!0||n===!0?(l.maxCoord=s,l.hiddenConsumes=!0):typeof e=="number"?l.maxStackCnt=e:typeof n=="number"&&(l.maxStackCnt=n,l.hiddenConsumes=!0);let a=[],d=[];for(let S=0;S<t.length;S+=1){let w=t[S],D=Gl(w);i[D]!=null?a.push({index:S,span:{start:w.firstCol,end:w.lastCol+1}}):d.push(w)}let c=l.addSegs(a),f=l.toRects(),{singleColPlacements:u,multiColPlacements:h,leftoverMargins:p}=Kp(f,t,o),v=[],y=[];for(let S of d){h[S.firstCol].push({seg:S,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let w=S.firstCol;w<=S.lastCol;w+=1)u[w].push({seg:Qe(S,w,w+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let S=0;S<o.length;S+=1)v.push(0);for(let S of c){let w=t[S.index],D=S.span;h[D.start].push({seg:Qe(w,D.start,D.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let C=D.start;C<D.end;C+=1)v[C]+=1,u[C].push({seg:Qe(w,C,C+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let S=0;S<o.length;S+=1)y.push(p[S]);return{singleColPlacements:u,multiColPlacements:h,moreCnts:v,moreMarginTops:y}}function Kp(t,e,n){let r=Xp(t,n.length),i=[],s=[],o=[];for(let l=0;l<n.length;l+=1){let a=r[l],d=[],c=0,f=0;for(let h of a){let p=e[h.index];d.push({seg:Qe(p,l,l+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:h.levelCoord,marginTop:h.levelCoord-c}),c=h.levelCoord+h.thickness}let u=[];c=0,f=0;for(let h of a){let p=e[h.index],v=h.span.end-h.span.start>1,y=h.span.start===l;f+=h.levelCoord-c,c=h.levelCoord+h.thickness,v?(f+=h.thickness,y&&u.push({seg:Qe(p,h.span.start,h.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:h.levelCoord,marginTop:0})):y&&(u.push({seg:Qe(p,h.span.start,h.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:h.levelCoord,marginTop:f}),f=0)}i.push(d),s.push(u),o.push(f)}return{singleColPlacements:i,multiColPlacements:s,leftoverMargins:o}}function Xp(t,e){let n=[];for(let r=0;r<e;r+=1)n.push([]);for(let r of t)for(let i=r.span.start;i<r.span.end;i+=1)n[i].push(r);return n}function Qe(t,e,n,r){if(t.firstCol===e&&t.lastCol===n-1)return t;let i=t.eventRange,s=i.range,o=xe(s,{start:r[e].date,end:V(r[n-1].date,1)});return Object.assign(Object.assign({},t),{firstCol:e,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:t.isStart&&o.start.valueOf()===s.start.valueOf(),isEnd:t.isEnd&&o.end.valueOf()===s.end.valueOf()})}class Jp extends ul{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const n=super.addSegs(e),{entriesByLevel:r}=this,i=s=>!this.forceHidden[Oe(s)];for(let s=0;s<r.length;s+=1)r[s]=r[s].filter(i);return n}handleInvalidInsertion(e,n,r){const{entriesByLevel:i,forceHidden:s}=this,{touchingEntry:o,touchingLevel:l,touchingLateral:a}=e;if(this.hiddenConsumes&&o){const d=Oe(o);if(!s[d])if(this.allowReslicing){const c=Object.assign(Object.assign({},o),{span:Yr(o.span,n.span)}),f=Oe(c);s[f]=!0,i[l][a]=c,r.push(c),this.splitEntry(o,n,r)}else s[d]=!0,r.push(o)}super.handleInvalidInsertion(e,n,r)}}class Yl extends se{constructor(){super(...arguments),this.cellElRefs=new he,this.frameElRefs=new he,this.fgElRefs=new he,this.segHarnessRefs=new he,this.rootElRef=Q(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:n,context:r}=this,{options:i}=r,s=e.cells.length,o=Mt(e.businessHourSegs,s),l=Mt(e.bgEventSegs,s),a=Mt(this.getHighlightSegs(),s),d=Mt(this.getMirrorSegs(),s),{singleColPlacements:c,multiColPlacements:f,moreCnts:u,moreMarginTops:h}=Zp(Fr(e.fgEventSegs,i.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,i.eventOrderStrict,n.segHeights,n.maxContentHeight,e.cells),p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return g("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((v,y)=>{let S=this.renderFgSegs(y,e.forPrint?c[y]:f[y],e.todayRange,p),w=this.renderFgSegs(y,em(d[y],f),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return g(qp,{key:v.key,elRef:this.cellElRefs.createRef(v.key),innerElRef:this.frameElRefs.createRef(v.key),dateProfile:e.dateProfile,date:v.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&y===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:v.extraRenderProps,extraDataAttrs:v.extraDataAttrs,extraClassNames:v.extraClassNames,extraDateSpan:v.extraDateSpan,moreCnt:u[y],moreMarginTop:h[y],singlePlacements:c[y],fgContentElRef:this.fgElRefs.createRef(v.key),fgContent:g(j,null,g(j,null,S),g(j,null,w)),bgContent:g(j,null,this.renderFillSegs(a[y],"highlight"),this.renderFillSegs(o[y],"non-business"),this.renderFillSegs(l[y],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,n){let r=this.props;this.updateSizing(!ie(e,r))}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,n,r,i,s,o,l){let{context:a}=this,{eventSelection:d}=this.props,{framePositions:c}=this.state,f=this.props.cells.length===1,u=s||o||l,h=[];if(c)for(let p of n){let{seg:v}=p,{instanceId:y}=v.eventRange.instance,S=p.isVisible&&!i[y],w=p.isAbsolute,D="",C="";w&&(a.isRtl?(C=0,D=c.lefts[v.lastCol]-c.lefts[v.firstCol]):(D=0,C=c.rights[v.firstCol]-c.rights[v.lastCol])),h.push(g("div",{className:"fc-daygrid-event-harness"+(w?" fc-daygrid-event-harness-abs":""),key:Vl(v),ref:u?null:this.segHarnessRefs.createRef(Gl(v)),style:{visibility:S?"":"hidden",marginTop:w?"":p.marginTop,top:w?p.absoluteTop:"",left:D,right:C}},Ul(v)?g(Wl,Object.assign({seg:v,isDragging:s,isSelected:y===d,defaultDisplayEventEnd:f},pe(v,r))):g(zl,Object.assign({seg:v,isDragging:s,isResizing:o,isDateSelecting:l,isSelected:y===d,defaultDisplayEventEnd:f},pe(v,r)))))}return h}renderFillSegs(e,n){let{isRtl:r}=this.context,{todayRange:i}=this.props,{framePositions:s}=this.state,o=[];if(s)for(let l of e){let a=r?{right:0,left:s.lefts[l.lastCol]-s.lefts[l.firstCol]}:{left:0,right:s.rights[l.firstCol]-s.rights[l.lastCol]};o.push(g("div",{key:il(l.eventRange),className:"fc-daygrid-bg-harness",style:a},n==="bg-event"?g(Al,Object.assign({seg:l},pe(l,i))):Dl(n)))}return g(j,{},...o)}updateSizing(e){let{props:n,state:r,frameElRefs:i}=this;if(!n.forPrint&&n.clientWidth!==null){if(e){let a=n.cells.map(d=>i.currentMap[d.key]);if(a.length){let d=this.rootElRef.current,c=new et(d,a,!0,!1);(!r.framePositions||!r.framePositions.similarTo(c))&&this.setState({framePositions:new et(d,a,!0,!1)})}}const s=this.state.segHeights,o=this.querySegHeights(),l=n.dayMaxEvents===!0||n.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},s),o),maxContentHeight:l?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,n={};for(let r in e){let i=Math.round(e[r].getBoundingClientRect().height);n[r]=Math.max(n[r]||0,i)}return n}computeMaxContentHeight(){let e=this.props.cells[0].key,n=this.cellElRefs.currentMap[e],r=this.fgElRefs.currentMap[e];return n.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(n=>e[n.key])}}Yl.addStateEquality({segHeights:ie});function em(t,e){if(!t.length)return[];let n=tm(e);return t.map(r=>({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:n[r.eventRange.instance.instanceId],marginTop:0}))}function tm(t){let e={};for(let n of t)for(let r of n)e[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return e}class nm extends se{constructor(){super(...arguments),this.splitBusinessHourSegs=_(jt),this.splitBgEventSegs=_(rm),this.splitFgEventSegs=_(jt),this.splitDateSelectionSegs=_(jt),this.splitEventDrag=_(ns),this.splitEventResize=_(ns),this.rowRefs=new he}render(){let{props:e,context:n}=this,r=e.cells.length,i=this.splitBusinessHourSegs(e.businessHourSegs,r),s=this.splitBgEventSegs(e.bgEventSegs,r),o=this.splitFgEventSegs(e.fgEventSegs,r),l=this.splitDateSelectionSegs(e.dateSelectionSegs,r),a=this.splitEventDrag(e.eventDrag,r),d=this.splitEventResize(e.eventResize,r),c=r>=7&&e.clientWidth?e.clientWidth/n.options.aspectRatio/6:null;return g(ze,{unit:"day"},(f,u)=>g(j,null,e.cells.map((h,p)=>g(Yl,{ref:this.rowRefs.createRef(p),key:h.length?h[0].date.toISOString():p,showDayNumbers:r>1,showWeekNumbers:e.showWeekNumbers,todayRange:u,dateProfile:e.dateProfile,cells:h,renderIntro:e.renderRowIntro,businessHourSegs:i[p],eventSelection:e.eventSelection,bgEventSegs:s[p],fgEventSegs:o[p],dateSelectionSegs:l[p],eventDrag:a[p],eventResize:d[p],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],n=e?e.closest(".fc-daygrid-body"):null;n&&(this.rootEl=n,this.context.registerInteractiveComponent(this,{el:n,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new et(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new et(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,n){let{colPositions:r,rowPositions:i}=this,s=r.leftToIndex(e),o=i.topToIndex(n);if(o!=null&&s!=null){let l=this.props.cells[o][s];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(o,s),allDay:!0},l.extraDateSpan),dayEl:this.getCellEl(o,s),rect:{left:r.lefts[s],right:r.rights[s],top:i.tops[o],bottom:i.bottoms[o]},layer:0}}return null}getCellEl(e,n){return this.rowRefs.currentMap[e].getCellEls()[n]}getCellRange(e,n){let r=this.props.cells[e][n].date,i=V(r,1);return{start:r,end:i}}}function rm(t,e){return jt(t.filter(im),e)}function im(t){return t.eventRange.def.allDay}class sm extends se{constructor(){super(...arguments),this.elRef=Q(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:n,dayMaxEvents:r,expandRows:i}=e,s=r===!0||n===!0;s&&!i&&(s=!1,n=null,r=null);let o=["fc-daygrid-body",s?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return g("div",{ref:this.elRef,className:o.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},g("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:i?e.clientHeight:""}},e.colGroupNode,g("tbody",{role:"presentation"},g(nm,{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:r,dayMaxEventRows:n,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=om(this.elRef.current,this.props.dateProfile);if(e){const n=e.closest(".fc-daygrid-body"),r=n.closest(".fc-scroller"),i=e.getBoundingClientRect().top-n.getBoundingClientRect().top;r.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function om(t,e){let n;return e.currentRangeUnit.match(/year|month/)&&(n=t.querySelector(`[data-date="${Uu(e.currentDate)}-01"]`)),n||(n=t.querySelector(`[data-date="${Et(e.currentDate)}"]`)),n}class lm extends vl{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}class ql extends se{constructor(){super(...arguments),this.slicer=new lm,this.tableRef=Q()}render(){let{props:e,context:n}=this;return g(sm,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,n,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 am extends zp{constructor(){super(...arguments),this.buildDayTableModel=_(cm),this.headerRef=Q(),this.tableRef=Q()}render(){let{options:e,dateProfileGenerator:n}=this.context,{props:r}=this,i=this.buildDayTableModel(r.dateProfile,n),s=e.dayHeaders&&g(gl,{ref:this.headerRef,dateProfile:r.dateProfile,dates:i.headerDates,datesRepDistinctDays:i.rowCnt===1}),o=l=>g(ql,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:i,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:l.tableColGroupNode,tableMinWidth:l.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:l.clientWidth,clientHeight:l.clientHeight,forPrint:r.forPrint});return e.dayMinWidth?this.renderHScrollLayout(s,o,i.colCnt,e.dayMinWidth):this.renderSimpleLayout(s,o)}}function cm(t,e){let n=new pl(t.renderRange,e);return new ml(n,/year|month|week/.test(t.currentRangeUnit))}class dm extends Yo{buildRenderRange(e,n,r){let i=super.buildRenderRange(e,n,r),{props:s}=this;return um({currentRange:i,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:s.fixedWeekCount,dateEnv:s.dateEnv})}}function um(t){let{dateEnv:e,currentRange:n}=t,{start:r,end:i}=n,s;if(t.snapToWeek&&(r=e.startOfWeek(r),s=e.startOfWeek(i),s.valueOf()!==i.valueOf()&&(i=ki(s,1))),t.fixedWeekCount){let o=e.startOfWeek(e.startOfMonth(V(n.end,-1))),l=Math.ceil(Mu(o,i));i=ki(i,6-l)}return{start:r,end:i}}var fm=':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}';hn(fm);var hm=ue({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:am,dateProfileGeneratorClass:dm},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}}}});class gm extends xh{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?nh(e)?["timed","allDay"]:["allDay"]:["timed"]}}const pm=B({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function $l(t){let e=["fc-timegrid-slot","fc-timegrid-slot-label",t.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return g(ye.Consumer,null,n=>{if(!t.isLabeled)return g("td",{className:e.join(" "),"data-time":t.isoTimeStr});let{dateEnv:r,options:i,viewApi:s}=n,o=i.slotLabelFormat==null?pm:Array.isArray(i.slotLabelFormat)?B(i.slotLabelFormat[0]):B(i.slotLabelFormat),l={level:0,time:t.time,date:r.toDate(t.date),view:s,text:r.format(t.date,o)};return g($,{elTag:"td",elClasses:e,elAttrs:{"data-time":t.isoTimeStr},renderProps:l,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:mm,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},a=>g("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},g(a,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function mm(t){return t.text}class vm extends H{render(){return this.props.slatMetas.map(e=>g("tr",{key:e.key},g($l,Object.assign({},e))))}}const ym=B({week:"short"}),bm=5;class Em extends se{constructor(){super(...arguments),this.allDaySplitter=new gm,this.headerElRef=Q(),this.rootElRef=Q(),this.scrollerElRef=Q(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let n=this.scrollerElRef.current;n&&(n.scrollTop=e)},this.renderHeadAxis=(e,n="")=>{let{options:r}=this.context,{dateProfile:i}=this.props,s=i.renderRange,l=_e(s.start,s.end)===1?Je(this.context,s.start,"week"):{};return r.weekNumbers&&e==="day"?g(xl,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:s.start,defaultFormat:ym},a=>g("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:n}},g(a,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:l}))):g("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},g("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},this.renderTableRowAxis=e=>{let{options:n,viewApi:r}=this.context,i={text:n.allDayText,view:r};return g($,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:n.allDayContent,defaultGenerator:Sm,classNameGenerator:n.allDayClassNames,didMount:n.allDayDidMount,willUnmount:n.allDayWillUnmount},s=>g("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},g(s,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,n,r){let{context:i,props:s}=this,o=[],l=Jt(i.options);return e&&o.push({type:"header",key:"header",isSticky:l,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),n&&(o.push({type:"body",key:"all-day",chunk:{content:n}}),o.push({type:"body",key:"all-day-divider",outerContent:g("tr",{role:"presentation",className:"fc-scrollgrid-section"},g("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:!!i.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:r}}),g(pt,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},g($r,{liquid:!s.isHeightAuto&&!s.forPrint,collapsibleWidth:s.forPrint,cols:[{width:"shrink"}],sections:o}))}renderHScrollLayout(e,n,r,i,s,o,l){let a=this.context.pluginHooks.scrollGridImpl;if(!a)throw new Error("No ScrollGrid implementation");let{context:d,props:c}=this,f=!c.forPrint&&Jt(d.options),u=!c.forPrint&&Cl(d.options),h=[];e&&h.push({type:"header",key:"header",isSticky:f,syncRowHeights:!0,chunks:[{key:"axis",rowContent:v=>g("tr",{role:"presentation"},this.renderHeadAxis("day",v.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),n&&(h.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:v=>g("tr",{role:"presentation"},this.renderTableRowAxis(v.rowSyncHeights[0]))},{key:"cols",content:n}]}),h.push({key:"all-day-divider",type:"body",outerContent:g("tr",{role:"presentation",className:"fc-scrollgrid-section"},g("td",{colSpan:2,className:"fc-timegrid-divider "+d.theme.getClass("tableCellShaded")}))}));let p=d.options.nowIndicator;return h.push({type:"body",key:"body",liquid:!0,expandRows:!!d.options.expandRows,chunks:[{key:"axis",content:v=>g("div",{className:"fc-timegrid-axis-chunk"},g("table",{"aria-hidden":!0,style:{height:v.expandRows?v.clientHeight:""}},v.tableColGroupNode,g("tbody",null,g(vm,{slatMetas:o}))),g("div",{className:"fc-timegrid-now-indicator-container"},g(ze,{unit:p?"minute":"day"},y=>{let S=p&&l&&l.safeComputeTop(y);return typeof S=="number"?g(Zr,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:S},isAxis:!0,date:y}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:r}]}),u&&h.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:or},{key:"cols",content:or}]}),g(pt,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:d.viewSpec},g(a,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:s}]}],sections:h}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:n}=this.context.options;return(e===!0||n===!0)&&(e=void 0,n=bm),{dayMaxEvents:e,dayMaxEventRows:n}}}function Sm(t){return t.text}class wm{constructor(e,n,r){this.positions=e,this.dateProfile=n,this.slotDuration=r}safeComputeTop(e){let{dateProfile:n}=this;if(ge(n.currentRange,e)){let r=L(e),i=e.valueOf()-r.valueOf();if(i>=re(n.slotMinTime)&&i<re(n.slotMaxTime))return this.computeTimeTop(P(i))}return null}computeDateTop(e,n){return n||(n=L(e)),this.computeTimeTop(P(e.valueOf()-n.valueOf()))}computeTimeTop(e){let{positions:n,dateProfile:r}=this,i=n.els.length,s=(e.milliseconds-re(r.slotMinTime))/re(this.slotDuration),o,l;return s=Math.max(0,s),s=Math.min(i,s),o=Math.floor(s),o=Math.min(o,i-1),l=s-o,n.tops[o]+n.getHeight(o)*l}}class Cm extends H{render(){let{props:e,context:n}=this,{options:r}=n,{slatElRefs:i}=e;return g("tbody",null,e.slatMetas.map((s,o)=>{let l={time:s.time,date:n.dateEnv.toDate(s.date),view:n.viewApi};return g("tr",{key:s.key,ref:i.createRef(s.key)},e.axis&&g($l,Object.assign({},s)),g($,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!s.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":s.isoTimeStr},renderProps:l,generatorName:"slotLaneContent",customGenerator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount}))}))}}class Am extends H{constructor(){super(...arguments),this.rootElRef=Q(),this.slatElRefs=new he}render(){let{props:e,context:n}=this;return g("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},g("table",{"aria-hidden":!0,className:n.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,g(Cm,{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:n}=this;n.onCoords&&n.clientWidth!==null&&this.rootElRef.current.offsetHeight&&n.onCoords(new wm(new et(this.rootElRef.current,Dm(this.slatElRefs.currentMap,n.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function Dm(t,e){return e.map(n=>t[n.key])}function it(t,e){let n=[],r;for(r=0;r<e;r+=1)n.push([]);if(t)for(r=0;r<t.length;r+=1)n[t[r].col].push(t[r]);return n}function rs(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.col].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}class xm extends H{render(){let{props:e}=this;return g(Rl,{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:()=>Zl(e.hiddenSegs,e),defaultGenerator:Rm,forceTimed:!0},n=>g(n,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function Rm(t){return t.shortText}function _m(t,e,n){let r=new ul;e!=null&&(r.strictOrder=e),n!=null&&(r.maxStackCnt=n);let i=r.addSegs(t),s=Bh(i),o=Tm(r);return o=Nm(o,1),{segRects:Om(o),hiddenGroups:s}}function Tm(t){const{entriesByLevel:e}=t,n=ei((r,i)=>r+":"+i,(r,i)=>{let s=km(t,r,i),o=is(s,n),l=e[r][i];return[Object.assign(Object.assign({},l),{nextLevelNodes:o[0]}),l.thickness+o[1]]});return is(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n)[0]}function is(t,e){if(!t)return[[],0];let{level:n,lateralStart:r,lateralEnd:i}=t,s=r,o=[];for(;s<i;)o.push(e(n,s)),s+=1;return o.sort(Mm),[o.map(Im),o[0][1]]}function Mm(t,e){return e[1]-t[1]}function Im(t){return t[0]}function km(t,e,n){let{levelCoords:r,entriesByLevel:i}=t,s=i[e][n],o=r[e]+s.thickness,l=r.length,a=e;for(;a<l&&r[a]<o;a+=1);for(;a<l;a+=1){let d=i[a],c,f=sr(d,s.span.start,ir),u=f[0]+f[1],h=u;for(;(c=d[h])&&c.span.start<s.span.end;)h+=1;if(u<h)return{level:a,lateralStart:u,lateralEnd:h}}return null}function Nm(t,e){const n=ei((r,i,s)=>Oe(r),(r,i,s)=>{let{nextLevelNodes:o,thickness:l}=r,a=l+s,d=l/a,c,f=[];if(!o.length)c=e;else for(let h of o)if(c===void 0){let p=n(h,i,a);c=p[0],f.push(p[1])}else{let p=n(h,c,0);f.push(p[1])}let u=(c-i)*d;return[c-u,Object.assign(Object.assign({},r),{thickness:u,nextLevelNodes:f})]});return t.map(r=>n(r,0,0)[1])}function Om(t){let e=[];const n=ei((i,s,o)=>Oe(i),(i,s,o)=>{let l=Object.assign(Object.assign({},i),{levelCoord:s,stackDepth:o,stackForward:0});return e.push(l),l.stackForward=r(i.nextLevelNodes,s+i.thickness,o+1)+1});function r(i,s,o){let l=0;for(let a of i)l=Math.max(n(a,s,o),l);return l}return r(t,0,0),e}function ei(t,e){const n={};return(...r)=>{let i=t(...r);return i in n?n[i]:n[i]=e(...r)}}function ss(t,e,n=null,r=0){let i=[];if(n)for(let s=0;s<t.length;s+=1){let o=t[s],l=n.computeDateTop(o.start,e),a=Math.max(l+(r||0),n.computeDateTop(o.end,e));i.push({start:Math.round(l),end:Math.round(a)})}return i}function Pm(t,e,n,r){let i=[],s=[];for(let d=0;d<t.length;d+=1){let c=e[d];c?i.push({index:d,thickness:1,span:c}):s.push(t[d])}let{segRects:o,hiddenGroups:l}=_m(i,n,r),a=[];for(let d of o)a.push({seg:t[d.index],rect:d});for(let d of s)a.push({seg:d,rect:null});return{segPlacements:a,hiddenGroups:l}}const Hm=B({hour:"numeric",minute:"2-digit",meridiem:!1});class Ql extends H{render(){return g(Qr,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:Hm}))}}class jm extends H{constructor(){super(...arguments),this.sortEventSegs=_(Fr)}render(){let{props:e,context:n}=this,{options:r}=n,i=r.selectMirror,s=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],o=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},l=this.sortEventSegs(e.fgEventSegs,r.eventOrder);return g(Kr,{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},a=>g("div",{className:"fc-timegrid-col-frame"},g("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),g("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(l,o,!1,!1,!1)),g("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(s,{},!!e.eventDrag,!!e.eventResize,!!i,"mirror")),g("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),Xr(r)&&g(a,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,n,r,i,s,o){let{props:l}=this;return l.forPrint?Zl(e,l):this.renderPositionedFgSegs(e,n,r,i,s,o)}renderPositionedFgSegs(e,n,r,i,s,o){let{eventMaxStack:l,eventShortHeight:a,eventOrderStrict:d,eventMinHeight:c}=this.context.options,{date:f,slatCoords:u,eventSelection:h,todayRange:p,nowDate:v}=this.props,y=r||i||s,S=ss(e,f,u,c),{segPlacements:w,hiddenGroups:D}=Pm(e,S,d,l);return g(j,null,this.renderHiddenGroups(D,e),w.map(C=>{let{seg:x,rect:R}=C,I=x.eventRange.instance.instanceId,A=y||!!(!n[I]&&R),F=zn(R&&R.span),z=!y&&R?this.computeSegHStyle(R):{left:0,right:0},G=!!R&&R.stackForward>0,k=!!R&&R.span.end-R.span.start<a;return g("div",{className:"fc-timegrid-event-harness"+(G?" fc-timegrid-event-harness-inset":""),key:o||I,style:Object.assign(Object.assign({visibility:A?"":"hidden"},F),z)},g(Ql,Object.assign({seg:x,isDragging:r,isResizing:i,isDateSelecting:s,isSelected:I===h,isShort:k},pe(x,p,v))))}))}renderHiddenGroups(e,n){let{extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:o,eventSelection:l,eventDrag:a,eventResize:d}=this.props;return g(j,null,e.map(c=>{let f=zn(c.span),u=Lm(c.entries,n);return g(xm,{key:Lo(_l(u)),hiddenSegs:u,top:f.top,bottom:f.bottom,extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:o,eventSelection:l,eventDrag:a,eventResize:d})}))}renderFillSegs(e,n){let{props:r,context:i}=this,o=ss(e,r.date,r.slatCoords,i.options.eventMinHeight).map((l,a)=>{let d=e[a];return g("div",{key:il(d.eventRange),className:"fc-timegrid-bg-harness",style:zn(l)},n==="bg-event"?g(Al,Object.assign({seg:d},pe(d,r.todayRange,r.nowDate))):Dl(n))});return g(j,null,o)}renderNowIndicator(e){let{slatCoords:n,date:r}=this.props;return n?e.map((i,s)=>g(Zr,{key:s,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:n.computeDateTop(i.start,r)},isAxis:!1,date:r})):null}computeSegHStyle(e){let{isRtl:n,options:r}=this.context,i=r.slotEventOverlap,s=e.levelCoord,o=e.levelCoord+e.thickness,l,a;i&&(o=Math.min(1,s+(o-s)*2)),n?(l=1-o,a=s):(l=s,a=1-o);let d={zIndex:e.stackDepth+1,left:l*100+"%",right:a*100+"%"};return i&&!e.stackForward&&(d[n?"marginLeft":"marginRight"]=10*2),d}}function Zl(t,{todayRange:e,nowDate:n,eventSelection:r,eventDrag:i,eventResize:s}){let o=(i?i.affectedInstances:null)||(s?s.affectedInstances:null)||{};return g(j,null,t.map(l=>{let a=l.eventRange.instance.instanceId;return g("div",{key:a,style:{visibility:o[a]?"hidden":""}},g(Ql,Object.assign({seg:l,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:a===r,isShort:!1},pe(l,e,n))))}))}function zn(t){return t?{top:t.start,bottom:-t.end}:{top:"",bottom:""}}function Lm(t,e){return t.map(n=>e[n.index])}class Bm extends H{constructor(){super(...arguments),this.splitFgEventSegs=_(it),this.splitBgEventSegs=_(it),this.splitBusinessHourSegs=_(it),this.splitNowIndicatorSegs=_(it),this.splitDateSelectionSegs=_(it),this.splitEventDrag=_(rs),this.splitEventResize=_(rs),this.rootElRef=Q(),this.cellElRefs=new he}render(){let{props:e,context:n}=this,r=n.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),i=e.cells.length,s=this.splitFgEventSegs(e.fgEventSegs,i),o=this.splitBgEventSegs(e.bgEventSegs,i),l=this.splitBusinessHourSegs(e.businessHourSegs,i),a=this.splitNowIndicatorSegs(e.nowIndicatorSegs,i),d=this.splitDateSelectionSegs(e.dateSelectionSegs,i),c=this.splitEventDrag(e.eventDrag,i),f=this.splitEventResize(e.eventResize,i);return g("div",{className:"fc-timegrid-cols",ref:this.rootElRef},g("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,g("tbody",{role:"presentation"},g("tr",{role:"row"},e.axis&&g("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},g("div",{className:"fc-timegrid-col-frame"},g("div",{className:"fc-timegrid-now-indicator-container"},typeof r=="number"&&g(Zr,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:r},isAxis:!0,date:e.nowDate})))),e.cells.map((u,h)=>g(jm,{key:u.key,elRef:this.cellElRefs.createRef(u.key),dateProfile:e.dateProfile,date:u.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:u.extraRenderProps,extraDataAttrs:u.extraDataAttrs,extraClassNames:u.extraClassNames,extraDateSpan:u.extraDateSpan,fgEventSegs:s[h],bgEventSegs:o[h],businessHourSegs:l[h],nowIndicatorSegs:a[h],dateSelectionSegs:d[h],eventDrag:c[h],eventResize:f[h],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 et(this.rootElRef.current,Fm(this.cellElRefs.currentMap,e.cells),!0,!1))}}function Fm(t,e){return e.map(n=>t[n.key])}class Um extends se{constructor(){super(...arguments),this.processSlotOptions=_(zm),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:n}=this.props,{slatCoords:r}=this.state;if(n&&r){if(e.time){let i=r.computeTimeTop(e.time);i=Math.ceil(i),i&&(i+=1),n(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:n}=this;return g("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},g(Am,{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}),g(Bm,{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:n.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,n){let{dateEnv:r,options:i}=this.context,{colCoords:s}=this,{dateProfile:o}=this.props,{slatCoords:l}=this.state,{snapDuration:a,snapsPerSlot:d}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),c=s.leftToIndex(e),f=l.positions.topToIndex(n);if(c!=null&&f!=null){let u=this.props.cells[c],h=l.positions.tops[f],p=l.positions.getHeight(f),v=(n-h)/p,y=Math.floor(v*d),S=f*d+y,w=this.props.cells[c].date,D=Kn(o.slotMinTime,xu(a,S)),C=r.add(w,D),x=r.add(C,a);return{dateProfile:o,dateSpan:Object.assign({range:{start:C,end:x},allDay:!1},u.extraDateSpan),dayEl:s.els[c],rect:{left:s.lefts[c],right:s.rights[c],top:h,bottom:h+p},layer:0}}return null}}function zm(t,e){let n=e||t,r=xr(t,n);return r===null&&(n=t,r=1),{snapDuration:n,snapsPerSlot:r}}class Wm extends vl{sliceRange(e,n){let r=[];for(let i=0;i<n.length;i+=1){let s=xe(e,n[i]);s&&r.push({start:s.start,end:s.end,isStart:s.start.valueOf()===e.start.valueOf(),isEnd:s.end.valueOf()===e.end.valueOf(),col:i})}return r}}class Vm extends se{constructor(){super(...arguments),this.buildDayRanges=_(Gm),this.slicer=new Wm,this.timeColsRef=Q()}render(){let{props:e,context:n}=this,{dateProfile:r,dayTableModel:i}=e,{nowIndicator:s,nextDayThreshold:o}=n.options,l=this.buildDayRanges(i,r,n.dateEnv);return g(ze,{unit:s?"minute":"day"},(a,d)=>g(Um,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,r,null,n,l),{forPrint:e.forPrint,axis:e.axis,dateProfile:r,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:a,nowIndicatorSegs:s&&this.slicer.sliceNowDate(a,r,o,n,l),todayRange:d,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function Gm(t,e,n){let r=[];for(let i of t.headerDates)r.push({start:n.add(i,e.slotMinTime),end:n.add(i,e.slotMaxTime)});return r}const os=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function Ym(t,e,n,r,i){let s=new Date(0),o=t,l=P(0),a=n||qm(r),d=[];for(;re(o)<re(e);){let c=i.add(s,o),f=xr(l,a)!==null;d.push({date:c,time:o,key:c.toISOString(),isoTimeStr:zu(c),isLabeled:f}),o=Kn(o,r),l=Kn(l,r)}return d}function qm(t){let e,n,r;for(e=os.length-1;e>=0;e-=1)if(n=P(os[e]),r=xr(n,t),r!==null&&r>1)return n;return t}class $m extends Em{constructor(){super(...arguments),this.buildTimeColsModel=_(Qm),this.buildSlatMetas=_(Ym)}render(){let{options:e,dateEnv:n,dateProfileGenerator:r}=this.context,{props:i}=this,{dateProfile:s}=i,o=this.buildTimeColsModel(s,r),l=this.allDaySplitter.splitProps(i),a=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,e.slotLabelInterval,e.slotDuration,n),{dayMinWidth:d}=e,c=!d,f=d,u=e.dayHeaders&&g(gl,{dates:o.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:c?this.renderHeadAxis:null}),h=e.allDaySlot!==!1&&(v=>g(ql,Object.assign({},l.allDay,{dateProfile:s,dayTableModel:o,nextDayThreshold:e.nextDayThreshold,tableMinWidth:v.tableMinWidth,colGroupNode:v.tableColGroupNode,renderRowIntro:c?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:v.clientWidth,clientHeight:v.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),p=v=>g(Vm,Object.assign({},l.timed,{dayTableModel:o,dateProfile:s,axis:c,slotDuration:e.slotDuration,slatMetas:a,forPrint:i.forPrint,tableColGroupNode:v.tableColGroupNode,tableMinWidth:v.tableMinWidth,clientWidth:v.clientWidth,clientHeight:v.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:v.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return f?this.renderHScrollLayout(u,h,p,o.colCnt,d,a,this.state.slatCoords):this.renderSimpleLayout(u,h,p)}}function Qm(t,e){let n=new pl(t.renderRange,e);return new ml(n,!1)}var Zm='.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)}.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}';hn(Zm);const Km={allDaySlot:Boolean};var Xm=ue({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:Km,views:{timeGrid:{component:$m,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class Jm extends H{constructor(){super(...arguments),this.state={textId:Ce()}}render(){let{theme:e,dateEnv:n,options:r,viewApi:i}=this.context,{cellId:s,dayDate:o,todayRange:l}=this.props,{textId:a}=this.state,d=Wr(o,l),c=r.listDayFormat?n.format(o,r.listDayFormat):"",f=r.listDaySideFormat?n.format(o,r.listDaySideFormat):"",u=Object.assign({date:n.toDate(o),view:i,textId:a,text:c,sideText:f,navLinkAttrs:Je(this.context,o),sideNavLinkAttrs:Je(this.context,o,"day",!1)},d);return g($,{elTag:"tr",elClasses:["fc-list-day",...yn(d,e)],elAttrs:{"data-date":Et(o)},renderProps:u,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:ev,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},h=>g("th",{scope:"colgroup",colSpan:3,id:s,"aria-labelledby":a},g(h,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}}function ev(t){return g(j,null,t.text&&g("a",Object.assign({id:t.textId,className:"fc-list-day-text"},t.navLinkAttrs),t.text),t.sideText&&g("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},t.sideNavLinkAttrs),t.sideText))}const tv=B({hour:"numeric",minute:"2-digit",meridiem:"short"});class nv extends H{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i,timeHeaderId:s,eventHeaderId:o,dateHeaderId:l}=e,a=r.eventTimeFormat||tv;return g(bn,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",i.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>rv(i,n),seg:i,timeText:"",disableDragging:!0,disableResizing:!0}),(d,c)=>g(j,null,iv(i,a,n,s,l),g("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},g("span",{className:"fc-list-event-dot",style:{borderColor:c.borderColor||c.backgroundColor}})),g(d,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${o} ${l}`}})))}}function rv(t,e){let n=Ur(t,e);return g("a",Object.assign({},n),t.eventRange.def.title)}function iv(t,e,n,r,i){let{options:s}=n;if(s.displayEventTime!==!1){let o=t.eventRange.def,l=t.eventRange.instance,a=!1,d;if(o.allDay?a=!0:Tf(t.eventRange.range)?t.isStart?d=ct(t,e,n,null,null,l.range.start,t.end):t.isEnd?d=ct(t,e,n,null,null,t.start,l.range.end):a=!0:d=ct(t,e,n),a){let c={text:n.options.allDayText,view:n.viewApi};return g($,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${i}`},renderProps:c,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:sv,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return g("td",{className:"fc-list-event-time"},d)}return null}function sv(t){return t.text}class ov extends se{constructor(){super(...arguments),this.computeDateVars=_(av),this.eventStoreToSegs=_(this._eventStoreToSegs),this.state={timeHeaderId:Ce(),eventHeaderId:Ce(),dateHeaderIdRoot:Ce()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:n}=this,{dayDates:r,dayRanges:i}=this.computeDateVars(e.dateProfile),s=this.eventStoreToSegs(e.eventStore,e.eventUiBases,i);return g(pt,{elRef:this.setRootEl,elClasses:["fc-list",n.theme.getClass("table"),n.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:n.viewSpec},g(Sl,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},s.length>0?this.renderSegList(s,r):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:n}=this.context,r={text:e.noEventsText,view:n};return g($,{elTag:"div",elClasses:["fc-list-empty"],renderProps:r,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:lv,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},i=>g(i,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,n){let{theme:r,options:i}=this.context,{timeHeaderId:s,eventHeaderId:o,dateHeaderIdRoot:l}=this.state,a=cv(e);return g(ze,{unit:"day"},(d,c)=>{let f=[];for(let u=0;u<a.length;u+=1){let h=a[u];if(h){let p=Et(n[u]),v=l+"-"+p;f.push(g(Jm,{key:p,cellId:v,dayDate:n[u],todayRange:c})),h=Fr(h,i.eventOrder);for(let y of h)f.push(g(nv,Object.assign({key:p+":"+y.eventRange.instance.instanceId,seg:y,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:s,eventHeaderId:o,dateHeaderId:v},pe(y,c,d))))}}return g("table",{className:"fc-list-table "+r.getClass("table")},g("thead",null,g("tr",null,g("th",{scope:"col",id:s},i.timeHint),g("th",{scope:"col","aria-hidden":!0}),g("th",{scope:"col",id:o},i.eventHint))),g("tbody",null,f))})}_eventStoreToSegs(e,n,r){return this.eventRangesToSegs(nr(e,n,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,r)}eventRangesToSegs(e,n){let r=[];for(let i of e)r.push(...this.eventRangeToSegs(i,n));return r}eventRangeToSegs(e,n){let{dateEnv:r}=this.context,{nextDayThreshold:i}=this.context.options,s=e.range,o=e.def.allDay,l,a,d,c=[];for(l=0;l<n.length;l+=1)if(a=xe(s,n[l]),a&&(d={component:this,eventRange:e,start:a.start,end:a.end,isStart:e.isStart&&a.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&a.end.valueOf()===s.end.valueOf(),dayIndex:l},c.push(d),!d.isEnd&&!o&&l+1<n.length&&s.end<r.add(n[l+1].start,i))){d.end=s.end,d.isEnd=!0;break}return c}}function lv(t){return t.text}function av(t){let e=L(t.renderRange.start),n=t.renderRange.end,r=[],i=[];for(;e<n;)r.push(e),i.push({start:e,end:V(e,1)}),e=V(e,1);return{dayDates:r,dayRanges:i}}function cv(t){let e=[],n,r;for(n=0;n<t.length;n+=1)r=t[n],(e[r.dayIndex]||(e[r.dayIndex]=[])).push(r);return e}var dv=':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}';hn(dv);const uv={listDayFormat:ls,listDaySideFormat:ls,noEventsClassNames:b,noEventsContent:b,noEventsDidMount:b,noEventsWillUnmount:b};function ls(t){return t===!1?null:B(t)}var fv=ue({name:"@fullcalendar/list",optionRefiners:uv,views:{list:{component:ov,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"}}}});qr.touchMouseIgnoreWait=500;let ar=0,en=0,cr=!1;class Kl{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=n=>{if(!this.shouldIgnoreMouse()&&hv(n)&&this.tryStart(n)){let r=this.createEventFromMouse(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=n=>{let r=this.createEventFromMouse(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleMouseUp=n=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(n)),this.cleanup()},this.handleTouchStart=n=>{if(this.tryStart(n)){this.isTouchDragging=!0;let r=this.createEventFromTouch(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r);let i=n.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=n=>{let r=this.createEventFromTouch(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleTouchEnd=n=>{if(this.isDragging){let r=n.target;r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",this.handleTouchEnd),r.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(n)),this.cleanup(),this.isTouchDragging=!1,gv()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let r=window.scrollX-this.prevScrollX+this.prevPageX,i=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:i,deltaX:r-this.origPageX,deltaY:i-this.origPageY})}},this.containerEl=e,this.emitter=new vn,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),pv()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),mv()}tryStart(e){let n=this.querySubjectEl(e),r=e.target;return n&&(!this.handleSelector||q(r,this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){cr=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?q(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return ar||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(cr=!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,n){let r=0,i=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(r=e.pageX-this.origPageX,i=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:r,deltaY:i}}createEventFromTouch(e,n){let r=e.touches,i,s,o=0,l=0;return r&&r.length?(i=r[0].pageX,s=r[0].pageY):(i=e.pageX,s=e.pageY),n?(this.origPageX=i,this.origPageY=s):(o=i-this.origPageX,l=s-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:s,deltaX:o,deltaY:l}}}function hv(t){return t.button===0&&!t.ctrlKey}function gv(){ar+=1,setTimeout(()=>{ar-=1},qr.touchMouseIgnoreWait)}function pv(){en+=1,en===1&&window.addEventListener("touchmove",Xl,{passive:!1})}function mv(){en-=1,en||window.removeEventListener("touchmove",Xl,{passive:!1})}function Xl(t){cr&&t.preventDefault()}class vv{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,n,r){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=n-window.scrollX,this.origScreenY=r-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,n){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=n-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,n){let r=()=>{this.cleanup(),n()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)}doRevertAnimation(e,n){let r=this.mirrorEl,i=this.sourceEl.getBoundingClientRect();r.style.transition="top "+n+"ms,left "+n+"ms",ot(r,{left:i.left,top:i.top}),uu(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(Cr(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,n=this.mirrorEl;return n||(n=this.mirrorEl=this.sourceEl.cloneNode(!0),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.pointerEvents="none",n.classList.add("fc-event-dragging"),ot(n,{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(n)),n}}class Jl extends Gr{constructor(e,n){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=n,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 ea extends Jl{constructor(e,n){super(new jh(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return Ph(this.scrollController.el)}}class yv extends Jl{constructor(e){super(new Lh,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 as=typeof performance=="function"?performance.now:Date.now;class bv{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 n=as();this.handleSide(e,(n-this.msSinceRequest)/1e3),this.requestAnimation(n)}else this.isAnimating=!1}}}start(e,n,r){this.isEnabled&&(this.scrollCaches=this.buildCaches(r),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,n))}handleMove(e,n){if(this.isEnabled){let r=e-window.scrollX,i=n-window.scrollY,s=this.pointerScreenY===null?0:i-this.pointerScreenY,o=this.pointerScreenX===null?0:r-this.pointerScreenX;s<0?this.everMovedUp=!0:s>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=i,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(as()))}}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,n){let{scrollCache:r}=e,{edgeThreshold:i}=this,s=i-e.distance,o=s*s/(i*i)*this.maxVelocity*n,l=1;switch(e.name){case"left":l=-1;case"right":r.setScrollLeft(r.getScrollLeft()+o*l);break;case"top":l=-1;case"bottom":r.setScrollTop(r.getScrollTop()+o*l);break}}computeBestEdge(e,n){let{edgeThreshold:r}=this,i=null,s=this.scrollCaches||[];for(let o of s){let l=o.clientRect,a=e-l.left,d=l.right-e,c=n-l.top,f=l.bottom-n;a>=0&&d>=0&&c>=0&&f>=0&&(c<=r&&this.everMovedUp&&o.canScrollUp()&&(!i||i.distance>c)&&(i={scrollCache:o,name:"top",distance:c}),f<=r&&this.everMovedDown&&o.canScrollDown()&&(!i||i.distance>f)&&(i={scrollCache:o,name:"bottom",distance:f}),a<=r&&this.everMovedLeft&&o.canScrollLeft()&&(!i||i.distance>a)&&(i={scrollCache:o,name:"left",distance:a}),d<=r&&this.everMovedRight&&o.canScrollRight()&&(!i||i.distance>d)&&(i={scrollCache:o,name:"right",distance:d}))}return i}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new yv(!1):new ea(n,!1))}queryScrollEls(e){let n=[];for(let r of this.scrollQuery)typeof r=="object"?n.push(r):n.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(r)));return n}}class wt extends Uh{constructor(e,n){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,fu(document.body),gu(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 s=this.minDistance,o,{deltaX:l,deltaY:a}=i;o=l*l+a*a,o>=s*s&&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,hu(document.body),pu(document.body),this.emitter.trigger("pointerup",i),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(i)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new Kl(e);r.emitter.on("pointerdown",this.onPointerDown),r.emitter.on("pointermove",this.onPointerMove),r.emitter.on("pointerup",this.onPointerUp),n&&(r.selector=n),this.mirror=new vv,this.autoScroller=new bv}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 Ev{constructor(e){this.el=e,this.origRect=Vr(e),this.scrollCaches=dl(e).map(n=>new ea(n,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let n of this.scrollCaches)e+=n.origScrollLeft-n.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let n of this.scrollCaches)e+=n.origScrollTop-n.getScrollTop();return e}isWithinClipping(e,n){let r={left:e,top:n};for(let i of this.scrollCaches)if(!Sv(i.getEventTarget())&&!wh(r,i.clientRect))return!1;return!0}}function Sv(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class En{constructor(e,n){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=r=>{let{dragging:i}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?(i.setIgnoreMove(!1),this.emitter.trigger("pointerdown",r)):i.setIgnoreMove(!0)},this.handleDragStart=r=>{this.emitter.trigger("dragstart",r),this.handleMove(r,!0)},this.handleDragMove=r=>{this.emitter.trigger("dragmove",r),this.handleMove(r)},this.handlePointerUp=r=>{this.releaseHits(),this.emitter.trigger("pointerup",r)},this.handleDragEnd=r=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,r),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",r)},this.droppableStore=n,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 vn}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl,s;i instanceof HTMLElement&&(s=Vr(i),r=Ch(r,s));let o=this.initialHit=this.queryHitForOffset(r.left,r.top);if(o){if(this.useSubjectCenter&&s){let l=al(s,o.rect);l&&(r=Ah(l))}this.coordAdjust=Dh(r,n)}else this.coordAdjust={left:0,top:0}}handleMove(e,n){let r=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(n||!Sn(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=me(this.droppableStore,e=>(e.component.prepareHits(),new Ev(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:r,offsetTrackers:i}=this,s=null;for(let o in r){let l=r[o].component,a=i[o];if(a&&a.isWithinClipping(e,n)){let d=a.computeLeft(),c=a.computeTop(),f=e-d,u=n-c,{origRect:h}=a,p=h.right-h.left,v=h.bottom-h.top;if(f>=0&&f<p&&u>=0&&u<v){let y=l.queryHit(f,u,p,v);y&&pn(y.dateProfile.activeRange,y.dateSpan.range)&&(this.disablePointCheck||a.el.contains(a.el.getRootNode().elementFromPoint(f+d-window.scrollX,u+c-window.scrollY)))&&(!s||y.layer>s.layer)&&(y.componentId=o,y.context=l.context,y.rect.left+=d,y.rect.right+=d,y.rect.top+=c,y.rect.bottom+=c,s=y)}}}return s}}function Sn(t,e){return!t&&!e?!0:!!t!=!!e?!1:uh(t.dateSpan,e.dateSpan)}function ta(t,e){let n={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(n,r(t,e));return Object.assign(n,wv(t,e.dateEnv)),n}function wv(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class Cv extends tt{constructor(e){super(e),this.handlePointerDown=r=>{let{dragging:i}=this,s=r.origEvent.target;i.setIgnoreMove(!this.component.isValidDateDownEl(s))},this.handleDragEnd=r=>{let{component:i}=this,{pointer:s}=this.dragging;if(!s.wasTouchScroll){let{initialHit:o,finalHit:l}=this.hitDragging;if(o&&l&&Sn(o,l)){let{context:a}=i,d=Object.assign(Object.assign({},ta(o.dateSpan,a)),{dayEl:o.dayEl,jsEvent:r.origEvent,view:a.viewApi||a.calendarApi.view});a.emitter.trigger("dateClick",d)}}},this.dragging=new wt(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new En(this.dragging,zr(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class Av extends tt{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=o=>{let{component:l,dragging:a}=this,{options:d}=l.context,c=d.selectable&&l.isValidDateDownEl(o.origEvent.target);a.setIgnoreMove(!c),a.delay=o.isTouch?Dv(l):null},this.handleDragStart=o=>{this.component.context.calendarApi.unselect(o)},this.handleHitUpdate=(o,l)=>{let{context:a}=this.component,d=null,c=!1;if(o){let f=this.hitDragging.initialHit;o.componentId===f.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(f,o)||(d=xv(f,o,a.pluginHooks.dateSelectionTransformers)),(!d||!qh(d,o.dateProfile,a))&&(c=!0,d=null)}d?a.dispatch({type:"SELECT_DATES",selection:d}):l||a.dispatch({type:"UNSELECT_DATES"}),c?Ar():Dr(),l||(this.dragSelection=d)},this.handlePointerUp=o=>{this.dragSelection&&(tl(this.dragSelection,o,this.component.context),this.dragSelection=null)};let{component:n}=e,{options:r}=n.context,i=this.dragging=new wt(e.el);i.touchScrollAllowed=!1,i.minDistance=r.selectMinDistance||0,i.autoScroller.isEnabled=r.dragScroll;let s=this.hitDragging=new En(this.dragging,zr(e));s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Dv(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function xv(t,e,n){let r=t.dateSpan,i=e.dateSpan,s=[r.range.start,r.range.end,i.range.start,i.range.end];s.sort(Eu);let o={};for(let l of n){let a=l(t,e);if(a===!1)return null;a&&Object.assign(o,a)}return o.range={start:s[0],end:s[3]},o.allDay=r.allDay,o}class Ct extends tt{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=o=>{let l=o.origEvent.target,{component:a,dragging:d}=this,{mirror:c}=d,{options:f}=a.context,u=a.context;this.subjectEl=o.subjectEl;let h=this.subjectSeg=Xe(o.subjectEl),v=(this.eventRange=h.eventRange).instance.instanceId;this.relevantEvents=Hr(u.getCurrentData().eventStore,v),d.minDistance=o.isTouch?0:f.eventDragMinDistance,d.delay=o.isTouch&&v!==a.props.eventSelection?_v(a):null,f.fixedMirrorParent?c.parentNode=f.fixedMirrorParent:c.parentNode=q(l,".fc"),c.revertDuration=f.dragRevertDuration;let y=a.isValidSegDownEl(l)&&!q(l,".fc-event-resizer");d.setIgnoreMove(!y),this.isDragging=y&&o.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=o=>{let l=this.component.context,a=this.eventRange,d=a.instance.instanceId;o.isTouch?d!==this.component.props.eventSelection&&l.dispatch({type:"SELECT_EVENT",eventInstanceId:d}):l.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(l.calendarApi.unselect(o),l.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new U(l,a.def,a.instance),jsEvent:o.origEvent,view:l.viewApi}))},this.handleHitUpdate=(o,l)=>{if(!this.isDragging)return;let a=this.relevantEvents,d=this.hitDragging.initialHit,c=this.component.context,f=null,u=null,h=null,p=!1,v={affectedEvents:a,mutatedEvents:J(),isEvent:!0};if(o){f=o.context;let y=f.options;c===f||y.editable&&y.droppable?(u=Rv(d,o,this.eventRange.instance.range.start,f.getCurrentData().pluginHooks.eventDragMutationMassagers),u&&(h=Br(a,f.getCurrentData().eventUiBases,u,f),v.mutatedEvents=h,yl(v,o.dateProfile,f)||(p=!0,u=null,h=null,v.mutatedEvents=J()))):f=null}this.displayDrag(f,v),p?Ar():Dr(),l||(c===f&&Sn(d,o)&&(u=null),this.dragging.setMirrorNeedsRevert(!u),this.dragging.setMirrorIsVisible(!o||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=f,this.validMutation=u,this.mutatedRelevantEvents=h)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=o=>{if(this.isDragging){let l=this.component.context,a=l.viewApi,{receivingContext:d,validMutation:c}=this,f=this.eventRange.def,u=this.eventRange.instance,h=new U(l,f,u),p=this.relevantEvents,v=this.mutatedRelevantEvents,{finalHit:y}=this.hitDragging;if(this.clearDrag(),l.emitter.trigger("eventDragStop",{el:this.subjectEl,event:h,jsEvent:o.origEvent,view:a}),c){if(d===l){let S=new U(l,v.defs[f.defId],u?v.instances[u.instanceId]:null);l.dispatch({type:"MERGE_EVENTS",eventStore:v});let w={oldEvent:h,event:S,relatedEvents:Ne(v,l,u),revert(){l.dispatch({type:"MERGE_EVENTS",eventStore:p})}},D={};for(let C of l.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(D,C(c,l));l.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},w),D),{el:o.subjectEl,delta:c.datesDelta,jsEvent:o.origEvent,view:a})),l.emitter.trigger("eventChange",w)}else if(d){let S={event:h,relatedEvents:Ne(p,l,u),revert(){l.dispatch({type:"MERGE_EVENTS",eventStore:p})}};l.emitter.trigger("eventLeave",Object.assign(Object.assign({},S),{draggedEl:o.subjectEl,view:a})),l.dispatch({type:"REMOVE_EVENTS",eventStore:p}),l.emitter.trigger("eventRemove",S);let w=v.defs[f.defId],D=v.instances[u.instanceId],C=new U(d,w,D);d.dispatch({type:"MERGE_EVENTS",eventStore:v});let x={event:C,relatedEvents:Ne(v,d,D),revert(){d.dispatch({type:"REMOVE_EVENTS",eventStore:v})}};d.emitter.trigger("eventAdd",x),o.isTouch&&d.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),d.emitter.trigger("drop",Object.assign(Object.assign({},ta(y.dateSpan,d)),{draggedEl:o.subjectEl,jsEvent:o.origEvent,view:y.context.viewApi})),d.emitter.trigger("eventReceive",Object.assign(Object.assign({},x),{draggedEl:o.subjectEl,view:y.context.viewApi}))}}else l.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:r}=n.context,i=this.dragging=new wt(e.el);i.pointer.selector=Ct.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.dragScroll;let s=this.hitDragging=new En(this.dragging,rr);s.useSubjectCenter=e.useEventCenter,s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp),s.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,n){let r=this.component.context,i=this.receivingContext;i&&i!==e&&(i===r?i.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:J(),isEvent:!0}}):i.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:n})}clearDrag(){let e=this.component.context,{receivingContext:n}=this;n&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e!==n&&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}}Ct.SELECTOR=".fc-event-draggable, .fc-event-resizable";function Rv(t,e,n,r){let i=t.dateSpan,s=e.dateSpan,o=i.range.start,l=s.range.start,a={};i.allDay!==s.allDay&&(a.allDay=s.allDay,a.hasEnd=e.context.options.allDayMaintainDuration,s.allDay?o=L(n):o=n);let d=Ye(o,l,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);d.milliseconds&&(a.allDay=!1);let c={datesDelta:d,standardProps:a};for(let f of r)f(c,t,e);return c}function _v(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class Tv extends tt{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=s=>{let{component:o}=this,l=this.querySegEl(s),a=Xe(l),d=this.eventRange=a.eventRange;this.dragging.minDistance=o.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(s.origEvent.target)||s.isTouch&&this.component.props.eventSelection!==d.instance.instanceId)},this.handleDragStart=s=>{let{context:o}=this.component,l=this.eventRange;this.relevantEvents=Hr(o.getCurrentData().eventStore,this.eventRange.instance.instanceId);let a=this.querySegEl(s);this.draggingSegEl=a,this.draggingSeg=Xe(a),o.calendarApi.unselect(),o.emitter.trigger("eventResizeStart",{el:a,event:new U(o,l.def,l.instance),jsEvent:s.origEvent,view:o.viewApi})},this.handleHitUpdate=(s,o,l)=>{let{context:a}=this.component,d=this.relevantEvents,c=this.hitDragging.initialHit,f=this.eventRange.instance,u=null,h=null,p=!1,v={affectedEvents:d,mutatedEvents:J(),isEvent:!0};s&&(s.componentId===c.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(c,s)||(u=Mv(c,s,l.subjectEl.classList.contains("fc-event-resizer-start"),f.range))),u&&(h=Br(d,a.getCurrentData().eventUiBases,u,a),v.mutatedEvents=h,yl(v,s.dateProfile,a)||(p=!0,u=null,h=null,v.mutatedEvents=null)),h?a.dispatch({type:"SET_EVENT_RESIZE",state:v}):a.dispatch({type:"UNSET_EVENT_RESIZE"}),p?Ar():Dr(),o||(u&&Sn(c,s)&&(u=null),this.validMutation=u,this.mutatedRelevantEvents=h)},this.handleDragEnd=s=>{let{context:o}=this.component,l=this.eventRange.def,a=this.eventRange.instance,d=new U(o,l,a),c=this.relevantEvents,f=this.mutatedRelevantEvents;if(o.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:d,jsEvent:s.origEvent,view:o.viewApi}),this.validMutation){let u=new U(o,f.defs[l.defId],a?f.instances[a.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:f});let h={oldEvent:d,event:u,relatedEvents:Ne(f,o,a),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:c})}};o.emitter.trigger("eventResize",Object.assign(Object.assign({},h),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||P(0),endDelta:this.validMutation.endDelta||P(0),jsEvent:s.origEvent,view:o.viewApi})),o.emitter.trigger("eventChange",h)}else o.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:n}=e,r=this.dragging=new wt(e.el);r.pointer.selector=".fc-event-resizer",r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.context.options.dragScroll;let i=this.hitDragging=new En(this.dragging,zr(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 q(e.subjectEl,".fc-event")}}function Mv(t,e,n,r){let i=t.context.dateEnv,s=t.dateSpan.range.start,o=e.dateSpan.range.start,l=Ye(s,o,i,t.largeUnit);if(n){if(i.add(r.start,l)<r.end)return{startDelta:l}}else if(i.add(r.end,l)>r.start)return{endDelta:l};return null}class Iv{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=r=>{r.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=r=>{let i=this.context.options.unselectCancel,s=No(r.origEvent);this.matchesCancel=!!q(s,i),this.matchesEvent=!!q(s,Ct.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:i}=this,{documentPointer:s}=this,o=i.getCurrentData();if(!s.wasTouchScroll){if(o.dateSelection&&!this.isRecentPointerDateSelect){let l=i.options.unselectAuto;l&&(!l||!this.matchesCancel)&&i.calendarApi.unselect(r)}o.eventSelection&&!this.matchesEvent&&i.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new Kl(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}const kv={fixedMirrorParent:b},Nv={dateClick:b,eventDragStart:b,eventDragStop:b,eventDrop:b,eventResizeStart:b,eventResizeStop:b,eventResize:b,drop:b,eventReceive:b,eventLeave:b};qr.dataAttrPrefix="";var Ov=ue({name:"@fullcalendar/interaction",componentInteractions:[Cv,Av,Ct,Tv],calendarInteractions:[Iv],elementDraggingImpl:wt,optionRefiners:kv,listenerRefiners:Nv});const Pv=t=>{var s,o,l;const e=t.event.extendedProps,n=!!e.isHoliday,r=n?e.holidayName||t.event.title:(s=e.category)==null?void 0:s.name,i=r?{backgroundColor:n?"#fee2e2":`${((o=e.category)==null?void 0:o.color)||"#000000"}22`,color:n?"#991b1b":"#374151",border:`1px solid ${n?"#fecaca":((l=e.category)==null?void 0:l.color)||"#e5e7eb"}`}:void 0;if(t.view.type.startsWith("list")){const a=!!e.isImportant&&!n,d=n?"":[t.timeText,e.location].filter(Boolean).join(" • ");return m.jsxs("div",{className:"flex flex-col gap-1 py-1",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[a&&m.jsx(rn,{className:"w-4 h-4 text-yellow-500 fill-yellow-500"}),m.jsx("span",{className:"text-sm font-medium text-gray-900",children:t.event.title}),r&&m.jsx("span",{className:"inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",style:i,children:r})]}),d&&m.jsxs("div",{className:"text-xs text-gray-500 flex items-center gap-1",children:[m.jsx("span",{className:"w-1 h-1 rounded-full bg-gray-400"}),d]}),!n&&e.description&&m.jsx("div",{className:"text-xs text-gray-600 line-clamp-2 pl-2 border-l-2 border-gray-200 ml-1",children:e.description})]})}return m.jsx("div",{className:vs("overflow-hidden px-1 rounded-md max-w-full cursor-pointer"),children:m.jsx("span",{className:"inline-flex items-center gap-1 text-[11px] leading-tight whitespace-nowrap overflow-hidden text-ellipsis max-w-full",children:m.jsx("span",{className:"truncate",title:t.event.title,children:t.event.title})})})},Hv=[hm,Xm,fv,Ov],ae={initialView:"dayGridMonth",locales:[Up],locale:"id",height:"auto",eventDisplay:"block",nowIndicator:!0,selectable:!0,dayMaxEventRows:2,noEventsContent:m.jsx("div",{className:"p-3 text-sm text-gray-500",children:"Tidak ada acara"}),eventContent:Pv},jv=({arg:t,importantDates:e})=>{const n=W(t.date).format("YYYY-MM-DD"),r=e.has(n),i=W(t.date).day()===0;return m.jsx("div",{className:"flex items-center justify-between w-full",children:m.jsxs("div",{className:"inline-flex items-center gap-1",children:[r&&m.jsx(rn,{className:"w-3 h-3 text-yellow-500 fill-yellow-500"}),m.jsx("span",{className:i?"text-red-600 font-medium":"",children:t.dayNumberText})]})})},Lv=({arg:t,importantDates:e})=>{const n=W(t.date).format("YYYY-MM-DD"),r=e.has(n),i=W(t.date).day()===0;return m.jsxs("div",{className:"flex items-center gap-2",children:[r&&m.jsx(rn,{className:"w-3 h-3 text-yellow-500 fill-yellow-500"}),m.jsx("span",{className:i?"text-red-600 font-medium":"",children:t.text})]})},Bv=()=>(E.useEffect(()=>{const t=document.createElement("style");return t.setAttribute("id","fc-listDay-styles"),t.textContent=`
      /* Gaya untuk header tampilan listDay */
      .fc .fc-list-day-cushion {
        background-color: #f9fafb !important;
        padding: 8px 14px !important;
      }
      
      .fc .fc-list-day-text,
      .fc .fc-list-day-side-text {
        font-weight: 600 !important;
        font-size: 0.9rem !important;
        color: #111827 !important;
      }

      /* Gaya untuk tabel listDay */
      .fc .fc-list-table {
        border-radius: 0.375rem;
        overflow: hidden;
      }

      /* Gaya untuk header tabel */
      .fc .fc-list-table th {
        background-color: #f3f4f6 !important;
        padding: 10px 14px !important;
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.025em !important;
        color: #4b5563 !important;
      }

      /* Gaya untuk baris tabel */
      .fc .fc-list-table td {
        padding: 10px 14px !important;
        font-size: 0.9rem !important;
        border-width: 0 !important;
        border-bottom-width: 1px !important;
        border-color: #e5e7eb !important;
      }
      
      /* Gaya untuk sel waktu pada baris */
      .fc .fc-list-event-time {
        font-weight: 500 !important;
        color: #4b5563 !important;
        width: 140px !important;
      }

      /* Gaya saat hover pada baris acara */
      .fc .fc-list-event:hover td {
        background-color: #f3f4f6 !important;
      }

      /* Gaya khusus untuk baris acara penting */
      .fc .fc-list-event.is-important td {
        background-color: #fffbeb22 !important;
      }

      /* Gaya khusus untuk baris acara libur */
      .fc .fc-list-event.is-holiday td {
        background-color: #fee2e222 !important;
      }
      
      /* Menyesuaikan tampilan untuk perangkat mobile */
      @media (max-width: 640px) {
        .fc .fc-list-event-time {
          width: 100px !important;
          font-size: 0.75rem !important;
        }
        
        .fc .fc-list-event-title {
          font-size: 0.85rem !important;
        }
      }
    `,document.head.appendChild(t),()=>{const e=document.getElementById("fc-listDay-styles");e&&e.remove()}},[]),null),Fv=E.forwardRef(function(e,n){const{events:r,importantDates:i,holidayDates:s,onDatesSet:o,onEventClick:l}=e,[a,d]=E.useState("dayGridMonth"),c=u=>{const h={id:Number(u.event.id),title:u.event.title??"",start:u.event.startStr||null,end:u.event.endStr||null,allDay:!!u.event.allDay,extendedProps:u.event.extendedProps??{}};l(h)},f=u=>{d(u)};return m.jsxs(m.Fragment,{children:[a==="listDay"&&m.jsx(Bv,{}),m.jsx(Ll,{ref:n,plugins:Hv,initialView:ae.initialView,headerToolbar:!1,locales:ae.locales,locale:ae.locale,height:ae.height,eventDisplay:ae.eventDisplay,nowIndicator:ae.nowIndicator,selectable:ae.selectable,dayMaxEventRows:ae.dayMaxEventRows,views:{dayGridMonth:{},timeGridWeek:{},timeGridDay:{},listDay:{buttonText:"Acara",titleFormat:{year:"numeric",month:"long",day:"numeric"}}},noEventsContent:ae.noEventsContent,events:r,datesSet:u=>{u.view.type&&f(u.view.type),o(u)},dayHeaderContent:u=>m.jsx(Lv,{arg:u,importantDates:i}),dayCellContent:u=>m.jsx(jv,{arg:u,importantDates:i}),dayCellClassNames:u=>Nd(u.date,s),eventClassNames:u=>Od(u.event.extendedProps),eventDidMount:u=>{var h;if(u.view.type.startsWith("list")){const p=u.event.extendedProps,v=p!=null&&p.isHoliday?"#fecaca":((h=p==null?void 0:p.category)==null?void 0:h.color)||"",y=u.el.closest("tr");y&&v&&(y.style.backgroundColor=`${v}22`,y.style.borderLeft=`3px solid ${v}`)}},eventClick:c,eventTimeFormat:{hour:"2-digit",minute:"2-digit"},eventContent:ae.eventContent,slotLabelFormat:{hour:"2-digit",minute:"2-digit",omitZeroMinute:!1,meridiem:"short"},allDayText:"Sepanjang hari",moreLinkText:"+{count} lagi",noEventsText:"Tidak ada acara"})]})}),Uv=({title:t,calendarRef:e})=>m.jsxs("div",{className:"flex items-center gap-2 justify-center",children:[m.jsx("button",{onClick:()=>{var n;return(n=e.current)==null?void 0:n.getApi().prev()},className:"rounded border px-2 py-1 text-xs md:text-sm hover:bg-gray-50","aria-label":"Previous",children:m.jsx(Ea,{className:"w-4 h-4"})}),m.jsx("div",{className:"text-sm md:text-lg font-semibold flex-1 text-center truncate",children:t}),m.jsx("button",{onClick:()=>{var n;return(n=e.current)==null?void 0:n.getApi().next()},className:"rounded border px-2 py-1 text-xs md:text-sm hover:bg-gray-50","aria-label":"Next",children:m.jsx(wa,{className:"w-4 h-4"})})]}),fy=()=>{var A,F,z,G;const t=na().props,e=t.nouid||"",n=Array.isArray(t.categories)?t.categories:[],r=Array.isArray(t.events)?t.events:[],i=t.filters||{},s=ra(),o=E.useRef(null),[l,a]=E.useState(!1),[d,c]=E.useState(null),{title:f,filteredEvents:u,holidayData:h,importantDates:p,activeCats:v,setActiveCats:y,handleDatesSet:S,rangeRef:w}=Md({nouid:e,initialEvents:r,initialFilters:i}),D=dt.useMemo(()=>{try{return Id(u)}catch(k){return console.error("Error processing events:",k),[]}},[u]),C=dt.useMemo(()=>{var k,M;try{return kd(h.names,(k=w.current)==null?void 0:k.start,(M=w.current)==null?void 0:M.end)}catch(Y){return console.error("Error processing holidays:",Y),[]}},[h.names,(A=w.current)==null?void 0:A.start,(F=w.current)==null?void 0:F.end]),R=v.length===0||v.includes("libur")?[...C,...D]:D,I=k=>{try{c(k),a(!0)}catch(M){console.error("Error handling event click:",M)}};return m.jsx(ma,{title:"Kalender",children:m.jsxs("div",{className:"p-3 space-y-3",children:[m.jsx(xd,{title:f,isMobile:s,onToday:()=>{var k;return(k=o.current)==null?void 0:k.getApi().today()},onPrev:()=>{var k;return(k=o.current)==null?void 0:k.getApi().prev()},onNext:()=>{var k;return(k=o.current)==null?void 0:k.getApi().next()},onViewMonth:()=>{var k;return(k=o.current)==null?void 0:k.getApi().changeView("dayGridMonth")},onViewListDay:()=>{var k;return(k=o.current)==null?void 0:k.getApi().changeView("listDay")},isListDay:((G=(z=o.current)==null?void 0:z.getApi().view)==null?void 0:G.type)==="listDay",categories:n,activeSlugs:v,onToggleCategory:k=>y(M=>M.includes(k)?M.filter(Y=>Y!==k):[...M,k]),onClearCategories:()=>y([]),onSelectAllCategories:()=>y(n.map(k=>k.slug))}),s&&m.jsx(Uv,{title:f,calendarRef:o}),m.jsx("div",{className:"rounded border bg-white",children:m.jsx(Fv,{ref:o,events:R,importantDates:p,holidayDates:h.dates,onDatesSet:S,onEventClick:I})}),m.jsx(_d,{open:l,onOpenChange:a,event:d})]})})};export{fy as default};
