@remit/web-client-dist 0.0.675 → 0.0.676
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{AppFrame-R9FR9SH9.js → AppFrame-DSPG81Mk.js} +1 -1
- package/assets/{BriefPane-BzlqkW4r.js → BriefPane-Cfl-uWfm.js} +1 -1
- package/assets/CalendarEventEditor-COnJXvRd.js +1 -0
- package/assets/CalendarEventPopup-CqHE2vrc.js +1 -0
- package/assets/CalendarLoadFailed-CxL15r1A.js +1 -0
- package/assets/CalendarQuickCreate-DxgU3bNP.js +1 -0
- package/assets/CalendarSession-BKwK9s2o.js +1 -0
- package/assets/{EmptyState-dD_YhGMH.js → EmptyState-BUOSmldo.js} +1 -1
- package/assets/{ErrorState-nA0Ptq3g.js → ErrorState-KjDYblD5.js} +1 -1
- package/assets/{FlaggedPane-BwhUf1qN.js → FlaggedPane-Dw-wR4tp.js} +1 -1
- package/assets/{FullCompose-dJ4mfUrX.js → FullCompose-Djp_h4BT.js} +1 -1
- package/assets/{LabelApplyTrigger-BA7ANeDk.js → LabelApplyTrigger-oS5sxATE.js} +1 -1
- package/assets/{MailShell-0sTtK1xD.js → MailShell-LIuV2C3h.js} +1 -1
- package/assets/{MailViewChrome-BEx9Dr1Z.js → MailViewChrome-yffBJjbO.js} +1 -1
- package/assets/{MailboxPane-DYgnYeOy.js → MailboxPane-DUCZVAx6.js} +1 -1
- package/assets/{MessageBody-Deha778B.js → MessageBody-C89PSL_p.js} +1 -1
- package/assets/MessageToolbar-UJadqHyA.js +1 -0
- package/assets/{NavMenuButton-C-7-t18I.js → NavMenuButton-B-goW-G5.js} +1 -1
- package/assets/{OnboardingWizard-hfP07hpw.js → OnboardingWizard-Cvqq2aP_.js} +1 -1
- package/assets/{OutboxPane-gEXLW7BJ.js → OutboxPane-ce4uTAzW.js} +1 -1
- package/assets/_calendarObjectId-lcrg9Fhc.js +1 -0
- package/assets/_mailboxId-BzKo-TnK.js +1 -0
- package/assets/_messageId-C7U0TsBv.js +1 -0
- package/assets/_messageId-CGB3gt7C.js +1 -0
- package/assets/_messageId-D2Qjacn6.js +1 -0
- package/assets/_outboxMessageId-FUbJ3RF8.js +1 -0
- package/assets/_recurrenceId-DpQOCGAd.js +1 -0
- package/assets/_threadId-BmZ2vl5z.js +1 -0
- package/assets/_threadId-Bs84eLjr.js +1 -0
- package/assets/_threadId-DySupNzi.js +1 -0
- package/assets/_view._date-DYujYKtx.js +1 -0
- package/assets/{account-service-status-Kz9s3jOk.js → account-service-status-oYDwuPLn.js} +1 -1
- package/assets/{accounts-B5C8kCn6.js → accounts-DhSbRlEm.js} +1 -1
- package/assets/{advanced-CudHnY-7.js → advanced-B50NfkTy.js} +1 -1
- package/assets/{appearance-BTH52atO.js → appearance-CYNOlHLz.js} +1 -1
- package/assets/{avatar-vPm9XfmM.js → avatar-uWJajuSb.js} +1 -1
- package/assets/{bottom-sheet-BTdseD_6.js → bottom-sheet-Bc0vwv2J.js} +1 -1
- package/assets/brief-DPWE6nMF.js +1 -0
- package/assets/{brief-DuHUqR8b.js → brief-bdXCpAmW.js} +1 -1
- package/assets/{calendar-BQjH3OHS.js → calendar-7SdvLY_h.js} +1 -1
- package/assets/calendar-event-popup-DsPmxVye.js +1 -0
- package/assets/calendar-event-sidebar-soFGsDRR.js +1 -0
- package/assets/{calendar-failure-note-BUFaaizf.js → calendar-failure-note-BtZLcaiZ.js} +1 -1
- package/assets/calendar-format-BwCpz-JZ.js +1 -0
- package/assets/calendar-guests-BR4hC59z.js +1 -0
- package/assets/calendar-suggestion-8jcpefeR.js +1 -0
- package/assets/calendar-tMekVEGW.js +1 -0
- package/assets/calendars-bLB0g-E-.js +1 -0
- package/assets/{card-865cdsJK.js → card-CPL-TrL1.js} +1 -1
- package/assets/{checkbox-Qon94b1C.js → checkbox-CGG1nAhQ.js} +1 -1
- package/assets/{circle-check-big-CyVG6r7N.js → circle-check-big-BsCwNdJZ.js} +1 -1
- package/assets/{circle-check-Db07NpOC.js → circle-check-i3jeyeTf.js} +1 -1
- package/assets/{circle-help-CVShnhWn.js → circle-help-CVWHf1ow.js} +1 -1
- package/assets/{clock-B9kFW89H.js → clock-NnulNCOv.js} +1 -1
- package/assets/compose._-_outboxMessageId_-Be8c22eR.js +1 -0
- package/assets/compose._-_outboxMessageId_-BuomqJqQ.js +1 -0
- package/assets/compose._-_outboxMessageId_-Bv9hyiuT.js +1 -0
- package/assets/compose._-_outboxMessageId_-CvUr9awX.js +1 -0
- package/assets/{config-import-C2ovEkHy.js → config-import-DmOMXQ5W.js} +1 -1
- package/assets/{confirm-dialog-CgMAaLI3.js → confirm-dialog-q8tbS_22.js} +1 -1
- package/assets/{copy-CIKgpUwt.js → copy-LUCWJAE6.js} +1 -1
- package/assets/{credential-steps-BWguS0eW.js → credential-steps-DVglyUgf.js} +1 -1
- package/assets/{download-A4hq8dWf.js → download-SQdHw0Vd.js} +1 -1
- package/assets/draft-Y5XWTm_J.js +1 -0
- package/assets/edit-DMorYaTV.js +1 -0
- package/assets/edit-Dr5FEVcd.js +1 -0
- package/assets/{external-link-DaKTW3eK.js → external-link-BDqA_mVy.js} +1 -1
- package/assets/{file-json-DiHW8YBd.js → file-json-DQGozYSr.js} +1 -1
- package/assets/{filters-1uKuLkQU.js → filters-DFLdTFEB.js} +1 -1
- package/assets/flagged-CCXBAY09.js +1 -0
- package/assets/{flagged-BIza20sq.js → flagged-CyMautVT.js} +1 -1
- package/assets/{folders-Bd16ltK4.js → folders-DtchKvEA.js} +1 -1
- package/assets/{help-copy-N4JgEUmu.js → help-copy-B2iT8EG_.js} +1 -1
- package/assets/{import-DJptfpxt.js → import-DqNA5XIM.js} +1 -1
- package/assets/index-BaEsIFAV.js +1 -0
- package/assets/index-Biz6TlId.js +1 -0
- package/assets/index-BkMAx0hv.js +1 -0
- package/assets/{index-BzL5-pGT.js → index-CL_fwLHN.js} +88 -88
- package/assets/index-CZYy2P_j.js +1 -0
- package/assets/index-CqsCZrgd.js +1 -0
- package/assets/{index-C8VKP1dT.css → index-Cr6oUxXl.css} +1 -1
- package/assets/index-CvDZvwnj.js +1 -0
- package/assets/index-D2Qjacn6.js +1 -0
- package/assets/{index-BWAq8iOl.js → index-DZb7rV9A.js} +4 -4
- package/assets/index-DoTwMLuw.js +1 -0
- package/assets/index-DrtbTKeC.js +1 -0
- package/assets/index-wVOTkeaF.js +1 -0
- package/assets/{kbd-B9MFmWVU.js → kbd-CDJCJUnp.js} +1 -1
- package/assets/{labels-DeCZEWet.js → labels-rv-5Xb0f.js} +1 -1
- package/assets/{mail-CSUpbRUP.js → mail-SW3rbFnq.js} +1 -1
- package/assets/{menu-CGw_RHKl.js → menu-CcLh9Whg.js} +1 -1
- package/assets/new-Zmtsd7wU.js +1 -0
- package/assets/onboarding-BbZUe6dp.js +1 -0
- package/assets/{onboarding-completion-DbgUYeRa.js → onboarding-completion-DoF3_MyG.js} +1 -1
- package/assets/outbox-ZJk7VidB.js +1 -0
- package/assets/{pencil-DOoqyGzC.js → pencil-LSmMSKiW.js} +1 -1
- package/assets/{popover-menu-CNiMANtf.js → popover-menu-fjlAfNO1.js} +1 -1
- package/assets/{refresh-cw-D1SQy8O7.js → refresh-cw-5OKnYRBy.js} +1 -1
- package/assets/{reply-CQarAZxU.js → reply-DvdgFS16.js} +1 -1
- package/assets/{rich-text-DgI7vzll.js → rich-text-BBwYPM6F.js} +1 -1
- package/assets/{rich-text-spellcheck-worker-provider-paPOw9As.js → rich-text-spellcheck-worker-provider-Bk8cqxyg.js} +1 -1
- package/assets/{rotate-ccw-DPB71584.js → rotate-ccw-CENCKp2Z.js} +1 -1
- package/assets/{roving-focus-Coea111y.js → roving-focus-FWOr5tBU.js} +1 -1
- package/assets/{row-actions-CiZruXil.js → row-actions-DA6zLLAB.js} +1 -1
- package/assets/{search-mirror-_Dap9COg.js → search-mirror-Dri4pWEq.js} +1 -1
- package/assets/{search-token-index-DQHE1g7A.js → search-token-index-B1HU1d2-.js} +1 -1
- package/assets/{sections-C6oVXjho.js → sections-Rf3k05-_.js} +1 -1
- package/assets/{senders-DIVpkzIq.js → senders-ikMjTlbx.js} +1 -1
- package/assets/settings-Bk7jziSO.js +1 -0
- package/assets/{settings-screen-4md2ibPl.js → settings-screen-DBP3ABLE.js} +1 -1
- package/assets/{shield-check-BcUXVpR8.js → shield-check-CdR23I2B.js} +1 -1
- package/assets/{sparkles-C1l6GCPT.js → sparkles-Bcn4ZRhZ.js} +1 -1
- package/assets/{suggested-vips-iEt-4yp9.js → suggested-vips-D-8cU8GT.js} +1 -1
- package/assets/suggestion._suggestionId-D6z0CuYD.js +1 -0
- package/assets/task._calendarTaskId-BYRN0yW3.js +1 -0
- package/assets/{undo-2-DHJ6nykB.js → undo-2-Bdx8L5xj.js} +1 -1
- package/assets/useCalendarData-DXhaM_NM.js +2 -0
- package/assets/useCalendarScheduling-BpjmrzdY.js +1 -0
- package/assets/useCalendarSuggestions-D3Jza1d7.js +1 -0
- package/assets/useCalendarTasks-D_NZ0GM6.js +1 -0
- package/assets/{useDebouncedValue-B7157ZPO.js → useDebouncedValue-BTZsNKEh.js} +1 -1
- package/assets/{useFilters-C3bLY42W.js → useFilters-CIuC8WLg.js} +1 -1
- package/assets/{useLabels-DYdHiHXI.js → useLabels-BZFMPVjT.js} +1 -1
- package/assets/useLayoutTier-DrLg7_rq.js +1 -0
- package/assets/{useMediaQuery-7Q3jBluO.js → useMediaQuery-DiQ0fGER.js} +1 -1
- package/assets/{useMessageBodyContent-CWGtiddz.js → useMessageBodyContent-D-LJBFh4.js} +1 -1
- package/assets/{useQueries-Sm8S3Cgh.js → useQueries-hChzM5ru.js} +1 -1
- package/assets/{useRefreshControl-bA8HK_j-.js → useRefreshControl-B6YIG0w2.js} +1 -1
- package/assets/{useResultFolderIndex-BaqajWHb.js → useResultFolderIndex-6TeGdWgp.js} +1 -1
- package/assets/{useSignature-sxHvGfKr.js → useSignature-BkzkUbjz.js} +1 -1
- package/assets/{warnings-ByqpxH4J.js → warnings-BdQvV6Kc.js} +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/CalendarEventEditor-BpGmPZ2Z.js +0 -1
- package/assets/CalendarEventPopup-Brcgx7tV.js +0 -1
- package/assets/CalendarQuickCreate-CwkBXqAB.js +0 -1
- package/assets/CalendarSession--XFP5lXS.js +0 -1
- package/assets/MessageToolbar-5T47fDWC.js +0 -1
- package/assets/_calendarObjectId-Dbrtihva.js +0 -1
- package/assets/_mailboxId-B587Zr5T.js +0 -1
- package/assets/_messageId-BxlZMqGk.js +0 -1
- package/assets/_messageId-CRIBYDCW.js +0 -1
- package/assets/_messageId-DTs144Nv.js +0 -1
- package/assets/_outboxMessageId-BxdPyrXI.js +0 -1
- package/assets/_recurrenceId-QBmk5dbN.js +0 -1
- package/assets/_threadId-8Y3P5szz.js +0 -1
- package/assets/_threadId-AMQdO9xw.js +0 -1
- package/assets/_threadId-mpk_WkaQ.js +0 -1
- package/assets/_view._date-BfJq9sBQ.js +0 -1
- package/assets/brief-BC_KN7ph.js +0 -1
- package/assets/calendar-LLRgZQzl.js +0 -1
- package/assets/calendar-event-popup-Mft0N_sd.js +0 -1
- package/assets/calendar-event-sidebar-D5vjFGdS.js +0 -1
- package/assets/calendar-report-CzeBcU6C.js +0 -1
- package/assets/calendar-suggestion-ClsxDTZs.js +0 -1
- package/assets/calendars-zYfPB3b8.js +0 -1
- package/assets/compose._-_outboxMessageId_-BkKmzR39.js +0 -1
- package/assets/compose._-_outboxMessageId_-BnYGu6ez.js +0 -1
- package/assets/compose._-_outboxMessageId_-C5Aukg6m.js +0 -1
- package/assets/compose._-_outboxMessageId_-Ck-eEtzy.js +0 -1
- package/assets/edit-CxVYhmi5.js +0 -1
- package/assets/edit-DXN-G3Tu.js +0 -1
- package/assets/flagged-DmSptMzm.js +0 -1
- package/assets/index-B18BvpkW.js +0 -1
- package/assets/index-B4pYEqZI.js +0 -1
- package/assets/index-B77HnSA5.js +0 -1
- package/assets/index-BZdYp7ae.js +0 -1
- package/assets/index-BiCNOLIH.js +0 -1
- package/assets/index-CoCVPZ34.js +0 -1
- package/assets/index-CroyVnhC.js +0 -1
- package/assets/index-DTs144Nv.js +0 -1
- package/assets/index-DsgtllX4.js +0 -1
- package/assets/index-DupXMcS6.js +0 -1
- package/assets/new-DVwQ9Ia3.js +0 -1
- package/assets/onboarding-CDWqPDW8.js +0 -1
- package/assets/outbox-Ct7VdX2v.js +0 -1
- package/assets/settings-Cv257vpL.js +0 -1
- package/assets/suggestion._suggestionId-BQw9qGr-.js +0 -1
- package/assets/useCalendarData-Bz4EDHDO.js +0 -2
- package/assets/useCalendarSuggestions-DcYFtQhb.js +0 -1
- package/assets/useLayoutTier-5aJYrTut.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as sn,r as S,bS as Qo,j as d,bT as Jo,bU as el,bV as Yn,o as H,bW as tl,bX as an,bY as nl,bZ as mt,b_ as De,v as ur,b$ as rl,c0 as In,c1 as rs,c2 as ke,c3 as sl,c4 as il,c5 as al,c6 as pt,ak as ss,c7 as ol,c8 as ll,c9 as cl,ca as is,cb as dl,t as ul,aw as fl,ah as hl,bR as gl,at as ml,aL as vi,f as pl,s as vl,cc as yl,cd as El,ce as zt,cf as bl,cg as Sl,ch as yi,ci as $n,X as wl,aH as Ei,cj as as,ck as Dl,cl as os,cm as Cl,cn as xl,co as Tl,cp as ls,L as Rl,cq as Ml,cr as Il,cs,ct as Nl,cu as kl,O as Pl}from"./index-CL_fwLHN.js";import{C as bi}from"./calendar-event-popup-DsPmxVye.js";import{a as Hl,b as jl}from"./calendar-guests-BR4hC59z.js";import{M as Ol}from"./menu-CcLh9Whg.js";import{M as Al,d as Ll,r as Si,e as Ge,U as _l,f as Ul,g as Bl,h as wi,b as Di,c as Zn,i as Wl,j as Fl,k as Vl}from"./useCalendarSuggestions-D3Jza1d7.js";import{a as zl}from"./useCalendarScheduling-BpjmrzdY.js";import{u as Gl}from"./useCalendarTasks-D_NZ0GM6.js";import{s as Yl,u as $l,a as Zl,b as ql,R as Xl,c as Kl}from"./useCalendarData-DXhaM_NM.js";import{d as Ql,e as Jl,p as ds}from"./reply-DvdgFS16.js";import{a as fr,b as hr,c as Ci,d as ec,e as tc,u as nc}from"./calendar-tMekVEGW.js";import{C as xi,r as rc,a as sc,d as ic,w as ac,b as us,f as oc,e as lc,c as cc,l as dc,g as uc,h as fc,i as hc,j as gc,E as mc,s as pc,t as vc,k as yc,m as Ec,n as bc}from"./calendar-suggestion-8jcpefeR.js";import{u as Sc}from"./useDebouncedValue-BTZsNKEh.js";import{C as wc}from"./clock-NnulNCOv.js";import{f as Dc,E as Cc}from"./ErrorState-KjDYblD5.js";import{C as qn}from"./CalendarLoadFailed-CxL15r1A.js";import{C as xc,A as Tc}from"./account-service-status-oYDwuPLn.js";import{C as Rc}from"./CalendarQuickCreate-DxgU3bNP.js";import{C as Mc}from"./CalendarSession-BKwK9s2o.js";import{f as Ic}from"./calendar-format-BwCpz-JZ.js";import{d as Nc,p as kc}from"./draft-Y5XWTm_J.js";import{C as Pc}from"./calendar-failure-note-BtZLcaiZ.js";import{S as Hc}from"./sparkles-Bcn4ZRhZ.js";import{u as jc}from"./useLayoutTier-DrLg7_rq.js";import"./pencil-LSmMSKiW.js";import"./circle-help-CVWHf1ow.js";import"./useQueries-hChzM5ru.js";import"./useMediaQuery-DiQ0fGER.js";const Oc=sn("CalendarOff",[["path",{d:"M4.2 4.2A2 2 0 0 0 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 1.82-1.18",key:"16swn3"}],["path",{d:"M21 15.5V6a2 2 0 0 0-2-2H9.5",key:"yhw86o"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h7",key:"1wap6i"}],["path",{d:"M21 10h-5.5",key:"quycpq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const Ac=sn("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const Lc=sn("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);const _c=sn("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),Le=globalThis.Temporal,Uc=(t,e)=>`Non-positive ${t}: ${e}`,Bc=(t,e)=>`Non-finite ${t}: ${e}`,Wc=t=>`Cannot convert bigint to ${t}`,Fc="Invalid object",Vc=(t,e,n,r)=>on(t,e)+`; must be between ${n}-${r}`,on=(t,e)=>`Invalid ${t}: ${e}`,zc=1e3,Gc=1e6,Yc=1e9,$c=6e10,Zc=36e11;function qc(t){return t===void 0?Object.create(null):Qc(t)}function Ti(t,e="number"){if(typeof t=="bigint")throw new TypeError(Wc(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Bc(e,t));return t}function gr(t,e){return Math.trunc(Ti(t,e))||0}function fs(t,e){return Xc(gr(t,e),e)}function Xc(t,e="number"){if(t<=0)throw new RangeError(Uc(e,t));return t}function Kc(t,e,n){return Math.min(Math.max(t,e),n)}function Ri(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function Qc(t){if(!Ri(t))throw new TypeError(Fc);return t}const Jc=on,ed=t=>`Missing ${t}`,td=(t,e,n)=>on(t,e)+"; must be "+Object.keys(n).join(),nd="Cannot use valueOf",rd="Invalid calling context",sd=(t,e)=>`Unknown calendar ${t}; might need ${e}`,id=t=>on("TimeZone",t),ln="Out-of-bounds date",ad=t=>`Invalid substring: ${t}`,Mi=Kc;function ae(t){throw new RangeError(t)}function tt(t){throw new TypeError(t)}function hs(t,e,n,r,s){return Ii(e,((i,a)=>{const o=i[a];return o===void 0&&tt(ed(a)),o})(t,e),n,r)}function Ii(t,e,n,r,s,i){const a=Mi(e,n,r);return e!==a&&ae(((o,l,c,u,f)=>Vc(o,l,c,u))(t,e,n,r)),a}function Ke(t,e=Map){const n=new e;return(r,...s)=>{if(n.has(r))return n.get(r);const i=t(r,...s);return n.set(r,i),i}}const od=t=>ld({name:t}),ld=(t,e)=>mr(n=>({value:n,configurable:1,writable:!1}),t),cd=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function mr(t,e){const n={};for(const r in e)n[r]=t(e[r],r);return n}function dd(t,e){const n={};for(const r of t)n[r]=e;return n}function Ni(t){const e={};for(const n of t)e[n]=r=>r[n];return e}function ki(t,e,n=Object.create(null)){for(const r of t)n[r]=e[r];return n}function pr(t,...e){return(...n)=>t(...e,...n)}function gs(){}function ms(t){return t[0].toUpperCase()+t.substring(1)}function ud(t){return new RegExp(`^${t}$`,"i")}function fd(t){return parseInt(t.padEnd(9,"0"))}function hd(t){return t&&t!=="+"?-1:1}function Nn(t){return t===void 0?0:parseInt(t)}function Gt(t,e){return String(e).padStart(t,"0")}const ve=pr(Gt,2);function gd(t,e){return Math.sign(t-e)}function Pi(t,e){const n=t/e;return t%e<0n?n-1n:n}function Hi(t,e){const n=Pi(t,e);return[n,t-n*e]}function we(t,e){return[Math.floor(t/e),cn(t,e)]}function cn(t,e){return(t%e+e)%e}function md(t,e){return Math.trunc(t/e)||0}function Ht(t){return Math.abs(t%1)===.5}function pd(t){const e=t.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,"");return e==="bc"||e==="b"?"bce":e==="ad"||e==="a"?"ce":e}const nt=void 0;function dn(t){return t===nt?"iso8601":t===0?"gregory":t.id}function vd(t,e){return"M"+ve(t)+(e?"L":"")}const yd={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Ed=Object.keys(yd),vr=zc,un=Gc,xt=Yc,yr=$c,ji=Zc,Er=864e11,Oi=BigInt(un),Xn=BigInt(xt),Pe=BigInt(Er),fn=Ed.slice(0,6),br=Ni(fn),bd=["day","month","year"];function Sd(t){return Dd(t),t}const wd={hour:23,minute:59,second:59};function Dd(t,e){const n={};for(const r of fn)n[r]=Ii(r,t[r],0,wd[r]||999);return n}function Sr(t){return Ai(t)*xt+Li(t)}function Ai(t){return 3600*t.hour+60*t.minute+t.second}function Li(t){return t.millisecond*un+t.microsecond*vr+t.nanosecond}function Cd(t){const[e,n]=we(t,un),[r,s]=we(n,vr);return xd(e,r,s)}function xd(t,e=0,n=0){const[r,s]=we(t,36e5),[i,a]=we(s,6e4),[o,l]=we(a,1e3);return{hour:r,minute:i,second:o,millisecond:l,microsecond:e,nanosecond:n}}function ps(t){const[e,n]=Hi(t,Xn);return[Number(e),Number(n)]}function Td(t){return wr(t)+BigInt(Sr(t))}function wr(t){return BigInt(Yt(t))*Pe}function Yt(t){return vt(t.year,t.month,t.day)}function vt(t,e=1,n=1){const r=e-1;return t+=Math.floor(r/12),e=cn(r,12),Date.UTC(t%400-400,e,0)/864e5+146097*(md(t,400)+1)+n}function hn(t){const[e,n]=Hi(t,Pe);return{...Rd(Number(e)),...Cd(Number(n))}}function Rd(t){const e=new Date(864e5*cn(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}function Md(t){return[t,0]}function Id(t,e,n){return{year:t,month:e,day:n}}function _i(t,e){switch(e){case 2:return gn(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Nd(t){return gn(t)?366:365}function gn(t){return t%4==0&&(t%100!=0||t%400==0)}function Dr(t){return cn(vt(t.year,t.month,t.day)+4,7)||7}function Ui(t){return vt(t.year,t.month,t.day)-vt(t.year)+1}function Bi(t){let e=t.year,n=Math.floor((Ui(t)-Dr(t)+10)/7),r=kn(e);return n<1?n=r=kn(--e):n>r&&(n=1,r=kn(++e)),{weekOfYear:n,yearOfWeek:e,Be:r}}function kn(t){const e=Dr({year:t,month:1,day:1});return e===4||e===3&&gn(t)?53:52}function kd({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function Pd(t){return Hd(t),Sd(t)}function Hd(t){return jd(t),t}function jd(t,e){const{year:n}=t,r=hs(t,"month",1,12);return{year:n,month:r,day:hs(t,"day",1,_i(n,r))}}function ye(t,e){return t?t.ae(e):e}function Od(t,e,n){return t?t.L(e,n):Md(n)}function vs(t,e){return t===0?kd(e):t&&t.h?.(e)||{}}function Ad(t,e,n,r){return t?t.de(e,n,r):Id(e,n,r)}function Ld(t,e){return t?t.j(e):12}function _d(t,e,n){return t?t.o(e,n):_i(e,n)}function Ud(t,e){const{year:n,month:r}=ye(t,e),[s,i]=Od(t,n,r);return vd(s,i)}function Wi(t,e){const{year:n}=ye(t,e);return t?t.q(n):gn(n)}function Fi(t,e){const{year:n}=ye(t,e);return Ld(t,n)}function Vi(t,e){const{year:n,month:r}=ye(t,e);return _d(t,n,r)}function zi(t,e){const{year:n}=ye(t,e);return t?t.i(n):Nd(n)}function Bd(t,e){if(!t)return Ui(e);const{year:n}=ye(t,e),r=Ad(t,n,1,1);return Yt(e)-Yt(r)+1}function Wd(t,e){return t===nt?Bi(e).weekOfYear:void 0}function Fd(t,e){return t===nt?Bi(e).yearOfWeek:void 0}const $t=pr(Vd,"string");function Vd(t,e,n=t){return typeof e!==t&&tt(Jc(n,e)),e}function zd(t,e="number"){return Number.isInteger(t)||ae(((n,r)=>`Non-integer ${n}: ${r}`)(e,t)),t||0}function Gd(t){return typeof t=="symbol"&&tt("Cannot convert Symbol to string"),String(t)}function Yd(t,e){return Ri(t)?String(t):$t(t,e)}function $d(t,e){return zd(Ti(t,e),e)}const Zd={compatible:0,reject:1,earlier:2,later:3},qd=[Math.floor,t=>Ht(t)?Math.floor(t):Math.round(t),Math.ceil,t=>Ht(t)?Math.ceil(t):Math.round(t),Math.trunc,t=>Ht(t)?Math.trunc(t)||0:Math.round(t),t=>t<0?Math.floor(t):Math.ceil(t),t=>Math.sign(t)*Math.round(Math.abs(t))||0,t=>Ht(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)];function Xd(t,e,n,r=0){const s=n[t];if(s===void 0)return r;const i=Gd(s),a=e[i];return a===void 0&&ae(td(t,i,e)),a}const Kd=pr(Xd,"disambiguation",Zd),Gi=BigInt(1e8)*Pe,Cr=BigInt(-1e8)*Pe,Yi=Cr-Pe;function Qd(t){const e=wr(t);return Jd(e),e!==Yi||Sr(t)||ae(ln),t}function Jd(t,e=1){(t<(e?Yi:Cr)||t>Gi)&&ae(ln)}function mn(t){return(t<Cr||t>Gi)&&ae(ln),t}function eu(t,e){return mn(wr(t)+BigInt(Sr(t)-e))}function tu(t){return{epochNanoseconds:t}}function $i(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function nu(t,e){return ki(fn,t,ru(t,e))}function ru(t,e){return ki(bd,t,{calendar:e})}function Zi(t){return e=t.epochNanoseconds,Number(Pi(e,Oi));var e}function qi(t){return t.epochNanoseconds}function su(t){return iu(t,yr,7)}function iu(t,e,n){return au(t/e,n)*e}function au(t,e){return qd[e](t)}const Xi=Ke(ou,WeakMap);function ou(t){const{epochNanoseconds:e,timeZone:n}=t,r=n.B(e);return{...hn(e+BigInt(r)),offsetNanoseconds:r}}function lu(t,e,n=0,r=t.N(e)){if(r.length===1)return r[0];if(n===1&&ae("Ambiguous offset"),r.length)return r[n===3?1:0];const s=Td(e),i=((o,l)=>{const c=o.B(l-Pe);return(u=>(u>Er&&ae("Out-of-bounds TimeZone gap"),u))(o.B(l+Pe)-c)})(t,s),a=hn(s+BigInt(i*(n===2?-1:1)));return(r=t.N(a))[n===2?0:r.length-1]}const cu=ud("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function du(t,e){const n=cu.exec(t);if(n&&(r=>(s=>{s[0]!=="T"&&s[0]!=="t"||(s=s.slice(1));const i=s.search(/[.,]/),a=i<0?s:s.slice(0,i),o=a.split(":");return o.length===1?/^(?:\d{2}|\d{4}|\d{6})$/i.test(a):(o.length===2||o.length===3)&&o.every(l=>l.length===2&&/^\d{2}$/i.test(l))})(r.slice(1)))(n[0]))return((r,s)=>{const i=r[4]||r[5];return i&&ae(ad(i)),o=(Nn(r[2])*ji+Nn(r[3])*yr+Nn(r[4])*xt+fd(r[5]||""))*hd(r[1]),Math.abs(o)>=Er&&ae("Out-of-bounds offset"),o;var o})(n)}const uu={era:Yd,month:fs,monthCode(t,e){if(typeof t=="string")return t;if(t&&typeof t=="object"){const n=t.toString;if(typeof n=="function")return $t(n.call(t),e)}return $t(t,e)},day:fs},fu=dd(fn,gr),hu=Object.assign({},uu,fu);({...hu});const gu=Intl.DateTimeFormat;function mu(t,e){e<-864e13&&ae(ln);const n=t.formatToParts(e),r={};for(const s of n)r[s.type]=s.value;return r}const pu={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},Pn=-388152e4;function vu(t){return xr(hn(t.epochNanoseconds))+"Z"}function yu(t){const e=t.calendar,n=t.timeZone,r=n.B(t.epochNanoseconds);return xr(hn(t.epochNanoseconds+BigInt(r)))+Ki(su(r))+Du(n.id)+(e===nt?"":Qi(dn(e)))}function Eu(t){const e=t.calendar;return xr(t)+(e===nt?"":Qi(dn(e)))}function xr(t,e){return bu(t)+"T"+wu(t)}function bu(t){return Su(t)+"-"+ve(t.day)}function Su(t){const{year:e}=t;return(e<0||e>9999?ea(e)+Gt(6,Math.abs(e)):Gt(4,e))+"-"+ve(t.month)}function wu(t,e){const n=[ve(t.hour),ve(t.minute)];return n.push(ve(t.second)+((r,s,i,a)=>Ji(r*un+s*vr+i))(t.millisecond,t.microsecond,t.nanosecond)),n.join(":")}function Ki(t,e=0){if(e===1)return"";const[n,r]=we(Math.abs(t),ji),[s,i]=we(r,yr),[a,o]=we(i,xt);return ea(t)+ve(n)+":"+ve(s)+(a||o?":"+ve(a)+Ji(o):"")}function Du(t,e){return"["+t+"]"}function Qi(t,e){return"[u-ca="+t+"]"}const Cu=/0+$/;function Ji(t,e){let n=Gt(9,t);return n=n.replace(Cu,""),n?"."+n:""}function ea(t){return t<0?"-":"+"}const xu=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,Tu=/[^\w\/:+-]+/;function ta(t){return Ru($t(t))}function Ru(t){return na(t).id}function na(t){const e=t.toUpperCase(),n=(s=>{const i=du(s);if(i!==void 0)return{id:Ki(i),X:i,m:i}})(e);if(n)return{kind:"fixed",...n};const r=e==="UTC"?"UTC":(s=>(Tu.test(s)&&ae(id(s)),xu.test(s)&&ae("Forbidden ICU TimeZone"),s.toLowerCase().split("/").map((i,a)=>(i.length<=3||/\d/.test(i))&&!/etc|yap/.test(i)?i.toUpperCase():i.replace(/baja|dumont|[a-z]+/g,(o,l)=>o.length<=2&&!a||o==="in"||o==="chat"?o.toUpperCase():o.length>2||!l?ms(o).replace(/island|noronha|murdo|rivadavia|urville/,ms):o)).join("/")))(t);return Mu(r)}const Mu=Ke(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};const e=t.toUpperCase(),n=Iu(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),Iu=Ke(t=>new gu("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function ra(t){const e=na(t);return Nu(e.id,e)}const Nu=Ke((t,e)=>e.kind==="named"?new Pu(t,e.m,e.format):new ku(t,e.m,e.kind==="fixed"?e.X:0));class ku{constructor(e,n,r){this.id=e,this.m=n,this.X=r}B(){return this.X}N(e){return[eu(e,this.X)]}O(){}}class Pu{constructor(e,n,r){this.id=e,this.m=n,this.ke=((s,i)=>{const a=Ke(s),o=Ke(Hu),l=86400*i;function c(f){const[h,g]=Es(f,l),p=jt(h),m=jt(g),E=a(p),w=a(m);return E===w?E:u(o(p,m),E,w,f)}function u(f,h,g,p){let m,E;for(;(p===void 0||(m=p<f[0]?h:p>=f[1]?g:void 0)===void 0)&&(E=f[1]-f[0]);){const w=f[0]+Math.floor(E/2);s(w)===g?f[1]=w:f[0]=w+1}return m}return{xe(f){const h=c(f-86400),g=c(f+86400),p=f-h,m=f-g;if(h===g)return[p];const E=c(p);return E===c(m)?[f-E]:h>g?[p,m]:[]},we:c,O:function f(h,g){if(g>0&&h>=864e10)return;if(g<0){if(h<=Pn)return;const C=ys()+94867200;if(h>C)return f(C,-1)}const p=g>0?Math.max(h,Pn):h;let[m,E]=Es(p,l);const w=l*g,D=g>0?Math.max(h,ys())+94867200:Pn,x=()=>g<0?E>D:m<D;for(;x();){const C=jt(m),R=jt(E),b=a(C),M=a(R);if(b!==M){const P=o(C,R);u(P,b,M);const k=P[0];if((gd(k,h)||1)===g)return k}m+=w,E+=w}}}})((s=>i=>{const a=mu(s,1e3*i);return 86400*vt((o=>{const l=o.relatedYear;if(l!==void 0)return parseInt(l);const c=parseInt(o.year);return o.era!==void 0&&pd(o.era)==="bce"?1-c:c})(a),parseInt(a.month),parseInt(a.day))+3600*parseInt(a.hour)+60*parseInt(a.minute)+parseInt(a.second)-i})(r),(s=>{const i=s.split("/").pop();return pu[i]||60})(e))}B(e){return this.ke.we((n=>ps(n)[0])(e))*xt}N(e){const n=86400*Yt(e)+Ai(e),r=Li(e);return this.ke.xe(n).map(s=>mn(BigInt(s)*Xn+BigInt(r)))}O(e,n){const[r,s]=ps(e),i=this.ke.O(r+(n>0||s?1:0),n);if(i!==void 0)return BigInt(i)*Xn}}function ys(){return Math.floor(Date.now()/1e3)}function Hu(t,e){return[t,e]}function Es(t,e){const n=Math.floor(t/e)*e;return[n,n+e]}function jt(t){return Mi(t,-1e10,864e10)}function ju(t,e,n){return $i(t.epochNanoseconds,e,n)}function Ou(t,e,n){const r=lu(e,t,(s=>Kd(qc(s)))(n));return $i(mn(r),e,t.calendar)}function Au(t){return tu(mn(BigInt($d(t))*Oi))}function Lu(t,e,n,r,s){const i=new Set(t),a=new Set(e),o=new Set(n);return(l,c)=>{let u,f;const h={},g={},p={};let m=0,E=0;for(const k of Object.keys(l)){const O=l[k];O===void 0||o.has(k)||(i.has(k)?k==="dateStyle"?u=O:k==="timeStyle"?f=O:h[k]=O:k==="era"?g[k]=O:a.has(k)?k==="dateStyle"||k==="timeStyle"?E=1:m=1:p[k]=O)}const w=u!==void 0,D=f!==void 0,x=w||D,C=Object.keys(h).length>0,R=m||E,b=C||w||D,M=Object.keys(g).length>0;(!c&&R||c&&R&&!b||x&&(C||M||m))&&tt("Invalid formatting options");const P={};return x||b||Object.assign(P,r),Object.assign(P,h,g,p),w&&(s?Object.assign(P,s[u]):P.dateStyle=u),D&&(P.timeStyle=f),P}}const _u={year:"numeric",month:"numeric",day:"numeric"},Uu={hour:"numeric",minute:"numeric",second:"numeric"},Bu=Object.assign({},_u,Uu),Wu=["weekday","year","month","day","dateStyle"],Fu=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],Vu=Wu.concat(Fu);({...Bu});const zu="PlainDateTime",Gu="ZonedDateTime",Yu="Instant";function rt(t,e,n,...r){return Object.defineProperties(e,od(t)),Object.defineProperties(e.prototype,cd("Temporal."+t)),Object.defineProperties(e.prototype,mr(s=>({get(){return s(n(this))},configurable:1}),Object.assign({},...r))),e}const st=gs.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:gs;function pn(){tt(rd)}function Tr(){tt(nd)}const Rr={era(t){return vs(t.calendar,t).era},eraYear(t){return vs(t.calendar,t).eraYear},year(t){return ye(t.calendar,t).year},month(t){return ye(t.calendar,t).month},monthCode(t){return Ud(t.calendar,t)},day(t){return ye(t.calendar,t).day}},$u={daysInMonth(t){return Vi(t.calendar,t)},daysInYear(t){return zi(t.calendar,t)},monthsInYear(t){return Fi(t.calendar,t)},inLeapYear(t){return Wi(t.calendar,t)}},Zu={dayOfWeek(t){return Dr(t)},dayOfYear(t){return Bd(t.calendar,t)},weekOfYear(t){return Wd(t.calendar,t)},yearOfWeek(t){return Fd(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return Vi(t.calendar,t)},daysInYear(t){return zi(t.calendar,t)},monthsInYear(t){return Fi(t.calendar,t)},inLeapYear(t){return Wi(t.calendar,t)}};function Zt(t){return Ni(Object.keys(t))}const sa=Zt(br),ia=Zt(Rr);Zt($u),Zt(Zu);const Hn=32,aa=150,qu="cal-1",Xu=600,Ku=900,Qu=1500,Ju=new Set;function ef(t){const e=new Map(t.map(n=>[n.id,n]));return{color:n=>e.get(n)?.color??qu,name:n=>e.get(n)?.name??""}}function tf({days:t,calendars:e,density:n,today:r,focusDate:s,selectedEventId:i,onSelectEvent:a,onPickSlot:o,onZoomDay:l,onReachStart:c,onReachEnd:u,onVisibleDayChange:f,atStartCap:h=!1,atEndCap:g=!1,onLoadEarlier:p,onLoadLater:m,loadingDates:E=Ju,freeOn:w=Yn,scrollTarget:D,todayLead:x,touch:C,className:R}){const b=S.useRef(null),M=S.useRef(new Map),P=S.useRef(t[0]?.date??""),k=S.useRef(0),O=S.useRef(""),q=S.useRef(""),B=S.useRef(!1),W=S.useRef(0),X=S.useRef(0),[ne,Q]=S.useState(s),Te=S.useMemo(()=>ef(e),[e]),Be=Qo(t,[r,s,...E]),fe=t[0]?.date??"",We=t[t.length-1]?.date??"";S.useLayoutEffect(()=>{const j=b.current;j&&(fe!==""&&fe<P.current&&(j.scrollTop+=j.scrollHeight-k.current),P.current=fe,k.current=j.scrollHeight,W.current=j.scrollTop)}),S.useEffect(()=>{if(B.current)return;const j=b.current;if(!j)return;B.current=!0;let G=!1;const J=()=>{const A=M.current.get(s);G||!A||(j.scrollTop=A.offsetTop-Hn,W.current=j.scrollTop)};J(),Q(s);const oe=requestAnimationFrame(J);return document.fonts?.ready.then(J),()=>{G=!0,cancelAnimationFrame(oe)}},[s]),S.useEffect(()=>{if(!D)return;const j=b.current,G=M.current.get(D.date);!j||!G||(j.scrollTop=G.offsetTop-Hn,W.current=j.scrollTop,Q(D.date),f(D.date))},[D,f]),S.useEffect(()=>{const j=b.current;if(!j)return;const G=()=>{X.current=Date.now()},J=["wheel","pointerdown","touchstart","touchmove","keydown"],oe=A=>{A.buttons!==0&&G()};for(const A of J)j.addEventListener(A,G,{passive:!0});return j.addEventListener("pointermove",oe,{passive:!0}),()=>{for(const A of J)j.removeEventListener(A,G);j.removeEventListener("pointermove",oe)}},[]);const ct=()=>{const j=b.current;if(!j)return;const G=j.scrollTop,J=G-W.current;if(W.current=G,J===0||Date.now()-X.current>Qu)return;const oe=[...M.current.entries()].filter(([,re])=>re.isConnected).sort((re,Fe)=>re[1].offsetTop-Fe[1].offsetTop);let A="";for(const[re,Fe]of oe){if(Fe.offsetTop-Hn-8>G)break;A=re}A!==""&&A!==ne&&(Q(A),f(A)),J<0&&G<Xu&&O.current!==fe&&(O.current=fe,c()),J>0&&G+j.clientHeight>j.scrollHeight-Ku&&q.current!==We&&(q.current=We,u())},dt=j=>G=>{G?M.current.set(j,G):M.current.delete(j)};return d.jsxs("div",{ref:b,onScroll:ct,"data-testid":"agenda-strip",className:H("relative min-h-0 flex-1 overflow-y-auto bg-surface",R),children:[d.jsxs("div",{className:"sticky top-0 z-20 flex h-8 items-center gap-2 border-b border-line bg-surface/95 px-row-inset backdrop-blur",children:[d.jsx("span",{className:"text-xs font-semibold text-fg",children:Jo(ne)}),d.jsx("span",{className:"text-xs text-fg-subtle",children:el(ne)}),ne===r&&d.jsx("span",{className:"rounded-full bg-accent-soft px-1.5 text-2xs font-medium text-accent",children:"Today"})]}),h&&p&&d.jsx(bs,{label:"Show earlier days",testId:"agenda-load-earlier",onLoad:p,touch:C}),Be.map(j=>d.jsx(nf,{row:j,lookup:Te,density:n,today:r,pending:j.kind==="day"&&E.has(j.day.date),freeOn:w,selectedEventId:i,onSelectEvent:a,onPickSlot:o,onZoomDay:l,anchorRef:dt(j.kind==="day"?j.day.date:j.from),lead:j.kind==="day"&&j.day.date===r?x:null,touch:C},j.key)),g&&m&&d.jsx(bs,{label:"Show later days",testId:"agenda-load-later",onLoad:m,touch:C})]})}function bs({label:t,testId:e,onLoad:n,touch:r}){return d.jsx("button",{type:"button",onClick:n,"data-testid":e,className:H("flex w-full items-center justify-center gap-2 border-y border-dashed border-line bg-surface-sunken px-row-inset text-xs font-medium text-fg-muted outline-none transition-colors hover:border-accent hover:text-accent focus-visible:ring-2 focus-visible:ring-ring",r?"min-h-14 py-3":"py-2"),children:t})}function nf({row:t,lookup:e,density:n,today:r,pending:s,freeOn:i,selectedEventId:a,onSelectEvent:o,onPickSlot:l,onZoomDay:c,anchorRef:u,lead:f,touch:h}){return t.kind==="run"?d.jsx("div",{ref:u,children:d.jsx(rf,{from:t.from,to:t.to,days:t.days,onPickSlot:l,touch:h})}):s?d.jsx("div",{ref:u,children:d.jsx(sf,{day:t.day,today:r})}):n==="dots"?d.jsxs("div",{ref:u,children:[f,d.jsx(af,{day:t.day,lookup:e,today:r,freeOn:i,onSelectEvent:o,onZoomDay:c,selectedEventId:a})]}):d.jsxs("div",{ref:u,children:[f,d.jsx(lf,{day:t.day,lookup:e,density:n,today:r,freeOn:i,selectedEventId:a,onSelectEvent:o,onPickSlot:l,onZoomDay:c,touch:h})]})}function rf({from:t,to:e,days:n,onPickSlot:r,touch:s}){return d.jsxs("button",{type:"button",onClick:()=>r({date:t,endDate:t,startTime:"10:00",endTime:"11:00",allDay:!1}),className:H("flex w-full items-center gap-3 border-y border-dashed border-line bg-surface-sunken px-row-inset text-left outline-none transition-colors hover:border-accent focus-visible:ring-2 focus-visible:ring-ring",s?"min-h-14 py-3":"py-2"),children:[d.jsx(Oc,{className:"size-4 shrink-0 text-accent"}),d.jsx("span",{className:"text-sm font-medium text-fg",children:tl(t,e)}),d.jsxs("span",{className:"text-xs text-fg-muted",children:[n," days with nothing booked"]}),d.jsx("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:"Add"})]})}function sf({day:t,today:e}){const n=t.date===e;return d.jsxs("section",{"aria-busy":"true","data-testid":`agenda-day-pending-${t.date}`,className:H("border-b border-line",n&&"border-l-2 border-l-accent bg-accent-soft/20"),children:[d.jsxs("header",{className:"flex h-section-row items-center gap-3 px-row-inset",children:[d.jsxs("div",{className:"flex w-16 shrink-0 items-baseline gap-1.5",children:[d.jsx("span",{className:H("text-lg font-semibold tabular-nums",n?"text-accent":"text-fg"),children:t.dayNumber}),d.jsx("span",{className:"text-2xs uppercase tracking-wider text-fg-subtle",children:t.weekdayLabel})]}),d.jsxs("span",{className:"sr-only",children:["Loading ",t.date]}),d.jsx("span",{className:"h-3 min-w-0 flex-1 animate-pulse rounded-full bg-surface-sunken"})]}),d.jsx("div",{className:"flex flex-col gap-1 pb-2",children:d.jsx("span",{className:"mx-row-inset h-7 animate-pulse rounded-md bg-surface-sunken"})})]})}function af({day:t,lookup:e,today:n,freeOn:r,selectedEventId:s,onSelectEvent:i,onZoomDay:a}){const o=t.date===n,l=[...t.allDay,...t.timed];return d.jsxs("div",{className:H("flex h-8 items-center gap-2 border-b border-line px-row-inset",o&&"bg-accent-soft/30"),children:[d.jsxs("button",{type:"button",onClick:()=>a(t.date),className:H("w-16 shrink-0 rounded-sm text-left text-xs tabular-nums outline-none focus-visible:ring-2 focus-visible:ring-ring",o?"font-semibold text-accent":"text-fg-muted"),children:[t.weekdayLabel," ",t.dayNumber]}),d.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden",children:l.map(c=>d.jsx("button",{type:"button",title:c.title,"aria-label":c.title,"aria-pressed":c.id===s,onClick:()=>i(c.id),className:H("size-2 shrink-0 rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring",an(e.color(c.calendarId)).solid,c.id===s&&"ring-2 ring-ring",c.myRsvp==="declined"&&"opacity-40")},c.id))}),d.jsx(la,{day:t,className:"w-24 shrink-0"}),d.jsx("span",{className:"w-24 shrink-0 text-right text-2xs text-fg-subtle",children:of(t,r)})]})}function of(t,e){const n=e(t);if(t.timed.length===0&&oa(n))return"clear";const r=n.reduce((s,i)=>Math.max(s,i.minutes),0);return r>=aa?`${ke(r)} free`:`${ke(t.busyMinutes)} booked`}function oa(t){return t.length===1&&t[0].wholeDay}function lf({day:t,lookup:e,density:n,today:r,freeOn:s,selectedEventId:i,onSelectEvent:a,onPickSlot:o,onZoomDay:l,touch:c}){const u=t.date===r,f=nl(t.timed),h=s(t),g=h.filter(E=>!E.wholeDay),p=t.timed.length===0&&oa(h),m=[...f.map(E=>({key:E[0].id,at:mt(E[0].start),node:E.length===1?d.jsx(da,{event:E[0],lookup:e,density:n,selected:E[0].id===i,onSelect:()=>a(E[0].id),touch:c}):d.jsx(hf,{events:E,lookup:e,density:n,selectedEventId:i,onSelectEvent:a,onZoomDay:()=>l(t.date),touch:c})})),...g.map(E=>({key:`free_${E.startMinute}`,at:E.startMinute,node:d.jsx(uf,{stretch:E,onPick:()=>o({date:E.date,endDate:E.date,startTime:De(E.startMinute),endTime:De(Math.min(E.startMinute+60,E.endMinute)),allDay:!1}),touch:c})}))].sort((E,w)=>E.at-w.at);return d.jsxs("section",{className:H("border-b border-line",u&&"border-l-2 border-l-accent bg-accent-soft/20"),children:[d.jsxs("header",{className:"flex h-section-row items-center gap-3 px-row-inset",children:[d.jsxs("div",{className:"flex w-16 shrink-0 items-baseline gap-1.5",children:[d.jsx("span",{className:H("text-lg font-semibold tabular-nums",u?"text-accent":"text-fg"),children:t.dayNumber}),d.jsx("span",{className:"text-2xs uppercase tracking-wider text-fg-subtle",children:t.weekdayLabel})]}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-fg-muted",children:cf(t)}),d.jsx(la,{day:t,className:"hidden w-32 shrink-0 sm:block"}),d.jsxs("button",{type:"button",onClick:()=>l(t.date),className:H("flex shrink-0 items-center gap-0.5 rounded-md border px-2 text-2xs outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring",c?"min-h-9":"h-6",t.conflicts.length>0?"border-warning text-warning hover:bg-warning-soft":"border-line text-fg-subtle hover:border-line-strong hover:text-fg"),children:["Grid",d.jsx(ur,{className:"size-3"})]})]}),d.jsxs("div",{className:"flex flex-col gap-1 pb-2",children:[t.allDay.map(E=>d.jsx(ff,{event:E,lookup:e,density:n,selected:E.id===i,onSelect:()=>a(E.id),touch:c},E.id)),p?d.jsx(df,{day:t,onPickSlot:o,touch:c}):m.map(E=>d.jsx("div",{children:E.node},E.key))]})]})}function cf(t){if(t.timed.length===0)return"Nothing booked";const e=[`${t.timed.length} ${t.timed.length===1?"event":"events"}`,`${ke(t.busyMinutes)} booked`];return t.conflicts.length>0&&e.push(`${t.conflicts.length} ${t.conflicts.length===1?"clash":"clashes"}`),e.join(" · ")}function la({day:t,className:e}){const n=rs-In;return d.jsx("div",{"aria-hidden":!0,className:H("relative h-1.5 overflow-hidden rounded-full bg-surface-sunken",e),children:rl(t).map(r=>{const s=Math.max(r.from,In),i=Math.min(r.to,rs);return i<=s?null:d.jsx("span",{className:"absolute inset-y-0 rounded-full bg-fg-subtle",style:{left:`${(s-In)/n*100}%`,width:`${(i-s)/n*100}%`}},`${r.from}-${r.to}`)})})}function df({day:t,onPickSlot:e,touch:n}){return d.jsx("button",{type:"button",onClick:()=>e({date:t.date,endDate:t.date,startTime:"10:00",endTime:"11:00",allDay:!1}),className:H("mx-row-inset flex items-center gap-2 rounded-md border border-dashed border-line px-2 text-left text-xs text-fg-muted outline-none transition-colors hover:border-accent hover:text-accent focus-visible:ring-2 focus-visible:ring-ring",n?"min-h-11":"h-8"),children:"Free all day"})}function uf({stretch:t,onPick:e,touch:n}){const r=t.minutes>=aa;return d.jsxs("button",{type:"button",onClick:e,className:H("ml-16 mr-row-inset flex items-center gap-2 rounded-md border border-dashed text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring",n?"min-h-11 px-3":"h-7 px-2",r?"border-accent-2 bg-accent-2-soft/40 text-accent-2 hover:bg-accent-2-soft":"border-line text-fg-subtle hover:border-line-strong hover:text-fg-muted"),children:[d.jsxs("span",{className:H("text-xs",r&&"font-medium"),children:[ke(t.minutes)," free"]}),d.jsxs("span",{className:"text-2xs tabular-nums opacity-80",children:[De(t.startMinute)," – ",De(t.endMinute)]})]})}function ca(t){return t==="detail"?"comfortable":"compact"}function ff({event:t,lookup:e,density:n,selected:r,onSelect:s,touch:i}){return d.jsx("div",{className:H("mx-row-inset",i&&"min-h-11"),children:d.jsx(xi,{title:t.title,timeText:"",color:e.color(t.calendarId),layout:"row",density:ca(n),rsvp:t.myRsvp,status:t.status,hasThread:t.threadId!=="",isRecurring:t.recurrenceRule!=="",zoneCertainty:t.zoneCertainty,selected:r,onClick:s,trailing:d.jsx("span",{className:"text-2xs",children:"All day"})})})}function hf({events:t,lookup:e,density:n,selectedEventId:r,onSelectEvent:s,onZoomDay:i,touch:a}){const o=Math.min(...t.map(c=>mt(c.start))),l=Math.max(...t.map(c=>mt(c.end)));return d.jsxs("div",{className:"mx-row-inset rounded-md border border-warning/50 bg-warning-soft/30",children:[d.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[d.jsx(Ac,{className:"size-3 shrink-0 text-warning"}),d.jsxs("span",{className:"text-2xs font-medium text-warning",children:[t.length," at once · ",De(o)," – ",De(l)]}),d.jsx("button",{type:"button",onClick:i,className:H("ml-auto rounded-sm px-1.5 text-2xs font-medium text-warning underline underline-offset-2 outline-none hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",a&&"min-h-9"),children:"Open the grid"})]}),d.jsx("div",{className:"flex flex-col gap-0.5 pb-1",children:t.map(c=>d.jsx(da,{event:c,lookup:e,density:n,selected:c.id===r,onSelect:()=>s(c.id),inset:!1,touch:a},c.id))})]})}function da({event:t,lookup:e,density:n,selected:r,onSelect:s,inset:i=!0,touch:a}){const o=n==="detail",l=mt(t.end)-mt(t.start),c=[e.name(t.calendarId),t.location].filter(u=>u!=="").join(" · ");return d.jsx("div",{className:H(i?"px-row-inset":"px-2",a&&"min-h-12"),children:d.jsx(xi,{title:t.title,timeText:"",color:e.color(t.calendarId),layout:"row",density:ca(n),rsvp:t.myRsvp,status:t.status,hasThread:t.threadId!=="",isRecurring:t.recurrenceRule!=="",zoneCertainty:t.zoneCertainty,selected:r,onClick:s,leading:d.jsxs("span",{className:H("shrink-0 pt-1 text-2xs tabular-nums text-fg-subtle",i?"w-14":"w-11"),children:[t.start.slice(11,16),o&&d.jsx("span",{className:"block opacity-70",children:t.end.slice(11,16)})]}),trailing:d.jsx("span",{className:"text-2xs tabular-nums",children:ke(l)}),detail:o&&c!==""?d.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-2xs opacity-80",children:[t.location!==""&&d.jsx(Al,{className:"size-3 shrink-0"}),d.jsx("span",{className:"truncate",children:c}),t.attendees.length>0&&d.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-0.5",children:[d.jsx(sl,{className:"size-3"}),t.attendees.length]})]}):void 0})})}function gf({nextUp:t,calendars:e,today:n,onSelectEvent:r,onGoTo:s,touch:i,className:a}){const{running:o,next:l,minutesUntilNext:c,after:u,free:f}=t,h=S.useMemo(()=>{const g=new Map(e.map(p=>[p.id,p.color]));return p=>g.get(p)??"cal-1"},[e]);return d.jsxs("section",{className:H("flex flex-col gap-2 rounded-lg border border-line bg-surface-raised p-3",a),children:[o.length>0&&d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx(Ss,{icon:d.jsx(Lc,{className:"size-3 text-danger"}),children:"Now"}),o.map(g=>d.jsx(ws,{eventId:g.id,title:g.title,color:h(g.calendarId),meta:`until ${g.end.slice(11,16)}`,onSelect:r,touch:i},g.id))]}),d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx(Ss,{icon:d.jsx(wc,{className:"size-3"}),children:l?`Next · in ${ke(c)}`:"Next"}),l?d.jsx(ws,{eventId:l.id,title:l.title,color:h(l.calendarId),meta:`${jn(l.start.slice(0,10),n)}${l.start.slice(11,16)}${l.location===""?"":` · ${l.location}`}`,onSelect:r,touch:i}):d.jsx("p",{className:"text-sm text-fg-muted",children:"Nothing else booked."}),u&&d.jsxs("p",{className:"truncate pl-1 text-2xs text-fg-subtle",children:["then ",u.title," · ",jn(u.start.slice(0,10),n),u.start.slice(11,16)]})]}),f&&d.jsxs("button",{type:"button",onClick:()=>s(f.date),className:H("flex items-center gap-2 rounded-md border border-dashed border-accent-2 bg-accent-2-soft/40 px-2 text-left text-accent-2 outline-none transition-colors hover:bg-accent-2-soft focus-visible:ring-2 focus-visible:ring-ring",i?"min-h-11":"min-h-8"),children:[d.jsx(_c,{className:"size-3.5 shrink-0"}),d.jsxs("span",{className:"text-xs font-medium",children:[ke(f.minutes)," free"]}),d.jsxs("span",{className:"text-2xs tabular-nums opacity-80",children:[jn(f.date,n),De(f.startMinute)," – ",De(f.endMinute)]})]})]})}function Ss({icon:t,children:e}){return d.jsxs("h3",{className:"flex items-center gap-1.5 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:[t,e]})}function ws({eventId:t,title:e,color:n,meta:r,onSelect:s,touch:i}){const a=an(n);return d.jsx("button",{type:"button",onClick:()=>s(t),className:H("flex w-full items-center gap-2 rounded-md border-l-2 px-2 py-1 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring",a.soft,a.text,a.rail,i&&"min-h-12"),children:d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate text-sm font-medium",children:e}),d.jsx("span",{className:"block truncate text-2xs opacity-80",children:r})]})})}function jn(t,e){return t===e?"":t===il(e,1)?"tomorrow · ":`${al(t)} · `}const ua=`${zu}Record`,fa=`${Gu}Record`,ha=`${Yu}Record`,mf=new WeakMap,ga=new WeakMap,ma=new WeakMap,pa=new WeakMap;function va(t){return pf(t)||pn()}function pf(t){return mf.get(t)}function ya(t){return vf(t)||pn()}function vf(t){return ga.get(t)}function Ea(t,e){ga.set(t,e)}function ba(t){return yf(t)||pn()}function yf(t){return ma.get(t)}function Sa(t,e){ma.set(t,e)}function wa(t){return Ef(t)||pn()}function Ef(t){return pa.get(t)}function Da(t,e){pa.set(t,e)}function Ca(t){return va(t).id}function xa(t){const e=va(t).ue;return e||ae(sd(Ca(t),"getExotic or getAny")),e}function bf(t){if(t!==void 0)return Sf(t)}function Sf(t){return xa(t),Ca(t)}const ut=wa,wf=rt(ua,class{get calendarId(){return ut(this).calendarId}toJSON(){return ut(this).toJSON()}valueOf(){return ut(this).valueOf()}},ut,ia,sa);function Df(t){const e=Object.create(wf.prototype);return Da(e,t),st(e),e}function Cf(t,e,n,r,s,i,a,o,l,c){return Df(new Le.PlainDateTime(t,e,n,r,s,i,a,o,l,bf(c)))}function xf(t,e,n){return Ta(ut(t).toZonedDateTime(e,n))}const Se=ba,Tf=rt(fa,class{get calendarId(){return Se(this).calendarId}get timeZoneId(){return Se(this).timeZoneId}get epochMilliseconds(){return Se(this).epochMilliseconds}get epochNanoseconds(){return Se(this).epochNanoseconds}toJSON(){return Se(this).toJSON()}valueOf(){return Se(this).valueOf()}},Se,ia,sa);function Ta(t){const e=Object.create(Tf.prototype);return Sa(e,t),st(e),e}function Rf(t){return Se(t).offsetNanoseconds}const ft=ya,Mf=rt(ha,class{get epochMilliseconds(){return ft(this).epochMilliseconds}get epochNanoseconds(){return ft(this).epochNanoseconds}toJSON(){return ft(this).toJSON()}valueOf(){return ft(this).valueOf()}});function If(t){const e=Object.create(Mf.prototype);return Ea(e,t),st(e),e}function Nf(t){return If(Le.Instant.fromEpochMilliseconds(t))}function kf(t,e){return Ta(ft(t).toZonedDateTimeISO(e))}function Pf(t){return t===void 0?nt:Hf(t)}function Hf(t){return xa(t)()}const Ut=wa,jf=rt(ua,class{get calendarId(){return dn(Ut(this).calendar)}toJSON(){return Eu(Ut(this))}valueOf(){return Tr()}},Ut,Rr,br);function Of(t){const e=Object.create(jf.prototype);return Da(e,t),st(e),e}function Af(t,e,n,r=0,s=0,i=0,a=0,o=0,l=0,c){const u=Qd(Pd(mr(gr,{year:t,month:e,day:n,hour:r,minute:s,second:i,millisecond:a,microsecond:o,nanosecond:l}))),f=Pf(c);return Of(nu(u,f))}function Lf(t,e,n){return Ra(Ou(Ut(t),ra(ta(e)),n))}const Re=ba,_f=rt(fa,class{get calendarId(){return dn(Re(this).calendar)}get timeZoneId(){return Re(this).timeZone.id}get epochMilliseconds(){return Zi(Re(this))}get epochNanoseconds(){return qi(Re(this))}toJSON(){return yu(Re(this))}valueOf(){return Tr()}},Uf,Rr,br);function Ra(t){const e=Object.create(_f.prototype);return Sa(e,t),st(e),e}function Uf(t){const e=Re(t);return{...Xi(e),calendar:e.calendar}}function Bf(t){return Xi(Re(t)).offsetNanoseconds}const Bt=ya,Wf=rt(ha,class{get epochMilliseconds(){return Zi(Bt(this))}get epochNanoseconds(){return qi(Bt(this))}toJSON(){return vu(Bt(this))}valueOf(){return Tr()}});function Ff(t){const e=Object.create(Wf.prototype);return Ea(e,t),st(e),e}function Vf(t){return Ff(Au(t))}function zf(t,e){return Ra(ju(Bt(t),ra(ta(e))))}const Gf=Le?Rf:Bf,Ds=Le?Cf:Af,Cs=Le?xf:Lf,Yf=Le?Nf:Vf,$f=Le?kf:zf;function xs(t,e){let n=Qe(t);return n[2]+=e*7,ue(n)}function K(t,e){let n=Qe(t);return n[2]+=e,ue(n)}function He(t,e){let n=Qe(t);return n[6]+=e,ue(n)}function Zf(t,e){return it(t,e)/7}function it(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function qf(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function Xf(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function Kf(t,e){return(e.valueOf()-t.valueOf())/1e3}function Qf(t,e){let n=V(t),r=V(e);return{years:0,months:0,days:Math.round(it(n,r)),milliseconds:e.valueOf()-r.valueOf()-(t.valueOf()-n.valueOf())}}function Ma(t,e){let n=yt(t,e);return n!==null&&n%7===0?n/7:null}function yt(t,e){return Ye(t)===Ye(e)?Math.round(it(t,e)):null}function V(t){return ue([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function Jf(t){return ue([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function eh(t){return ue([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function th(t){return ue([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function nh(t,e,n){let r=t.getUTCFullYear(),s=On(t,r,e,n);if(s<1)return On(t,r-1,e,n);let i=On(t,r+1,e,n);return i>=1?Math.min(s,i):s}function On(t,e,n,r){let s=ue([e,0,1+rh(e,n,r)]),i=V(t),a=Math.round(it(s,i));return Math.floor(a/7)+1}function rh(t,e,n){let r=7+e-n;return-((7+ue([t,0,r]).getUTCDay()-e)%7)+r-1}function sh(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function Ts(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 Qe(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function ue(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function Ia(t){return!isNaN(t.valueOf())}function Ye(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}let Na={};function ih(t,e){Na[t]=e}function ah(t){return new Na[t]}class oh{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return ue(e)}markerToArray(e){return Qe(e)}}ih("gregory",oh);function lh(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 Rs(t,e){let n=[],{start:r}=e,s,i;for(t.sort(ch),s=0;s<t.length;s+=1)i=t[s],i.start>r&&n.push({start:r,end:i.start}),i.end>r&&(r=i.end);return r<e.end&&n.push({start:r,end:e.end}),n}function ch(t,e){return t.start.valueOf()-e.start.valueOf()}function Et(t,e){let{start:n,end:r}=t,s=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)&&(s={start:n,end:r}),s}function dh(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 Mr(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function vn(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function Ie(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function uh(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 Ms(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){let r=Ms(t,n.calendarSystem),s=e?Ms(e,n.calendarSystem):null;return{date:r,start:r,end:s,timeZone:n.timeZone,localeCodes:n.locale.codes}}function An(t){return t%1===0}function Ln(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}const fh=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function _(t,e){return typeof t=="string"?hh(t):typeof t=="object"&&t?Is(t):typeof t=="number"?Is({[e||"milliseconds"]:t}):null}function hh(t){let e=fh.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 Is(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 gh(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function mh(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function ph(t){return qe(t)/365}function vh(t){return qe(t)/30}function qe(t){return bt(t)/864e5}function bt(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function Kn(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 yh(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",yn(e,!0)))),r}function Ir(t){return t.toISOString().replace(/T.*$/,"")}function yn(t,e=!1){let n=t<0?"-":"+",r=Math.abs(t),s=Math.floor(r/60),i=Math.round(r%60);return e?`${n+Ln(s,2)}:${Ln(i,2)}`:`GMT${n}${s}${i?`:${Ln(i,2)}`:""}`}function ie(t){let e="";for(const n of t)e+=n.value;return e}const Eh=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function bh(t){let e=Eh.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(Ia(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 Sh{constructor(e){this.timeZone=e.timeZone,this.calendarSystem=ah(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.weekTextLong=e.weekTextLong,this.weekTextShort=e.weekTextShort??e.weekTextLong,this.cmdFormatter=e.cmdFormatter}createMarker(e){let n=this.createMarkerMeta(e);return n===null?null:n.marker}createNowMarker(){return this.timestampToMarker(new Date().valueOf())}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=ue(e)),n===null||!Ia(n)?null:{marker:n,isTimeUnspecified:!1}}parse(e){let n=bh(e);if(n===null)return null;let{marker:r}=n;return n.timeZoneOffset!==null&&(r=this.timestampToMarker(r.valueOf()-n.timeZoneOffset*60*1e3)),{marker:r,isTimeUnspecified:n.isTimeUnspecified}}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 Ye(e)===Ye(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 Ye(e)===Ye(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=Ma(e,n),r!==null?{unit:"week",value:r}:(r=yt(e,n),r!==null?{unit:"day",value:r}:(r=qf(e,n),An(r)?{unit:"hour",value:r}:(r=Xf(e,n),An(r)?{unit:"minute",value:r}:(r=Kf(e,n),An(r)?{unit:"second",value:r}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,r){let s;return r.years&&(s=this.diffWholeYears(e,n),s!==null)?s/ph(r):r.months&&(s=this.diffWholeMonths(e,n),s!==null)?s/vh(r):r.days&&(s=yt(e,n),s!==null)?s/qe(r):(n.valueOf()-e.valueOf())/bt(r)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?V(e):n==="hour"?Jf(e):n==="minute"?eh(e):n==="second"?th(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)):nh(e,this.weekDow,this.weekDoy)}formatToParts(e,n){return n.formatToParts({marker:e,timeZoneOffset:this.offsetForMarker(e)},this)}formatRangeToParts(e,n,r,s={}){return s.isEndExclusive&&(n=He(n,-1)),r.formatRangeToParts({marker:e,timeZoneOffset:this.offsetForMarker(e)},{marker:n,timeZoneOffset:this.offsetForMarker(n)},this)}formatIso(e,n={}){let r=null;return n.omitTimeZoneOffset||(r=this.offsetForMarker(e)),yh(e,r,n.omitTime)}timestampToMarker(e){if(this.timeZone==="local")return ue(sh(new Date(e)));if(this.timeZone==="UTC")return new Date(e);const n=$f(Yf(e),this.timeZone);return new Date(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond))}offsetForMarker(e){return this.timeZone==="local"?-Ts(Qe(e)).getTimezoneOffset():this.timeZone==="UTC"?0:Gf(Cs(Ds(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),this.timeZone))/(1e9*60)}toDate(e){return this.timeZone==="local"?Ts(Qe(e)):this.timeZone==="UTC"?new Date(e.valueOf()):new Date(Cs(Ds(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),this.timeZone).epochMilliseconds)}}const wh=new Set(["week","meridiem","omitZeroMinute","omitCommas","forceCommas","omitTrailing","weekdayJustify"]),Ot=/([ap])\.?m\.?/i,Dh=/,/g,Ch=/\u200e/g,xh=/[\s.,]+$/,Qn=/^\s+$/;class Th{constructor(e){const n={},r={};for(const s in e)wh.has(s)?r[s]=e[s]:n[s]=e[s];n.timeZoneName==="long"&&(n.timeZoneName="short"),this.timeZoneOnly=Object.keys(n).length===1&&n.timeZoneName==="short",this.weekOnly=!!(!Object.keys(n).length&&r.week),this.timeZoneOnly||(n.timeZoneName&&(n.hour||(n.hour="2-digit"),n.minute||(n.minute="2-digit")),r.omitZeroMinute&&(n.second||n.fractionalSecondDigits)&&delete r.omitZeroMinute,n.timeZone="UTC"),this.standardOptions=n,this.extendedOptions=r}formatToParts(e,n){const{standardOptions:r,extendedOptions:s}=this;if(this.timeZoneOnly)return[{type:"timeZoneName",value:yn(e.timeZoneOffset)}];if(this.weekOnly)return Ih(n.computeWeekNumber(e.marker),n.weekTextLong,n.weekTextShort,n.locale,s.week);const{normalFormat:i,zeroFormat:a}=this.getFormats(n),l=(a&&!e.marker.getUTCMinutes()?a:i).formatToParts(e.marker);return Rh(l,e,r,s)}formatRangeToParts(e,n,r){const{standardOptions:s,extendedOptions:i}=this;if(this.timeZoneOnly||this.weekOnly)return this.formatToParts(e,r).map(u=>({source:u.type==="literal"?"shared":"startRange",...u}));const{normalFormat:a,zeroFormat:o}=this.getFormats(r),c=(o&&!e.marker.getUTCMinutes()&&!n.marker.getUTCMinutes()?o:a).formatRangeToParts(e.marker,n.marker);return Mh(c,e,n,s,i)}getFormats(e){if(this.cachedContext!==e){const{standardOptions:n,extendedOptions:r}=this,{codes:s}=e.locale,i=new Intl.DateTimeFormat(s,n);let a;if(r.omitZeroMinute){const o={...n};delete o.minute,a=new Intl.DateTimeFormat(s,o)}this.cachedContext=e,this.cachedFormats={normalFormat:i,zeroFormat:a}}return this.cachedFormats}}function ka(t,e,n){let r=!1,s;for(const i of t){const a=i.type==="literal";if(a||i.type==="dayPeriod"){let o=i.value;if(o=o.replace(Ch,""),e.omitCommas&&(o=o.replace(Dh,"")),!a){const{meridiem:l}=e;l===!1?o=o.replace(Ot,""):l==="narrow"?o=o.replace(Ot,(c,u)=>u.toLocaleLowerCase()):l==="short"?o=o.replace(Ot,(c,u)=>`${u.toLocaleLowerCase()}m`):l==="lowercase"&&(o=o.replace(Ot,c=>c.toLocaleLowerCase())),s&&(s.value=s.value.trimEnd())}i.value=o}else if(i.type==="timeZoneName"){const o=n(i);o!=null&&(i.value=o,r=!0)}s=a?i:void 0}return{lastLiteral:s,anyTzInjected:r}}function Rh(t,e,n,r){const s=n.timeZoneName==="short"?e.timeZoneOffset==null?"UTC":yn(e.timeZoneOffset):void 0,{lastLiteral:i,anyTzInjected:a}=ka(t,r,()=>s);if(s&&!a&&(i?i.value+=" ":t.push({type:"literal",value:" "}),t.push({type:"timeZoneName",value:s})),r.weekdayJustify&&t.length===3&&Qn.test(t[1].value)&&t[r.weekdayJustify==="start"?2:0].type==="weekday"&&t.reverse(),r.forceCommas)for(const o of t)o.type==="literal"&&Qn.test(o.value)&&(o.value=`,${o.value}`);return r.omitTrailing&&Pa(t),t.filter(o=>o.value)}function Mh(t,e,n,r,s){const i=r.timeZoneName==="short";if(ka(t,s,a=>{if(!i)return;const o=a.source==="endRange"?n.timeZoneOffset:e.timeZoneOffset;return o==null?"UTC":yn(o)}),s.forceCommas)for(const a of t)a.type==="literal"&&Qn.test(a.value)&&(a.value=`,${a.value}`);return s.omitTrailing&&Pa(t),t.filter(a=>a.value)}function Pa(t){const e=t[t.length-1];e?.type==="literal"&&(e.value=e.value.replace(xh,""),e.value||t.pop())}function Ih(t,e,n,r,s){const i=[];return s==="long"?i.push({type:"literal",value:e}):(s==="short"||s==="narrow")&&i.push({type:"literal",value:n}),(s==="long"||s==="short")&&i.push({type:"literal",value:" "}),i.push({type:"week",value:r.simpleNumberFormat.format(t)}),r.options.direction==="rtl"&&i.reverse(),i}class Nh{constructor(e){this.cmdStr=e}formatToParts(e,n){const r=n.cmdFormatter(this.cmdStr,qt(e,null,n));return Array.isArray(r)?r:[{type:"literal",value:r}]}formatRangeToParts(e,n,r){const s=r.cmdFormatter(this.cmdStr,qt(e,n,r));return Array.isArray(s)?s.map(i=>({source:"shared",...i})):[{source:"shared",type:"literal",value:s}]}}class kh{constructor(e){this.func=e}formatToParts(e,n){return[{type:"literal",value:this.func(qt(e,null,n))}]}formatRangeToParts(e,n,r){return[{source:"shared",type:"literal",value:this.func(qt(e,n,r))}]}}var v={popoverZ:"fc-nH",isolate:"fc-7s",borderBoxRoot:"fc-wa",notAllowed:"fc-4m",noScrollbars:"fc-eM",noShrink:"fc-Qo",calendarScreenRoot:"fc-fi",calendarPrintRoot:"fc-Jf",cursorPointer:"fc-DP",cursorResizeT:"fc-An",cursorResizeB:"fc-lZ",cursorResizeS:"fc-9V",cursorResizeE:"fc-70",hit:"fc-mN",hitX:"fc-2d",hitY:"fc-B0",borderNone:"fc-Tu",borderOnlyB:"fc-3e",borderOnlyS:"fc-PB",fakeBorderS:"fc-2l",flexRow:"fc-Ao",flexCol:"fc-HH",grow:"fc-GV",liquid:"fc-g2",minHeight0:"fc-Ot",printRoot:"fc-uD",printHeader:"fc-jM",noPadding:"fc-OJ",noMargin:"fc-oE",whiteSpaceNoWrap:"fc-y2",overflowAnchorNone:"fc-gZ",crop:"fc-FA",rel:"fc-cc",abs:"fc-H0",fill:"fc-ct",fillTop:"fc-iv",fillY:"fc-7k",fillStart:"fc-Yw",sticky:"fc-Ip",stickyT:"fc-CS",stickyS:"fc-tT",tableHeaderSticky:"fc-hy",contentBox:"fc-Np",alignCenter:"fc-6H",alignStart:"fc-K8",alignEnd:"fc-E3",footerScrollbarSticky:"fc-Px",footerScrollbar:"fc-J4",breakInsideAvoid:"fc-Yi",printSiblingRow:"fc-fx",z0:"fc-BS",z1:"fc-iu",focusZ2:"fc-Bk",internalEvent:"fc-Ft",internalEventMirror:"fc-lc",internalEventDraggable:"fc-uL",internalEventSelected:"fc-Bv",internalEventResizable:"fc-Qk",internalEventResizer:"fc-9X",internalEventResizerStart:"fc-Sj",internalEventResizerEnd:"fc-DL",internalBgEvent:"fc-oP",internalMoreLink:"fc-R2",internalNavLink:"fc-SW",internalPopover:"fc-Cs",internalView:"fc-LQ",internalScroller:"fc-dT"};function N(...t){return t.filter(Boolean).join(" ")}function Ns(t){return t*100+"%"}function Y(t){return typeof t=="object"&&t?new Th(t):typeof t=="string"?new Nh(t):typeof t=="function"?new kh(t):null}function Ce(...t){console.warn("FullCalendar:",...t)}const ks={};function Z(t,e){return!t||typeof t=="string"?t:(Ph(e),"")}function T(t,e){return typeof t=="function"?n=>Z(t(n),e):Z(t,e)}function Ph(t){ks[t]||(Ce(`Invalid option \`${t}\`: expected a className string or a falsy value.`),ks[t]=!0)}function En(t){t.preventDefault()}function Hh(t,e){return n=>{let r=n.target.closest(t);r&&e.call(r,n,r)}}function Ha(t,e,n,r){let s=Hh(n,r);return t.addEventListener(e,s),()=>{t.removeEventListener(e,s)}}function jh(t,e,n,r){let s;return Ha(t,"mouseover",e,(i,a)=>{if(a!==s){s=a,n(i,a);let o=l=>{s=null,r(l,a),a.removeEventListener("mouseleave",o)};a.addEventListener("mouseleave",o)}})}const Ps=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Oh(t,e){let n=r=>{e(r),Ps.forEach(s=>{t.removeEventListener(s,n)})};Ps.forEach(r=>{t.addEventListener(r,n)})}function Nr(t){return{onClick:t,...ja(t)}}function ja(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let Hs=0;function Ee(){return Hs+=1,String(Hs)}function kr(){document.body.classList.add(v.notAllowed)}function Pr(){document.body.classList.remove(v.notAllowed)}function Ah(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",En)}function Lh(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",En)}function _h(t){t.addEventListener("contextmenu",En)}function Uh(t){t.removeEventListener("contextmenu",En)}function Bh(t){let e=[],n=[],r,s;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)s=n[r],typeof s=="string"?e.push(s.charAt(0)==="-"?{field:s.substring(1),order:-1}:{field:s,order:1}):typeof s=="function"&&e.push({func:s});return e}function Wh(t,e,n){let r,s;for(r=0;r<n.length;r+=1)if(s=Fh(t,e,n[r]),s)return s;return 0}function Fh(t,e,n){return n.func?n.func(t,e):Vh(t[n.field],e[n.field])*(n.order||1)}function Vh(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 de(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((r,s,i)=>r.replace("$"+i,s||""),t):n}function zh(t,e){return t-e}function Oa(t,e){return t===e}function at(t){const e=t.borderless;return{borderlessX:!!(t.borderlessX??e),borderlessTop:!!(t.borderlessTop??e),borderlessBottom:!!(t.borderlessBottom??e)}}const{hasOwnProperty:Je}=Object.prototype;function je(t,e){let n={};for(let r in t)e(t[r],r)&&(n[r]=t[r]);return n}function _e(t,e){let n={};for(let r in t)n[r]=e(t[r],r);return n}function Aa(t){let e=[];for(let n in t)e.push(t[n]);return e}function La(t){let e={};for(let n of t)e[n]=!0;return e}function Gh(t,e){return typeof t=="object"&&t&&typeof e=="object"&&e?Hr(t,e,Oe):t===e}function Hr(t,e,n){if(t===e)return!0;for(let r in t)if(Je.call(t,r)&&!(r in e))return!1;for(let r in e)if(Je.call(e,r)&&(!(r in t)||!n(t[r],e[r],r)))return!1;return!0}function _n(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?Oe(t,e):t===e}function Oe(t,e){return Hr(t,e,Oa)}function js(t,e,n){return Hr(t,e,(r,s,i)=>{const a=n[i];return a?a(r,s):r===s})}function Yh(t,e){let n=[];for(let r in t)Je.call(t,r)&&(r in e||n.push(r));for(let r in e)Je.call(e,r)&&t[r]!==e[r]&&n.push(r);return n}function $h(t,e){return t?Zh(t,e,qh):e}function Zh(t,e,n){const r={};for(let s in t)Je.call(t,s)&&(s in e||(r[s]=t[s]));for(let s in e)Je.call(e,s)&&(s in t?r[s]=n(t[s],e[s]):r[s]=e[s]);return r}function qh(t,e){return Object.assign({},t,e)}function At(t,e){return Array.isArray(t)&&Array.isArray(e)?St(t,e):t===e}function St(t,e,n=Oa){if(t===e)return!0;let r=t.length,s;if(r!==e.length)return!1;for(s=0;s<r;s+=1)if(!n(t[s],e[s]))return!1;return!0}const Os={navLinkDayClick:y,navLinkWeekClick:y,duration:_,buttons:y,toolbarElements:y,prevText:String,nextText:String,prevYearText:String,nextYearText:String,todayText:String,yearText:String,monthText:String,weekTextLong:String,weekTextShort:String,dayText:String,listText:y,todayHint:y,prevHint:y,nextHint:y,buttonDisplay:y,buttonGroupClass:T,buttonClass:T,defaultAllDayEventDuration:_,defaultTimedEventDuration:_,nextDayThreshold:_,scrollTime:_,scrollTimeReset:Boolean,slotMinTime:_,slotMaxTime:_,popoverFormat:Y,slotDuration:_,snapDuration:_,headerToolbar:y,footerToolbar:y,forceEventDuration:Boolean,dayLaneClass:T,dayLaneInnerClass:T,dayLaneDidMount:y,dayLaneWillUnmount:y,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:y,weekNumbers:Boolean,weekNumberHeaderClass:T,weekNumberHeaderInnerClass:T,weekNumberHeaderContent:y,weekNumberHeaderDidMount:y,weekNumberHeaderWillUnmount:y,inlineWeekNumberClass:T,inlineWeekNumberContent:y,inlineWeekNumberDidMount:y,inlineWeekNumberWillUnmount:y,editable:Boolean,controller:y,nowIndicator:Boolean,nowIndicatorSnap:y,nowIndicatorHeaderClass:T,nowIndicatorHeaderContent:y,nowIndicatorHeaderDidMount:y,nowIndicatorHeaderWillUnmount:y,nowIndicatorDotClass:Z,nowIndicatorLineClass:T,nowIndicatorLineContent:y,nowIndicatorLineDidMount:y,nowIndicatorLineWillUnmount:y,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:y,locale:y,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:y,eventOrder:Bh,eventOrderStrict:Boolean,eventSlicing:Boolean,eventPrintLayout:String,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:y,contentHeight:y,direction:String,colorScheme:String,weekNumberFormat:Y,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,progressiveEventRendering:Boolean,businessHours:y,initialDate:y,now:y,eventDataTransform:y,tableHeaderSticky:y,footerScrollbarSticky:y,defaultAllDay:Boolean,eventSourceFailure:y,eventSourceSuccess:y,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:y,eventConstraint:y,eventAllow:y,eventColor:String,eventContrastColor:String,eventDidMount:y,eventWillUnmount:y,eventContent:y,eventClass:T,eventInnerClass:T,eventTimeClass:T,eventTitleClass:T,eventBeforeClass:T,eventAfterClass:T,listItemEventClass:T,listItemEventInnerClass:T,listItemEventTimeClass:T,listItemEventTitleClass:T,listItemEventBeforeClass:T,listItemEventAfterClass:T,blockEventClass:T,blockEventInnerClass:T,blockEventTimeClass:T,blockEventTitleClass:T,blockEventBeforeClass:T,blockEventAfterClass:T,rowEventClass:T,rowEventInnerClass:T,rowEventTimeClass:T,rowEventTitleClass:T,rowEventTitleSticky:Boolean,rowEventBeforeClass:T,rowEventBeforeContent:y,rowEventAfterClass:T,rowEventAfterContent:y,columnEventClass:T,columnEventInnerClass:T,columnEventTimeClass:T,columnEventTitleClass:T,columnEventTitleSticky:Boolean,columnEventBeforeClass:T,columnEventAfterClass:T,backgroundEventClass:T,backgroundEventDidMount:y,backgroundEventWillUnmount:y,backgroundEventContent:y,backgroundEventInnerClass:T,backgroundEventTitleClass:T,backgroundEventColor:String,selectConstraint:y,selectOverlap:y,selectAllow:y,droppable:Boolean,unselectCancel:String,slotHeaderFormat:y,slotLaneClass:T,slotLaneDidMount:y,slotLaneWillUnmount:y,slotHeaderClass:T,slotHeaderInnerClass:T,slotHeaderContent:y,slotHeaderDidMount:y,slotHeaderWillUnmount:y,slotHeaderAlign:y,slotHeaderSticky:y,slotHeaderRowClass:Z,slotHeaderDividerClass:T,dayMaxEvents:y,dayMaxEventRows:y,dayMinWidth:Number,slotHeaderInterval:_,dayHeaderClass:T,dayHeaderInnerClass:T,dayHeaderContent:y,dayHeaderDidMount:y,dayHeaderWillUnmount:y,dayHeaderAlign:y,_dayHeaderSticky:y,dayHeaderRowClass:Z,dayHeaderDividerClass:T,dayRowClass:Z,dayCellDidMount:y,dayCellWillUnmount:y,dayCellClass:T,dayCellInnerClass:T,dayCellTopContent:y,dayCellTopClass:T,dayCellTopInnerClass:T,dayCellBottomClass:T,allDaySlot:Boolean,allDayText:String,allDayHeaderClass:T,allDayHeaderInnerClass:T,allDayHeaderContent:y,allDayHeaderDidMount:y,allDayHeaderWillUnmount:y,timedText:String,slotMinWidth:Number,slotMinHeight:Number,navLinks:Boolean,eventTimeFormat:Y,rerenderDelay:Number,moreLinkText:y,moreLinkHint:y,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:_,hiddenDays:y,fixedWeekCount:Boolean,validRange:y,visibleRange:y,titleFormat:y,eventInteractive:Boolean,noEventsText:String,viewHint:y,viewChangeHint:String,navLinkHint:y,closeHint:String,eventsHint:String,headingLevel:Number,moreLinkClick:y,moreLinkContent:y,moreLinkDidMount:y,moreLinkWillUnmount:y,moreLinkClass:T,moreLinkInnerClass:T,rowMoreLinkClass:T,rowMoreLinkInnerClass:T,columnMoreLinkClass:T,columnMoreLinkInnerClass:T,navLinkClass:Z,monthStartFormat:Y,dayCellFormat:Y,handleCustomRendering:y,customRenderingMetaMap:y,popoverClass:Z,popoverCloseClass:Z,popoverCloseContent:y,dayNarrowWidth:Number,borderless:Boolean,borderlessX:Boolean,borderlessTop:Boolean,borderlessBottom:Boolean,fillerClass:T,headerToolbarClass:T,footerToolbarClass:T,toolbarClass:T,toolbarSectionClass:T,toolbarTitleClass:Z,tableClass:T,tableHeaderClass:T,tableBodyClass:T,nonBusinessHoursClass:Z,highlightClass:Z,dayHeaders:Boolean,dayHeaderFormat:Y,allDayDividerClass:Z,listDaysClass:Z,listDayClass:T,listDayFormat:_s,listDayAltFormat:_s,listDayHeaderDidMount:y,listDayHeaderWillUnmount:y,listDayHeaderClass:T,listDayHeaderInnerClass:T,listDayHeaderContent:y,listDayBodyClass:T,noEventsClass:T,noEventsInnerClass:T,noEventsContent:y,noEventsDidMount:y,noEventsWillUnmount:y,multiMonthMaxColumns:Number,singleMonthMinWidth:Number,singleMonthTitleFormat:Y,singleMonthDidMount:y,singleMonthWillUnmount:y,singleMonthClass:T,singleMonthHeaderClass:T,singleMonthHeaderInnerClass:T},Un={buttonDisplay:"auto",eventDisplay:"auto",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",initialView:"",aspectRatio:1.35,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:"",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",eventPrintLayout:"auto",popoverFormat:{month:"long",day:"numeric",year:"numeric"},longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"},dayCellFormat:{day:"numeric",omitTrailing:!0},headingLevel:2,outerBorder:!0,dayNarrowWidth:80,eventOverlap:!0,slotHeaderAlign:"start",slotHeaderSticky:!0,dayHeaderAlign:"start",_dayHeaderSticky:!0,rowEventTitleSticky:!0,columnEventTitleSticky:!0,nowIndicatorSnap:"auto",dayHeaders:!0},As={datesSet:y,eventsSet:y,eventAdd:y,eventChange:y,eventRemove:y,eventClick:y,eventMouseEnter:y,eventMouseLeave:y,select:y,unselect:y,loading:y,_unmount:y,_beforeprint:y,_afterprint:y,_noDateSelect:y,_noEventDrop:y,_noEventResize:y,_timeScrollRequest:y,dateClick:y,eventDragStart:y,eventDragStop:y,eventDrop:y,eventResizeStart:y,eventResizeStop:y,eventResize:y,drop:y,eventReceive:y,eventLeave:y},Ls={class:T,className:T,viewClass:T,viewDidMount:y,viewWillUnmount:y,views:y,plugins:y,initialEvents:y,events:y,eventSources:y},Xh={type:String,component:y,class:T,className:T,content:y,didMount:y,willUnmount:y,buttonTextKey:String,dateProfileGeneratorClass:y,usesMinMaxTime:Boolean,disallowAmbigTitle:Boolean},Ve={dateIncrement:_n,headerToolbar:_n,footerToolbar:_n,buttons:Gh,plugins:At,events:At,eventSources:At,resources:At};function jr(t,e){let n={},r={};for(let s in e)s in t&&(n[s]=e[s](t[s],s));for(let s in t)s in e||(r[s]=t[s]);return{refined:n,extra:r}}function y(t){return t}function _s(t){return t===!1?null:Y(t)}function _a(t){let e=Math.floor(it(t.start,t.end))||1,n=V(t.start),r=K(n,e);return{start:n,end:r}}function Ua(t,e=_(0)){let n=null,r=null;if(t.end){r=V(t.end);let s=t.end.valueOf()-r.valueOf();s&&s>=bt(e)&&(r=K(r,1))}return t.start&&(n=V(t.start),r&&r<=n&&(r=K(n,1))),{start:n,end:r}}function $e(t,e,n,r){return r==="year"?_(n.diffWholeYears(t,e),"year"):r==="month"?_(n.diffWholeMonths(t,e),"month"):Qf(t,e)}function Or(t,e){return{instanceId:Ee(),defId:t,range:e}}function Kh(t,e,n,r){for(let s=0;s<r.length;s+=1){let i=r[s].parse(t,n);if(i){let{allDay:a}=t;return a==null&&(a=e,a==null&&(a=i.allDayGuess,a==null&&(a=!1))),{allDay:a,duration:i.duration,typeData:i.typeData,typeId:s}}}return null}function Ae(t,e,n){let{dateEnv:r,pluginHooks:s,options:i}=n,{defs:a,instances:o}=t;o=je(o,l=>!a[l.defId].recurringDef);for(let l in a){let c=a[l];if(c.recurringDef){let{duration:u}=c.recurringDef;u||(u=c.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);let f=Qh(c,u,e,r,s.recurringTypes);for(let h of f){let g=Or(l,{start:h,end:r.add(h,u)});o[g.instanceId]=g}}}return{defs:a,instances:o}}function Qh(t,e,n,r,s){let a=s[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:r.subtract(n.start,e),end:n.end},r);return t.allDay&&(a=a.map(V)),a}function wt(t,e,n,r,s,i){let a=ge(),o=_r(n);for(let l of t){let c=Wa(l,e,n,r,o,s,i);c&&Jn(c,a)}return a}function Jn(t,e=ge()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function Ar(t,e){let n=t.instances[e];if(n){let r=t.defs[n.defId],s=bn(t,i=>Jh(r,i));return s.defs[r.defId]=r,s.instances[n.instanceId]=n,s}return ge()}function Jh(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function ge(){return{defs:{},instances:{}}}function Lr(t,e){return{defs:{...t.defs,...e.defs},instances:{...t.instances,...e.instances}}}function bn(t,e){let n=je(t.defs,e),r=je(t.instances,s=>n[s.defId]);return{defs:n,instances:r}}function eg(t,e){let{defs:n,instances:r}=t,s={},i={};for(let a in n)e.defs[a]||(s[a]=n[a]);for(let a in r)!e.instances[a]&&s[r[a].defId]&&(i[a]=r[a]);return{defs:s,instances:i}}function tg(t,e){return Array.isArray(t)?wt(t,null,e,!0):typeof t=="object"&&t?wt([t],null,e,!0):t!=null?String(t):null}const Xt={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:y,overlap:y,allow:y,class:Z,className:Z,color:String,contrastColor:String},ng={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],color:"",contrastColor:"",className:""};function Kt(t,e){let n=tg(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]:[],color:t.color||"",contrastColor:t.contrastColor||"",className:(t.class??t.className)||""}}function rg(t){return t.reduce(sg,ng)}function sg(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),color:e.color||t.color,contrastColor:e.contrastColor||t.contrastColor,className:N(t.className,e.className)}}const Wt={id:String,groupId:String,title:String,url:String,interactive:Boolean},Ba={start:y,end:y,date:y,allDay:Boolean},ig={...Wt,...Ba,extendedProps:y};function Wa(t,e,n,r,s=_r(n),i,a){let{refined:o,extra:l}=Fa(t,n,s),c=og(e,n),u=Kh(o,c,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let h=er(o,l,e?e.sourceId:"",u.allDay,!!u.duration,n,i);return h.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:h,instance:null}}let f=ag(o,c,n,r);if(f){let h=er(o,l,e?e.sourceId:"",f.allDay,f.hasEnd,n,i),g=Or(h.defId,f.range);return a&&h.publicId&&a[h.publicId]&&(g.instanceId=a[h.publicId]),{def:h,instance:g}}return null}function Fa(t,e,n=_r(e)){return jr(t,n)}function _r(t){return{...Xt,...ig,...t.pluginHooks.eventRefiners}}function er(t,e,n,r,s,i,a){let o={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(a&&t.id?a[t.id]:"")||Ee(),sourceId:n,allDay:r,hasEnd:s,interactive:t.interactive,ui:Kt(t,i),extendedProps:{...t.extendedProps||{},...e}};for(let l of i.pluginHooks.eventDefMemberAdders)Object.assign(o,l(t));return Object.freeze(o.ui.className),Object.freeze(o.extendedProps),o}function ag(t,e,n,r){let{allDay:s}=t,i,a=null,o=!1,l,c=null,u=t.start!=null?t.start:t.date;if(i=n.dateEnv.createMarkerMeta(u),i)a=i.marker;else if(!r)return null;return t.end!=null&&(l=n.dateEnv.createMarkerMeta(t.end)),s==null&&(e!=null?s=e:s=(!i||i.isTimeUnspecified)&&(!l||l.isTimeUnspecified)),s&&a&&(a=V(a)),l&&(c=l.marker,s&&(c=V(c)),a&&c<=a&&(c=null)),c?o=!0:r||(o=n.options.forceEventDuration||!1,c=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:o,range:{start:a,end:c}}}function og(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}const lg={start:y,end:y,allDay:Boolean};function cg(t,e,n){let r=dg(t,e),{range:s}=r;if(!s.start)return null;if(!s.end){if(n==null)return null;s.end=e.add(s.start,n)}return r}function dg(t,e){let{refined:n,extra:r}=jr(t,lg),s=n.start?e.createMarkerMeta(n.start):null,i=n.end?e.createMarkerMeta(n.end):null,{allDay:a}=n;return a==null&&(a=s&&s.isTimeUnspecified&&(!i||i.isTimeUnspecified)),{range:{start:s?s.marker:null,end:i?i.marker:null},allDay:a,...r}}function ug(t,e){return dh(t.range,e.range)&&t.allDay===e.allDay&&fg(t,e)}function fg(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 hg(t,e){return{...za(t.range,e,t.allDay),allDay:t.allDay}}function Va(t,e,n){return{...za(t,e,n),timeZone:e.timeZone}}function za(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 gg(t,e,n){let r=Fa({editable:!1},n),s=er(r.refined,r.extra,"",t.allDay,!0,n);return{def:s,ui:$a(s,e),instance:Or(s.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function Ga(t,e,n){n.emitter.trigger("select",{...Ur(t,n),jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view})}function mg(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function Ur(t,e){let n={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(n,r(t,e));return Object.assign(n,hg(t,e.dateEnv)),n}function Us(t,e,n){let{dateEnv:r,options:s}=n,i=e;return t?(i=V(i),i=r.add(i,s.defaultAllDayEventDuration)):i=r.add(i,s.defaultTimedEventDuration),i}function Br(t,e,n,r){let s=Jt(t.defs,e),i=ge();for(let a in t.defs){let o=t.defs[a];i.defs[a]=pg(o,s[a],n,r)}for(let a in t.instances){let o=t.instances[a],l=i.defs[o.defId];i.instances[a]=vg(o,l,s[o.defId],n,r)}return i}function pg(t,e,n,r){let s=n.standardProps||{};s.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(s.hasEnd=!0);let i={...t,...s,ui:{...t.ui,...s.ui}};n.extendedProps&&(i.extendedProps={...i.extendedProps,...n.extendedProps});for(let a of r.pluginHooks.eventDefMutationAppliers)a(i,n,r);return!i.hasEnd&&r.options.forceEventDuration&&(i.hasEnd=!0),i}function vg(t,e,n,r,s){let{dateEnv:i}=s,a=r.standardProps&&r.standardProps.allDay===!0,o=r.standardProps&&r.standardProps.hasEnd===!1,l={...t};return a&&(l.range=_a(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:i.add(l.range.start,r.datesDelta),end:i.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:i.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:i.add(l.range.end,r.endDelta)}),o&&(l.range={start:l.range.start,end:Us(e.allDay,l.range.start,s)}),e.allDay&&(l.range={start:V(l.range.start),end:V(l.range.end)}),l.range.end<l.range.start&&(l.range.end=Us(e.allDay,l.range.start,s)),l}class ze{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 z{constructor(e,n,r){this._context=e,this._def=n,this._instance=r||null}setProp(e,n){if(e in Ba)Ce(`Cannot set date-related event property \`${e}\`. Use a method instead.`);else if(e==="id")n=Wt[e](n),this.mutate({standardProps:{publicId:n}});else if(e in Wt)n=Wt[e](n),this.mutate({standardProps:{[e]:n}});else if(e in Xt){let r=Xt[e](n);e==="editable"?r={startEditable:n,durationEditable:n}:r={[e]:n},this.mutate({standardProps:{ui:r}})}else Ce(`Cannot set event property \`${e}\`. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:r}=this._context,s=r.createMarker(e);if(s&&this._instance){let i=this._instance.range,a=$e(i.start,s,r,n.granularity);n.maintainDuration?this.mutate({datesDelta:a}):this.mutate({startDelta:a})}}setEnd(e,n={}){let{dateEnv:r}=this._context,s;if(!(e!=null&&(s=r.createMarker(e),!s))&&this._instance)if(s){let i=$e(this._instance.range.end,s,r,n.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,r={}){let{dateEnv:s}=this._context,i={allDay:r.allDay},a=s.createMarker(e),o;if(a&&!(n!=null&&(o=s.createMarker(n),!o))&&this._instance){let l=this._instance.range;r.allDay===!0&&(l=_a(l));let c=$e(l.start,a,s,r.granularity);if(o){let u=$e(l.end,o,s,r.granularity);gh(c,u)?this.mutate({datesDelta:c,standardProps:i}):this.mutate({startDelta:c,endDelta:u,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:c,standardProps:i})}}moveStart(e){let n=_(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=_(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=_(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let r={allDay:e},{maintainDuration:s}=n;s==null&&(s=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=s),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:n}=this._context,r=this._instance,s=Y(e);return this._def.hasEnd?ie(n.formatRangeToParts(r.range.start,r.range.end,s)):ie(n.formatToParts(r.range.start,s))}mutate(e){let n=this._instance;if(n){let r=this._def,s=this._context,{eventStore:i}=s.getCurrentData(),a=Ar(i,n.instanceId);a=Br(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],color:"",contrastColor:"",className:""}},e,s);let l=new z(s,r,n);this._def=a.defs[r.defId],this._instance=a.instances[n.instanceId],s.dispatch({type:"MERGE_EVENTS",eventStore:a}),s.emitter.trigger("eventChange",{oldEvent:l,event:this,relatedEvents:Ne(a,s,n),revert(){s.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,n=Ya(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 ze(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}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay}):""}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 color(){return this._def.ui.color}get contrastColor(){return this._def.ui.contrastColor}get className(){return this._def.ui.className}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let n=this._def,{ui:r}=n,{startStr:s,endStr:i}=this,a={allDay:n.allDay};return n.title&&(a.title=n.title),s&&(a.start=s),i&&(a.end=i),n.publicId&&(a.id=n.publicId),n.groupId&&(a.groupId=n.groupId),n.url&&(a.url=n.url),r.display&&r.display!=="auto"&&(a.display=r.display),r.color&&(a.color=r.color),r.contrastColor&&(a.contrastColor=r.contrastColor),r.className&&(a.className=r.className),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,n.extendedProps):a.extendedProps=n.extendedProps),a}toJSON(){return this.toPlainObject()}}function Ya(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:s}=t,i=[],a=n?n.instanceId:"";for(let o in s){let l=s[o],c=r[l.defId];l.instanceId!==a&&i.push(new z(e,c,l))}return i}function yg(t){return t.eventRange.instance.instanceId}function Bs(t,e,n,r){let s={},i={},a={},o=[],l=[],c=Jt(t.defs,e);for(let u in t.defs){let f=t.defs[u];c[f.defId].display==="inverse-background"&&(f.groupId?(s[f.groupId]=[],a[f.groupId]||(a[f.groupId]=f)):i[u]=[])}for(let u in t.instances){let f=t.instances[u],h=t.defs[f.defId],g=c[h.defId],p=f.range,m=!h.allDay&&r?Ua(p,r):p,E=Et(m,n);E&&(g.display==="inverse-background"?h.groupId?s[h.groupId].push(E):i[f.defId].push(E):g.display!=="none"&&(g.display==="background"?o:l).push({def:h,ui:g,instance:f,range:E,isStart:m.start&&m.start.valueOf()===E.start.valueOf(),isEnd:m.end&&m.end.valueOf()===E.end.valueOf()}))}for(let u in s){let f=s[u],h=Rs(f,n);for(let g of h){let p=a[u],m=c[p.defId];o.push({def:p,ui:m,instance:null,range:g,isStart:!1,isEnd:!1})}}for(let u in i){let f=i[u],h=Rs(f,n);for(let g of h)o.push({def:t.defs[u],ui:c[u],instance:null,range:g,isStart:!1,isEnd:!1})}return{bg:o,fg:l}}function Qt(t,e){t.fcEventRange=e}function et(t){return t.fcEventRange||t.parentNode.fcEventRange||null}function Jt(t,e){return _e(t,n=>$a(n,e))}function $a(t,e){const n=[],r=e[""],s=e[t.defId];return r&&n.push(r),s&&n.push(s),n.push(t.ui),rg(n)}function Eg(t,e){let n=t.map(bg);return n.sort((r,s)=>Wh(r,s,e)),n.map(r=>r._seg)}function bg(t){let{eventRange:e}=t,n=e.def,r=e.instance?e.instance.range:e.range,s=r.start?r.start.valueOf():0,i=r.end?r.end.valueOf():0;return{...n.extendedProps,...n,id:n.publicId,start:s,end:i,duration:i-s,allDay:Number(n.allDay),_seg:t}}function Sg(t,e){let{pluginHooks:n}=e,r=n.isDraggableTransformers,{def:s,ui:i}=t,a=i.startEditable;for(let o of r)a=o(a,s,i,e);return a}function wg(t,e,n,r,s,i,a,o=!0,l=!0){const{dateEnv:c,options:u}=a,{def:f}=e;let{displayEventTime:h,displayEventEnd:g}=u;h==null&&(h=o!==!1),g==null&&(g=l!==!1);const p=!s&&n&&V(n).valueOf()!==V(e.instance.range.start).valueOf()?n:e.instance.range.start,m=!i&&r&&V(He(r,-1)).valueOf()!==V(He(e.instance.range.end,-1)).valueOf()?r:e.instance.range.end;if(h&&!f.allDay){if(g&&(s||i)&&f.hasEnd){const E=c.formatRangeToParts(p,m,t),w=Cg(E);return w!=null?ie(c.formatToParts(p,t))+w+ie(c.formatToParts(m,t)):ie(E)}if(s)return ie(c.formatToParts(p,t))}return""}const Dg=new Set(["year","month","day"]);function Cg(t){let e,n=!1;for(const r of t)r.source==="shared"&&(e=r),Dg.has(r.type)&&(n=!0);return n?e.value:void 0}function tr(t,e,n){let r=t.range;return{isPast:r.end<=e.start,isFuture:r.start>=e.end,isToday:e&&Ie(e,r.start)}}function xg(t,e){let{def:n,instance:r}=t,{url:s}=n;if(s)return["a",{href:s},!0];let{emitter:i,options:a}=e,{eventInteractive:o}=a;o==null&&(o=n.interactive,o==null&&(o=!!i.hasHandlers("eventClick")));let l;return o&&(l=ja(c=>{i.trigger("eventClick",{el:c.target,event:new z(e,n,r),jsEvent:c,view:e.viewApi})}),l={role:"button",...l}),["div",l,o]}const Tg=/(^c|C)lass(Name)?$/,Rg=/Content$/,Mg=/(DidMount|WillUnmount)$/,Ig=/^on[A-Z]/,Ng={buttons:$h};function kg(...t){const e={};for(const n of t)for(const r in n){const s=n[r];e[r]?e[r]=pe(e[r],s):e[r]=s}return e}function pe(...t){let e={};for(const n of t)for(let r in n)if(r in e){const s=Ng[r]||(Tg.test(r)?Pg:Rg.test(r)?Hg:Mg.test(r)?jg:void 0);e[r]=s?s(e[r],n[r],r):n[r]}else e[r]=n[r];return e}function Pg(t,e,n){const r=typeof t=="function",s=typeof e=="function";if(r||s){const i=a=>N(Z(r?t(a):t,n),Z(s?e(a):e,n));return i.parts=[t,e],i}return N(Z(t,n),Z(e,n))}function Hg(t,e){if(typeof e=="function"){const n=r=>{const s=e(r);return s===!0?typeof t=="function"?t(r):t:s};return n.parts=[t,e],n}return e??t}function jg(t,e){if(t&&e){const n=(...r)=>{t(...r),e(...r)};return n.parts=[t,e],n}return t||e}function Og(t,e){const n=Yh(t,e);for(let r of n)if(!Ig.test(r))return!1;return!0}function nr(t,e){const n=t&&t.parts,r=e&&e.parts;if(n&&r){const s=n.length,i=r.length;if(s!==i)return!1;for(let a=0;a<s;a++)if(!(n[a]===r[a]||nr(n[a],r[a])))return!1;return!0}return!1}const Ag=[],Za={code:"en",week:{dow:0,doy:4},direction:"ltr",todayText:"Today",prevText:"Prev",nextText:"Next",prevYearText:"Prev year",nextYearText:"Next year",yearText:"Year",monthText:"Month",weekTextLong:"Week",dayText:"Day",listText:"List",closeHint:"Close",eventsHint:"Events",allDayText:"All-day",timedText:"Timed",moreLinkText:"more",noEventsText:"No events to display"},qa={...Za,weekTextShort:"W",todayHint:(t,e)=>e==="day"?"Today":`This ${t}`,prevHint:"Previous $0",nextHint:"Next $0",viewHint:"$0 view",viewChangeHint:"Change view",navLinkHint:"Go to $0",moreLinkHint(t){return`Show ${t} more event${t===1?"":"s"}`}};function Lg(t){let e=t.length>0?t[0].code:"en",n=Ag.concat(t),r={en:qa};for(let s of n)r[s.code]=s;return{map:r,defaultCode:e}}function Xa(t,e){return typeof t=="object"&&!Array.isArray(t)?Ka(t.code,[t.code],t):_g(t,e)}function _g(t,e){let n=[].concat(t||[]),r=Ug(n,e)||qa;return Ka(t,n,r)}function Ug(t,e){for(let n=0;n<t.length;n+=1){let r=t[n].toLocaleLowerCase().split("-");for(let s=r.length;s>0;s-=1){let i=r.slice(0,s).join("-");if(e[i])return e[i]}}return null}function Ka(t,e,n){let r=pe(Za,n);delete r.code;let{week:s}=r;return delete r.week,{codeArg:t,codes:e,week:s,simpleNumberFormat:new Intl.NumberFormat(t),options:r}}class Ws extends Error{constructor(e,n){super(e),this.response=n}}function Bg(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(s=>{if(s.ok)return s.json().then(i=>[i,s],()=>{throw new Ws("Failure parsing JSON",s)});throw new Ws("Request failed",s)})}function Wg(t,e){e.emitter.trigger("datesSet",{...Va(t.activeRange,e.dateEnv),view:e.viewApi})}function Fg(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Ne(t,e))}let Vg={ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}};const zg={name:"array-event-source",eventSourceDefs:[Vg]};function Gg(t,e,n){let r=!1,s=function(o){r||(r=!0,e(o))},i=function(o){r||(r=!0,n(o))},a=t(s,i);a&&typeof a.then=="function"&&a.then(s,i)}let Yg={parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:r}=t.context,s=t.eventSource.meta;Gg(s.bind(null,Va(t.range,r)),i=>e({rawEvents:i}),n)}};const $g={name:"func-event-source",eventSourceDefs:[Yg]},Zg={method:String,extraParams:y,startParam:String,endParam:String,timeZoneParam:String};let qg={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,s=Kg(r,t.range,t.context);Bg(r.method,r.url,s).then(([i,a])=>{e({rawEvents:i,response:a})},n)}};const Xg={name:"json-event-source",eventSourceRefiners:Zg,eventSourceDefs:[qg]};function Kg(t,e,n){let{dateEnv:r,options:s}=n,i,a,o,l,c={};return i=t.startParam,i==null&&(i=s.startParam),a=t.endParam,a==null&&(a=s.endParam),o=t.timeZoneParam,o==null&&(o=s.timeZoneParam),typeof t.extraParams=="function"?l=t.extraParams():l=t.extraParams||{},Object.assign(c,l),c[i]=r.formatIso(e.start),c[a]=r.formatIso(e.end),r.timeZone!=="local"&&(c[o]=r.timeZone),c}const Qg={name:"change-handler",optionChangeHandlers:{controller(t,e){t._setApi(e.calendarApi)},events(t,e){Fs([t],e)},eventSources:Fs}};function Fs(t,e){let n=Aa(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 s of t){let i=!1;for(let a=0;a<n.length;a+=1)if(n[a]._raw===s){n.splice(a,1),i=!0;break}i||r.push(s)}for(let s of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:s.sourceId});for(let s of r)e.calendarApi.addEventSource(s)}const Jg={id:String,defaultAllDay:Boolean,url:String,format:String,events:y,eventDataTransform:y,success:y,failure:y};function Qa(t,e,n=Ja(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:s,extra:i}=jr(r,n),a=em(s,e);if(a)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:s.defaultAllDay,eventDataTransform:s.eventDataTransform,success:s.success,failure:s.failure,publicId:s.id||"",sourceId:Ee(),sourceDefId:a.sourceDefId,meta:a.meta,ui:Kt(s,e),extendedProps:i}}return null}function Ja(t){return{...Xt,...Jg,...t.pluginHooks.eventSourceRefiners}}function em(t,e){let n=e.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let i=n[r].parseMeta(t);if(i)return{sourceDefId:r,meta:i}}return null}function tm(t,e,n){let r=e?e.activeRange:null;return to({},lm(t,n),r,n)}function nm(t,e,n,r){let s=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return to(t,e.sources,s,r);case"REMOVE_EVENT_SOURCE":return sm(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?no(t,s,r):t;case"FETCH_EVENT_SOURCES":return Wr(t,e.sourceIds?La(e.sourceIds):ro(t,r),s,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return om(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function rm(t,e,n){let r=e?e.activeRange:null;return Wr(t,ro(t,n),r,!0,n)}function eo(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function to(t,e,n,r){let s={};for(let i of e)s[i.sourceId]=i;return n&&(s=no(s,n,r)),{...t,...s}}function sm(t,e){return je(t,n=>n.sourceId!==e)}function no(t,e,n){return Wr(t,je(t,r=>im(r,e,n)),e,!1,n)}function im(t,e,n){return so(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function Wr(t,e,n,r,s){let i={};for(let a in t){let o=t[a];e[a]?i[a]=am(o,n,r,s):i[a]=o}return i}function am(t,e,n,r){let{options:s,calendarApi:i}=r,a=r.pluginHooks.eventSourceDefs[t.sourceDefId],o=Ee();return a.fetch({eventSource:t,range:e,isRefetch:n,context:r},l=>{let{rawEvents:c}=l;s.eventSourceSuccess&&(c=s.eventSourceSuccess.call(i,c,l.response)||c),t.success&&(c=t.success.call(i,c,l.response)||c),r.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:o,fetchRange:e,rawEvents:c})},l=>{let c=!1;s.eventSourceFailure&&(s.eventSourceFailure.call(i,l),c=!0),t.failure&&(t.failure(l),c=!0),c||Ce(`Unhandled event source error: ${l.message}`,l),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:o,fetchRange:e,error:l})}),{...t,isFetching:!0,latestFetchId:o}}function om(t,e,n,r){let s=t[e];return s&&n===s.latestFetchId?{...t,[e]:{...s,isFetching:!1,fetchRange:r}}:t}function ro(t,e){return je(t,n=>so(n,e))}function lm(t,e){let n=Ja(e),r=[].concat(t.eventSources||[]),s=[];t.initialEvents&&r.unshift(t.initialEvents),t.events&&r.unshift(t.events);for(let i of r){let a=Qa(i,e,n);a&&s.push(a)}return s}function so(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}const cm={daysOfWeek:y,startTime:_,endTime:_,duration:_,startRecur:y,endRecur:y};let dm={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=mh(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:r,typeData:n}}return null},expand(t,e,n){let r=Et(e,{start:t.startRecur,end:t.endRecur});return r?fm(t.daysOfWeek,t.startTime,t.dateEnv,n,r):[]}};const um={name:"simple-recurring-event",recurringTypes:[dm],eventRefiners:cm};function fm(t,e,n,r,s){let i=t?La(t):null,a=V(s.start),o=s.end,l=[];for(e&&(e.milliseconds<0?o=K(o,1):e.milliseconds>=1e3*60*60*24&&(a=K(a,-1)));a<o;){let c;(!i||i[a.getUTCDay()])&&(e?c=r.add(a,e):c=a,l.push(r.createMarker(n.toDate(c)))),a=K(a,1)}return l}const hm=[zg,$g,Xg,um,Qg,{name:"misc",isLoadingFuncs:[t=>eo(t.eventSources)],propSetHandlers:{dateProfile:Wg,eventStore:Fg}}];function L(t,e,n){let r,s;return function(...i){if(!r)s=t.apply(this,i);else if(!St(r,i)){let a=t.apply(this,i);(!e||!e(a,s))&&(s=a)}return r=i,s}}function ht(t,e,n){let r,s;return i=>(r?Oe(r,i)||(s=t.call(this,i)):s=t.call(this,i),r=i,s)}const ot=S.createContext({});function gm(t,e,n,r,s,i,a,o,l,c,u,f,h,g){return{dateEnv:s,nowManager:i,options:n,pluginHooks:a,emitter:c,dispatch:o,getCurrentData:l,calendarApi:u,viewSpec:t,viewApi:e,dateProfileGenerator:r,baseId:f,registerInteractiveComponent:h,unregisterInteractiveComponent:g}}class Ue extends S.Component{shouldComponentUpdate(e,n){return!js(this.props,e,this.propEquality)||!js(this.state,n,this.stateEquality)}}Ue.addPropsEquality=mm;Ue.addStateEquality=pm;Ue.contextType=ot;Ue.prototype.propEquality={};Ue.prototype.stateEquality={};class $ extends Ue{}$.contextType=ot;function mm(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function pm(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function U(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class Fr extends ${constructor(){super(...arguments),this.id=Ee(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{this.el=e,this.props.elRef&&U(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:r}=n,{customGenerator:s,defaultGenerator:i,renderProps:a}=e,o=io(e,"",this.handleEl);let l=!1,c,u=[],f;if(s!=null){const h=typeof s=="function"?s(a):s;if(h===!0)l=!0;else{const g=h&&typeof h=="object";g&&"html"in h?o.dangerouslySetInnerHTML={__html:h.html}:g&&"domNodes"in h?u=Array.prototype.slice.call(h.domNodes):(g?S.isValidElement(h):typeof h!="function")?c=h:f=h}}else l=!vm(e.generatorName,r);return l&&i&&(c=i(a)),this.queuedDomNodes=u,this.currentGeneratorMeta=f,S.createElement(e.tag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){const{props:n,context:r}=this,{handleCustomRendering:s,customRenderingMetaMap:i}=r.options;if(s){const a=this.currentGeneratorMeta??i?.[n.generatorName];a&&s({id:this.id,isActive:e,containerEl:this.el,generatorMeta:a,renderProps:n.renderProps})}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,{el:r}=this;if(!St(e,n)){for(const s of n)s.remove();for(let s of e)r.appendChild(s);this.currentDomNodes=e}}}Fr.addPropsEquality({renderProps:Oe,attrs:Og,style:Oe});function vm(t,e){return!!(e.handleCustomRendering&&t&&e.customRenderingMetaMap?.[t])}function io(t,e,n){const r={...t.attrs,ref:n};return(t.className||e)&&(r.className=N(e,t.className,r.className)),t.style&&(r.style=t.style),r}const ym=S.createContext(0);class te extends S.Component{constructor(){super(...arguments),this.InnerContent=Em.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(U(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=I(e.classNameGenerator,e.renderProps);if(e.children){const r=io(e,n,this.handleEl),s=e.children(this.InnerContent,e.renderProps,r);return e.tag?S.createElement(e.tag,r,s):s}else return S.createElement(Fr,{...e,elRef:this.handleEl,tag:e.tag||"div",className:N(e.className,n),renderId:this.context})}componentDidMount(){this.el?this.props.didMount?.({...this.props.renderProps,el:this.el}):this.didMountMisfire=!0}componentWillUnmount(){this.props.willUnmount?.({...this.props.renderProps,el:this.el})}}te.contextType=ym;function Em(t,e){const n=t.props;return S.createElement(Fr,{renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context,...e})}function I(t,e){return(typeof t=="function"?t(e):t)||""}function ao(t){return t.text}function xe(t){return t.height==="auto"||t.contentHeight==="auto"}function oo(t){let{tableHeaderSticky:e}=t;return(e==null||e==="auto")&&(e=xe(t)),e}function bm(t){const e=xe(t);let{footerScrollbarSticky:n}=t;return(n==null||n==="auto")&&(n=e),!!n&&e}function Sm(t){const e=t.scrollerSyncerClass;if(!e)throw new RangeError("Must import @fullcalendar/scrollgrid");return e}class lo{constructor(e){this.handleChange=e,this.isMounted=!1,this.handleRefresh=()=>{let n=this.computeTiming();n.nowDate.valueOf()!==this.nowDate.valueOf()&&(this.nowDate=n.nowDate,this.todayRange=n.todayRange,this.handleChange()),this.clearTimeout(),this.setTimeout(n.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()}}update(e){if(this.isMounted)(e.unit!==this.unit||e.unitValue!==this.unitValue||e.nowIndicatorSnap!==this.nowIndicatorSnap||e.nowManager!==this.nowManager||e.dateEnv!==this.dateEnv)&&(this.unit=e.unit,this.unitValue=e.unitValue,this.nowIndicatorSnap=e.nowIndicatorSnap,this.nowManager=e.nowManager,this.dateEnv=e.dateEnv,this.clearTimeout(),this.setTimeout());else{this.isMounted=!0,this.unit=e.unit,this.unitValue=e.unitValue,this.nowIndicatorSnap=e.nowIndicatorSnap,this.nowManager=e.nowManager,this.dateEnv=e.dateEnv;const n=this.computeTiming();this.nowDate=n.nowDate,this.todayRange=n.todayRange,this.setTimeout(),this.nowManager.addResetListener(this.handleRefresh),typeof document<"u"&&document.addEventListener("visibilitychange",this.handleVisibilityChange)}return{nowDate:this.nowDate,todayRange:this.todayRange}}destroy(){this.isMounted&&(this.isMounted=!1,this.clearTimeout(),this.nowManager.removeResetListener(this.handleRefresh),typeof document<"u"&&document.removeEventListener("visibilitychange",this.handleVisibilityChange))}computeTiming(){let e=this.nowManager.getDateMarker(),{unit:n,unitValue:r,nowIndicatorSnap:s,dateEnv:i}=this;s==="auto"&&(s=/year|month|week|day/.test(n)||(r||1)===1);let a,o;return s?(a=i.startOf(e,n),o=i.add(a,_(1,n)).valueOf()-e.valueOf()):(a=e,o=1e3*60),o=Math.min(1e3*60*60*24,o),{nowDate:a,todayRange:wm(a),waitMs:o}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{const n=this.computeTiming();this.nowDate=n.nowDate,this.todayRange=n.todayRange,this.handleChange(),this.setTimeout(n.waitMs)},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function wm(t){let e=V(t),n=K(e,1);return{start:e,end:n}}class co{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,n,r,s){let{dateEnv:i}=this.props,a=i.subtract(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(a,r,-1,s)}buildNext(e,n,r,s){let{dateEnv:i}=this.props,a=i.add(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(a,r,1,s)}build(e,n,r,s=!0){let{props:i}=this,a,o,l,c,u,f;return a=this.buildValidRange(n),a=this.trimHiddenDays(a),s&&(e=uh(e,a)),o=this.buildCurrentRangeInfo(e,r),l=/^(year|month|week|day)$/.test(o.unit),c=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,l),c=this.trimHiddenDays(c),u=c,i.showNonCurrentDates||(u=Et(u,o.range)),u=this.adjustActiveRange(u),u=Et(u,a),f=Mr(o.range,a),Ie(c,e)||(e=c.start),{currentDate:e,validRange:a,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:l,activeRange:u,renderRange:c,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:f,dateIncrement:this.buildDateIncrement(o.duration)}}buildValidRange(e){let n=this.props.validRangeInput,r=typeof n=="function"?n.call(this.props.calendarApi,this.props.dateEnv.toDate(e)):n;return this.refineRange(r)||{start:null,end:null}}buildCurrentRangeInfo(e,n){let{props:r}=this,s=null,i=null,a=null,o;return r.duration?(s=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,n,s,i)):(o=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,n,o)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(s=this.getFallbackDuration(),i=Kn(s).unit,a=this.buildRangeFromDuration(e,n,s,i)),{duration:s,unit:i,range:a}}getFallbackDuration(){return _({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:r,slotMinTime:s,slotMaxTime:i}=this.props,{start:a,end:o}=e;return r&&(qe(s)<0&&(a=V(a),a=n.add(a,s)),qe(i)>1&&(o=V(o),o=K(o,-1),o=n.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,n,r,s){let{dateEnv:i,dateAlignment:a}=this.props,o,l,c;if(!a){let{dateIncrement:f}=this.props;f&&bt(f)<bt(r)?a=Kn(f).unit:a=s}qe(r)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,n),o=V(o));function u(){o=i.startOf(e,a),l=i.add(o,r),c={start:o,end:l}}return u(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,n),u()),c}buildRangeFromDayCount(e,n,r){let{dateEnv:s,dateAlignment:i}=this.props,a=0,o=e,l;i&&(o=s.startOf(o,i)),o=V(o),o=this.skipHiddenDays(o,n),l=o;do l=K(l,1),this.isHiddenDay(l)||(a+=1);while(a<r);return{start:o,end:l}}buildCustomVisibleRange(e){let{props:n}=this,r=n.visibleRangeInput,s=typeof r=="function"?r.call(n.calendarApi,n.dateEnv.toDate(e)):r,i=this.refineRange(s);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,n,r){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,r;return n||((r=this.props.dateAlignment)?_(1,r):e||_({days:1}))}refineRange(e){if(e){let n=lh(e,this.props.dateEnv);return n&&(n=Ua(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],r=0,s;for(this.props.weekends===!1&&e.push(0,6),s=0;s<7;s+=1)(n[s]=e.indexOf(s)!==-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=K(e,n);return e}}function uo(t,e){const{currentRange:n}=t;if(t.currentRangeUnit==="year")return e.diffWholeYears(n.start,n.end)>1?"year":"month";if(t.currentRangeUnit==="month"){if(e.diffWholeMonths(n.start,n.end)>1)return"month"}else if(t.currentRangeUnit==="week"){if(Ma(n.start,n.end)>1)return"week"}else if(t.currentRangeUnit==="day"&&yt(n.start,n.end)>1)return"day"}function fo(t,e,n){if(t.valueOf()===V(t).valueOf()){if(e==="year")return!n.getMonth(t)&&n.getDay(t)===1;if(e==="month")return n.getDay(t)===1;if(e==="week")return t.getUTCDay()===n.weekDow;if(e==="day")return!0}return!1}function Dm(t,e,n,r,s){switch(e.type){case"RECEIVE_EVENTS":return Cm(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,s);case"RESET_RAW_EVENTS":return xm(t,n[e.sourceId],e.rawEvents,r.activeRange,s);case"ADD_EVENTS":return Tm(t,e.eventStore,r?r.activeRange:null,s);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return Lr(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ae(t,r.activeRange,s):t;case"REMOVE_EVENTS":return eg(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return go(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return bn(t,i=>!i.sourceId);case"REMOVE_ALL_EVENTS":return ge();default:return t}}function Cm(t,e,n,r,s,i){if(e&&n===e.latestFetchId){let a=wt(ho(s,e,i),e,i);return r&&(a=Ae(a,r,i)),Lr(go(t,e.sourceId),a)}return t}function xm(t,e,n,r,s){const{defIdMap:i,instanceIdMap:a}=Mm(t);let o=wt(ho(n,e,s),e,s,!1,i,a);return Ae(o,r,s)}function ho(t,e,n){let r=n.options.eventDataTransform,s=e?e.eventDataTransform:null;return s&&(t=Vs(t,s)),r&&(t=Vs(t,r)),t}function Vs(t,e){let n;if(!e)n=t;else{n=[];for(let r of t){let s=e(r);s?n.push(s):s==null&&n.push(r)}}return n}function Tm(t,e,n,r){return n&&(e=Ae(e,n,r)),Lr(t,e)}function zs(t,e,n){let{defs:r}=t,s=_e(t.instances,i=>r[i.defId].allDay?i:{...i,range:{start:n.createMarker(e.toDate(i.range.start)),end:n.createMarker(e.toDate(i.range.end))}});return{defs:r,instances:s}}function go(t,e){return bn(t,n=>n.sourceId!==e)}function Rm(t,e){return{defs:t.defs,instances:je(t.instances,n=>!e[n.instanceId])}}function Mm(t){const{defs:e,instances:n}=t,r={},s={};for(let i in e){const a=e[i],{publicId:o}=a;o&&(r[o]=i)}for(let i in n){const a=n[i],o=e[a.defId],{publicId:l}=o;l&&(s[l]=i)}return{defIdMap:r,instanceIdMap:s}}class lt{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function Im(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function Vr(t){return{[t.component.uid]:t}}const rr={};class Tt{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){Nm(this.handlers,e,n)}off(e,n){km(this.handlers,e,n)}trigger(e,...n){let r=this.handlers[e]||[],s=this.options&&this.options[e],i=[].concat(s||[],r);for(let a of i)a.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function Nm(t,e,n){(t[e]||(t[e]=[])).push(n)}function km(t,e,n){n?t[e]&&(t[e]=t[e].filter(r=>r!==n)):delete t[e]}function Pm(t){return{name:t.name,premiumReleaseDate:t.premiumReleaseDate?new Date(t.premiumReleaseDate):void 0,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||[],eventSourceDefs:t.eventSourceDefs||[],cmdFormatter:t.cmdFormatter,recurringTypes:t.recurringTypes||[],initialView:t.initialView||"",elementDraggingImpl:t.elementDraggingImpl,optionChangeHandlers:t.optionChangeHandlers||{},scrollerSyncerClass:t.scrollerSyncerClass||null,listenerRefiners:t.listenerRefiners||{},optionRefiners:t.optionRefiners||{},optionDefaults:t.optionDefaults?[t.optionDefaults]:[],propSetHandlers:t.propSetHandlers||{}}}function Hm(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:[],eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollerSyncerClass:null,listenerRefiners:{},optionRefiners:{},optionDefaults:[],propSetHandlers:{}};function s(i){for(let a of i){const{name:o}=a;if(!o)throw new Error("Plugin must specify a name");if(!n[o]){const l=n[o]=Pm(a);r=Om(r,l),s(a.deps||[])}}}return t&&s(t),s(e),r}function jm(){let t=[],e=[],n;return(r,s)=>((!n||!St(r,t)||!St(s,e))&&(n=Hm(r,s)),t=r,e=s,n)}function Om(t,e){return{premiumReleaseDate:Am(t.premiumReleaseDate,e.premiumReleaseDate),reducers:t.reducers.concat(e.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:t.contextInit.concat(e.contextInit),eventRefiners:{...t.eventRefiners,...e.eventRefiners},eventDefMemberAdders:t.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:{...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:kg(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),eventSourceDefs:t.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(e.recurringTypes),initialView:t.initialView||e.initialView,elementDraggingImpl:t.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:{...t.optionChangeHandlers,...e.optionChangeHandlers},scrollerSyncerClass:t.scrollerSyncerClass||e.scrollerSyncerClass,listenerRefiners:{...t.listenerRefiners,...e.listenerRefiners},optionRefiners:{...t.optionRefiners,...e.optionRefiners},optionDefaults:t.optionDefaults.concat(e.optionDefaults),propSetHandlers:{...t.propSetHandlers,...e.propSetHandlers}}}function Am(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}function Lm(t,e){let n={},r;for(r in t)sr(r,n,t,e);for(r in e)sr(r,n,t,e);return n}function sr(t,e,n,r){if(e[t])return e[t];let s=_m(t,e,n,r);return s&&(e[t]=s),s}function _m(t,e,n,r){let s=n[t],i=r[t],a=u=>s&&s[u]!==null?s[u]:i&&i[u]!==null?i[u]:null,o=a("component"),l=a("superType"),c=null;if(l){if(l===t)throw new Error("Can't have a custom view type that references itself");c=sr(l,e,n,r)}return!o&&c&&(o=c.component),o?{type:t,component:o,defaults:pe(c?c.defaults:{},s?s.rawOptions:{}),overrides:pe(c?c.overrides:{},i?i.rawOptions:{})}:null}function Gs(t){return _e(t,Um)}function Um(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=Ys(e.content):n&&!(n.prototype instanceof $)&&(n=Ys(n)),{superType:e.type,component:n,rawOptions:e}}function Ys(t){return e=>d.jsx(ot.Consumer,{children:n=>{const{options:r,viewSpec:s}=n,i={...e,nextDayThreshold:r.nextDayThreshold,...at(r),options:{headerToolbar:r.headerToolbar,footerToolbar:r.footerToolbar},isHeightAuto:xe(r),view:n.viewApi};return d.jsx(te,{tag:"div",className:N(I(r.viewClass,i),I(s.optionDefaults.class,i),I(s.optionDefaults.className,i),I(s.optionOverrides.class,i),I(s.optionOverrides.className,i)),renderProps:i,generatorName:void 0,customGenerator:t,didMount:r.didMount||r.viewDidMount,willUnmount:r.willUnmount||r.viewWillUnmount})}})}function Bm(t,e,n){let r=Gs(t),s=Gs(e.views),i=Lm(r,s);return _e(i,a=>Wm(a,s,e,n))}function Wm(t,e,n,r){let s=t.overrides.duration||t.defaults.duration||r.duration||n.duration,i=null,a="",o="",l={};if(s&&(i=Fm(s),i)){let c=Kn(i);a=c.unit,c.value===1&&(o=a,l=e[a]?e[a].rawOptions:{})}return{type:t.type,component:t.component,duration:i,durationUnit:a,singleUnit:o,optionDefaults:t.defaults,optionOverrides:{...l,...t.overrides}}}let $s={};function Fm(t){let e=JSON.stringify(t),n=$s[e];return n===void 0&&(n=_(t),$s[e]=n),n}function Vm(t,e){return e.type==="CHANGE_VIEW_TYPE"&&(t=e.viewType),t}function zm(t,e){return e.type==="CHANGE_DATE"?e.dateMarker:t}function Gm(t,e,n){let r=t.initialDate;return r!=null?e.createMarker(r):n.getDateMarker()}function Ym(t,e){return e.type==="SET_OPTION"?{...t,[e.optionName]:e.rawOptionValue}:t}function $m(t,e,n,r,s){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return s.build(e.dateMarker||n,r);case"CHANGE_DATE":return s.build(e.dateMarker,r);case"PREV":if(i=s.buildPrev(t,n,r),i.isValid)return i;break;case"NEXT":if(i=s.buildNext(t,n,r),i.isValid)return i;break}return t}function Zm(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function qm(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function Xm(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 Km(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 Qm(t,e,n){let r=t.headerToolbar?Zs(t.headerToolbar,t,e,n):null,s=t.footerToolbar?Zs(t.footerToolbar,t,e,n):null;return{header:r,footer:s}}function Zs(t,e,n,r){let s=e.direction==="rtl",i=[],a=!1;function o(c){let u=Jm(c,e,n,r);return i.push(...u.viewsWithButtons),a=a||u.hasTitle,u.widgets}return{sectionWidgets:{start:o(t[s?"right":"left"]||t.start||""),center:o(t.center||""),end:o(t[s?"left":"right"]||t.end||"")},viewsWithButtons:i,hasTitle:a}}function Jm(t,e,n,r){let s=e.buttons||{},i=e.toolbarElements||{},a=t?t.split(" "):[],o=[],l=!1;return{widgets:a.map(u=>u.split(",").map(f=>{if(f==="title")return l=!0,{name:f};if(i[f])return{name:f,customElement:i[f]};let h,g=s[f]||{},p,m,E;if(h=n[f]){o.push(f);const w=h.optionDefaults.buttonTextKey;p=g.text||(w?e[w]:"")||(h.singleUnit?e[h.singleUnit+"TextLong"]||e[h.singleUnit+"Text"]:"")||f,m=de(g.hint||e.viewHint,[p,f],p),E=D=>{g?.click?.(D),D.defaultPrevented||r.changeView(f)}}else p=g.text||e[f+"TextLong"]||e[f+"Text"]||f,f==="prevYear"?m=de(g.hint||e.prevHint,[e.yearText,"year"],p):f==="nextYear"?m=de(g.hint||e.nextHint,[e.yearText,"year"],p):m=w=>de(g.hint||e[f+"Hint"],[e[w+"TextLong"]||e[w+"Text"],w],p),E=w=>{g?.click?.(w),w.defaultPrevented||r[f]?.()};return{name:f,isView:!!h,buttonText:p,buttonHint:m,buttonDisplay:g.display,buttonIconClass:g.iconClass,buttonIconContent:g.iconContent,buttonClick:E,buttonIsPrimary:g.isPrimary||!1,buttonClass:g.class??g.className,buttonDidMount:g.didMount,buttonWillUnmount:g.willUnmount}})),viewsWithButtons:o,hasTitle:l}}class ep{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]}}const tp={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",className:"",groupId:"_businessHours"};function np(t,e){return wt(rp(t),null,e)}function rp(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=>({...tp,...n})),e}function sp(t,e,n){let r;/^(year|month)$/.test(t.currentRangeUnit)?r=t.currentRange:r=t.activeRange;let s;const i={isEndExclusive:t.isRangeAllDay};return e.titleFormat?s=n.formatRangeToParts(r.start,r.end,Y(e.titleFormat),i):(s=n.formatRangeToParts(r.start,r.end,Y(qs(t,e.disallowAmbigTitle,"long")),i),ip(s)&&(s=n.formatRangeToParts(r.start,r.end,Y(qs(t,e.disallowAmbigTitle,"short")),i))),ie(s)}function qs(t,e,n){const{currentRangeUnit:r}=t;if(r==="year")return{year:"numeric"};if(r==="month")return{year:"numeric",month:n};if(!e){const s=yt(t.currentRange.start,t.currentRange.end);if(s!==null&&s>1)return{year:"numeric",month:n}}return{year:"numeric",month:"long",day:"numeric"}}function ip(t){let e=!1,n=!1;for(const r of t)r.type==="month"&&(r.source==="startRange"&&(e=!0),r.source==="endRange"&&(n=!0));return e&&n}class Xs{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 s of this.resetListeners.values())s()}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 ap{constructor(e){this.computeCurrentViewData=L(this._computeCurrentViewData),this.organizeRawLocales=L(Lg),this.buildLocale=L(Xa),this.buildPluginHooks=jm(),this.buildDateEnv=L(op),this.parseToolbars=L(Qm),this.buildViewSpecs=L(Bm),this.buildDateProfileGenerator=ht(lp),this.buildViewApi=L(cp),this.buildViewUiProps=ht(fp),this.buildEventUiBySource=L(dp,Oe),this.buildEventUiBases=L(up),this.parseContextBusinessHours=ht(hp),this.buildToolbarProps=L(gp),this.buildTitle=L(sp),this.nowManager=new Xs,this.isDrainingActionQueue=!1,this.actionQueue=[],this.optionOverrides={},this.emitter=new Tt,this.currentCalendarOptionsRefiners={},this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.handleNowChange=()=>{this.dispatch({type:"UPDATE_NOW"})},this.dispatch=n=>{this.actionQueue.push(n),this.isDrainingActionQueue||this.drainActionQueue()},this.config=e,this.nowManager=new Xs,this.nowTimer=new lo(this.handleNowChange)}destroy(){this.nowTimer.destroy()}update(e){return this.optionOverrides=e,this.actionQueue.push({type:"IDLE"}),this.drainActionQueue(),this.data}resetOptions(e,n){n===void 0?this.optionOverrides=e:(this.optionOverrides={...this.optionOverrides,...e},this.optionsForRefining.push(...n)),this.dispatch({type:"RESET_OPTIONS"})}drainActionQueue(){let e,{state:n,data:r}=this;const s=!n,{actionQueue:i}=this,a=[];for(this.isDrainingActionQueue=!0;i.length;){const o=i.shift();({state:n,data:r,calendarContext:e}=this.reduce(n,r,o)),this.state=n,this.data=r,o.type!=="IDLE"&&a.push(o)}if(this.isDrainingActionQueue=!1,s){const o=e.options.controller;o&&o._setApi(this.config.calendarApi)}if(!s&&a.length){const{onDataChange:o}=this.config;o&&o(this.data,a)}}reduce(e,n,r){let{config:s}=this,i=!e,a=i?{}:Ym(e.dynamicOptionOverrides,r),o=this.computeOptionsData(this.optionOverrides,a,s.calendarApi),l=i?o.calendarOptions.initialView||o.pluginHooks.initialView:Vm(e.currentViewType,r),c=this.computeCurrentViewData(l,o,this.optionOverrides,a);s.calendarApi.currentDataManager=this,this.emitter.setThisContext(s.calendarApi),this.emitter.setOptions(c.options);let u={nowManager:this.nowManager,dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:s.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},{nowDate:f}=this.nowTimer.update({unit:"day",unitValue:1,nowIndicatorSnap:"auto",nowManager:this.nowManager,dateEnv:o.dateEnv}),h=i?Gm(o.calendarOptions,o.dateEnv,this.nowManager):zm(e.currentDate,r),g;i?g=c.dateProfileGenerator.build(h,f):(g=e.dateProfile,n&&n.dateProfileGenerator!==c.dateProfileGenerator&&(g=c.dateProfileGenerator.build(h,f)),g=$m(g,r,h,f,c.dateProfileGenerator)),(r&&(r.type==="PREV"||r.type==="NEXT")||!Ie(g.activeRange,h))&&(h=g.currentRange.start);let p=i?tm(o.calendarOptions,g,u):nm(e.eventSources,r,g,u),m=i?ge():Dm(e.eventStore,r,p,g,u),E=eo(p),w=i?ge():E&&!c.options.progressiveEventRendering&&e.renderableEventStore||m,{eventUiSingleBase:D,selectionConfig:x}=this.buildViewUiProps(u),C=this.buildEventUiBySource(p),R=i?{}:this.buildEventUiBases(w.defs,D,C),b={dynamicOptionOverrides:a,currentViewType:l,currentDate:h,dateProfile:g,eventSources:p,eventStore:m,renderableEventStore:w,selectionConfig:x,eventUiBases:R,businessHours:this.parseContextBusinessHours(u),dateSelection:i?null:Zm(e.dateSelection,r),eventSelection:i?"":qm(e.eventSelection,r),eventDrag:i?null:Xm(e.eventDrag,r),eventResize:i?null:Km(e.eventResize,r),nowDate:f},M={...u,...b};for(let Q of o.pluginHooks.reducers)Object.assign(b,Q(e,r,M));let P=e?Ks(e,u):!1,k=Ks(b,u);!P&&k?this.emitter.trigger("loading",!0):P&&!k&&this.emitter.trigger("loading",!1);let O=this.buildTitle(g,c.options,o.dateEnv),q=this.buildToolbarProps(c.viewSpec,g,c.dateProfileGenerator,h,f,O),B={viewTitle:O,nowManager:this.nowManager,calendarApi:s.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData,toolbarProps:q,...o,...c,...b},W=o.pluginHooks.optionChangeHandlers,X=n&&n.calendarOptions,ne=o.calendarOptions;if(X&&X!==ne){X.timeZone!==ne.timeZone&&(b.eventSources=B.eventSources=rm(B.eventSources,g,B),b.eventStore=B.eventStore=zs(B.eventStore,n.dateEnv,B.dateEnv),b.renderableEventStore=B.renderableEventStore=zs(B.renderableEventStore,n.dateEnv,B.dateEnv));for(let Q in W)(this.optionsForHandling.indexOf(Q)!==-1||X[Q]!==ne[Q])&&W[Q](ne[Q],B)}return this.optionsForHandling=[],{state:b,data:B,calendarContext:u}}computeOptionsData(e,n,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:s,pluginHooks:i,localeDefaults:a,availableLocaleData:o}=this.processRawCalendarOptions(e,n),l=this.buildDateEnv(s.timeZone,s.locale,s.weekNumberCalculation,s.firstDay,s.weekTextLong,s.weekTextShort,i,o),c=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides),u=this.parseToolbars(s,c,r);return this.stableCalendarOptionsData={calendarOptions:s,pluginHooks:i,dateEnv:l,viewSpecs:c,toolbarConfig:u,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,n){let{locales:r,locale:s}=pe(Un,e,n),i=this.organizeRawLocales(r),a=i.map,o=this.buildLocale(s||i.defaultCode,a).options,l=this.buildPluginHooks(e.plugins||[],hm),c=this.currentCalendarOptionsRefiners={...Os,...As,...Ls,...l.listenerRefiners,...l.optionRefiners},u=pe(Un,...l.optionDefaults,o,Js(pe(e,n),c)),f={},h=this.currentCalendarOptionsInput,g=this.currentCalendarOptionsRefined,p=!1;for(let m in u)this.optionsForRefining.indexOf(m)===-1&&(u[m]===h[m]||Ve[m]&&m in h&&Ve[m](h[m],u[m])||nr(h[m],u[m]))?f[m]=g[m]:c[m]&&(f[m]=c[m](u[m],m),p=!0);return p&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=f,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:l,availableLocaleData:i,localeDefaults:o}}_computeCurrentViewData(e,n,r,s){let i=n.viewSpecs[e];if(!i)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a}=this.processRawViewOptions(i,n.pluginHooks,n.localeDefaults,r,s);this.nowManager.handleInput(n.dateEnv,a.now);let o=this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.config.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),l=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:i,options:a,dateProfileGenerator:o,viewApi:l}}processRawViewOptions(e,n,r,s,i){let a={...Os,...As,...Ls,...Xh,...n.listenerRefiners,...n.optionRefiners},o=pe(Un,...n.optionDefaults,e.optionDefaults,r,Js(pe(s,e.optionOverrides,i),a)),l={},c=this.currentViewOptionsInput,u=this.currentViewOptionsRefined,f=!1;for(let h in o)o[h]===c[h]||Ve[h]&&Ve[h](o[h],c[h])||nr(c[h],o[h])?l[h]=u[h]:(o[h]===this.currentCalendarOptionsInput[h]||Ve[h]&&Ve[h](o[h],this.currentCalendarOptionsInput[h])?h in this.currentCalendarOptionsRefined&&(l[h]=this.currentCalendarOptionsRefined[h]):a[h]&&(l[h]=a[h](o[h],h)),f=!0);return f&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined}}}function op(t,e,n,r,s,i,a,o){let l=Xa(e||o.defaultCode,o.map);return new Sh({calendarSystem:"gregory",timeZone:t,locale:l,weekNumberCalculation:n,firstDay:r,weekTextLong:s,weekTextShort:i,cmdFormatter:a.cmdFormatter})}function lp(t){let e=t.dateProfileGeneratorClass||co;return new e(t)}function cp(t,e,n){return new ep(t,e,n)}function dp(t){return _e(t,e=>e.ui)}function up(t,e,n){let r={"":e};for(let s in t){let i=t[s];i.sourceId&&n[i.sourceId]&&(r[s]=n[i.sourceId])}return r}function fp(t){const{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},t),selectionConfig:Kt({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function Ks(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function hp(t){return np(t.options.businessHours,t)}const Qs={};function Js(t,e){const n={};for(const r in t)e[r]?n[r]=t[r]:Qs[r]||(Ce(`Unknown option \`${r}\`.`),Qs[r]=!0);return n}function gp(t,e,n,r,s,i){let a=n.build(s,s,void 0,!1),o=n.buildPrev(e,r,s,!1),l=n.buildNext(e,r,s,!1);return{title:i,selectedButton:t.type,navUnit:t.singleUnit,isTodayEnabled:a.isValid&&!Ie(e.currentRange,s),isPrevEnabled:o.isValid,isNextEnabled:l.isValid}}class mp{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}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):Ce(`Unknown listener \`${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(),s;n=n||"day",s=r.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),s?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:s.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:r}=this.getCurrentData(),s=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),i,a;for(let o in n)s.push(o);for(i=0;i<s.length;i+=1)if(a=n[s[i]],a&&a.singleUnit===e)return a;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=_(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 ie(r.formatToParts(r.createMarker(e),Y(n)))}formatRange(e,n,r){let{dateEnv:s}=this.getCurrentData();return ie(s.formatRangeToParts(s.createMarker(e),s.createMarker(n),Y(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 s=this.getCurrentData(),i=cg(r,s.dateEnv,_({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Ga(i,null,s))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),mg(e,n))}addEvent(e,n){if(e instanceof z){let a=e._def,o=e._instance;return this.getCurrentData().eventStore.defs[a.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Jn({def:a,instance:o})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),s;if(n instanceof ze)s=n.internalEventSource;else if(typeof n=="boolean")n&&([s]=Aa(r.eventSources));else if(n!=null){let a=this.getEventSourceById(n);if(!a)return Ce(`Unknown event source ID \`${n}\`.`),null;s=a.internalEventSource}let i=Wa(e,s,r,!1);if(i){let a=new z(r,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Jn(i)}),this.triggerEventAdd(a),a}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:Ya(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:r,instances:s}=n.eventStore;e=String(e);for(let i in r){let a=r[i];if(a.publicId===e){if(a.recurringDef)return new z(n,a,null);for(let o in s){let l=s[o];if(l.defId===a.defId)return new z(n,a,l)}}}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 s in n)r.push(new ze(e,n[s]));return r}getEventSourceById(e){let n=this.getCurrentData(),r=n.eventSources;e=String(e);for(let s in r)if(r[s].publicId===e)return new ze(n,r[s]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof ze)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=Qa(e,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new ze(n,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=_(e);n&&this.trigger("_timeScrollRequest",n)}getButtonState(){const e=this.getCurrentData(),{toolbarProps:n}=e,r=e.calendarOptions,s=r.buttons||{},i=e.viewSpecs,a=e.viewSpec.singleUnit,o=[a?ei(a,r):"",a],l={today:{text:r.todayText,hint:de(r.todayHint,o,r.todayText),isDisabled:!n.isTodayEnabled},prev:{text:r.prevText,hint:de(r.prevHint,o,r.prevText),isDisabled:!n.isPrevEnabled},next:{text:r.nextText,hint:de(r.nextHint,o,r.nextText),isDisabled:!n.isNextEnabled},prevYear:{text:r.prevYearText,hint:de(r.prevHint,[r.yearText,"year"],r.prevYearText),isDisabled:!1},nextYear:{text:r.prevYearText,hint:de(r.nextHint,[r.yearText,"year"],r.nextYearText),isDisabled:!1}};for(const c in i){const u=i[c],{singleUnit:f}=u,h=u.optionDefaults.buttonTextKey,g=s[c]?.text||(h?r[h]:"")||(f?ei(f,r):"")||c,p=de(r.viewHint,[g,c],g);l[c]={text:g,hint:p}}return l}}function ei(t,e){return e[t+"TextLong"]||e[t+"Text"]}class pp extends S.Component{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{pt.flushSync(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{pt.flushSync(()=>{this.setState({forPrint:!1})})}}render(){return this.props?.children(this.state.forPrint)}componentDidMount(){const{props:e}=this,{emitter:n}=e;n.on("_beforeprint",this.handleBeforePrint),n.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){const{props:e}=this,{emitter:n}=e;n.off("_beforeprint",this.handleBeforePrint),n.off("_afterprint",this.handleAfterPrint)}}function vp(t,e){let n=t.borderlessX??t.borderless,r=t.borderlessTop??t.borderless,s=t.borderlessBottom??t.borderless;const i={borderlessX:!!n,borderlessTop:!!r,borderlessBottom:!!s};return N(I(t.class,i),I(t.className,i),v.borderBoxRoot,v.isolate,v.flexCol,e?v.calendarPrintRoot:v.calendarScreenRoot)}class yp extends ${render(){const{contentGenerator:e,className:n}=this.props;if(e)return d.jsx(te,{tag:"span",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:{},generatorName:void 0,customGenerator:e});if(n!==void 0)return d.jsx("span",{"aria-hidden":!0,className:n})}}class Ep extends ${render(){let{props:e}=this,{options:n}=this.context,r=e.widgetGroups.map(s=>this.renderWidgetGroup(s));return S.createElement("div",{className:I(n.toolbarSectionClass,{name:e.name})},...r)}renderWidgetGroup(e){let{props:n,context:r}=this,{options:s}=r,i=[],a=!0,o=!0;for(const l of e){const{name:c,isView:u}=l;c==="title"?a=!1:u||(o=!1)}for(let l of e){let{name:c,customElement:u,buttonHint:f}=l;if(c==="title")i.push(d.jsx("div",{role:"heading","aria-level":s.headingLevel,id:n.titleId,className:N(s.toolbarTitleClass),children:n.title}));else if(u)i.push(d.jsx(te,{tag:"span",style:{display:"contents"},renderProps:{},generatorName:void 0,customGenerator:u}));else{let h=c===n.selectedButton,g=!n.isTodayEnabled&&c==="today"||!n.isPrevEnabled&&c==="prev"||!n.isNextEnabled&&c==="next",p=l.buttonDisplay??s.buttonDisplay;p==="auto"&&(p=l.buttonIconContent||l.buttonIconClass?"icon":"text");let m;p!=="text"&&(m=d.jsx(yp,{className:l.buttonIconClass,contentGenerator:l.buttonIconContent}));let E=e.length>1&&a,w=E?{hasSelection:o}:null,D={name:c,text:l.buttonText,isPrimary:l.buttonIsPrimary,isSelected:h,isDisabled:g,isIconOnly:p==="icon",buttonGroup:w};i.push(d.jsx(te,{tag:"button",attrs:{type:"button",disabled:g,...a&&o?{role:"tab","aria-selected":h}:{"aria-pressed":h},"aria-label":typeof f=="function"?f(n.navUnit):f,onClick:l.buttonClick},className:N(I(s.buttonClass,D),!g&&v.cursorPointer,E&&N(h?v.z1:v.z0,v.focusZ2)),renderProps:D,generatorName:void 0,classNameGenerator:l.buttonClass,didMount:l.buttonDidMount,willUnmount:l.buttonWillUnmount,children:()=>p==="text"?l.buttonText:p==="icon"?m:p==="icon-text"?d.jsxs(d.Fragment,{children:[m,l.buttonText]}):d.jsxs(d.Fragment,{children:[l.buttonText,m]})}))}}return i.length>1?S.createElement("div",{role:a&&o?"tablist":void 0,"aria-label":a&&o?s.viewChangeHint:void 0,className:N(I(s.buttonGroupClass,{hasSelection:o}),v.isolate)},...i):i[0]}}class ti extends ${render(){let{props:e}=this,n=this.context.options,{sectionWidgets:r}=e.model;const{borderlessX:s,borderlessTop:i,borderlessBottom:a}=at(n),o=e.isHeader?n.headerToolbarClass:n.footerToolbarClass;return d.jsxs("div",{className:N(I(o,{borderlessX:s,borderlessTop:i,borderlessBottom:a}),I(n.toolbarClass,{borderlessX:s,borderlessTop:i,borderlessBottom:a})),children:[this.renderSection("start",r.start),this.renderSection("center",r.center),this.renderSection("end",r.end)]})}renderSection(e,n){let{props:r}=this;return d.jsx(Ep,{name:e,widgetGroups:n,title:r.title,titleId:r.titleId,navUnit:r.navUnit,selectedButton:r.selectedButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled},e)}}class bp extends lt{constructor(e){super(e),this.handleSegClick=(n,r)=>{let{component:s}=this,{context:i}=s,a=et(r);a&&s.isValidSegDownEl(n.target)&&i.emitter.trigger("eventClick",{el:r,event:new z(s.context,a.def,a.instance),jsEvent:n,view:i.viewApi})},this.destroy=Ha(e.el,"click",`.${v.internalEvent}`,this.handleSegClick)}}class Sp extends lt{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{et(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=jh(e.el,`.${v.internalEvent}`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,r){let{component:s}=this,{context:i}=s,a=et(r);(!n||s.isValidSegDownEl(n.target))&&i.emitter.trigger(e,{el:r,event:new z(i,a.def,a.instance),jsEvent:n,view:i.viewApi})}}class wp extends Ue{constructor(){super(...arguments),this.buildViewContext=L(gm),this.buildViewPropTransformers=L(Dp),this.interactionsStore={},this.calendarInteractions=[],this.registerInteractiveComponent=(e,n)=>{let r=Im(e,n),i=[bp,Sp];n.disableHits||(i=i.concat(this.props.pluginHooks.componentInteractions));let a=i.map(o=>new o(r));this.interactionsStore[e.uid]=a,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]}}get viewTitleId(){return this.props.baseId+"title"}render(){const{props:e}=this;let{toolbarConfig:n,options:r}=e,s,i=!1,a;e.forPrint||xe(r)||(r.height!=null?i=!0:r.contentHeight!=null?s=r.contentHeight:a=Math.max(r.aspectRatio,.5));let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,e.baseId,this.registerInteractiveComponent,this.unregisterInteractiveComponent);return d.jsxs(ot.Provider,{value:o,children:[n.header&&d.jsx(ti,{model:n.header,isHeader:!0,titleId:this.viewTitleId,...e.toolbarProps}),d.jsxs("div",{className:N(v.flexCol,v.rel,v.overflowAnchorNone,v.minHeight0,i&&v.liquid),style:{height:s,aspectRatio:a!=null?String(a):void 0},children:[this.renderView(N((i||s)&&v.liquid,a!=null&&v.fill,v.internalView)),this.buildAppendContent()]}),n.footer&&d.jsx(ti,{model:n.footer,isHeader:!1,...e.toolbarProps})]})}renderView(e){const{props:n}=this,{pluginHooks:r,viewSpec:s,toolbarConfig:i,toolbarProps:a}=n;let o={className:e,dateProfile:n.dateProfile,businessHours:n.businessHours,eventStore:n.renderableEventStore,eventUiBases:n.eventUiBases,dateSelection:n.dateSelection,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,forPrint:n.forPrint,labelId:i.header&&i.header.hasTitle?this.viewTitleId:void 0,labelStr:i.header&&i.header.hasTitle?void 0:a.title},l=this.buildViewPropTransformers(r.viewPropsTransformers),c={...n,toolbarProps:a,forPrint:n.forPrint};for(let f of l)Object.assign(o,f.transform(o,c));let u=s.component;return d.jsx(u,{...o})}buildAppendContent(){const{props:e}=this;return d.jsx(d.Fragment,{children:e.pluginHooks.viewContainerAppends.map((n,r)=>d.jsx(S.Fragment,{children:n(e)},r))})}componentDidMount(){const{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e));let{propSetHandlers:n}=e.pluginHooks;for(let r in n)n[r](e[r],e);for(let r of e.pluginHooks.contextInit)r(e)}componentDidUpdate(e){const{props:n}=this;let{propSetHandlers:r}=n.pluginHooks;for(let s in r)n[s]!==e[s]&&r[s](n[s],n)}componentWillUnmount(){const{props:e}=this;for(let n of this.calendarInteractions)n.destroy();this.calendarInteractions=[],e.emitter.trigger("_unmount")}}function Dp(t){return t.map(e=>new e)}const Cp=S.forwardRef((t,e)=>{const n=Rp(t.id),[r,s]=S.useState("");function i(c,u){(xp(u)?pt.flushSync:Tp)(()=>{s(Ee())})}const[a]=S.useState(()=>new mp),[o]=S.useState(()=>new ap({calendarApi:a,onDataChange:i}));S.useEffect(()=>()=>{o.destroy()},[]),S.useImperativeHandle(e,()=>({getApi:()=>a}),[]);const l=o.update(t);return d.jsx(pp,{emitter:l.emitter,children:c=>{const u=l.calendarOptions,f=u.direction==="rtl",h=vp(u,c);return d.jsx("div",{dir:f?"rtl":void 0,className:h,style:{height:u.height},"data-color-scheme":u.colorScheme||void 0,children:d.jsx(wp,{...l,baseId:n,forPrint:c})})}})});function xp(t){for(const e of t)if(e.type==="SET_EVENT_DRAG"||e.type==="UNSET_EVENT_DRAG"||e.type==="SET_EVENT_RESIZE"||e.type==="UNSET_EVENT_RESIZE"||e.type==="MERGE_EVENTS")return!0;return!1}function Tp(t){t()}let ni=!1;function Rp(t){if(ss.useId)return ss.useId();const[e]=S.useState(()=>Ee());return t?t+":":(ni||(ni=!0,Ce("Missing `id` prop. Provide one for better SSR support in React 17.")),`fc:${e}:`)}function mo(t){const e=t.getRootNode();return e instanceof Document?e.body||e.documentElement:e}function Dt(t){return getComputedStyle(t).direction==="rtl"}const Mp=/(top|left|right|bottom|width|height)$/i;function Ft(t,e){for(let n in e)Ip(t,n,e[n])}function Ip(t,e,n){n==null?t.style[e]="":typeof n=="number"&&Mp.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function po(t){return t.composedPath?.()[0]??t.target}class vo extends S.Component{constructor(e,n){super(e,n),this.handleChange=()=>{this.forceUpdate()},this.runner=new lo(this.handleChange)}render(){const{props:e,context:n}=this,{nowDate:r,todayRange:s}=this.runner.update({nowManager:n.nowManager,unit:e.unit,unitValue:e.unitValue,nowIndicatorSnap:n.options.nowIndicatorSnap,dateEnv:n.dateEnv});return e.children(r,s)}componentWillUnmount(){this.runner.destroy()}}vo.contextType=ot;const Np=Y({year:"numeric",month:"long",day:"numeric"}),kp=Y({week:"long"}),Pp=Y({weekday:"long"});function en(t){for(const e of t)if(e.type==="weekday")return e.value;return""}function tn(t){for(const e of t)if(e.type==="day")return e.value;return""}function yo(t){for(const e of t)if(e.type==="month")return e.value;return""}function Sn(t,e,n="day"){return ie(t.dateEnv.formatToParts(e,n==="week"?kp:Np))}function zr(t,e,n="day",r=Sn(t,e,n),s=!0){const{dateEnv:i,options:a,calendarApi:o}=t,l=i.toDate(e),c=u=>{let f=n==="day"?a.navLinkDayClick:n==="week"?a.navLinkWeekClick:null;typeof f=="function"?f.call(o,i.toDate(e),u):(typeof f=="string"&&(n=f),o.zoomTo(e,n))};return{role:"link","aria-label":de(a.navLinkHint,[r,l],r),className:N(a.navLinkClass,v.cursorPointer,v.internalNavLink),...s?Nr(c):{onClick:c}}}function Gr(t,e,n,r,s){const i=!!(n&&(!n.activeRange||!Ie(n.activeRange,t)));return{date:e.toDate(t),dow:t.getUTCDay(),isDisabled:i,isOther:!i&&!!(n&&!Ie(n.currentRange,t)),isToday:!i&&!!(r&&Ie(r,t)),isPast:!i&&!!(s?t<s:r&&t<r.start),isFuture:!i&&!!(s?t>s:r&&t>=r.end)}}function ir(t,e){return t!=null&&(t===e||Math.abs(t-e)<.01)}const Hp=!0,ar=new Map,or=new Set;let lr=!1,Bn=!1;function gt(t){or.add(t),!lr&&!Bn&&(Bn=!0,requestAnimationFrame(()=>{Bn=!1,Eo()}))}function Eo(){for(const t of or.values())t(),or.delete(t)}const Lt=typeof ResizeObserver<"u"&&new ResizeObserver(t=>{lr=!0;for(let e of t){const n=e.target,r=ar.get(n);let s,i;if(e.borderBoxSize&&Hp){const o=e.borderBoxSize[0]||e.borderBoxSize;s=o.inlineSize,i=o.blockSize}else({width:s,height:i}=n.getBoundingClientRect());let a=!1;ir(r.width,s)||(r.width=s,a=r.watchWidth),ir(r.height,i)||(r.height=i,a||(a=r.watchHeight)),a&&r.callback(s,i)}pt.flushSync(()=>{Eo(),lr=!1})});function wn(t,e,n=!0,r=!0){return ar.set(t,{callback:e,watchWidth:n,watchHeight:r}),Lt&&Lt.observe(t,{box:"border-box"}),()=>{ar.delete(t),Lt&&Lt.unobserve(t)}}function bo(t,e){return wn(t,e,!0)}function Dn(t,e){return wn(t,(n,r)=>e(r),!1,!0)}class jp extends ${constructor(){super(...arguments),this.refineRenderProps=ht(Op)}render(){const{props:e,context:n}=this,{options:r,viewSpec:s}=n,i=this.refineRenderProps({...at(r),options:{headerToolbar:r.headerToolbar,footerToolbar:r.footerToolbar},isHeightAuto:xe(r),viewApi:n.viewApi});return d.jsx(te,{elRef:e.elRef,tag:e.tag||"div",attrs:e.attrs,style:e.style,className:N(e.className,I(r.viewClass,i),I(s.optionDefaults.class,i),I(s.optionDefaults.className,i),I(s.optionOverrides.class,i),I(s.optionOverrides.className,i)),renderProps:i,generatorName:void 0,didMount:r.didMount||r.viewDidMount,willUnmount:r.willUnmount||r.viewWillUnmount,children:()=>e.children})}}function Op(t){return{view:t.viewApi,borderlessX:t.borderlessX,borderlessTop:t.borderlessTop,borderlessBottom:t.borderlessBottom,options:t.options,isHeightAuto:t.isHeightAuto}}class Cn extends ${constructor(){super(...arguments),this.uid=Ee()}prepareHits(){}queryHit(e,n,r,s,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!e.closest(`.${v.internalEventMirror}`)}isValidDateDownEl(e){return!e.closest(`.${v.internalEvent}:not(.${v.internalBgEvent})`)&&!e.closest(`.${v.internalMoreLink}`)&&!e.closest(`.${v.internalNavLink}`)&&!e.closest(`.${v.internalPopover}`)}}class ri{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()}}class Ap{constructor(e){this.el=e,this.emitter=new Tt,this.isScroll=!1,this.isScrollRecent=!1,this.isWheelRecent=!1,this.isMouseDown=!1,this.isTouchDown=!1,this.isMouse=!1,this.isTouch=!1,this.isWheel=!1,this.handleScroll=()=>{this.isScrollRecent=!0,this.isMouseDown&&(this.isMouse=!0),this.isTouchDown&&(this.isTouch=!0),this.isWheelRecent&&(this.isWheel=!0),this.startScroll(),this.emitter.trigger("scroll",this.getIsDevice()),this.scrollWaiter.request(500)},this.handleScrollWait=()=>{this.isScrollRecent=!1,this.isTouchDown||this.endScroll()},this.handleWheel=()=>{this.isWheelRecent=!0,this.wheelWaiter.request(500)},this.handleWheelWait=()=>{this.isWheelRecent=!1},this.handleMouseDown=()=>{this.isMouseDown=!0},this.handleMouseUp=()=>{this.isMouseDown=!1},this.handleTouchStart=()=>{this.isTouchDown=!0},this.handleTouchEnd=()=>{this.isTouchDown=!1,this.isScrollRecent||this.endScroll()},this.wheelWaiter=new ri(this.handleWheelWait),this.scrollWaiter=new ri(this.handleScrollWait),e.addEventListener("scroll",this.handleScroll,{passive:!0}),e.addEventListener("wheel",this.handleWheel,{passive:!0}),e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("mouseup",this.handleMouseUp),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.addEventListener("touchend",this.handleTouchEnd)}destroy(){let{el:e}=this;e.removeEventListener("scroll",this.handleScroll,{passive:!0}),e.removeEventListener("wheel",this.handleWheel,{passive:!0}),e.removeEventListener("mousedown",this.handleMouseDown),e.removeEventListener("mouseup",this.handleMouseUp),e.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.removeEventListener("touchend",this.handleTouchEnd)}startScroll(){this.isScroll||(this.isScroll=!0,this.emitter.trigger("scrollStart",this.getIsDevice()))}endScroll(){this.isScroll&&(this.scrollWaiter.clear(),this.wheelWaiter.clear(),this.isScroll=!1,this.isWheelRecent=!1,this.emitter.trigger("scrollEnd",this.getIsDevice()),this.isMouse=!1,this.isTouch=!1,this.isWheel=!1)}getIsDevice(){return this.isWheel||this.isMouse||this.isTouch}}class nn extends Cn{constructor(){super(...arguments),this.handleEl=e=>{this.el&&(this.el=null,this._isUnmounting=!0,this.listener.destroy()),e&&(this.el=e,this._isUnmounting=!1,this.listener=new Ap(e))},this.handleHRuler=e=>{this.disconnectHRuler&&(this.disconnectHRuler(),this.disconnectHRuler=void 0,this.clientWidth!==void 0&&(this.clientWidth=void 0,U(this.props.clientWidthRef,null))),e&&(this.disconnectHRuler=bo(e,n=>{this._isUnmounting||n!==this.clientWidth&&(this.clientWidth=n,U(this.props.clientWidthRef,n))}))},this.handleVRuler=e=>{this.disconnectVRuler&&(this.disconnectVRuler(),this.disconnectVRuler=void 0,this.clientHeight!==void 0&&(this.clientHeight=void 0,U(this.props.clientHeightRef,null))),e&&(this.disconnectVRuler=Dn(e,n=>{if(this._isUnmounting)return;n!==this.clientHeight&&(this.clientHeight=n,U(this.props.clientHeightRef,n));const r=Math.round(this.el.getBoundingClientRect().height-n);r!==this.bottomScrollbarWidth&&(this.bottomScrollbarWidth=r,U(this.props.bottomScrollbarWidthRef,r))}))}}render(){const{props:e}=this,n=e.horizontal||e.vertical?"hidden":"";return d.jsxs("div",{ref:this.handleEl,className:N(e.className,v.noPadding,v.rel,e.hideScrollbars&&v.noScrollbars,v.internalScroller),style:{...e.style,overflowX:e.horizontal?"auto":n,overflowY:e.vertical?"auto":n},children:[e.children,!!e.clientWidthRef&&d.jsx("div",{ref:this.handleHRuler,className:v.fillTop}),!!(e.clientHeightRef||e.bottomScrollbarWidthRef)&&d.jsx("div",{ref:this.handleVRuler,className:v.fillStart})]})}endScroll(){this.listener.endScroll()}get x(){const{el:e}=this;return e?Lp(e):0}get y(){const{el:e}=this;return e?e.scrollTop:0}scrollTo({x:e,y:n}){const{el:r}=this;r&&(n!=null&&(r.scrollTop=n),e!=null&&_p(r,e))}addScrollStartListener(e){this.listener.emitter.on("scrollStart",e)}removeScrollStartListener(e){this.listener.emitter.off("scrollStart",e)}addScrollEndListener(e){this.listener.emitter.on("scrollEnd",e)}removeScrollEndListener(e){this.listener.emitter.off("scrollEnd",e)}}function Lp(t){const{scrollLeft:e}=t;return Dt(t)?Up(e,t):e}function _p(t,e){const n=Dt(t);t.scrollLeft=n?Bp(e,t):e}function Up(t,e){switch(So()){case"positive":return e.scrollWidth-e.clientWidth-t;case"negative":return-t}return t}function Bp(t,e){switch(So()){case"positive":return e.scrollWidth-e.clientWidth-t;case"negative":return-t}return t}let si;function So(){return si||(si=Wp())}function Wp(){let t=document.createElement("div");t.style.position="absolute",t.style.top="-1000px",t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.direction="rtl";let e=document.createElement("div");e.style.width="200px",e.style.height="200px",t.appendChild(e),document.body.appendChild(t);let n;return t.scrollLeft>0?n="positive":(t.scrollLeft=50,t.scrollLeft>0?n="reverse":n="negative"),t.remove(),n}class Yr extends ${constructor(){super(...arguments),this.buildPublicEvent=L((e,n,r)=>new z(e,n,r)),this.handleEl=e=>{this.el=e,U(this.props.elRef,e),e&&Qt(e,this.props.eventRange)}}render(){const{props:e,context:n}=this,{options:r}=n,{eventRange:s}=e,i=s.ui,a=r.eventTimeFormat||e.defaultTimeFormat,o=e.forcedTimeText??wg(a,s,e.slicedStart,e.slicedEnd,e.isStart,e.isEnd,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd),[l,c,u]=xg(s,n),f=this.buildPublicEvent(n,s.def,s.instance),h=!e.disableDragging&&Sg(s,n),g=/row|column/.test(e.display),p={event:f,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1,timeText:o},m={event:f,view:n.viewApi,timeText:o,color:i.color||r.eventColor,contrastColor:i.contrastColor||r.eventContrastColor,isDraggable:h,isStartResizable:!e.disableResizing&&e.isStart&&i.durationEditable&&r.eventResizableFromStart,isEndResizable:!e.disableResizing&&e.isEnd&&i.durationEditable,isMirror:e.isMirror,isStart:!!e.isStart,isEnd:!!e.isEnd,isFirst:!!e.isFirst,isLast:!!e.isLast,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing,isInteractive:u,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1,level:e.level||0,timeClass:N(I(r.eventTimeClass,p),g&&I(r.blockEventTimeClass,p),e.display==="row"&&I(r.rowEventTimeClass,p),e.display==="column"&&I(r.columnEventTimeClass,p),e.display==="list-item"&&I(r.listItemEventTimeClass,p)),titleClass:N(I(r.eventTitleClass,p),g&&I(r.blockEventTitleClass,p),e.display==="row"&&I(r.rowEventTitleClass,p),e.display==="column"&&I(r.columnEventTitleClass,p),e.display==="list-item"&&I(r.listItemEventTitleClass,p),e.display==="row"&&r.rowEventTitleSticky&&v.stickyS,e.display==="column"&&r.columnEventTitleSticky&&v.stickyT),options:{eventOverlap:!!r.eventOverlap}},E=N(g&&I(r.blockEventClass,m),e.display==="row"&&I(r.rowEventClass,m),e.display==="column"&&I(r.columnEventClass,m),e.display==="list-item"&&I(r.listItemEventClass,m),i.className,e.className,e.display==="column"?v.flexCol:v.flexRow,(s.def.url||h)&&v.cursorPointer,v.internalEvent,e.isMirror&&v.internalEventMirror,h&&v.internalEventDraggable,m.isSelected&&v.internalEventSelected,(m.isStartResizable||m.isEndResizable)&&v.internalEventResizable),w=N(I(r.eventBeforeClass,m),g&&I(r.blockEventBeforeClass,m),e.display==="row"&&I(r.rowEventBeforeClass,m),e.display==="column"&&I(r.columnEventBeforeClass,m),e.display==="list-item"&&I(r.listItemEventBeforeClass,m)),D=N(I(r.eventAfterClass,m),g&&I(r.blockEventAfterClass,m),e.display==="row"&&I(r.rowEventAfterClass,m),e.display==="column"&&I(r.columnEventAfterClass,m),e.display==="list-item"&&I(r.listItemEventAfterClass,m)),x=N(I(r.eventInnerClass,m),g&&I(r.blockEventInnerClass,m),e.display==="row"&&I(r.rowEventInnerClass,m),e.display==="column"&&I(r.columnEventInnerClass,m),e.display==="list-item"&&I(r.listItemEventInnerClass,m),!e.disableLiquid&&v.liquid),C=e.display==="row"&&r.rowEventBeforeContent,R=e.display==="row"&&r.rowEventAfterContent;return d.jsx(te,{tag:l,attrs:{...e.attrs,...c,dir:e.isDragging&&r.direction==="rtl"?"rtl":void 0},className:E,style:{"--fc-event-color":m.color,"--fc-event-contrast-color":m.contrastColor},elRef:this.handleEl,renderProps:m,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:Fp,classNameGenerator:r.eventClass,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount,children:b=>d.jsxs(d.Fragment,{children:[!!(m.isSelected&&g)&&d.jsx("div",{className:e.display==="column"?v.hitX:v.hitY}),(w||C)&&d.jsxs("div",{className:N(w,!e.disableZindexes&&v.z1,m.isStartResizable&&N(e.display==="column"?v.cursorResizeT:v.cursorResizeS,v.internalEventResizer,v.internalEventResizerStart)),children:[C&&d.jsx(te,{tag:"div",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:m,generatorName:void 0,customGenerator:C}),!!(m.isStartResizable&&m.isSelected)&&d.jsx("div",{className:v.hit})]}),d.jsx(b,{tag:"div",className:N(x,!e.disableZindexes&&v.z0)}),(D||R)&&d.jsxs("div",{className:N(D,!e.disableZindexes&&v.z1,m.isEndResizable&&N(e.display==="column"?v.cursorResizeB:v.cursorResizeE,v.internalEventResizer,v.internalEventResizerEnd)),children:[R&&d.jsx(te,{tag:"div",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:m,generatorName:void 0,customGenerator:R}),!!(m.isEndResizable&&m.isSelected)&&d.jsx("div",{className:v.hit})]})]})})}componentDidUpdate(e){this.el&&this.props.eventRange!==e.eventRange&&Qt(this.el,this.props.eventRange)}}Yr.addPropsEquality({seg:Oe});function Fp(t){return d.jsxs(d.Fragment,{children:[t.timeText&&d.jsx("div",{className:t.timeClass,children:t.timeText}),d.jsx("div",{className:t.titleClass,children:t.event.title||d.jsx(d.Fragment,{children:" "})})]})}function Vp(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function wo(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 zp(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 Gp(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function Yp(t,e){return{left:t.left-e.left,top:t.top-e.top}}function $p(t,e=!1){let n=window.getComputedStyle(t),r=parseInt(n.borderLeftWidth,10)||0,s=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,o=Xp(t),l=o.y-r-s,c=o.x-i-a,u={borderLeft:r,borderRight:s,borderTop:i,borderBottom:a,scrollbarBottom:c,scrollbarLeft:0,scrollbarRight:0};return n.direction==="rtl"?u.scrollbarLeft=l:u.scrollbarRight=l,e&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function Zp(t,e=!1,n){let r=$r(t),s=$p(t,e),i={left:r.left+s.borderLeft+s.scrollbarLeft,right:r.right-s.borderRight-s.scrollbarRight,top:r.top+s.borderTop,bottom:r.bottom-s.borderBottom-s.scrollbarBottom};return e&&(i.left+=s.paddingLeft,i.right-=s.paddingRight,i.top+=s.paddingTop,i.bottom-=s.paddingBottom),i}function $r(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 qp(t){let e=Do(t),n=t.getBoundingClientRect();for(let r of e){let s=wo(n,r.getBoundingClientRect());if(s)n=s;else return null}return n}function Do(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}function Xp(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}class Kp{constructor(){this.sliceBusinessHours=L(this._sliceBusinessHours),this.sliceDateSelection=L(this._sliceDateSpan),this.sliceEventStore=L(this._sliceEventStore),this.sliceEventDrag=L(this._sliceInteraction),this.sliceEventResize=L(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,r,s,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,n,r,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,r,a,s,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,r,s,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,n,r,...i),eventResize:this.sliceEventResize(e.eventResize,a,n,r,...i),eventSelection:e.eventSelection}}sliceNowDate(e,n,r,s,...i){return this._sliceDateSpan({range:{start:e,end:He(e,1)},allDay:!1},n,r,{},s,...i)}_sliceBusinessHours(e,n,r,s,...i){return e?this._sliceEventStore(Ae(e,_t(n,!!r),s),{},n,r,...i).bg:[]}_sliceEventStore(e,n,r,s,...i){if(e){let a=Bs(e,n,_t(r,!!s),s);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,r,s,...i){if(!e)return null;let a=Bs(e.mutatedEvents,n,_t(r,!!s),s);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,r,s,i,...a){if(!e)return[];let o=_t(n,!!r),l=Et(e.range,o);if(l){e={...e,range:l};let c=gg(e,s,i),u=this.sliceRange(e.range,...a);for(let f of u)f.eventRange=c;return u}return[]}sliceEventRanges(e,n){let r=[];for(let s of e)r.push(...this.sliceEventRange(s,n));return r}sliceEventRange(e,n){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:K(r.start,1)});let s=this.sliceRange(r,...n);for(let i of s)i.eventRange=e,i.isStart=e.isStart&&i.isStart,i.isEnd=e.isEnd&&i.isEnd;return s}}function _t(t,e){let n=t.activeRange;return e?n:{start:He(n.start,t.slotMinTime.milliseconds),end:He(n.end,t.slotMaxTime.milliseconds-864e5)}}class Qp extends Kp{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}const Jp=new Date(2592e5);function ev(t,e,n,r,s,i){const a=tv(t,e,n,r,s,i),o=uo(n,i.dateEnv);if(e&&o!=="day")for(const l of a.dataConfigs)fo(l.dateMarker,o,i.dateEnv)&&(l.renderProps.isMajor=!0);return[a]}function tv(t,e,n,r,s,i,a,o){return{isDateRow:!0,renderConfig:nv(s,e,i),dataConfigs:rv(t,e,n,r,s,i,a,void 0,void 0,void 0,void 0,o)}}function nv(t,e,n){const{options:r}=n;return{generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,classNameGenerator:r.dayHeaderClass,innerClassNameGenerator:r.dayHeaderInnerClass,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount,align:r.dayHeaderAlign,sticky:r._dayHeaderSticky,dayHeaderFormat:t,datesRepDistinctDays:e}}const Co=[];for(let t=0;t<7;t++)Co.push(K(new Date(2592e5),t));function rv(t,e,n,r,s,i,a=1,o="",l={},c={},u="",f){const{dateEnv:h,viewApi:g,options:p}=i;return e?t.map((m,E)=>{const w=Gr(m,h,n,r),D=f!=null,x=p.navLinks&&!w.isDisabled&&t.length>1,C={...w,...l,isMajor:D,isSticky:!1,inPopover:!1,hasNavLink:x,view:g},R=Sn(i,m);return{key:o+m.toUTCString(),dateMarker:m,renderProps:C,attrs:{"aria-label":R,...w.isToday?{"aria-current":"date"}:{},"data-date":Ir(m),...c},innerAttrs:x?zr(i,m,void 0,R):{"aria-hidden":!0},colSpan:a,hasNavLink:x,className:u}}):t.map((m,E)=>{const w=m.getUTCDay(),D=K(Jp,w),x={date:h.toDate(m),dow:w,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},C=f!=null,R={...x,date:Co[w],isMajor:C,isSticky:!1,inPopover:!1,hasNavLink:!1,view:g,...l},b=ie(h.formatToParts(D,Pp));return{key:o+String(w),dateMarker:m,renderProps:R,attrs:{"aria-label":b,...c},innerAttrs:{"aria-hidden":!0},colSpan:a,className:u}})}class Xe{constructor(e,n=!1){this.masterCallback=e,this.ignoreDeletes=n,this.rev="",this.current=new Map,this.callbacks=new Map,this.handleValue=(r,s)=>{let{current:i,callbacks:a}=this;r===null?this.ignoreDeletes||(i.delete(s),a.delete(s)):i.set(s,r),this.rev=Ee(),this.masterCallback&&this.masterCallback(r,s)}}createRef(e){let n=this.callbacks.get(e);return n||(n=r=>{this.handleValue(r,e)},this.callbacks.set(e,n)),n}}class xo extends ${constructor(){super(...arguments),this.elRef=S.createRef()}render(){return d.jsx("div",{ref:this.elRef})}componentDidMount(){this._isUnmounting=!1;const{props:e}=this,n=this.elRef.current;this.disconnectWidth=bo(n,r=>{this._isUnmounting||U(e.widthRef,r)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectWidth();const{props:e}=this;e.widthRef&&U(e.widthRef,null)}}function Me(t){return yg(t)+":"+t.start+(t.standinFor?":standin":t.isSlice?":slice":"")}function Vt(t,e){const n=[];for(let r=0;r<e;r++)n[r]=[];for(const r of t)n[r.row].push(r);return n}function ii(t,e){const n=[];if(t){for(let r=0;r<e;r++)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(const r of t.segs)n[r.row].segs.push(r)}else for(let r=0;r<e;r++)n[r]=null;return n}function ai(t,e){return{...t,start:e,end:e+1,isStart:t.isStart&&t.start===e,isEnd:t.isEnd&&t.end-1===e,standinFor:t}}class sv extends ${constructor(){super(...arguments),this.buildPublicEvent=L((e,n,r)=>new z(e,n,r)),this.handleEl=e=>{this.el=e,e&&Qt(e,this.props.eventRange)}}render(){const{props:e,context:n}=this,{eventRange:r}=e,{options:s}=n,i=r.ui,a=this.buildPublicEvent(n,r.def,r.instance),o={event:a,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1},l={event:a,view:n.viewApi,timeText:"",color:i.color||s.backgroundEventColor,contrastColor:i.contrastColor,isDraggable:!1,isStartResizable:!1,isEndResizable:!1,isMirror:!1,isStart:e.isStart,isEnd:e.isEnd,isFirst:!1,isLast:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:!1,isDragging:!1,isResizing:!1,isInteractive:!1,level:0,isNarrow:e.isNarrow||!1,isShort:e.isShort||!1,timeClass:"",titleClass:I(s.backgroundEventTitleClass,o),options:{eventOverlap:!!s.eventOverlap}},c=N(i.className,v.fill,v.internalEvent,v.internalBgEvent,e.isVertical?v.flexCol:v.flexRow),u=N(I(s.backgroundEventInnerClass,l),v.liquid);return d.jsx(te,{tag:"div",className:c,style:{"--fc-event-color":l.color,"--fc-event-contrast-color":l.contrastColor},defaultGenerator:iv,elRef:this.handleEl,renderProps:l,generatorName:"backgroundEventContent",customGenerator:s.backgroundEventContent,classNameGenerator:s.backgroundEventClass,didMount:s.backgroundEventDidMount,willUnmount:s.backgroundEventWillUnmount,children:f=>d.jsx(f,{tag:"div",className:u})})}componentDidUpdate(e){this.el&&this.props.eventRange!==e.eventRange&&Qt(this.el,this.props.eventRange)}}function iv(t){let{title:e}=t.event;return e&&d.jsx("div",{className:t.titleClass,children:t.event.title})}function av(t,e){return d.jsx("div",{className:N(t==="non-business"?e.nonBusinessHoursClass:t==="highlight"?e.highlightClass:void 0,v.fill)})}const Wn=10,ov=1;class lv extends Cn{constructor(){super(...arguments),this.getDateMeta=L(Gr),this.closeRef=S.createRef(),this.focusStartRef=S.createRef(),this.focusEndRef=S.createRef(),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)},this.handleDocumentMouseDown=e=>{const n=po(e);this.rootEl.contains(n)||this.handleClose()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleClose()},this.handleClose=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{props:e,context:n}=this,{options:r,dateEnv:s,viewApi:i}=n,{startDate:a,todayRange:o,dateProfile:l}=e,c=this.getDateMeta(a,s,l,o),u=s.formatToParts(a,r.popoverFormat),f=ie(u);const h={...c,isMajor:!1,isNarrow:!1,isSticky:!1,inPopover:!0,level:0,hasNavLink:!1,text:f,textParts:u,get weekdayText(){return en(u)},get dayNumberText(){return tn(u)},view:i},g={...c,isMajor:!1,isNarrow:!1,inPopover:!0,hasNavLink:!1,get weekdayText(){return en(u)},get dayNumberText(){return tn(u)},get monthText(){return yo(u)},view:i,text:"",textParts:[],options:{businessHours:!!r.businessHours}},p=Ir(a),{dayHeaderAlign:m}=r,E=typeof m=="function"?m({level:0,inPopover:!0,isNarrow:!1}):m,w=Dt(e.alignEl);return pt.createPortal(d.jsxs("div",{"data-date":p,id:e.id,role:"dialog","aria-labelledby":e.titleId,className:N(r.popoverClass,v.flexCol,v.popoverZ,v.abs,v.borderBoxRoot,v.internalPopover),style:{top:0,left:0},dir:w?"rtl":void 0,"data-color-scheme":r.colorScheme||void 0,ref:this.handleRootEl,children:[d.jsx("div",{tabIndex:0,style:{outline:"none"},ref:this.focusStartRef}),d.jsxs("div",{className:N(I(r.dayHeaderClass,h),v.flexCol,v.borderOnlyB,E==="center"?v.alignCenter:E==="end"?v.alignEnd:v.alignStart),children:[d.jsx("div",{children:d.jsx(te,{tag:"div",attrs:{id:e.titleId},generatorName:"dayHeaderContent",renderProps:h,customGenerator:r.dayHeaderContent,defaultGenerator:cv,classNameGenerator:r.dayHeaderInnerClass,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount})}),d.jsx(te,{tag:"button",attrs:{"aria-label":r.closeHint,...Nr(this.handleClose)},elRef:this.closeRef,className:N(r.popoverCloseClass,v.flexRow,v.cursorPointer),renderProps:{},customGenerator:r.popoverCloseContent,generatorName:"popoverCloseContent"})]}),d.jsx("div",{className:N(I(r.dayCellClass,g),v.flexCol,v.borderNone),children:d.jsx("div",{className:I(r.dayCellInnerClass,g),children:e.children})}),d.jsx("div",{tabIndex:0,style:{outline:"none"},ref:this.focusEndRef})]}),mo(e.alignEl))}queryHit(e,n,r,s,i){let{rootEl:a,props:o}=this;return n>=0&&n<s&&r>=0&&r<i?{dateProfile:o.dateProfile,dateSpan:{allDay:!o.forceTimed,range:{start:o.startDate,end:o.endDate},...o.dateSpanProps},getDayEl:()=>a,rect:{left:0,top:0,right:s,bottom:i},layer:1}:null}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.focusStartRef.current.addEventListener("focus",this.handleClose),this.focusEndRef.current.addEventListener("focus",this.handleClose),this.closeRef.current.focus({preventScroll:!0}),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.focusStartRef.current.removeEventListener("focus",this.handleClose),this.focusEndRef.current.removeEventListener("focus",this.handleClose)}updateSize(){let{alignEl:e,alignParentTop:n}=this.props,{rootEl:r}=this;const s=Dt(e),i=qp(e);if(i){let a=r.getBoundingClientRect(),o=n?e.closest(n).getBoundingClientRect().top-ov:i.top,l=s?i.right-a.width:i.left;o=Math.max(o,Wn),l=Math.min(l,document.documentElement.clientWidth-Wn-a.width),l=Math.max(l,Wn);const{offsetParent:c}=r;let u,f;if(!c||c===document.body)u=o+window.scrollY,f=l+window.scrollX;else{const h=c.getBoundingClientRect();u=o-h.top+c.scrollTop,f=l-h.left+c.scrollLeft}Ft(r,{top:u,left:f})}}}function cv(t){return t.text}function oi(t,e){const n=Math.max(t.start,e.start),r=Math.min(t.end,e.end);if(n<r)return{start:n,end:r,isStart:t.isStart&&n===t.start,isEnd:t.isEnd&&r===t.end}}function li(t){return t.end}function dv(t){return t.reduce(fv).eventRange.range.start}function uv(t){return t.reduce(hv).eventRange.range.end}function fv(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function hv(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class gv extends ${constructor(){super(...arguments),this.state={isPopoverOpen:!1},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&U(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:r}=this,{dateEnv:s,options:i}=r,{moreLinkClick:a}=i,o=ci(n).start;function l(c){let{def:u,instance:f,range:h}=c.eventRange;return{event:new z(r,u,f),start:s.toDate(h.start),end:s.toDate(h.end),isStart:c.isStart,isEnd:c.isEnd}}typeof a=="function"&&(a=a({date:s.toDate(o),allDay:!!n.allDayDate,allSegs:n.segs.map(l),hiddenSegs:n.hiddenSegs.map(l),jsEvent:e,view:r.viewApi})),!a||a==="popover"?this.setState({isPopoverOpen:!0}):typeof a=="string"&&r.calendarApi.zoomTo(o,a)},this.handlePopoverClose=()=>{this.linkEl&&this.linkEl.focus(),this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return d.jsx(ot.Consumer,{children:r=>{let{viewApi:s,options:i,calendarApi:a,baseId:o}=r,{moreLinkText:l}=i,c=e.hiddenSegs.length,u=ci(e),f=o+"popover-"+u.start.toISOString(),h=`+${c}`,g=typeof l=="function"?l.call(a,c):`${h} ${l}`,p=de(i.moreLinkHint,[c],g),m={num:c,numericText:h,longText:g,text:e.isMicro||e.display==="column"?h:g,isNarrow:e.isNarrow,view:s};return d.jsxs(d.Fragment,{children:[!!c&&d.jsx(te,{tag:"div",elRef:this.handleLinkEl,className:N(I(e.display==="row"?i.rowMoreLinkClass:i.columnMoreLinkClass,m),e.className,e.display==="row"?v.flexRow:v.flexCol,v.internalMoreLink,v.cursorPointer),style:e.style,attrs:{...e.attrs,...Nr(this.handleClick),title:p,role:"button","aria-haspopup":"dialog","aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?f:void 0},renderProps:m,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:mv,classNameGenerator:i.moreLinkClass,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount,children:E=>d.jsx(E,{tag:"div",className:N(I(i.moreLinkInnerClass,m),I(e.display==="row"?i.rowMoreLinkInnerClass:i.columnMoreLinkInnerClass,m),e.display==="row"?v.stickyS:v.stickyT)})}),n.isPopoverOpen&&d.jsx(lv,{id:f,titleId:f+"-title",startDate:u.start,endDate:u.end,dateProfile:e.dateProfile,todayRange:e.todayRange,dateSpanProps:e.dateSpanProps,alignEl:e.alignElRef?e.alignElRef.current:this.linkEl,alignParentTop:e.alignParentTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose,children:e.popoverContent()})]})}})}}function mv(t){return t.text}function ci(t){return t.allDayDate?{start:t.allDayDate,end:K(t.allDayDate,1)}:{start:dv(t.hiddenSegs),end:uv(t.hiddenSegs)}}const To=Y({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ro(t){let{display:e}=t.eventRange.ui;return e==="list-item"||e==="auto"&&!t.eventRange.def.allDay&&t.end-t.start===1&&t.isStart&&t.isEnd}class pv extends ${render(){let{props:e}=this;return d.jsx(gv,{display:"row",className:e.className,isNarrow:e.isNarrow,isMicro:e.isMicro,dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,segs:e.segs,hiddenSegs:e.hiddenSegs,alignElRef:e.alignElRef,alignParentTop:e.alignParentTop,dateSpanProps:e.dateSpanProps,popoverContent:()=>d.jsx(d.Fragment,{children:e.segs.map(n=>{let{eventRange:r}=n,{instanceId:s}=r.instance,i=!!(e.eventDrag&&e.eventDrag.affectedInstances[s]),a=!!(e.eventResize&&e.eventResize.affectedInstances[s]),o=i||a;return d.jsx("div",{style:{visibility:o?"hidden":void 0},children:d.jsx(Yr,{display:Ro(n)?"list-item":"row",eventRange:r,isStart:n.isStart,isEnd:n.isEnd,isDragging:i,isResizing:a,isMirror:!1,isSelected:s===e.eventSelection,defaultTimeFormat:To,defaultDisplayEventEnd:!1,...tr(r,e.todayRange)})},s)})})})}}class vv extends Cn{constructor(){super(...arguments),this.getDateMeta=L(Gr),this.refineRenderProps=ht(bv),this.rootElRef=S.createRef(),this.handleBodyEl=e=>{this.disconnectBodyHeight&&(this.disconnectBodyHeight(),this.disconnectBodyHeight=void 0,U(this.props.headerHeightRef,null),U(this.props.mainHeightRef,null)),e&&(this.disconnectBodyHeight=wn(e,(n,r)=>{if(this._isUnmounting)return;const{props:s}=this,i=e.getBoundingClientRect(),a=this.rootElRef.current.getBoundingClientRect(),o=i.top-a.top;ir(this.headerHeight,o)||(this.headerHeight=o,U(s.headerHeightRef,o)),s.fgLiquidHeight&&U(s.mainHeightRef,r)}))}}render(){let{props:e,context:n}=this,{options:r,dateEnv:s}=n;const i=e.showDayNumber&&Ev(e.date,e.dateProfile.currentRange,s),a=this.getDateMeta(e.date,s,e.dateProfile,e.todayRange),o=N(e.borderStart?v.borderOnlyS:v.borderNone,e.width!=null?"":v.liquid,v.flexCol,v.noMargin,v.noPadding),l=r.navLinks,c=this.refineRenderProps({date:e.date,isMajor:e.isMajor,isNarrow:e.isNarrow,dateMeta:a,hasLabel:e.showDayNumber,hasMonthLabel:i,hasNavLink:l,renderProps:e.renderProps,viewApi:n.viewApi,dateEnv:n.dateEnv,monthStartFormat:r.monthStartFormat,dayCellFormat:r.dayCellFormat,businessHours:!!r.businessHours});if(a.isDisabled)return d.jsx("div",{role:"gridcell","aria-disabled":!0,className:N(I(r.dayCellClass,c),e.className,o),style:{width:e.width}});const u=Sn(n,e.date);return d.jsx(te,{tag:"div",elRef:this.rootElRef,className:N(e.className,o),attrs:{...e.attrs,role:"gridcell","aria-label":u,...c.isToday?{"aria-current":"date"}:{},"data-date":Ir(e.date)},style:{width:e.width},renderProps:c,generatorName:"dayCellTopContent",customGenerator:r.dayCellTopContent,defaultGenerator:yv,classNameGenerator:r.dayCellClass,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount,children:f=>d.jsxs(d.Fragment,{children:[d.jsx("div",{className:N(v.rel,I(r.dayCellTopClass,c)),children:e.showDayNumber&&d.jsx(f,{tag:"div",attrs:l?zr(n,e.date,void 0,u):{"aria-hidden":!0},className:I(r.dayCellTopInnerClass,c)})}),d.jsxs("div",{className:N(v.flexCol,e.fgLiquidHeight?v.liquid:v.grow),ref:this.handleBodyEl,children:[d.jsx("div",{className:I(r.dayCellInnerClass,c),style:{minHeight:e.fgHeight},children:e.fg}),d.jsx(pv,{className:v.rel,allDayDate:e.date,segs:e.segs,hiddenSegs:e.hiddenSegs,alignElRef:this.rootElRef,alignParentTop:e.showDayNumber?"[role=row]":`.${v.internalView}`,dateSpanProps:e.dateSpanProps,dateProfile:e.dateProfile,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,isNarrow:e.isNarrow,isMicro:e.isMicro})]}),d.jsx("div",{className:N(v.rel,I(r.dayCellBottomClass,c))})]})})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}}function yv(t){return t.text||d.jsx(d.Fragment,{children:" "})}function Ev(t,e,n){const{start:r,end:s}=e,i=He(s,-1),a=n.getYear(r),o=n.getMonth(r),l=n.getYear(i),c=n.getMonth(i);return!(a===l&&o===c)&&(t.valueOf()===r.valueOf()||n.getDay(t)===1&&t.valueOf()<s.valueOf())}function bv(t){let{date:e,dateEnv:n,hasLabel:r,hasMonthLabel:s,hasNavLink:i,businessHours:a}=t,o=[],l="";return r&&(o=n.formatToParts(e,s?t.monthStartFormat:t.dayCellFormat),l=ie(o)),{...t.dateMeta,...t.renderProps,text:l,textParts:o,isMajor:t.isMajor,isNarrow:t.isNarrow,inPopover:!1,hasNavLink:i,get weekdayText(){return en(o)},get dayNumberText(){return tn(o)},get monthText(){return yo(o)},options:{businessHours:a},view:t.viewApi}}class di{constructor(e,n=l=>1,r=!1,s,i,a=!1,o=!1){this.getSegThickness=n,this.strictOrder=r,this.maxCoord=s,this.maxDepth=i,this.hiddenConsumes=a,this.allowSlicing=o,this.placementsByLevel=[],this.levelCoords=[],this.hiddenSegs=[];for(const l of e)this.insertSeg(l,this.getSegThickness(l))}insertSeg(e,n,r){if(n!=null){const s=this.findInsertion(e,n);if(this.isInsertionValid(s,n))this.insertSegAt(e,s,n,r);else{const{touchingPlacement:i}=s;if(i){if(this.hiddenConsumes&&!i.isZombie&&(i.isZombie=!0,this.hiddenSegs.push(i),this.allowSlicing)){const a=Object.assign({},i);Object.assign(i,oi(i,e)),i.isSlice=!0,this.splitSeg(a,i.thickness,i)}this.allowSlicing?(this.hiddenSegs.push({...e,...oi(e,i)}),this.splitSeg(e,n,i)):this.hiddenSegs.push(e)}else this.hiddenSegs.push(e)}}}isInsertionValid(e,n){return(this.maxCoord==null||e.levelCoord+n<=this.maxCoord)&&(this.maxDepth==null||e.depth<this.maxDepth)}splitSeg(e,n,r){e.start<r.start&&this.insertSeg({...e,end:r.start,isEnd:!1},n,!0),e.end>r.end&&this.insertSeg({...e,start:r.end,isStart:!1},n,!0)}insertSegAt(e,n,r,s){const i={...e,thickness:r,depth:n.depth,isSlice:s||e.isSlice||!1,isZombie:!1};n.lateralIndex===-1?(Fn(this.placementsByLevel,n.levelIndex,[i]),Fn(this.levelCoords,n.levelIndex,n.levelCoord)):Fn(this.placementsByLevel[n.levelIndex],n.lateralIndex,i)}findInsertion(e,n){let{placementsByLevel:r,levelCoords:s}=this,i=r.length,a=0,o,l,c=0;for(let h=0;h<i;h+=1){const g=s[h];if(!this.strictOrder&&g>=a+n)break;let p=r[h],m,[E,w]=ui(p,e.start,li),D=E+w;for(;(m=p[D])&&m.start<e.end;){let x=g+m.thickness;x>a&&(a=x,o=m,l=h),x===a&&(c=Math.max(c,m.depth+1)),D+=1}}let u=0;if(o)for(u=l+1;u<i&&s[u]<a;)u+=1;let f=-1;return u<i&&s[u]===a&&([f]=ui(r[u],e.end,li)),{touchingPlacement:o,levelCoord:a,levelIndex:u,lateralIndex:f,depth:c}}traverseSegs(e){const{placementsByLevel:n,levelCoords:r}=this;for(let s=0;s<n.length;s++){const i=n[s],a=r[s];for(const o of i)o.isZombie||e(o,a)}}}function Fn(t,e,n){t.splice(e,0,n)}function ui(t,e,n){let r=0,s=t.length;if(!s||e<n(t[r]))return[0,0];if(e>n(t[s-1]))return[s,0];for(;r<s;){let i=Math.floor(r+(s-r)/2),a=n(t[i]);if(e<a)s=i;else if(e>a)r=i+1;else return[i,1]}return[r,0]}function Sv(t,e,n,r,s,i=!0,a,o){let l,c,u;a===!0||o===!0?(l=r,u=!0):typeof a=="number"?(c=a,u=!1):typeof o=="number"&&(c=o,u=!0);const f=new Map,h=new Map,g=new Map,p=new Map;let m=new di(t,C=>e.get(Me(C)),s,l,c,u,i);m.traverseSegs((C,R)=>{Vn(f,C),g.set(Me(C),R),C.isSlice&&p.set(C.eventRange,!0)});for(const C of m.hiddenSegs)Vn(h,C);if(p.size){g.clear(),m=new di(wv(t,f),C=>e.get(Me(C)),s,l,c,u),m.traverseSegs((C,R)=>{g.set(Me(C),R)});for(const C of m.hiddenSegs)Vn(h,C)}const E=[],w=[],D=[],x=[];for(let C=0;C<n.length;C++)E.push([]),w.push([]),D.push([]),x.push(0);for(const C of t){const{eventRange:R}=C,b=f.get(R)||[],M=h.get(R)||[],P=p.get(R)||!1;if(D[C.start].push(C),P)for(const k of b)D[k.start].push(k);for(const k of b){for(let B=k.start;B<k.end;B++){const W=ai(k,B);E[B].push(W)}const O=Me(k),q=g.get(O);if(q!=null){const B=e.get(O);for(let W=k.start;W<k.end;W++)x[W]=Math.max(x[W],q+B)}}for(const k of M)for(let O=k.start;O<k.end;O++){const q=ai(k,O);E[O].push(q),w[O].push(q)}}return[E,w,D,g,x]}function Vn(t,e){let n=t.get(e.eventRange);n||t.set(e.eventRange,n=[]),n.push(e)}function wv(t,e){const n=[];for(const r of t)n.push(...e.get(r.eventRange)||[]);return n}class Dv{constructor(e,n){let r=e.start,{end:s}=e,i=[],a=[],o=-1;for(;r<s;)n.isHiddenDay(r)?i.push(o+.5):(o+=1,i.push(o),a.push(r)),r=K(r,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let n=this.getDateDayIndex(e.start),r=this.getDateDayIndex(K(e.end,-1)),s=Math.max(0,n),i=Math.min(this.cnt-1,r);return s=Math.ceil(s),i=Math.floor(i),s<=i?{start:s,end:i+1,isStart:n===s,isEnd:r===i}:null}getDateDayIndex(e){let{indices:n}=this,r=Math.floor(it(this.dates[0],e));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class Cv{constructor(e,n,r,s=""){this.dateEnv=r,this.majorUnit=s;let{dates:i}=e,a,o,l;if(n){for(o=i[0].getUTCDay(),a=1;a<i.length&&i[a].getUTCDay()!==o;a+=1);l=Math.ceil(i.length/a)}else l=1,a=i.length;this.rowCount=l,this.colCount=a,this.daySeries=e,this.cellRows=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCount;n+=1){let r=[];for(let s=0;s<this.colCount;s+=1)r.push(this.buildCell(n,s));e.push(r)}return e}buildCell(e,n){let r=this.daySeries.dates[e*this.colCount+n];return{key:r.toISOString(),date:r,isMajor:this.cellIsMajor(r)}}cellIsMajor(e){return this.majorUnit?fo(e,this.majorUnit,this.dateEnv):!1}buildHeaderDates(){let e=[];for(let n=0;n<this.colCount;n+=1)e.push(this.cellRows[0][n].date);return e}sliceRange(e){let{colCount:n}=this,r=this.daySeries.sliceRange(e),s=[];if(r){const{start:i,end:a}=r;let o=i;for(;o<a;){let l=Math.floor(o/n),c=Math.min((l+1)*n,a);s.push({row:l,start:o%n,end:(c-1)%n+1,isStart:r.isStart&&o===i,isEnd:r.isEnd&&c===a}),o=c}}return s}}function xv(t,e,n){const r=new Dv(t.renderRange,e),s=/year|month|week/.test(t.currentRangeUnit),i=!s&&uo(t,n);return new Cv(r,s,n,i!=="day"?i:void 0)}function Tv(t,e,n){return n==null?[void 0,void 0]:n/t<e?[e*t,e]:[n,void 0]}function Rv(t,e,n){let r=0;for(const s of e){const i=s[0].key,a=s[0].date,o=s[s.length-1].date;if(t>=a&&t<=o)return r;const l=n.get(i);if(l==null)return;r+=l}return r}function fi(t,e,n){let r,s;if(e!=null)r=t.start*e,s=(n-t.end)*e;else{const i=1/n;r=Ns(t.start*i),s=Ns(1-t.end*i)}return{insetInlineStart:r,insetInlineEnd:s}}function Mv(t,e,n,r,s){const i=n??e/r,a=Math.floor(t/i),o=s?r-a-1:a,l=a*i,c=l+i;return{col:o,left:l,right:c}}function Iv(t,e,n){let r=0,s=0,i=0;for(const a of e){const o=a[0].key;if(s=i,i=s+n.get(o),t<i)break;r++}return{row:r,top:s,bottom:i}}function Nv(t,e){return t.querySelectorAll("[role=row]")[e]}function kv(t,e){return t.querySelectorAll("[role=gridcell]")[e]}const Mo=60,Pv=Y({weekday:"narrow"});function Hv(t,e,n){return t||jv(e,n)}function jv(t,e){return t?e>1?Y({weekday:"short",weekdayJustify:"start",day:"numeric",omitCommas:!0,omitTrailing:!0}):Y({weekday:"long",weekdayJustify:"start",day:"numeric",omitCommas:!0,omitTrailing:!0}):Y({weekday:"short"})}class Ov extends S.Component{constructor(){super(...arguments),this.rootElRef=S.createRef()}render(){const{props:e}=this;return d.jsx("div",{className:N(e.className,v.abs),style:e.style,ref:this.rootElRef,children:e.children})}componentDidMount(){this._isUnmounting=!1;const e=this.rootElRef.current;this.disconnectHeight=Dn(e,n=>{this._isUnmounting||U(this.props.heightRef,n)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),U(this.props.heightRef,null)}}const Av=Y({week:"narrow"});class Lv extends ${constructor(){super(...arguments),this.headerHeightRefMap=new Xe(()=>{gt(this.handleSegPositioning)}),this.mainHeightRefMap=new Xe(()=>{(this.props.dayMaxEvents===!0||this.props.dayMaxEventRows===!0)&>(this.handleSegPositioning)}),this.segHeightRefMap=new Xe(()=>{gt(this.handleSegPositioning)}),this.buildWeekNumberRenderProps=L(_v),this.handleRootEl=e=>{this.rootEl=e,U(this.props.rootElRef,e)},this.handleSegPositioning=()=>{this._isUnmounting||this.forceUpdate()}}render(){const{props:e,context:n,headerHeightRefMap:r,mainHeightRefMap:s}=this,{cells:i}=e,{options:a}=n,o=e.cells[0].date,l=e.dayMaxEvents===!0||e.dayMaxEventRows===!0,c=Eg(e.fgEventSegs,a.eventOrder),[u,f]=this.computeFgDims(),[h,g,p,m,E]=Sv(c,this.segHeightRefMap.current,i,l?f:void 0,a.eventOrderStrict,a.eventSlicing,e.dayMaxEvents,e.dayMaxEventRows),w=[];if(u!=null){let M=0;for(const P of i){const k=r.current.get(P.key);if(k!=null){const O=u-k;w.push(E[M]+O)}else w.push(void 0);M++}}const D=this.getHighlightSegs(),x=this.getMirrorSegs(),C=a.navLinks,R=Sn(n,o,"week"),b=this.buildWeekNumberRenderProps(o,n,e.cellIsNarrow,C);return d.jsxs("div",{role:e.role,"aria-label":e.role==="row"?R:void 0,className:N(a.dayRowClass,e.className,v.flexRow,v.rel,v.isolate,e.forPrint&&e.basis!==void 0&&v.printSiblingRow),style:{flexBasis:e.basis},ref:this.handleRootEl,children:[e.showWeekNumbers&&!e.cellIsMicro&&d.jsx(te,{tag:"div",attrs:{...C?zr(n,o,"week",R,!1):{},role:void 0,"aria-hidden":!0},className:v.z1,renderProps:b,generatorName:"inlineWeekNumberContent",customGenerator:a.inlineWeekNumberContent,defaultGenerator:ao,classNameGenerator:a.inlineWeekNumberClass,didMount:a.inlineWeekNumberDidMount,willUnmount:a.inlineWeekNumberWillUnmount}),this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(D,"highlight"),e.cells.map((M,P)=>{const k=this.renderFgSegs(u,p[P],m,e.todayRange,!1);return d.jsx(vv,{dateProfile:e.dateProfile,todayRange:e.todayRange,date:M.date,isMajor:M.isMajor,showDayNumber:e.showDayNumbers,isNarrow:e.cellIsNarrow,isMicro:e.cellIsMicro,borderStart:!!P,segs:h[P],hiddenSegs:g[P],fgLiquidHeight:l,fg:d.jsx(d.Fragment,{children:k}),eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,renderProps:M.renderProps,dateSpanProps:M.dateSpanProps,attrs:M.attrs,className:M.className,fgHeight:w[P],width:e.colWidth,headerHeightRef:r.createRef(M.key),mainHeightRef:s.createRef(M.key)},M.key)}),this.renderFgSegs(u,x,m,e.todayRange,!0)]})}renderFgSegs(e,n,r,s,i){const{props:a,segHeightRefMap:o}=this,{colWidth:l,eventSelection:c,cellIsMicro:u}=a,f=a.cells.length,h=a.cells.length===1,g=[];for(const p of n){const m=Me(p),{standinFor:E,eventRange:w}=p,{instanceId:D}=w.instance;if(E)continue;const{insetInlineStart:x,insetInlineEnd:C}=fi(p,l,f),R=r.get(E?Me(E):m)??(i?0:void 0),b=e!=null&&R!=null?e+R:void 0,M=!!(a.eventDrag&&a.eventDrag.affectedInstances[D]),P=!!(a.eventResize&&a.eventResize.affectedInstances[D]),k=!i&&(M||P||E||b==null),O=Ro(p),q=D===c;g.push(d.jsx(Ov,{className:p.start?v.fakeBorderS:"",style:{visibility:k?"hidden":void 0,top:b,insetInlineStart:x,insetInlineEnd:C,zIndex:q?1e3:0},heightRef:!E&&!i?o.createRef(m):null,children:d.jsx(Yr,{display:O?"list-item":"row",eventRange:w,isStart:p.isStart,isEnd:p.isEnd,isDragging:M,isResizing:P,isMirror:i,isSelected:q,isNarrow:a.cellIsNarrow,defaultTimeFormat:To,defaultDisplayEventEnd:h,disableResizing:O,forcedTimeText:u?"":void 0,...tr(w,s)})},m))}return g}renderFillSegs(e,n){const{props:r,context:s}=this,{todayRange:i,colWidth:a}=r,o=r.cells.length,l=[];for(const c of e){const u=c.start+":"+c.end,{insetInlineStart:f,insetInlineEnd:h}=fi(c,a,o),g=!c.standinFor;l.push(d.jsx("div",{className:v.fillY,style:{visibility:g?"":"hidden",insetInlineStart:f,insetInlineEnd:h},children:n==="bg-event"?d.jsx(sv,{eventRange:c.eventRange,isStart:c.isStart,isEnd:c.isEnd,isNarrow:r.cellIsNarrow,isVertical:!1,...tr(c.eventRange,i)}):av(n,s.options)},u))}return d.jsx(d.Fragment,{children:l})}componentDidMount(){this._isUnmounting=!1;const{rootEl:e}=this;this.disconnectHeight=Dn(e,n=>{U(this.props.heightRef,n)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),U(this.props.heightRef,null)}computeFgDims(){const{cells:e}=this.props,n=this.headerHeightRefMap.current,r=this.mainHeightRefMap.current;let s,i;for(const a of e){const o=n.get(a.key),l=r.get(a.key);if(o!=null&&((s===void 0||o>s)&&(s=o),l!=null)){const c=o+l;(i===void 0||c<i)&&(i=c)}}return[s,i!=null&&s!=null?i-s:void 0]}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}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}}function _v(t,e,n,r){const{dateEnv:s,options:i}=e,a=s.computeWeekNumber(t),o=s.formatToParts(t,i.weekNumberFormat||Av),l=ie(o),c=s.toDate(t);return{num:a,text:l,textParts:o,date:c,isNarrow:n,hasNavLink:r}}class Io extends Cn{constructor(){super(...arguments),this.splitBusinessHourSegs=L(Vt),this.splitBgEventSegs=L(Bv),this.splitFgEventSegs=L(Vt),this.splitDateSelectionSegs=L(Vt),this.splitEventDrag=L(ii),this.splitEventResize=L(ii),this.rowHeightRefMap=new Xe((e,n)=>{const{rowHeightRefMap:r}=this.props;r&&r.handleValue(e,n)}),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:n,rowHeightRefMap:r}=this,{options:s}=n,{cellRows:i}=e,a=i.length,o=i[0]?.[0]?.key||"",l=this.splitFgEventSegs(e.fgEventSegs,a),c=this.splitBgEventSegs(e.bgEventSegs,a),u=this.splitBusinessHourSegs(e.businessHourSegs,a),f=this.splitDateSelectionSegs(e.dateSelectionSegs,a),h=this.splitEventDrag(e.eventDrag,a),g=this.splitEventResize(e.eventResize,a),p=xe(s),m=!e.forPrint&&!p,E=Wv(e.visibleWidth,a,p,s);return d.jsx("div",{role:"rowgroup",className:N(e.className,!e.forPrint&&v.flexCol),style:{width:e.width},ref:this.handleRootEl,children:i.map((w,D)=>d.jsx(Lv,{role:"row",dateProfile:e.dateProfile,todayRange:e.todayRange,cells:w,cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,showDayNumbers:a>1,showWeekNumbers:a>1&&s.weekNumbers,forPrint:e.forPrint,className:N(m&&v.grow,a>1&&v.breakInsideAvoid,D<a-1?v.borderOnlyB:v.borderNone),fgEventSegs:l[D],bgEventSegs:c[D],businessHourSegs:u[D],dateSelectionSegs:f[D],eventSelection:e.eventSelection,eventDrag:h[D],eventResize:g[D],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,colWidth:e.colWidth,basis:E,heightRef:r.createRef(w[0].key)},o+":"+w[0].key))})}queryHit(e,n,r,s){const{props:i}=this,a=i.cellRows[0].length,{col:o,left:l,right:c}=Mv(n,s,i.colWidth,a,e),{row:u,top:f,bottom:h}=Iv(r,i.cellRows,this.rowHeightRefMap.current),g=i.cellRows[u][o],p=g.date,m=K(p,1);return{dateProfile:i.dateProfile,dateSpan:{range:{start:p,end:m},allDay:!0,...g.dateSpanProps},getDayEl:()=>kv(Nv(this.rootEl,u),o),rect:{left:l,right:c,top:f,bottom:h},layer:0}}}function Uv(t){return t.eventRange.def.allDay}function Bv(t,e){return Vt(t.filter(Uv),e)}function Wv(t,e,n,r){if(t!=null){const s=t/r.aspectRatio/6;return e>6||n?s:0}return 0}class Fv extends ${constructor(){super(...arguments),this.state={},this.buildDayHeaderText=L(Vv),this.handleInnerEl=e=>{this.disconnectSize&&(this.disconnectSize(),this.disconnectSize=void 0),e?this.disconnectSize=wn(e,(n,r)=>{this._isUnmounting||(U(this.props.innerHeightRef,r),this.setState({innerWidth:n}))}):U(this.props.innerHeightRef,null)}}render(){const{props:e,state:n,context:r}=this,{renderConfig:s,dataConfig:i}=e,a=e.colWidth!=null?e.colWidth*(i.colSpan||1):void 0,o=i.renderProps.isDisabled,l=s.dayHeaderFormat?this.buildDayHeaderRenderProps(i.renderProps,e.cellIsNarrow,e.rowLevel,e.cellIsMicro,i.dateMarker,s.dayHeaderFormat,!!s.datesRepDistinctDays,r.dateEnv):{...i.renderProps,isNarrow:e.cellIsNarrow,level:e.rowLevel},c=s.align,u=typeof c=="function"?c({level:e.rowLevel,inPopover:i.renderProps.inPopover,isNarrow:e.cellIsNarrow}):c,f=s.sticky,h=e.rowLevel>0&&f!==!1&&(u!=="center"||a!=null&&e.viewportWidth!=null&&a>e.viewportWidth*.75);let g;return h&&(u==="center"?n.innerWidth!=null&&(g=`calc(50% - ${n.innerWidth/2}px)`):g=typeof f=="number"||typeof f=="string"?f:0),d.jsx(te,{tag:"div",attrs:{role:"columnheader","aria-colspan":i.colSpan,...i.attrs},className:N(i.className,v.noMargin,v.noPadding,v.flexCol,e.borderStart?v.borderOnlyS:v.borderNone,u==="center"?v.alignCenter:u==="end"?v.alignEnd:v.alignStart,e.colWidth==null&&v.liquid,!h&&v.crop),style:{width:a},renderProps:l,generatorName:s.generatorName,customGenerator:s.customGenerator,defaultGenerator:ao,classNameGenerator:o?void 0:s.classNameGenerator,didMount:s.didMount,willUnmount:s.willUnmount,children:p=>d.jsx("div",{ref:this.handleInnerEl,className:N(v.flexCol,v.noShrink,v.whiteSpaceNoWrap,h&&v.sticky),style:{left:g,right:g},children:d.jsx(p,{tag:"div",attrs:i.innerAttrs,className:I(s.innerClassNameGenerator,l)})})})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}buildDayHeaderRenderProps(e,n,r,s,i,a,o,l){const c=this.buildDayHeaderText(o?i:e.date,a,o,l),u=s?this.buildDayHeaderText(i,Pv,!1,l):c;return{...e,isNarrow:n,level:r,text:u.text,textParts:u.textParts,weekdayText:s?u.text:c.weekdayText,dayNumberText:c.dayNumberText}}}function Vv(t,e,n,r){const s=r.formatToParts(t,e);return{text:ie(s),textParts:s,weekdayText:en(s),dayNumberText:n?tn(s):""}}class zv extends ${constructor(){super(...arguments),this.innerHeightRefMap=new Xe(()=>{gt(this.handleInnerHeights)}),this.handleInnerHeights=()=>{if(this._isUnmounting)return;const e=this.innerHeightRefMap.current;let n=0;for(const r of e.values())n=Math.max(n,r);this.currentInnerHeight!==n&&(this.currentInnerHeight=n,U(this.props.innerHeightRef,n))}}render(){const{props:e,context:n}=this,{options:r}=n;return d.jsx("div",{role:e.role,"aria-rowindex":e.rowIndex!=null?1+e.rowIndex:void 0,className:N(r.dayHeaderRowClass,e.className,v.flexRow,v.contentBox,e.borderBottom?v.borderOnlyB:v.borderNone),style:{height:e.height},children:e.dataConfigs.map((s,i)=>d.jsx(Fv,{renderConfig:e.renderConfig,dataConfig:s,borderStart:!!i,colWidth:e.colWidth,viewportWidth:e.viewportWidth,innerHeightRef:this.innerHeightRefMap.createRef(s.key),cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,rowLevel:e.rowLevel},s.key))})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0,this.currentInnerHeight=void 0,U(this.props.innerHeightRef,null)}}class No extends ${render(){const{props:e}=this,{headerTiers:n}=e;return d.jsx("div",{role:"rowgroup",className:N(e.className,v.flexCol,e.width==null&&v.liquid),style:{width:e.width},children:n.map((r,s)=>S.createElement(zv,{...r,key:s,role:"row",borderBottom:s<n.length-1,colWidth:e.colWidth,viewportWidth:e.viewportWidth,cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,rowLevel:n.length-s-1}))})}}class Gv extends ${constructor(){super(...arguments),this.state={},this.handleScroller=e=>{U(this.props.scrollerRef,e)},this.handleTotalWidth=e=>{this._isUnmounting||this.setState({totalWidth:e})},this.handleClientWidth=e=>{this._isUnmounting||this.setState({clientWidth:e})}}render(){const{props:e,state:n,context:r}=this,{options:s}=r,{borderlessX:i,borderlessTop:a,borderlessBottom:o}=at(s),{totalWidth:l,clientWidth:c}=n;let u=l!=null&&c!=null?l-c:void 0;u<3&&(u=0);const f=!e.forPrint&&!xe(s),h=!e.forPrint&&oo(s),g=e.cellRows[0].length,p=c!=null?c/g:void 0,m=p!=null&&p<=Mo,E=m||p!=null&&p<=s.dayNarrowWidth;return d.jsxs(d.Fragment,{children:[s.dayHeaders&&d.jsxs("div",{className:N(I(s.tableHeaderClass,{isSticky:h,borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),v.printHeader,h&&v.tableHeaderSticky),children:[d.jsxs("div",{className:v.flexRow,children:[d.jsx(No,{headerTiers:e.headerTiers,cellIsNarrow:E,cellIsMicro:m}),!!u&&d.jsx("div",{className:N(I(s.fillerClass,{inTableHeader:!0}),v.borderOnlyS),style:{minWidth:u}})]}),d.jsx("div",{className:I(s.dayHeaderDividerClass,{isSticky:h,multiMonthColumns:0,options:{allDaySlot:!!s.allDaySlot}})})]}),d.jsx(nn,{vertical:f,className:N(I(s.tableBodyClass,{borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),!e.forPrint&&v.flexCol,f&&v.liquid),ref:this.handleScroller,clientWidthRef:this.handleClientWidth,children:d.jsx(Io,{dateProfile:e.dateProfile,todayRange:e.todayRange,cellRows:e.cellRows,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed,className:v.grow,dayMaxEvents:e.forPrint?void 0:s.dayMaxEvents,dayMaxEventRows:s.dayMaxEventRows,fgEventSegs:e.fgEventSegs,bgEventSegs:e.bgEventSegs,businessHourSegs:e.businessHourSegs,dateSelectionSegs:e.dateSelectionSegs,eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,visibleWidth:l,cellIsNarrow:E,cellIsMicro:m,rowHeightRefMap:e.rowHeightRefMap})}),d.jsx(xo,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}}class Yv extends ${constructor(){super(...arguments),this.rootElRef=S.createRef()}render(){const{props:e}=this;return d.jsx("div",{ref:this.rootElRef,className:N(v.footerScrollbar,e.isSticky&&v.footerScrollbarSticky),children:d.jsx(nn,{horizontal:!0,ref:e.scrollerRef,children:d.jsx("div",{style:{minWidth:e.canvasWidth}})})})}componentDidMount(){this._isUnmounting=!1,this.disconnectHeight=Dn(this.rootElRef.current,e=>{this._isUnmounting||U(this.props.scrollbarWidthRef,e)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),U(this.props.scrollbarWidthRef,null)}}class $v extends ${constructor(){super(...arguments),this.state={},this.headerScrollerRef=S.createRef(),this.bodyScrollerRef=S.createRef(),this.footerScrollerRef=S.createRef(),this.handleTotalWidth=e=>{this._isUnmounting||this.setState({totalWidth:e})},this.handleClientWidth=e=>{this._isUnmounting||this.setState({clientWidth:e})}}render(){const{props:e,state:n,context:r}=this,{options:s}=r,{borderlessX:i,borderlessTop:a,borderlessBottom:o}=at(s),{totalWidth:l,clientWidth:c}=n,u=l!=null&&c!=null?l-c:void 0,f=!e.forPrint&&!xe(s),h=!e.forPrint&&oo(s),g=!e.forPrint&&bm(s),p=e.cellRows[0].length,[m,E]=Tv(p,e.dayMinWidth,c),w=E!=null&&E<=Mo,D=w||E!=null&&E<=s.dayNarrowWidth;return d.jsxs(d.Fragment,{children:[s.dayHeaders&&d.jsxs("div",{className:N(I(s.tableHeaderClass,{isSticky:h,borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),v.printHeader,h&&v.tableHeaderSticky),children:[d.jsxs(nn,{horizontal:!0,hideScrollbars:!0,className:v.flexRow,ref:this.headerScrollerRef,children:[d.jsx(No,{headerTiers:e.headerTiers,colWidth:E,viewportWidth:c,width:m,cellIsNarrow:D,cellIsMicro:w}),!!u&&d.jsx("div",{className:N(I(s.fillerClass,{inTableHeader:!0}),v.borderOnlyS),style:{minWidth:u}})]}),d.jsx("div",{className:I(s.dayHeaderDividerClass,{isSticky:h,multiMonthColumns:0,options:{allDaySlot:!!s.allDaySlot}})})]}),d.jsx(nn,{vertical:f,horizontal:!0,hideScrollbars:g||e.forPrint,className:N(I(s.tableBodyClass,{borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),!e.forPrint&&v.flexCol,f&&v.liquid),ref:this.bodyScrollerRef,clientWidthRef:this.handleClientWidth,children:d.jsx(Io,{dateProfile:e.dateProfile,todayRange:e.todayRange,cellRows:e.cellRows,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed,className:v.grow,dayMaxEvents:e.forPrint?void 0:s.dayMaxEvents,dayMaxEventRows:s.dayMaxEventRows,fgEventSegs:e.fgEventSegs,bgEventSegs:e.bgEventSegs,businessHourSegs:e.businessHourSegs,dateSelectionSegs:e.dateSelectionSegs,eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,colWidth:E,width:m,visibleWidth:l,cellIsNarrow:D,cellIsMicro:w,rowHeightRefMap:e.rowHeightRefMap})}),!!g&&d.jsx(Yv,{isSticky:!0,canvasWidth:m,scrollerRef:this.footerScrollerRef}),d.jsx(xo,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1;const e=Sm(this.context.pluginHooks);this.syncedScroller=new e(!0),U(this.props.scrollerRef,this.syncedScroller),this.updateSyncedScroller()}componentDidUpdate(){this.updateSyncedScroller()}componentWillUnmount(){this._isUnmounting=!0,this.syncedScroller.destroy()}updateSyncedScroller(){this.syncedScroller.handleChildren([this.headerScrollerRef.current,this.bodyScrollerRef.current,this.footerScrollerRef.current])}}class Zv extends ${constructor(){super(...arguments),this.scrollerRef=S.createRef(),this.rowHeightRefMap=new Xe(()=>{gt(this.updateScrollY)}),this.scrollDate=null,this.updateScrollY=()=>{if(this._isUnmounting)return;const e=this.rowHeightRefMap.current,n=this.scrollerRef.current;if(n&&this.scrollDate){let r=Rv(this.scrollDate,this.props.cellRows,e);r!=null&&(r&&r++,n.scrollTo({y:r}))}},this.handleScrollEnd=e=>{e&&(this.scrollDate=null)}}render(){const{props:e,context:n}=this,{options:r}=n,{borderlessX:s,borderlessTop:i,borderlessBottom:a}=at(r),o=e.forPrint?[]:e.businessHourSegs,l=e.forPrint?[]:e.dateSelectionSegs,c=e.forPrint?null:e.eventDrag,u=e.forPrint?null:e.eventResize,f={...e,businessHourSegs:o,dateSelectionSegs:l,eventDrag:c,eventResize:u,scrollerRef:this.scrollerRef,rowHeightRefMap:this.rowHeightRefMap};return d.jsx(jp,{viewSpec:n.viewSpec,attrs:{role:"grid","aria-rowcount":e.headerTiers.length+e.cellRows.length,"aria-colcount":e.cellRows[0].length,"aria-labelledby":e.labelId,"aria-label":e.labelStr},className:N(e.className,v.printRoot,I(r.tableClass,{borderlessX:s,borderlessTop:i,borderlessBottom:a,multiMonthColumns:0})),children:r.dayMinWidth?d.jsx($v,{...f,dayMinWidth:r.dayMinWidth}):d.jsx(Gv,{...f})})}componentDidMount(){this._isUnmounting=!1,this.resetScroll(),this.scrollerRef.current.addScrollEndListener(this.handleScrollEnd)}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile&&this.context.options.scrollTimeReset&&this.resetScroll()}componentWillUnmount(){this._isUnmounting=!0,this.scrollerRef.current.removeScrollEndListener(this.handleScrollEnd)}resetScroll(){this.scrollDate=this.props.dateProfile.currentDate,this.updateScrollY(),this.scrollerRef.current.scrollTo({x:0})}}class qv extends co{buildRenderRange(e,n,r){let s=super.buildRenderRange(e,n,r),{props:i}=this;return Xv({currentRange:s,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}}function Xv(t){let{dateEnv:e,currentRange:n}=t,{start:r,end:s}=n,i;if(t.snapToWeek&&(r=e.startOfWeek(r),i=e.startOfWeek(s),i.valueOf()!==s.valueOf()&&(s=xs(i,1))),t.fixedWeekCount){let a=e.startOfWeek(e.startOfMonth(K(n.end,-1))),o=Math.ceil(Zf(a,s));s=xs(s,6-o)}return{start:r,end:s}}class Kv extends ${constructor(){super(...arguments),this.buildDayTableModel=L(xv),this.buildDateRowConfigs=L(ev),this.createDayHeaderFormatter=L(Hv),this.slicer=new Qp}render(){const{props:e,context:n}=this,{dateProfile:r}=e,{options:s,dateEnv:i}=n,a=this.buildDayTableModel(r,n.dateProfileGenerator,i),o=a.rowCount===1,l=this.createDayHeaderFormatter(n.options.dayHeaderFormat,o,a.colCount),c=this.slicer.sliceProps(e,r,s.nextDayThreshold,n,a);return d.jsx(vo,{unit:"day",children:(u,f)=>{const h=this.buildDateRowConfigs(a.headerDates,o,r,f,l,n);return d.jsx(Zv,{labelId:e.labelId,labelStr:e.labelStr,dateProfile:r,todayRange:f,cellRows:a.cellRows,forPrint:e.forPrint,className:e.className,headerTiers:h,fgEventSegs:c.fgEventSegs,bgEventSegs:c.bgEventSegs,businessHourSegs:c.businessHourSegs,dateSelectionSegs:c.dateSelectionSegs,eventDrag:c.eventDrag,eventResize:c.eventResize,eventSelection:c.eventSelection})}})}}var Qv={name:"daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:Kv,dateProfileGeneratorClass:qv},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 Jv{constructor(e,n){this.emitter=new Tt}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const ko={};function Po(t,e,n){let{instances:r}=t.mutatedEvents;for(let s in r)if(!vn(e.validRange,r[s].range))return!1;return Ho({eventDrag:t},n)}function ey(t,e,n){return vn(e.validRange,t.range)?Ho({dateSelection:t},n):!1}function Ho(t,e){let n=e.getCurrentData(),r={businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null,...t};return(e.pluginHooks.isPropsValid||ty)(r,e)}function ty(t,e,n={},r){return!(t.eventDrag&&!ny(t,e,n,r)||t.dateSelection&&!ry(t,e,n,r))}function ny(t,e,n,r){let s=e.getCurrentData(),i=t.eventDrag,a=i.mutatedEvents,o=a.defs,l=a.instances,c=Jt(o,i.isEvent?t.eventUiBases:{"":s.selectionConfig});r&&(c=_e(c,r));let u=Rm(t.eventStore,i.affectedEvents.instances),f=u.defs,h=u.instances,g=Jt(f,t.eventUiBases);for(let p in l){let m=l[p],E=m.range,w=c[m.defId],D=o[m.defId];if(!jo(w.constraints,E,u,t.businessHours,e))return!1;let{eventOverlap:x}=e.options,C=typeof x=="function"?x:null;for(let b in h){let M=h[b];if(Mr(E,M.range)&&(g[M.defId].overlap===!1&&i.isEvent||w.overlap===!1||C&&!C(new z(e,f[M.defId],M),new z(e,D,m))))return!1}let R=s.eventStore;for(let b of w.allows){let M={...n,range:m.range,allDay:D.allDay},P=R.defs[D.defId],k=R.instances[p],O;if(P?O=new z(e,P,k):O=new z(e,D),!b(Ur(M,e),O))return!1}}return!0}function ry(t,e,n,r){let s=t.eventStore,i=s.defs,a=s.instances,o=t.dateSelection,l=o.range,{selectionConfig:c}=e.getCurrentData();if(r&&(c=r(c)),!jo(c.constraints,l,s,t.businessHours,e))return!1;let{selectOverlap:u}=e.options,f=typeof u=="function"?u:null;for(let h in a){let g=a[h];if(Mr(l,g.range)&&(c.overlap===!1||f&&!f(new z(e,i[g.defId],g),null)))return!1}for(let h of c.allows){let g={...n,...o};if(!h(Ur(g,e),null))return!1}return!0}function jo(t,e,n,r,s){for(let i of t)if(!iy(sy(i,e,n,r,s),e))return!1;return!0}function sy(t,e,n,r,s){return t==="businessHours"?zn(Ae(r,e,s)):typeof t=="string"?zn(bn(n,i=>i.groupId===t)):typeof t=="object"&&t?zn(Ae(t,e,s)):[]}function zn(t){let{instances:e}=t,n=[];for(let r in e)n.push(e[r].range);return n}function iy(t,e){for(let n of t)if(vn(n,e))return!0;return!1}ko.touchMouseIgnoreWait=500;let cr=0,rn=0,dr=!1;class Oo{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()&&ay(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 s=n.target;this.shouldIgnoreMove||s.addEventListener("touchmove",this.handleTouchMove),s.addEventListener("touchend",this.handleTouchEnd),s.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=n=>{if(this.isDragging){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,oy()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let r=window.scrollX-this.prevScrollX+this.prevPageX,s=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:s,deltaX:r-this.origPageX,deltaY:s-this.origPageY})}},this.containerEl=e,this.emitter=new Tt,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ly()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),cy()}cancel(){this.isDragging&&this.cleanup()}tryStart(e){let n=this.querySubjectEl(e),r=e.target;return n&&(!this.handleSelector||r.closest(this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){dr=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?e.target.closest(this.selector):this.containerEl}shouldIgnoreMouse(){return cr||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(dr=!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,s=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(r=e.pageX-this.origPageX,s=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:r,deltaY:s}}createEventFromTouch(e,n){let r=e.touches,s,i,a=0,o=0;return r&&r.length?(s=r[0].pageX,i=r[0].pageY):(s=e.pageX,i=e.pageY),n?(this.origPageX=s,this.origPageY=i):(a=s-this.origPageX,o=i-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:s,pageY:i,deltaX:a,deltaY:o}}}function ay(t){return t.button===0&&!t.ctrlKey}function oy(){cr+=1,setTimeout(()=>{cr-=1},ko.touchMouseIgnoreWait)}function ly(){rn+=1,rn===1&&window.addEventListener("touchmove",Ao,{passive:!1})}function cy(){rn-=1,rn||window.removeEventListener("touchmove",Ao,{passive:!1})}function Ao(t){dr&&t.preventDefault()}class dy{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0,this.colorScheme=""}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.setProperty("display","","important"),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&this.mirrorEl.style.setProperty("display","none","important"),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,s=this.sourceEl.getBoundingClientRect();r.style.transition="top "+n+"ms,left "+n+"ms",Ft(r,{left:s.left,top:s.top}),Oh(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(this.mirrorEl.remove(),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&Ft(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",this.colorScheme&&n.setAttribute("data-color-scheme",this.colorScheme),n.classList.add(v.borderBoxRoot),Ft(n,{position:"fixed",zIndex:this.zIndex,visibility:"",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(n)),n}}class Zr{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 uy extends Zr{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 fy extends Zr{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 Lo extends Zr{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 _o extends Lo{constructor(e,n){super(new uy(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return Zp(this.scrollController.el)}}class hy extends Lo{constructor(e){super(new fy,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 hi=typeof performance=="function"?performance.now:Date.now;class gy{constructor(){this.isEnabled=!0,this.scrollQuery=[window,`.${v.internalScroller}`],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=hi();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,s=n-window.scrollY,i=this.pointerScreenY===null?0:s-this.pointerScreenY,a=this.pointerScreenX===null?0:r-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),a<0?this.everMovedLeft=!0:a>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=s,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(hi()))}}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:s}=this,i=s-e.distance,a=i*i/(s*s)*this.maxVelocity*n,o=1;switch(e.name){case"left":o=-1;case"right":r.setScrollLeft(r.getScrollLeft()+a*o);break;case"top":o=-1;case"bottom":r.setScrollTop(r.getScrollTop()+a*o);break}}computeBestEdge(e,n){let{edgeThreshold:r}=this,s=null,i=this.scrollCaches||[];for(let a of i){let o=a.clientRect,l=e-o.left,c=o.right-e,u=n-o.top,f=o.bottom-n;l>=0&&c>=0&&u>=0&&f>=0&&(u<=r&&this.everMovedUp&&a.canScrollUp()&&(!s||s.distance>u)&&(s={scrollCache:a,name:"top",distance:u}),f<=r&&this.everMovedDown&&a.canScrollDown()&&(!s||s.distance>f)&&(s={scrollCache:a,name:"bottom",distance:f}),l<=r&&this.everMovedLeft&&a.canScrollLeft()&&(!s||s.distance>l)&&(s={scrollCache:a,name:"left",distance:l}),c<=r&&this.everMovedRight&&a.canScrollRight()&&(!s||s.distance>c)&&(s={scrollCache:a,name:"right",distance:c}))}return s}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new hy(!1):new _o(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 Rt extends Jv{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=s=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.emitter.trigger("pointerdown",s),this.isInteracting&&(Ah(document.body),_h(document.body),s.isTouch||s.origEvent.preventDefault(),this.mirror.setIsVisible(!1),this.mirror.start(s.subjectEl,s.pageX,s.pageY),this.startDelay(s),this.minDistance||this.handleDistanceSurpassed(s)))},this.onPointerMove=s=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",s),!this.isDistanceSurpassed){let i=this.minDistance,a,{deltaX:o,deltaY:l}=s;a=o*o+l*l,a>=i*i&&this.handleDistanceSurpassed(s)}this.isDragging&&(s.origEvent.type!=="scroll"&&(this.mirror.handleMove(s.pageX,s.pageY),this.autoScroller.handleMove(s.pageX,s.pageY)),this.emitter.trigger("dragmove",s))}},this.onPointerUp=s=>{this.isInteracting&&(this.isInteracting=!1,Lh(document.body),Uh(document.body),this.emitter.trigger("pointerup",s),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(s)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new Oo(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 dy,this.autoScroller=new gy}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)}cancel(){this.isInteracting&&(this.isInteracting=!1,this.pointer.cancel())}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class my{constructor(e){this.el=e,this.origRect=$r(e),this.isRtl=Dt(e),this.scrollCaches=Do(e).map(n=>new _o(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 s of this.scrollCaches)if(!py(s.getEventTarget())&&!Vp(r,s.clientRect))return!1;return!0}}function py(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class xn{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:s}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?this.emitter.trigger("pointerdown",r):s.cancel()},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 Tt}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},r=n,s=e.subjectEl,i;s instanceof HTMLElement&&(i=$r(s),r=zp(r,i));let a=this.initialHit=this.queryHitForOffset(r.left,r.top);if(a){if(this.useSubjectCenter&&i){let o=wo(i,a.rect);o&&(r=Gp(o))}this.coordAdjust=Yp(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||!Tn(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=_e(this.droppableStore,e=>(e.component.prepareHits(),new my(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:r,offsetTrackers:s}=this,i=null;for(let a in r){let o=r[a].component,l=s[a];if(l&&l.isWithinClipping(e,n)){let c=l.computeLeft(),u=l.computeTop(),f=e-c,h=n-u,{origRect:g}=l,p=g.right-g.left,m=g.bottom-g.top;if(f>=0&&f<p&&h>=0&&h<m){let E=o.queryHit(l.isRtl,f,h,p,m);E&&vn(E.dateProfile.activeRange,E.dateSpan.range)&&(this.disablePointCheck||l.el.contains(l.el.getRootNode().elementFromPoint(f+c-window.scrollX,h+u-window.scrollY)))&&(!i||E.layer>i.layer)&&(E.componentId=a,E.context=o.context,E.rect.left+=c,E.rect.right+=c,E.rect.top+=u,E.rect.bottom+=u,i=E)}}}return i}}function Tn(t,e){return!t&&!e?!0:!!t!=!!e?!1:ug(t.dateSpan,e.dateSpan)}function Uo(t,e){let n={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(n,r(t,e));return Object.assign(n,vy(t,e.dateEnv)),n}function vy(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class yy extends lt{constructor(e){super(e),this.handlePointerDown=r=>{let{dragging:s}=this,i=r.origEvent.target;this.component.context.emitter.hasHandlers("dateClick")&&this.component.isValidDateDownEl(i)||s.cancel()},this.handleDragEnd=r=>{let{component:s}=this,{pointer:i}=this.dragging;if(!i.wasTouchScroll){let{initialHit:a,finalHit:o}=this.hitDragging;if(a&&o&&Tn(a,o)){let{context:l}=s,c={...Uo(a.dateSpan,l),dayEl:a.getDayEl(),jsEvent:r.origEvent,view:l.viewApi||l.calendarApi.view};l.emitter.trigger("dateClick",c)}}},this.dragging=new Rt(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new xn(this.dragging,Vr(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class Ey extends lt{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=a=>{let{component:o,dragging:l}=this,{options:c}=o.context;c.selectable&&o.isValidDateDownEl(a.origEvent.target)?l.delay=a.isTouch?by(o):null:l.cancel()},this.handleDragStart=a=>{this.component.context.calendarApi.unselect(a)},this.handleHitUpdate=(a,o)=>{let{context:l}=this.component,c=null,u=!1;if(a){let f=this.hitDragging.initialHit;a.componentId===f.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(f,a)||(c=Sy(f,a,l.pluginHooks.dateSelectionTransformers)),(!c||!ey(c,a.dateProfile,l))&&(u=!0,c=null)}c?l.dispatch({type:"SELECT_DATES",selection:c}):o||l.dispatch({type:"UNSELECT_DATES"}),u?kr():Pr(),o||(this.dragSelection=c)},this.handlePointerUp=a=>{this.dragSelection?(Ga(this.dragSelection,a,this.component.context),this.dragSelection=null):this.component.context.emitter.trigger("_noDateSelect")};let{component:n}=e,{options:r}=n.context,s=this.dragging=new Rt(e.el);s.touchScrollAllowed=!1,s.minDistance=r.selectMinDistance||0,s.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new xn(this.dragging,Vr(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function by(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function Sy(t,e,n){let r=t.dateSpan,s=e.dateSpan,i=[r.range.start,r.range.end,s.range.start,s.range.end];i.sort(zh);let a={};for(let o of n){let l=o(t,e);if(l===!1)return null;l&&Object.assign(a,l)}return a.range={start:i[0],end:i[3]},a.allDay=r.allDay,a}class Mt extends lt{constructor(e){super(e),this.subjectEl=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=a=>{let o=a.origEvent.target,{component:l,dragging:c}=this,{mirror:u}=c,{options:f}=l.context,h=l.context;this.subjectEl=a.subjectEl;let p=(this.eventRange=et(a.subjectEl)).instance.instanceId;this.relevantEvents=Ar(h.getCurrentData().eventStore,p),c.minDistance=a.isTouch?0:f.eventDragMinDistance,c.delay=a.isTouch&&p!==l.props.eventSelection?Dy(l):null,u.parentNode=mo(o),u.revertDuration=f.dragRevertDuration,u.colorScheme=f.colorScheme||"",l.isValidSegDownEl(o)&&!o.closest(`.${v.internalEventResizer}`)?this.isDragging=a.subjectEl.classList.contains(v.internalEventDraggable):c.cancel()},this.handleDragStart=a=>{let o=this.component.context,l=this.eventRange,c=l.instance.instanceId;a.isTouch?c!==this.component.props.eventSelection&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:c}):o.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(o.calendarApi.unselect(a),o.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new z(o,l.def,l.instance),jsEvent:a.origEvent,view:o.viewApi}))},this.handleHitUpdate=(a,o)=>{if(!this.isDragging)return;let l=this.relevantEvents,c=this.hitDragging.initialHit,u=this.component.context,f=null,h=null,g=null,p=!1,m={affectedEvents:l,mutatedEvents:ge(),isEvent:!0};if(a){f=a.context;let E=f.options;u===f||E.editable&&E.droppable?(h=wy(c,a,this.eventRange.instance.range.start,f.getCurrentData().pluginHooks.eventDragMutationMassagers),h&&(g=Br(l,f.getCurrentData().eventUiBases,h,f),m.mutatedEvents=g,Po(m,a.dateProfile,f)||(p=!0,h=null,g=null,m.mutatedEvents=ge()))):f=null}this.displayDrag(f,m),p?kr():Pr(),o||(u===f&&Tn(c,a)&&(h=null),this.dragging.setMirrorNeedsRevert(!h),this.dragging.setMirrorIsVisible(!a||!this.subjectEl.getRootNode().querySelector(`.${v.internalEventMirror}`)),this.receivingContext=f,this.validMutation=h,this.mutatedRelevantEvents=g)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=a=>{if(this.isDragging){let o=this.component.context,l=o.viewApi,{receivingContext:c,validMutation:u}=this,f=this.eventRange.def,h=this.eventRange.instance,g=new z(o,f,h),p=this.relevantEvents,m=this.mutatedRelevantEvents,{finalHit:E}=this.hitDragging;if(this.clearDrag(),o.emitter.trigger("eventDragStop",{el:this.subjectEl,event:g,jsEvent:a.origEvent,view:l}),u){if(c===o){let w=new z(o,m.defs[f.defId],h?m.instances[h.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:m});let D={oldEvent:g,event:w,relatedEvents:Ne(m,o,h),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:p})}},x={};for(let C of o.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(x,C(u,o));o.emitter.trigger("eventDrop",{...D,...x,el:a.subjectEl,delta:u.datesDelta,jsEvent:a.origEvent,view:l}),o.emitter.trigger("eventChange",D)}else if(c){let w={event:g,relatedEvents:Ne(p,o,h),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:p})}};o.emitter.trigger("eventLeave",{...w,draggedEl:a.subjectEl,view:l}),o.dispatch({type:"REMOVE_EVENTS",eventStore:p}),o.emitter.trigger("eventRemove",w);let D=m.defs[f.defId],x=m.instances[h.instanceId],C=new z(c,D,x);c.dispatch({type:"MERGE_EVENTS",eventStore:m});let R={event:C,relatedEvents:Ne(m,c,x),revert(){c.dispatch({type:"REMOVE_EVENTS",eventStore:m})}};c.emitter.trigger("eventAdd",R),a.isTouch&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:h.instanceId}),c.emitter.trigger("drop",{...Uo(E.dateSpan,c),draggedEl:a.subjectEl,jsEvent:a.origEvent,view:E.context.viewApi}),c.emitter.trigger("eventReceive",{...R,draggedEl:a.subjectEl,view:E.context.viewApi})}}else o.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:r}=n.context,s=this.dragging=new Rt(e.el);s.pointer.selector=Mt.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new xn(this.dragging,rr);i.useSubjectCenter=e.useEventCenter,i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,n){let r=this.component.context,s=this.receivingContext;s&&s!==e&&(s===r?s.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:ge(),isEvent:!0}}):s.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.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}Mt.SELECTOR=`.${v.internalEventDraggable}, .${v.internalEventResizable}`;function wy(t,e,n,r){let s=t.dateSpan,i=e.dateSpan,a=s.range.start,o=i.range.start,l={};s.allDay!==i.allDay&&(l.allDay=i.allDay,l.hasEnd=e.context.options.allDayMaintainDuration,i.allDay?a=V(n):a=n);let c=$e(a,o,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);c.milliseconds&&(l.allDay=!1);let u={datesDelta:c,standardProps:l};for(let f of r)f(u,t,e);return u}function Dy(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class Cy extends lt{constructor(e){super(e),this.draggingSegEl=null,this.draggingEventRange=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=i=>{let{component:a}=this,o=this.querySegEl(i),l=this.eventRange=et(o);this.dragging.minDistance=a.context.options.eventDragMinDistance,this.component.isValidSegDownEl(i.origEvent.target)&&!(i.isTouch&&this.component.props.eventSelection!==l.instance.instanceId)||this.dragging.cancel()},this.handleDragStart=i=>{let{context:a}=this.component,o=this.eventRange;this.relevantEvents=Ar(a.getCurrentData().eventStore,this.eventRange.instance.instanceId);let l=this.querySegEl(i);this.draggingSegEl=l,this.draggingEventRange=et(l),a.calendarApi.unselect(),a.emitter.trigger("eventResizeStart",{el:l,event:new z(a,o.def,o.instance),jsEvent:i.origEvent,view:a.viewApi})},this.handleHitUpdate=(i,a,o)=>{let{context:l}=this.component,c=this.relevantEvents,u=this.hitDragging.initialHit,f=this.eventRange.instance,h=null,g=null,p=!1,m={affectedEvents:c,mutatedEvents:ge(),isEvent:!0};i&&(i.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,i)||(h=xy(u,i,o.subjectEl.classList.contains(v.internalEventResizerStart),f.range))),h&&(g=Br(c,l.getCurrentData().eventUiBases,h,l),m.mutatedEvents=g,Po(m,i.dateProfile,l)||(p=!0,h=null,g=null,m.mutatedEvents=null)),g?l.dispatch({type:"SET_EVENT_RESIZE",state:m}):l.dispatch({type:"UNSET_EVENT_RESIZE"}),p?kr():Pr(),a||(h&&Tn(u,i)&&(h=null),this.validMutation=h,this.mutatedRelevantEvents=g)},this.handleDragEnd=i=>{let{context:a}=this.component,o=this.eventRange.def,l=this.eventRange.instance,c=new z(a,o,l),u=this.relevantEvents,f=this.mutatedRelevantEvents;if(a.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:c,jsEvent:i.origEvent,view:a.viewApi}),this.validMutation){let h=new z(a,f.defs[o.defId],l?f.instances[l.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:f});let g={oldEvent:c,event:h,relatedEvents:Ne(f,a,l),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:u})}};a.emitter.trigger("eventResize",{...g,el:this.draggingSegEl,startDelta:this.validMutation.startDelta||_(0),endDelta:this.validMutation.endDelta||_(0),jsEvent:i.origEvent,view:a.viewApi}),a.emitter.trigger("eventChange",g)}else a.emitter.trigger("_noEventResize");this.draggingEventRange=null,this.relevantEvents=null,this.validMutation=null};let{component:n}=e,r=this.dragging=new Rt(e.el);r.pointer.selector=`.${v.internalEventResizer}`,r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.context.options.dragScroll;let s=this.hitDragging=new xn(this.dragging,Vr(e));s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return e.subjectEl.closest(`.${v.internalEvent}`)}}function xy(t,e,n,r){let s=t.context.dateEnv,i=t.dateSpan.range.start,a=e.dateSpan.range.start,o=$e(i,a,s,t.largeUnit);if(n){if(s.add(r.start,o)<r.end)return{startDelta:o}}else if(s.add(r.end,o)>r.start)return{endDelta:o};return null}class Ty{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 s=this.context.options.unselectCancel,i=po(r.origEvent);this.matchesCancel=!!i.closest(s),this.matchesEvent=!!i.closest(Mt.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:s}=this,{documentPointer:i}=this,a=s.getCurrentData();if(!i.wasTouchScroll){if(a.dateSelection&&!this.isRecentPointerDateSelect){let o=s.options.unselectAuto;o&&(!o||!this.matchesCancel)&&s.calendarApi.unselect(r)}a.eventSelection&&!this.matchesEvent&&s.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new Oo(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()}}var Ry={name:"interaction",componentInteractions:[yy,Ey,Mt,Cy],calendarInteractions:[Ty],elementDraggingImpl:Rt};const My=[Qv,Ry],Iy={comfortable:3,compact:2},Bo="cal-1",Ny={color:Bo,rsvp:"accepted",status:"confirmed",hasThread:!1,isRecurring:!1,zoneCertainty:"local"},ky=(t,e)=>new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit"}).format(t),Py=t=>t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;function Hy({date:t,events:e,colorByCalendarId:n,density:r,selectedEventId:s,timeZone:i,now:a,onSelectEvent:o,onPickSlot:l,dayHref:c,onZoomDay:u,canMove:f=()=>!1,onMoveEvent:h,tasks:g=[],onSelectTask:p,className:m}){const E=S.useRef(null);S.useEffect(()=>{E.current?.getApi().gotoDate(t)},[t]);const w=S.useMemo(()=>new Map(g.map(b=>[b.calendarTaskId,b])),[g]),D=S.useMemo(()=>[...e.map(b=>({id:b.id,title:b.title,start:b.start,end:b.end,allDay:b.allDay,editable:h!==void 0&&f(b.id)})),...g.map(b=>({id:b.calendarTaskId,title:b.title,start:b.due,allDay:b.allDay,editable:!1}))],[e,g,f,h]),x=b=>{b.revert(),h?.(b.event.id,is(b.event.startStr,b.event.endStr===""?b.event.startStr:b.event.endStr,b.event.allDay))},C=S.useMemo(()=>new Map(e.map(b=>[b.id,{color:n[b.calendarId]??Bo,rsvp:b.myRsvp,status:b.status,hasThread:b.threadId!=="",isRecurring:b.recurrenceRule!=="",zoneCertainty:b.zoneCertainty}])),[e,n]),R=b=>C.get(b)??Ny;return d.jsx("div",{"data-testid":"calendar-grid",className:H("h-full min-h-0 w-full text-fg",m),children:d.jsx(Cp,{ref:E,plugins:My,initialView:"dayGridMonth",initialDate:t,now:a,timeZone:i,height:"100%",headerToolbar:!1,firstDay:1,fixedWeekCount:!1,selectable:!0,editable:!1,eventInteractive:!0,expandRows:!0,dayMaxEvents:Iy[r],dayCellTopContent:b=>{const M=ky(b.date,i);return d.jsx("a",{href:c(M),"aria-label":`Open ${b.date.toLocaleDateString("en-GB",{dateStyle:"full",timeZone:i})}`,className:"hover:underline",onClick:P=>{Py(P)||(P.preventDefault(),u(M))},children:Number(M.slice(8))})},dayCellDidMount:b=>{b.el.querySelector(":scope [aria-hidden='true']:has(> a)")?.removeAttribute("aria-hidden");const M=b.el.querySelector("a");for(const P of["mousedown","touchstart","pointerdown"])M?.addEventListener(P,k=>k.stopPropagation())},moreLinkClick:"popover",moreLinkText:b=>`+${b}`,displayEventEnd:!1,eventTimeFormat:{hour:"2-digit",minute:"2-digit",hour12:!1},dayHeaderFormat:{weekday:"short"},events:D,eventClick:b=>w.has(b.event.id)?p?.(b.event.id):o(b.event.id),eventDrop:x,eventResize:x,eventDidMount:b=>{b.el.setAttribute(w.has(b.event.id)?"data-task-id":"data-event-id",b.event.id)},dateClick:b=>l(dl(b.dateStr,b.allDay)),select:b=>{if(!cl(b.startStr,b.endStr)){b.view.calendar.unselect();return}l(is(b.startStr,b.endStr,!0))},viewClass:"bg-surface",tableClass:"border-line",tableHeaderClass:"bg-surface",fillerClass:"border-line",dayHeaderRowClass:"h-pane-header",dayHeaderClass:b=>H("border-b border-line bg-surface",b.isToday?"text-accent":"text-fg-subtle"),dayHeaderInnerClass:"px-1 py-1 text-2xs font-semibold uppercase tracking-wider",dayHeaderDividerClass:"border-b border-line",dayCellClass:b=>H("border-line",b.isOther&&"bg-surface-sunken"),dayCellTopInnerClass:b=>H("px-1 py-0.5 text-2xs tabular-nums",b.isToday?"font-semibold text-accent":"text-fg-muted"),dayRowClass:"border-line",highlightClass:"bg-accent-soft",moreLinkClass:"rounded-sm bg-surface-sunken text-2xs font-semibold text-fg-muted hover:bg-line hover:text-fg",moreLinkInnerClass:"px-1 py-0.5",popoverClass:"rounded-lg border border-line bg-surface-raised shadow-xl shadow-black/20",popoverCloseClass:"text-fg-subtle hover:text-fg",eventClass:b=>H(ll({color:R(b.event.id).color,layout:"row",density:"compact",rsvp:R(b.event.id).rsvp,status:R(b.event.id).status,selected:b.event.id===s,stacked:!1}),"my-px cursor-pointer px-1 py-0 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring"),eventContent:b=>{const M=w.get(b.event.id);if(M)return d.jsxs("span",{className:H("flex min-w-0 items-center gap-1 truncate",M.completed&&"line-through opacity-60"),children:[d.jsx("span",{"aria-hidden":"true",children:M.completed?"☑":"☐"}),d.jsx("span",{className:"truncate",children:M.title===""?"(No title)":M.title})]});const P=R(b.event.id);return d.jsx(ol,{title:b.event.title,timeText:r==="compact"?"":b.timeText,layout:"row",rsvp:P.rsvp,hasThread:P.hasThread,isRecurring:P.isRecurring,zoneCertainty:P.zoneCertainty})}})})}function jy(t){const e=[],n=new Map;for(const r of t){let s=n.get(r.accountId);s||(s={accountId:r.accountId,accountLabel:r.accountLabel,calendars:[]},n.set(r.accountId,s),e.push(r.accountId)),s.calendars.push(r)}return e.map(r=>n.get(r))}function Oy({calendars:t,visible:e,onToggle:n,onToggleAccount:r,layout:s="list",touch:i,closedAccountIds:a,className:o}){const[l,c]=S.useState(()=>new Set(a??[])),u=f=>c(h=>{const g=new Set(h);return g.delete(f)||g.add(f),g});return s==="strip"?d.jsx("div",{className:H("flex items-center gap-1.5 overflow-x-auto px-row-inset",o),children:t.map(f=>{const h=an(f.color),g=e.has(f.id);return d.jsxs("label",{className:H("inline-flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full border px-2.5 text-xs transition-colors","has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring",i?"min-h-9":"h-7",g?H(h.soft,h.text,h.border):"border-line text-fg-subtle"),children:[d.jsx("input",{type:"checkbox",checked:g,onChange:()=>n(f.id),className:"sr-only"}),d.jsx("span",{className:H("size-2 rounded-full border",h.border,g?h.solid:"bg-transparent")}),f.name]},f.id)})}):d.jsx("div",{className:H("flex flex-col gap-3",o),children:jy(t).map(f=>{const h=f.calendars.every(p=>e.has(p.id)),g=!l.has(f.accountId);return d.jsxs("section",{className:"flex flex-col",children:[d.jsxs("div",{className:"flex items-center gap-2 px-row-inset pb-1",children:[d.jsxs("button",{type:"button",onClick:()=>u(f.accountId),"aria-expanded":g,className:H("flex min-w-0 flex-1 items-center gap-1.5 rounded-sm text-left text-2xs font-semibold uppercase tracking-wider text-fg-subtle outline-none transition-colors hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",i&&"min-h-11"),children:[g?d.jsx(ul,{className:"size-3 shrink-0"}):d.jsx(ur,{className:"size-3 shrink-0"}),d.jsx("span",{className:"truncate",children:f.accountLabel})]}),r&&d.jsx("button",{type:"button",onClick:()=>r(f.accountId,!h),className:"rounded-sm text-2xs text-fg-subtle outline-none hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",children:h?"None":"All"})]}),g&&f.calendars.map(p=>d.jsx(Ay,{calendar:p,checked:e.has(p.id),touch:i,onToggle:()=>n(p.id)},p.id))]},f.accountId)})})}function Ay({calendar:t,checked:e,touch:n,onToggle:r}){const s=an(t.color),i=t.sync==="paused",a=t.syncError??"";return d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("label",{className:H("flex cursor-pointer items-center gap-2.5 rounded-sm px-row-inset hover:bg-surface-sunken",n?"min-h-11":"min-h-9"),children:[d.jsx("input",{type:"checkbox",checked:e,onChange:r,className:"peer sr-only"}),d.jsx("span",{"aria-hidden":!0,className:H("flex size-4 shrink-0 items-center justify-center rounded-xs border transition-colors","peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-1 peer-focus-visible:ring-offset-surface",e?H(s.solid,s.border):H("bg-transparent",s.border)),children:e&&d.jsx(fl,{className:"size-3 text-canvas",strokeWidth:3})}),d.jsx("span",{className:H("min-w-0 flex-1 truncate text-sm",e?"text-fg":"text-fg-subtle"),children:t.name}),i&&d.jsx(xc,{className:"size-3.5 shrink-0 text-fg-subtle","aria-hidden":!0}),a!==""&&d.jsx(hl,{className:"size-3.5 shrink-0 text-danger","aria-hidden":!0})]}),i&&d.jsx("span",{className:"sr-only",children:`${t.name}: ${Tc.Calendar}`}),a!==""&&d.jsx("p",{className:"px-row-inset pb-1 text-xs text-danger",children:d.jsx("span",{className:"block pl-6.5",children:`Not refreshed: ${a}`})})]})}const Gn={year:"Year",month:"Month",week:"Week",day:"Day",agenda:"Agenda"},Ly=["day","week","month","year","agenda"];function _y({view:t,title:e,weekNumber:n,views:r=Ly,onChangeView:s,onPrev:i,onNext:a,onToday:o,sidePane:l,trailing:c,touch:u=!1,className:f}){const h=H("flex shrink-0 items-center justify-center rounded-full text-fg-muted outline-none transition-colors hover:bg-surface-sunken hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",u?"size-11":"size-9");return d.jsxs("div",{role:"toolbar","aria-label":"Calendar","data-calendar-toolbar":"",className:H("flex shrink-0 items-center gap-1 border-b border-line bg-surface px-2",u?"h-14":"h-14 gap-2",f),children:[l&&d.jsx("button",{type:"button","aria-label":"Side pane","aria-expanded":l.open,"aria-controls":l.controls,onClick:l.onToggle,className:h,children:d.jsx(Ol,{className:"size-5"})}),d.jsx("button",{type:"button",onClick:o,className:H("shrink-0 rounded-full border border-line px-4 text-sm font-medium text-fg outline-none transition-colors hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",u?"min-h-11":"h-9"),children:"Today"}),d.jsx("button",{type:"button",onClick:i,"aria-label":`Previous ${Gn[t].toLowerCase()}`,className:h,children:d.jsx(gl,{className:"size-5"})}),d.jsx("button",{type:"button",onClick:a,"aria-label":`Next ${Gn[t].toLowerCase()}`,className:h,children:d.jsx(ur,{className:"size-5"})}),d.jsx("h1",{className:H("min-w-0 truncate font-normal text-fg",u?"text-base":"text-xl"),children:e}),n!==void 0&&d.jsxs("span",{className:"shrink-0 rounded-md bg-surface-sunken px-2 py-0.5 text-xs font-medium text-fg-muted",children:["Week ",n]}),d.jsx("div",{className:"min-w-0 flex-1"}),!u&&c,d.jsx(ml,{"aria-label":"View",value:t,onChange:g=>{const p=r.find(m=>m===g.target.value);p&&s(p)},className:H("shrink-0",u?"h-11 w-24":"w-28"),children:r.map(g=>d.jsx("option",{value:g,children:Gn[g]},g))})]})}function Uy({id:t,onNewEvent:e,newEventRef:n,month:r,calendars:s,className:i}){return d.jsxs("section",{id:t,"aria-label":"Calendar side pane",className:H("flex w-64 shrink-0 flex-col gap-4 overflow-y-auto bg-surface px-3 py-3",i),children:[d.jsxs("button",{ref:n,type:"button",onClick:e,className:"flex h-12 w-fit items-center gap-3 rounded-2xl bg-surface-raised px-5 text-sm font-medium text-fg shadow-md outline-none transition-shadow hover:shadow-lg focus-visible:ring-2 focus-visible:ring-ring",children:[d.jsx(vi,{className:"size-5 text-accent","aria-hidden":"true"}),"New event"]}),r,d.jsxs("section",{"aria-label":"My calendars",className:"flex flex-col gap-1",children:[d.jsx("h2",{className:"px-1 text-sm font-medium text-fg",children:"My calendars"}),s]})]})}function gi({onNewEvent:t,newEventRef:e,className:n}){return d.jsx("button",{ref:e,type:"button","aria-label":"New event",onClick:t,className:H("flex size-12 items-center justify-center rounded-2xl bg-surface-raised text-accent shadow-md outline-none hover:shadow-lg focus-visible:ring-2 focus-visible:ring-ring",n),children:d.jsx(vi,{className:"size-6","aria-hidden":"true"})})}function By(t){return H("flex cursor-pointer items-center justify-center rounded-md px-2 font-medium transition-colors","has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring",t?"bg-accent-2-soft text-accent-2":"text-fg-muted hover:bg-surface-sunken hover:text-fg")}function Wy({options:t,value:e,onChange:n,touch:r,ariaLabel:s,className:i}){const a=S.useId();return d.jsxs("fieldset",{className:H("inline-flex items-center gap-0.5",i),children:[d.jsx("legend",{className:"sr-only",children:s}),t.map(o=>d.jsxs("label",{className:H(By(e===o.value),r?"min-h-11 flex-1 text-sm":"h-7 text-xs"),children:[d.jsx("input",{type:"radio",name:a,value:o.value,checked:e===o.value,onChange:()=>n(o.value),className:"sr-only"}),r?o.shortLabel:o.label]},o.value))]})}function Fy(){const t=pl(),{updateEvent:e}=Ll();return S.useCallback(async(n,r,s,i)=>{const{calendarObjectId:a,recurrenceId:o}=Si(n.id),l=await t.fetchQuery({...yl({path:{calendarObjectId:a},query:{calendarId:n.calendarId}}),meta:vl(404),staleTime:0}).catch(h=>({unread:Dc(h)}));if("unread"in l)return{kind:"refused",message:l.unread};const c=Nc(n,{repeat:"",location:"",notes:"",guests:[]}),u={...c,date:r.date,endDate:r.endDate,startTime:r.startTime,endTime:r.endTime,allDay:r.allDay},f=kc(c,u,{clock:Ge(),anchor:Yl(l.icalData,i===""?_l:i)});return f.ok?e({calendarObjectId:a,calendarId:n.calendarId,recurrenceId:o,scope:s,etag:l.etag},f.patch):{kind:"refused",message:f.problem}},[t,e])}const Ze={mode:"idle",dragging:null},qr=t=>({mode:"quick",dragging:null,draft:t,status:"editing",problem:""}),Ct=t=>({range:t,title:"",location:"",calendarId:"",guests:[]});function Wo(t,e){return t.dragging?"drag":t.mode==="quick"?"popup":e.eventPopup?"event-popup":e.sidebar?"sidebar":e.nav?"nav":null}function Vy(t,e){return t.mode==="quick"?{...t,dragging:null,draft:{...t.draft,range:e},status:t.status==="saving"?"saving":"editing"}:t.mode==="sidebar"?{...t,dragging:null,draft:{...t.draft,range:e}}:qr(Ct(e))}function zy(t,e,n){switch(e.type){case"drag":return{...t,dragging:e.range};case"drag-cancel":return{...t,dragging:null};case"drag-end":case"keyboard":return n.sidebar&&t.mode!=="sidebar"?{mode:"sidebar",dragging:null,draft:Ct(e.range)}:Vy(t,e.range);case"click":return t.mode==="quick"?Ze:t.mode==="sidebar"||n.sidebar?{...t,dragging:null}:n.eventPopup?{...t,dragging:null}:qr(Ct(e.range))}}function Gy(t,e){switch(e.type){case"gesture":return zy(t,e.gesture,e.layers);case"new-event":return qr(Ct(e.range));case"outside":return t.mode==="quick"?Ze:t;case"escape":{const n=Wo(t,e.layers);return n==="drag"?{...t,dragging:null}:n==="popup"?Ze:t}case"change":return t.mode==="idle"?t:{...t,draft:e.draft};case"save":return t.mode!=="quick"?t:{...t,status:"saving",problem:""};case"saved":return Ze;case"save-failed":return t.mode!=="quick"?t:{...t,status:"failed",problem:e.problem};case"expand":return t.mode!=="quick"?t:{mode:"sidebar",dragging:null,draft:t.draft};case"sidebar-range":return t.mode==="sidebar"?{...t,draft:{...t.draft,range:e.range}}:{mode:"sidebar",dragging:null,draft:Ct(e.range)};case"sidebar-closed":return t.mode==="sidebar"?Ze:t}}function Yy(t){return t.dragging?t.dragging:t.mode==="idle"?null:t.draft.range}const $y="[data-calendar-popover], [data-event-id], [data-task-id], [data-time-columns], [data-all-day-row], [role='dialog']";function Zy({layers:t,isPhone:e,closeToView:n,closeNav:r,drawnEvents:s}){const[i,a]=S.useReducer(Gy,Ze),o=S.useRef({session:i,layers:t,isPhone:e,closeToView:n,closeNav:r});o.current={session:i,layers:t,isPhone:e,closeToView:n,closeNav:r};const l=S.useRef(null),c=S.useRef(null),u=S.useRef(""),f=S.useRef(!1),h=S.useRef(!1),[g,p]=S.useState(""),m=S.useCallback(x=>{const C=o.current,R=C.session.mode==="idle";if(C.isPhone&&x.type==="click"&&R&&!C.layers.eventPopup)return;(x.type==="click"||x.type==="drag-end"||x.type==="keyboard")&&C.layers.eventPopup&&C.closeToView(),R&&(x.type==="click"||x.type==="keyboard")&&(l.current=x.origin),R&&x.type==="drag-end"&&(l.current=document.querySelector("[role='grid'][aria-label='Time grid']")),a({type:"gesture",gesture:x,layers:C.layers})},[]);S.useEffect(()=>{const x=R=>{R.target instanceof Element&&(R.target.closest($y)||(o.current.layers.eventPopup&&o.current.closeToView(),a({type:"outside"})))},C=R=>{if(R.key!=="Escape"||R.defaultPrevented)return;const{session:b,layers:M}=o.current,P=Wo(b,M);P===null||P==="drag"||(R.preventDefault(),P==="event-popup"?o.current.closeToView():P==="sidebar"?c.current?.():P==="nav"?o.current.closeNav():a({type:"escape",layers:M}))};return document.addEventListener("pointerdown",x,!0),window.addEventListener("keydown",C),()=>{document.removeEventListener("pointerdown",x,!0),window.removeEventListener("keydown",C)}},[]),S.useEffect(()=>{const x=i.mode==="quick";h.current&&i.mode==="idle"&&!f.current&&l.current?.focus(),x&&(f.current=!1),h.current=x},[i.mode]),S.useEffect(()=>{if(g===""||s.length===0)return;const x=document.querySelector(`[data-event-id^="${CSS.escape(g)}"]`);x&&(x.focus(),p(""))},[g,s]);const E=t.sidebar;S.useEffect(()=>{E||a({type:"sidebar-closed"})},[E]);const w=S.useCallback(x=>{l.current=x},[]),D=S.useCallback(x=>{f.current=!0,p(x)},[]);return{session:i,dispatch:a,takeGesture:m,setOrigin:w,requestClose:c,carriedFocus:u,focusSaved:D}}const Fo="remit:calendar-side-pane";function qy(){try{return localStorage.getItem(Fo)!=="closed"}catch{return!0}}function Xy(t){try{localStorage.setItem(Fo,t?"open":"closed")}catch{}}function Ky(t,e){return t.includes("sidebar")?!0:!t.some(r=>r!=="intelligence")&&e}function Qy(t){const e=Ql(),n=Jl(),[r,s]=S.useState(qy),i=!t&&Ky(e,r),a=t&&e.includes("nav"),o=S.useCallback(()=>{if(t){n(ds(e,a?void 0:"nav"));return}const c=!i;Xy(c),s(c);const u=e.filter(f=>f!=="sidebar");n(c?[...u,"sidebar"]:u)},[t,a,i,e,n]),l=S.useCallback(c=>{n(ds(e,c?"nav":void 0))},[e,n]);return{open:i,toggle:o,navOpen:a,setNavOpen:l}}const Vo="remit:calendar-density",mi="comfortable";function Jy(){try{return localStorage.getItem(Vo)==="compact"?"compact":mi}catch{return mi}}function eE(t){try{localStorage.setItem(Vo,t)}catch{}}const tE=t=>t==="compact"?"pills":"detail";function nE({days:t,calendars:e,density:n,today:r,anchorDate:s,now:i,selectedEventId:a,freeOn:o,loadingDates:l,error:c,onRetry:u,scrollTarget:f,onSelectEvent:h,onPickSlot:g,onZoomDay:p,onGoToDate:m,onReachStart:E,onReachEnd:w,atStartCap:D,atEndCap:x,onLoadEarlier:C,onLoadLater:R,onVisibleDayChange:b}){const M=S.useMemo(()=>El(t,i),[t,i]),P=!l.has(r);return c!=null?d.jsx("div",{className:"flex h-full items-center justify-center bg-surface",children:d.jsx(Cc,{title:"Couldn't load these days",error:c,onRetry:u})}):d.jsx(tf,{days:t,calendars:e,density:tE(n),today:r,focusDate:s,selectedEventId:a,freeOn:o,loadingDates:l,scrollTarget:f,onSelectEvent:h,onPickSlot:g,onZoomDay:p,onReachStart:E,onReachEnd:w,atStartCap:D,atEndCap:x,onLoadEarlier:C,onLoadLater:R,onVisibleDayChange:b,todayLead:P?d.jsx("div",{className:"border-b border-line bg-surface-sunken p-3",children:d.jsx(gf,{nextUp:M,calendars:e,today:r,onSelectEvent:h,onGoTo:m})}):void 0})}const rE=400;function sE({density:t,onPickSlot:e}){const{date:n,calendarIds:r}=fr(),{openEvent:s,setAnchorDate:i,zoomToDay:a}=hr(),o=Ci(),[l]=S.useState(()=>new Date),c=S.useMemo(()=>zt(l),[l]),u=S.useMemo(()=>l.toISOString(),[l]),[f,h]=S.useState(()=>rc(n)),[g,p]=S.useState(),[m,E]=S.useState(n),w=S.useRef(0),D=S.useRef(n),x=S.useCallback(A=>{D.current=A,E(A),h(re=>sc(re,A)),w.current+=1,p({date:A,token:w.current})},[]);S.useEffect(()=>{n!==D.current&&x(n)},[n,x]);const C=Sc(m,rE);S.useEffect(()=>{C!==D.current&&(D.current=C,i(C))},[C,i]);const R=S.useMemo(()=>ic(f),[f]),b=S.useMemo(()=>ac(R),[R]),{calendars:M,timeZoneByCalendarId:P,shown:k,narrowed:O,resolved:q,isLoading:B}=$l(r),W=Ul(b,O,q),X=Bl(b),ne=Zl(W.instances,P,k),Q=S.useMemo(()=>R.map(A=>bl(A,ne,c)),[R,ne,c]),Te=S.useMemo(()=>{const A=new Set;if(B||!q)return new Set(R);for(const re of R)W.pendingWindows.has(us(re))&&A.add(re);return A},[R,W.pendingWindows,B,q]),Be=S.useMemo(()=>oc(R,X.spans),[R,X.spans]),fe=S.useCallback(A=>X.pendingWindows.has(us(A.date))?Yn(A):Be.get(A.date)??Yn(A),[Be,X.pendingWindows]),We=S.useCallback(A=>{x(A),i(A)},[x,i]),ct=S.useCallback(A=>{const re=Si(A);s(re.calendarObjectId,re.recurrenceId)},[s]),dt=S.useCallback(()=>h(lc),[]),j=S.useCallback(()=>h(cc),[]),G=S.useCallback(()=>h(dc),[]),J=S.useCallback(()=>h(uc),[]),oe=S.useCallback(()=>{W.refetch(),X.refetch()},[W.refetch,X.refetch]);return d.jsx(nE,{days:Q,calendars:M,density:t,today:c,anchorDate:n,now:u,selectedEventId:o?wi(o.calendarObjectId,o.recurrenceId??""):"",freeOn:fe,loadingDates:Te,error:W.error??X.error,onRetry:oe,scrollTarget:g,onSelectEvent:ct,onPickSlot:e,onZoomDay:a,onGoToDate:We,onReachStart:dt,onReachEnd:j,atStartCap:hc(f),atEndCap:fc(f),onLoadEarlier:G,onLoadLater:J,onVisibleDayChange:E})}const zo="calendar-side-pane";function iE(t,e){if(t==="day")return[e,e];if(t==="week"){const n=yi($n(e),7);return[n[0],n[6]]}return["",""]}function pi({onNewEvent:t,newEventRef:e,onPicked:n,className:r}){const{view:s,date:i,calendarIds:a}=fr(),{goToDate:o,setCalendarIds:l}=hr(),{calendars:c,error:u,retry:f}=Di(),[h,g]=S.useState({for:i,month:i}),p=h.for===i?h.month:i,[m,E]=iE(s,i),w=new Set(ql(c,a)),D=x=>{const C=new Set(w);C.has(x)?C.delete(x):C.add(x),l(C.size===c.length?[]:c.map(R=>R.id).filter(R=>C.has(R)))};return d.jsx(Uy,{id:zo,className:r,onNewEvent:t,newEventRef:e,month:d.jsx(Sl,{month:p,today:zt(new Date),rangeStart:m,rangeEnd:E,onPickDay:x=>{o(x),n?.()},onShowMonth:x=>g({for:i,month:x})}),calendars:u!==null&&c.length===0?d.jsx(qn,{title:"Couldn't load your calendars",error:u,onRetry:f,compact:!0}):d.jsx(Oy,{calendars:c,visible:w,onToggle:D,onToggleAccount:(x,C)=>{const R=new Set(c.filter(M=>M.accountId===x).map(M=>M.id)),b=c.map(M=>M.id).filter(M=>R.has(M)?C:w.has(M));l(b.length===c.length?[]:b)}})})}const aE="This calendar changed while you were writing.",oE=(t,e)=>{if(e.allDay)return{...t,start:`${e.date}T00:00:00`,end:`${lE(e.endDate)}T00:00:00`};const n=Ge();return{...t,start:as(e.date,e.startTime,n),end:as(e.endDate,e.endTime,n)}};function lE(t){const[e,n,r]=t.split("-").map(Number);return new Date(Date.UTC(e,n-1,r+1)).toISOString().slice(0,10)}function cE(t,e,n,r){const s=Fy(),[i,a]=S.useState(()=>new Map),[o,l]=S.useState(),[c,u]=S.useState(),f=S.useRef(null),h=S.useMemo(()=>new Set(e.filter(D=>D.readOnly).map(D=>D.id)),[e]),g=S.useCallback((D,x)=>{l(void 0),u(void 0),a(C=>new Map(C).set(D.event.id,D.range)),s(D.event,D.range,x,n[D.event.calendarId]??"").then(C=>{a(R=>{const b=new Map(R);return b.delete(D.event.id),b}),C.kind!=="written"&&(u({text:C.kind==="conflict"?aE:`Couldn't move ${D.event.title}: ${C.message}`,retry:()=>g(D,x),conflict:C.kind==="conflict"}),requestAnimationFrame(()=>f.current?.focus()))})},[s,n]),p=S.useCallback((D,x)=>{const C=t.find(b=>b.id===D);if(!C)return;const R={event:C,range:x};if(C.seriesId!==""){l(R);return}g(R,void 0)},[t,g]),m=S.useMemo(()=>i.size===0?t:t.map(D=>{const x=i.get(D.id);return x?oE(D,x):D}),[t,i]),E=c&&d.jsxs("div",{className:"flex items-start gap-2 border-b border-line px-3 py-2",children:[d.jsx("div",{className:"min-w-0 flex-1",children:d.jsx(bi,{focusRef:f,failure:{text:c.text,reportHref:Zn(c.text),onRetry:c.conflict?()=>{u(void 0),r()}:c.retry,retryLabel:c.conflict?"Reload the week":void 0}})}),d.jsx("button",{type:"button","aria-label":"Dismiss",onClick:()=>u(void 0),className:"flex size-8 items-center justify-center rounded-full text-fg-muted hover:bg-surface-sunken",children:d.jsx(wl,{className:"size-4"})})]}),w=d.jsx(Ei,{open:o!==void 0,onClose:()=>l(void 0),title:"Move a repeating event",children:o&&d.jsx(Xl,{title:o.event.title,ruleText:"It repeats",instanceText:Ic(o.event),onChoose:D=>g(o,D),onCancel:()=>l(void 0)})});return{events:m,canMove:D=>{const x=t.find(C=>C.id===D);return x!==void 0&&!h.has(x.calendarId)},onMoveEvent:p,banner:E,prompt:w}}function dE({suggestions:t,busy:e,failure:n,reportHref:r,addBlocked:s,onAdd:i,onChangeFirst:a,onDismiss:o}){return d.jsxs("aside",{"aria-label":"Waiting for you",className:"hidden w-72 shrink-0 flex-col gap-2 overflow-y-auto border-r border-line bg-surface-sunken py-3 lg:flex",children:[d.jsxs("h3",{className:"flex items-center gap-1.5 px-row-inset text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:[d.jsx(Hc,{className:"size-3","aria-hidden":!0}),"Waiting for you"]}),n!==""&&d.jsx(Pc,{text:n,reportHref:r,className:"mx-row-inset"}),s!==void 0&&d.jsx("div",{className:"mx-row-inset rounded-md border border-warning/40 bg-warning-soft p-2 text-xs text-fg",children:s}),d.jsx(gc,{className:"px-row-inset",items:t.map(({suggestion:l,whenText:c})=>({id:l.id,card:d.jsx(mc,{suggestion:l,whenText:c,onAdd:()=>i(l.id),onReview:a&&(()=>a(l.id)),onDismiss:()=>o(l.id),addLabel:"Add to calendar",busy:e,addBlocked:s!==void 0})}))}),d.jsx("p",{className:"px-row-inset text-2xs text-fg-subtle",children:"None of this is on your calendar until you add it. Adding sends the organiser nothing."})]})}const uE=(t,e)=>e.kind==="refused"?`Couldn't ${t}: ${e.message}`:"";function fE({onChangeFirst:t}){const{suggestions:e,error:n}=Wl(),r=Di(),{defaultCalendarId:s}=r,i=Fl(),[a,o]=S.useState(""),l=e.map(m=>({suggestion:vc(m,{threadId:"",threadSubject:"",calendarId:s,sender:m.organizer===""?"From your mail":m.organizer}),whenText:pc(m)})),c=n===null?"":"Couldn't read what your mail is waiting on.";if(l.length===0&&c===""&&a==="")return null;const u=Vl(c||a||"pending invitations could not be answered"),f=m=>{const E=e.find(w=>w.suggestionId===m);E&&t(m,bc(E))},h=m=>{const E=e.find(w=>w.suggestionId===m);return E?.zoneCertainty==="Ambiguous"&&E.method!=="Cancel"},g=e[0]?.method==="Cancel",p=(m,E)=>{o(""),E().then(w=>o(uE(m,w)))};return d.jsx(dE,{suggestions:l,busy:i.isAnswering,failure:c||a,reportHref:u,addBlocked:yc(Ec(r),u),onAdd:m=>{if(h(m)){f(m);return}p("add this to your calendar",()=>i.accept(m,s))},onChangeFirst:g?void 0:f,onDismiss:m=>p("dismiss this",()=>i.dismiss(m,!1))})}const hE=["day","month","agenda"],gE=[{value:"comfortable",label:"Detail",shortLabel:"Detail"},{value:"compact",label:"Glance",shortLabel:"Glance"}],mE={year:"Couldn't load this year",month:"Couldn't load this month",week:"Couldn't load this week",day:"Couldn't load this day",agenda:"Couldn't load these days"};function pE({isPhone:t,detail:e}){const{view:n,date:r,calendarIds:s}=fr(),i=!ls(n),{events:a,calendars:o,timeZoneByCalendarId:l,colorByCalendarId:c,isLoading:u,error:f,retry:h,instanceOf:g,tasks:p,storedTasks:m}=Kl({view:n,date:r,calendarIds:s,enabled:i}),{updateTask:E}=Gl(),[w,D]=S.useState(),x=S.useCallback(function F(he){const le=m.find(ce=>ce.calendarTaskId===he);if(!le)throw new Error(`task ${he} is drawn but was not read`);D(void 0),E(le,{completed:!le.completed}).then(ce=>{if(ce.kind==="written")return;const ns=`Couldn't save "${le.summary}": ${ce.message}`;D({text:ns,reportHref:Zn(ns),onRetry:()=>F(he)})})},[m,E]),[C,R]=S.useState([]),b=S.useCallback(F=>R([...F]),[]),M=zl(C),P=C.filter(F=>F.method==="Cancel").map(F=>F.email),k=cE(a,o,l,h),O=k.events,{goToView:q,goToToday:B,goToDate:W,openEvent:X,openTask:ne,openNewEvent:Q,closeToView:Te,changeSuggestionFirst:Be,zoomToDay:fe,dayHref:We}=hr(),ct=ec(),dt=Ci(),j=ct?void 0:dt,G=tc(),J=nc(),[oe,A]=S.useState(Jy),re=S.useCallback(F=>{eE(F),A(F)},[]),Fe=S.useCallback(F=>{const he=g(F);X(he.calendarObjectId,he.recurrenceId)},[g,X]),Rn=J,me=Qy(t),{session:ee,dispatch:be,takeGesture:Go,setOrigin:Xr,requestClose:Kr,carriedFocus:It,focusSaved:Mn}=Zy({layers:{eventPopup:j!==void 0||G!==void 0,sidebar:J,nav:me.navOpen},isPhone:t,closeToView:Te,closeNav:()=>me.setNavOpen(!1),drawnEvents:O}),Yo=S.useCallback(F=>{ee.mode==="quick"&&(It.current=F,be({type:"expand"}),Q(Dl(ee.draft.range,Ge())))},[ee,It,be,Q]),$o=S.useMemo(()=>({session:ee,dispatch:be,requestClose:Kr,carriedFocus:It,focusSaved:Mn,trackSends:b}),[ee,be,Kr,It,Mn,b]),Qr=Yy(ee),Zo=Qr?{range:Qr,title:ee.mode==="idle"?"":ee.draft.title,tone:ee.mode==="sidebar"&&!ee.dragging?"draft":"selection",warning:ee.mode==="quick"&&ee.status==="failed",handles:ee.mode==="sidebar"}:void 0,Jr=new Date().toISOString(),se=kl(n,t),es=F=>be({type:"new-event",range:F}),qo=S.useMemo(()=>{const F={};if(se!=="year")return F;const he=Ge();for(const le of O){const ce=le.allDay?le.start.slice(0,10):os(le.start,he).date;F[ce]=(F[ce]??0)+1}for(const le of p){const ce=le.allDay?le.due.slice(0,10):os(le.due,he).date;F[ce]=(F[ce]??0)+1}return F},[O,p,se]),Nt=se==="day"?[r]:se==="week"?yi($n(r),7):void 0,ts=j?wi(j.calendarObjectId,j.recurrenceId??""):"",kt=S.useRef(null),Pt=S.useCallback(()=>{const F=zt(new Date),he=new Date().getHours()*60,ce=Cl(Nt??[r],F,he);Xr(document.activeElement instanceof HTMLElement?document.activeElement:kt.current),j&&Te(),be({type:"new-event",range:xl(ce.date,ce.minute)})},[Nt,r,j,Te,Xr,be]),Xo=se==="week"||se==="day"?Tl(se==="week"?$n(r):r):void 0,Ko=ls(n)?d.jsx(sE,{density:oe,onPickSlot:es}):f!=null?d.jsx(qn,{title:mE[n],error:f,onRetry:h}):u?d.jsx("div",{role:"status","aria-label":"Loading the calendar",className:"flex h-full items-center justify-center bg-surface",children:d.jsx(Rl,{className:"size-6 animate-spin text-fg-subtle"})}):se==="year"?d.jsx(Ml,{date:r,today:zt(new Date),counts:qo,onPickDay:fe}):Nt?d.jsx(Il,{days:Nt,events:O,colorByCalendarId:c,density:oe,timeZone:Ge(),now:Jr,selectedEventId:ts,draft:Zo,onGesture:Go,onSelectEvent:Fe,onOpenDay:fe,touch:t,canMove:k.canMove,onMoveEvent:k.onMoveEvent,tasks:p,selectedTaskId:G??"",onSelectTask:ne,onToggleTask:x}):d.jsx(Hy,{date:r,events:O,colorByCalendarId:c,density:oe,selectedEventId:ts,timeZone:Ge(),now:Jr,onSelectEvent:Fe,onPickSlot:es,dayHref:We,onZoomDay:fe,canMove:k.canMove,onMoveEvent:k.onMoveEvent,tasks:p,onSelectTask:ne});return d.jsxs(Mc.Provider,{value:$o,children:[d.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-surface text-fg",children:[d.jsx(_y,{view:se,views:t?hE:void 0,title:t&&se==="day"?new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"short",timeZone:"UTC"}).format(new Date(`${r}T00:00:00Z`)):Nl(se,r),weekNumber:Xo,onChangeView:q,onPrev:()=>W(cs(r,se,-1)),onNext:()=>W(cs(r,se,1)),onToday:B,touch:t,sidePane:{open:t?me.navOpen:me.open,controls:zo,onToggle:me.toggle},trailing:se==="week"||se==="day"?d.jsx(Wy,{ariaLabel:"Calendar density",options:gE,value:oe,onChange:re,touch:t,className:"shrink-0"}):void 0}),d.jsxs("div",{className:"relative flex min-h-0 flex-1",children:[me.open&&d.jsx(pi,{onNewEvent:Pt,newEventRef:kt}),!(t&&Rn)&&d.jsxs(d.Fragment,{children:[t&&ee.mode==="idle"&&d.jsx(gi,{onNewEvent:Pt,newEventRef:kt,className:"fixed right-4 bottom-[calc(var(--app-tab-bar,0px)+1rem)] z-30 size-14 rounded-full"}),!me.open&&!t&&d.jsx(gi,{onNewEvent:Pt,newEventRef:kt,className:"absolute top-2 left-2 z-20"}),!J&&d.jsx(fE,{onChangeFirst:Be}),d.jsxs("div",{"data-calendar-body":"",className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[k.banner,P.length>0&&d.jsx("div",{className:"p-2",children:d.jsx(Hl,{guests:P,onDismiss:()=>R([])})}),w&&d.jsx("div",{className:"p-2",children:d.jsx(bi,{failure:w})}),M.checkError!==null&&d.jsx("div",{className:"p-2",children:d.jsx(qn,{title:`Couldn't check whether the messages to ${M.unchecked.join(", ")} went out`,error:M.checkError,onRetry:M.recheck,compact:!0})}),M.missed.length>0&&d.jsx("div",{className:"p-2",children:d.jsx(jl,{missed:M.missed,onRetry:()=>{M.retry()},reportHref:Zn(`Invitations not sent to ${M.missed.join(", ")}`),onDismiss:()=>R([])})}),Ko]})]}),!Rn&&e,ee.mode==="quick"&&d.jsx(Rc,{session:ee,dispatch:be,onMoreOptions:Yo,onSaved:Mn,touch:t}),Rn&&d.jsx("aside",{"aria-label":"Event",className:t?"min-h-0 min-w-0 flex-1":"w-[26rem] shrink-0 border-l border-line",children:e})]})]}),k.prompt,t&&d.jsx(Ei,{open:me.navOpen,onClose:()=>me.setNavOpen(!1),title:"Calendars",anchor:"left",children:d.jsx(pi,{onNewEvent:Pt,onPicked:()=>me.setNavOpen(!1),className:"w-full"})})]})}function zE(){const t=jc()==="phone";return d.jsx(pE,{isPhone:t,detail:d.jsx(Pl,{})})}export{zE as component};
|