@remit/web-client-dist 0.0.673 → 0.0.675
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 +1 -0
- package/assets/BriefPane-BzlqkW4r.js +1 -0
- package/assets/CalendarEventEditor-BpGmPZ2Z.js +1 -0
- package/assets/CalendarEventPopup-Brcgx7tV.js +1 -0
- package/assets/CalendarQuickCreate-CwkBXqAB.js +1 -0
- package/assets/CalendarSession--XFP5lXS.js +1 -0
- package/assets/EmptyState-dD_YhGMH.js +1 -0
- package/assets/ErrorState-nA0Ptq3g.js +1 -0
- package/assets/FlaggedPane-BwhUf1qN.js +1 -0
- package/assets/FullCompose-dJ4mfUrX.js +1 -0
- package/assets/LabelApplyTrigger-BA7ANeDk.js +1 -0
- package/assets/MailShell-0sTtK1xD.js +1 -0
- package/assets/MailViewChrome-BEx9Dr1Z.js +1 -0
- package/assets/MailboxPane-DYgnYeOy.js +1 -0
- package/assets/{MessageBody-xzQttW18.js → MessageBody-Deha778B.js} +3 -3
- package/assets/MessageToolbar-5T47fDWC.js +1 -0
- package/assets/NavMenuButton-C-7-t18I.js +1 -0
- package/assets/OnboardingWizard-hfP07hpw.js +1 -0
- package/assets/OutboxPane-gEXLW7BJ.js +1 -0
- package/assets/_calendarObjectId-Dbrtihva.js +1 -0
- package/assets/_mailboxId-B587Zr5T.js +1 -0
- package/assets/_messageId-BxlZMqGk.js +1 -0
- package/assets/_messageId-CRIBYDCW.js +1 -0
- package/assets/_messageId-DTs144Nv.js +1 -0
- package/assets/_outboxMessageId-BxdPyrXI.js +1 -0
- package/assets/_recurrenceId-QBmk5dbN.js +1 -0
- package/assets/_threadId-8Y3P5szz.js +1 -0
- package/assets/_threadId-AMQdO9xw.js +1 -0
- package/assets/_threadId-mpk_WkaQ.js +1 -0
- package/assets/_view._date-BfJq9sBQ.js +1 -0
- package/assets/account-service-status-Kz9s3jOk.js +1 -0
- package/assets/accounts-B5C8kCn6.js +1 -0
- package/assets/advanced-CudHnY-7.js +1 -0
- package/assets/appearance-BTH52atO.js +1 -0
- package/assets/{avatar-CDZx9RcB.js → avatar-vPm9XfmM.js} +1 -1
- package/assets/{bottom-sheet-B-kTBnyv.js → bottom-sheet-BTdseD_6.js} +1 -1
- package/assets/brief-BC_KN7ph.js +1 -0
- package/assets/{brief-BnVwi6Bh.js → brief-DuHUqR8b.js} +1 -1
- package/assets/calendar-BQjH3OHS.js +1 -0
- package/assets/calendar-LLRgZQzl.js +1 -0
- package/assets/calendar-event-popup-Mft0N_sd.js +1 -0
- package/assets/calendar-event-sidebar-D5vjFGdS.js +1 -0
- package/assets/calendar-failure-note-BUFaaizf.js +1 -0
- package/assets/calendar-report-CzeBcU6C.js +1 -0
- package/assets/calendar-suggestion-ClsxDTZs.js +1 -0
- package/assets/calendars-zYfPB3b8.js +1 -0
- package/assets/card-865cdsJK.js +1 -0
- package/assets/checkbox-Qon94b1C.js +1 -0
- package/assets/{circle-check-Nj7sUGPS.js → circle-check-Db07NpOC.js} +1 -1
- package/assets/circle-check-big-CyVG6r7N.js +1 -0
- package/assets/circle-help-CVShnhWn.js +1 -0
- package/assets/{clock-99u2Mdmy.js → clock-B9kFW89H.js} +1 -1
- package/assets/compose._-_outboxMessageId_-BkKmzR39.js +1 -0
- package/assets/compose._-_outboxMessageId_-BnYGu6ez.js +1 -0
- package/assets/compose._-_outboxMessageId_-C5Aukg6m.js +1 -0
- package/assets/compose._-_outboxMessageId_-Ck-eEtzy.js +1 -0
- package/assets/{config-import-CAmEPP05.js → config-import-C2ovEkHy.js} +1 -1
- package/assets/{confirm-dialog-PhUq_oc3.js → confirm-dialog-CgMAaLI3.js} +1 -1
- package/assets/copy-CIKgpUwt.js +1 -0
- package/assets/{credential-steps-BES-y0iD.js → credential-steps-BWguS0eW.js} +1 -1
- package/assets/download-A4hq8dWf.js +1 -0
- package/assets/edit-CxVYhmi5.js +1 -0
- package/assets/edit-DXN-G3Tu.js +1 -0
- package/assets/{external-link-BsYxbrL5.js → external-link-DaKTW3eK.js} +1 -1
- package/assets/{file-json-C0JfxlBX.js → file-json-DiHW8YBd.js} +1 -1
- package/assets/filters-1uKuLkQU.js +1 -0
- package/assets/{flagged-BTJq-RZj.js → flagged-BIza20sq.js} +1 -1
- package/assets/flagged-DmSptMzm.js +1 -0
- package/assets/folders-Bd16ltK4.js +1 -0
- package/assets/{help-copy-BUCBLhdW.js → help-copy-N4JgEUmu.js} +1 -1
- package/assets/import-DJptfpxt.js +1 -0
- package/assets/index-B18BvpkW.js +1 -0
- package/assets/index-B4pYEqZI.js +1 -0
- package/assets/index-B77HnSA5.js +1 -0
- package/assets/{index-BBaBlwlN.js → index-BWAq8iOl.js} +7 -7
- package/assets/index-BZdYp7ae.js +1 -0
- package/assets/index-BiCNOLIH.js +1 -0
- package/assets/index-BzL5-pGT.js +349 -0
- package/assets/{index-C2Hz4y-Q.css → index-C8VKP1dT.css} +1 -1
- package/assets/index-CoCVPZ34.js +1 -0
- package/assets/index-CroyVnhC.js +1 -0
- package/assets/index-DTs144Nv.js +1 -0
- package/assets/index-DsgtllX4.js +1 -0
- package/assets/index-DtqBFgK5.js +1 -0
- package/assets/index-DupXMcS6.js +1 -0
- package/assets/kbd-B9MFmWVU.js +1 -0
- package/assets/labels-DeCZEWet.js +1 -0
- package/assets/mail-CSUpbRUP.js +1 -0
- package/assets/menu-CGw_RHKl.js +1 -0
- package/assets/new-DVwQ9Ia3.js +1 -0
- package/assets/onboarding-CDWqPDW8.js +1 -0
- package/assets/onboarding-completion-DbgUYeRa.js +1 -0
- package/assets/outbox-Ct7VdX2v.js +1 -0
- package/assets/{pencil-CoAnhAKI.js → pencil-DOoqyGzC.js} +1 -1
- package/assets/{popover-menu-BHNjsQiI.js → popover-menu-CNiMANtf.js} +1 -1
- package/assets/refresh-cw-D1SQy8O7.js +1 -0
- package/assets/reply-CQarAZxU.js +1 -0
- package/assets/{rich-text-D9hn7JQa.js → rich-text-DgI7vzll.js} +3 -3
- package/assets/{rich-text-spellcheck-worker-provider-BqOsf6u-.js → rich-text-spellcheck-worker-provider-paPOw9As.js} +1 -1
- package/assets/rotate-ccw-DPB71584.js +1 -0
- package/assets/{roving-focus-B9mHbGbD.js → roving-focus-Coea111y.js} +1 -1
- package/assets/{row-actions-BkhFe3TY.js → row-actions-CiZruXil.js} +1 -1
- package/assets/search-mirror-_Dap9COg.js +1 -0
- package/assets/search-token-index-DQHE1g7A.js +1 -0
- package/assets/{sections-ClqQBEFv.js → sections-C6oVXjho.js} +1 -1
- package/assets/senders-DIVpkzIq.js +1 -0
- package/assets/settings-Cv257vpL.js +1 -0
- package/assets/settings-screen-4md2ibPl.js +1 -0
- package/assets/shield-check-BcUXVpR8.js +1 -0
- package/assets/sparkles-C1l6GCPT.js +1 -0
- package/assets/suggested-vips-iEt-4yp9.js +1 -0
- package/assets/suggestion._suggestionId-BQw9qGr-.js +1 -0
- package/assets/{undo-2-WqFuHEgY.js → undo-2-DHJ6nykB.js} +1 -1
- package/assets/useCalendarData-Bz4EDHDO.js +2 -0
- package/assets/useCalendarSuggestions-DcYFtQhb.js +1 -0
- package/assets/{useDebouncedValue-nmGpghjy.js → useDebouncedValue-B7157ZPO.js} +1 -1
- package/assets/{useFilters-zdrGUBZF.js → useFilters-C3bLY42W.js} +1 -1
- package/assets/{useLabels-CesUuQey.js → useLabels-DYdHiHXI.js} +1 -1
- package/assets/useLayoutTier-5aJYrTut.js +1 -0
- package/assets/useMediaQuery-7Q3jBluO.js +1 -0
- package/assets/useMessageBodyContent-CWGtiddz.js +1 -0
- package/assets/useQueries-Sm8S3Cgh.js +1 -0
- package/assets/useRefreshControl-bA8HK_j-.js +1 -0
- package/assets/useResultFolderIndex-BaqajWHb.js +1 -0
- package/assets/{useSignature-BMl5h116.js → useSignature-sxHvGfKr.js} +1 -1
- package/assets/warnings-ByqpxH4J.js +5 -0
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/BriefPane-DqtL8KK7.js +0 -1
- package/assets/CalendarComposePane-Sr72cVvW.js +0 -1
- package/assets/CalendarComposeSeed-B0PN5iBD.js +0 -1
- package/assets/CalendarShell-_yGJJZGQ.js +0 -1
- package/assets/EmptyState-Do3nwfV4.js +0 -1
- package/assets/ErrorState-DcwvjIQG.js +0 -1
- package/assets/FlaggedPane-Cmhk0gcN.js +0 -1
- package/assets/FullCompose-aUTiTI79.js +0 -1
- package/assets/LabelApplyTrigger-BNJ7ewFc.js +0 -1
- package/assets/MailNav-BdiWAfH_.js +0 -1
- package/assets/MailShell-DTW4ysuk.js +0 -1
- package/assets/MailViewChrome-BOp09SXr.js +0 -1
- package/assets/MailboxPane-CbM92Ovm.js +0 -1
- package/assets/MessageToolbar-D_XXU4rk.js +0 -1
- package/assets/NavMenuButton-D-YzcNLk.js +0 -1
- package/assets/OnboardingWizard-hiUJAJmS.js +0 -1
- package/assets/OpenCalendarEvent-DI9FmufS.js +0 -2
- package/assets/OutboxPane-5Tg_XaNz.js +0 -1
- package/assets/SignInAgain-CZ5gXYZu.js +0 -1
- package/assets/_calendarObjectId-vCwbJTnk.js +0 -1
- package/assets/_mailboxId-Cfuu19RK.js +0 -1
- package/assets/_messageId-CgycoOJ5.js +0 -1
- package/assets/_messageId-D-b80c2N.js +0 -1
- package/assets/_messageId-DRetwfpf.js +0 -1
- package/assets/_outboxMessageId-Bn0dQ4xZ.js +0 -1
- package/assets/_recurrenceId-Cnhx2TOl.js +0 -1
- package/assets/_threadId-Cng5uaoZ.js +0 -1
- package/assets/_threadId-DOrkCv20.js +0 -1
- package/assets/_threadId-DXMeaFS2.js +0 -1
- package/assets/_view._date-CbKJy0l4.js +0 -1
- package/assets/accounts-Cq3q9zT9.js +0 -1
- package/assets/advanced-CmQPXUBR.js +0 -1
- package/assets/appearance-Bj0VbMeI.js +0 -1
- package/assets/attendee-row-CPJnqwGs.js +0 -1
- package/assets/bell-off-Bzm-PBgf.js +0 -1
- package/assets/brief-smZMIU_D.js +0 -1
- package/assets/bug-rutCyt-b.js +0 -1
- package/assets/calendar-Badl9o28.js +0 -1
- package/assets/calendar-clash-strip-DBNuXhBt.js +0 -1
- package/assets/calendar-report-OI80fkc1.js +0 -1
- package/assets/calendar-subscription-B-aAc2Gy.js +0 -1
- package/assets/calendar-suggestion-B5sKDqe0.js +0 -1
- package/assets/calendars-CUfsifTm.js +0 -1
- package/assets/card-WnranLyn.js +0 -1
- package/assets/checkbox-DJpIppZD.js +0 -1
- package/assets/chevron-left-CF03ieoO.js +0 -1
- package/assets/circle-check-big-Bkno0zML.js +0 -1
- package/assets/circle-help-DqnCeQ17.js +0 -1
- package/assets/compose._-_outboxMessageId_-BKdFP0ao.js +0 -1
- package/assets/compose._-_outboxMessageId_-BtlHF3xu.js +0 -1
- package/assets/compose._-_outboxMessageId_-D0RsY9X4.js +0 -1
- package/assets/compose._-_outboxMessageId_-D388BLER.js +0 -1
- package/assets/copy-CLKRqvl9.js +0 -1
- package/assets/download-DS8Ui8jJ.js +0 -1
- package/assets/filters-BAZYluMO.js +0 -1
- package/assets/flagged-CoNpo9-C.js +0 -1
- package/assets/folders-C-gfrylt.js +0 -1
- package/assets/import-D5avZjYG.js +0 -1
- package/assets/index-B-6f2NO7.js +0 -1
- package/assets/index-BCw2cMz0.js +0 -1
- package/assets/index-BVmS60uo.js +0 -1
- package/assets/index-Bnka257H.js +0 -1
- package/assets/index-CBHO_oxW.js +0 -1
- package/assets/index-CgycoOJ5.js +0 -1
- package/assets/index-D-b80c2N.js +0 -1
- package/assets/index-D7VpR8Bx.js +0 -293
- package/assets/index-DYyayMku.js +0 -1
- package/assets/index-DZZWB09x.js +0 -1
- package/assets/index-XWbwFOgn.js +0 -1
- package/assets/kbd-DzZig-MJ.js +0 -1
- package/assets/labels-dyDIPXoj.js +0 -1
- package/assets/mail-BiL0g7on.js +0 -1
- package/assets/mail-Bir39SMd.js +0 -1
- package/assets/map-pin-C0usgYas.js +0 -1
- package/assets/menu-liPRY-HF.js +0 -1
- package/assets/minus-Cs2PKH6V.js +0 -1
- package/assets/new-BEBqxznp.js +0 -1
- package/assets/onboarding-CHwAu1ha.js +0 -1
- package/assets/onboarding-completion-CYRjdQQn.js +0 -1
- package/assets/outbox-C0EOKXQq.js +0 -1
- package/assets/refresh-cw-CpnxiYht.js +0 -1
- package/assets/rotate-ccw-Cj4SUyhN.js +0 -1
- package/assets/search-mirror-DQmL3P3k.js +0 -1
- package/assets/search-query-0wEBmb1P.js +0 -1
- package/assets/search-token-index-CXQQu5cA.js +0 -1
- package/assets/senders-DuUfs3Pf.js +0 -1
- package/assets/settings-KZn9t_aP.js +0 -1
- package/assets/settings-screen-BjSyVU2l.js +0 -1
- package/assets/shield-check-CD-wbm99.js +0 -1
- package/assets/suggested-vips-B7UuI1d0.js +0 -1
- package/assets/suggestion._suggestionId-BnW2e786.js +0 -1
- package/assets/useCalendarData-C3g6QMEH.js +0 -1
- package/assets/useCalendarEvents-BQ8pmFV8.js +0 -1
- package/assets/useCalendarFreeBusy-CrTlSUQQ.js +0 -1
- package/assets/useCalendarWrites-LwW_U-yG.js +0 -1
- package/assets/useCalendars-B1migLvB.js +0 -1
- package/assets/useLayoutTier-B0zSRsSh.js +0 -1
- package/assets/useMessageBodyContent-DPlXjxls.js +0 -1
- package/assets/useQueries-BDOaD0Tu.js +0 -1
- package/assets/useRefreshControl-CSd_fo15.js +0 -1
- package/assets/useResultFolderIndex-D44p4QVU.js +0 -1
- package/assets/warnings-L0tU6MHK.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as en,r as S,bS as Lo,j as d,bT as _o,bU as Uo,bV as Bn,o as P,bW as Bo,bX as tn,bY as Wo,bZ as ut,b_ as Ee,v as rr,b$ as Fo,c0 as Dn,c1 as Gr,c2 as Re,c3 as Vo,c4 as zo,c5 as Go,c6 as ft,ak as Yr,c7 as Yo,c8 as Zo,c9 as $o,ca as Zr,cb as qo,t as Xo,aw as Ko,ah as Qo,bR as Jo,at as el,aL as si,f as tl,s as nl,cc as rl,cd as sl,ce as Bt,cf as il,w as al,cg as ol,ch as ii,ci as Wn,X as ll,aH as ai,cj as $r,ck as cl,cl as dl,cm as ul,cn as fl,co as hl,cp as qr,L as gl,cq as ml,cr as pl,cs as Xr,ct as vl,cu as yl,O as El}from"./index-BzL5-pGT.js";import{M as bl}from"./menu-CGw_RHKl.js";import{c as Sl,r as oi,d as Be,U as wl,e as Dl,f as Cl,g as li,b as ci,h as xl,i as Tl}from"./useCalendarSuggestions-DcYFtQhb.js";import{s as Rl,u as Ml,a as Il,b as Nl,R as kl,c as Pl}from"./useCalendarData-Bz4EDHDO.js";import{d as Hl,e as Ol,p as Kr}from"./reply-CQarAZxU.js";import{a as sr,b as ir,c as di,d as jl,u as Al}from"./calendar-LLRgZQzl.js";import{C as ui,r as Ll,a as _l,d as Ul,w as Bl,b as Qr,f as Wl,e as Fl,c as Vl,l as zl,g as Gl,h as Yl,i as Zl,s as $l,j as ql,Z as Xl,E as Kl,k as Ql,t as Jl,m as ec,n as tc,o as nc}from"./calendar-suggestion-ClsxDTZs.js";import{u as rc}from"./useDebouncedValue-B7157ZPO.js";import{M as sc,c as fi,f as ic,a as ac}from"./calendar-report-CzeBcU6C.js";import{C as oc}from"./clock-B9kFW89H.js";import{f as hi,E as lc}from"./ErrorState-nA0Ptq3g.js";import{C as cc,A as dc}from"./account-service-status-Kz9s3jOk.js";import{C as uc}from"./CalendarQuickCreate-CwkBXqAB.js";import{d as fc,p as hc,C as gc}from"./CalendarSession--XFP5lXS.js";import{C as mc}from"./calendar-event-popup-Mft0N_sd.js";import{C as pc}from"./calendar-failure-note-BUFaaizf.js";import{S as vc}from"./sparkles-C1l6GCPT.js";import{u as yc}from"./useLayoutTier-5aJYrTut.js";import"./useQueries-Sm8S3Cgh.js";import"./useMediaQuery-7Q3jBluO.js";import"./pencil-DOoqyGzC.js";const Ec=en("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 bc=en("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 Sc=en("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 wc=en("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"}]]),He=globalThis.Temporal,Dc=(t,e)=>`Non-positive ${t}: ${e}`,Cc=(t,e)=>`Non-finite ${t}: ${e}`,xc=t=>`Cannot convert bigint to ${t}`,Tc="Invalid object",Rc=(t,e,n,r)=>nn(t,e)+`; must be between ${n}-${r}`,nn=(t,e)=>`Invalid ${t}: ${e}`,Mc=1e3,Ic=1e6,Nc=1e9,kc=6e10,Pc=36e11;function Hc(t){return t===void 0?Object.create(null):Ac(t)}function gi(t,e="number"){if(typeof t=="bigint")throw new TypeError(xc(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Cc(e,t));return t}function ar(t,e){return Math.trunc(gi(t,e))||0}function Jr(t,e){return Oc(ar(t,e),e)}function Oc(t,e="number"){if(t<=0)throw new RangeError(Dc(e,t));return t}function jc(t,e,n){return Math.min(Math.max(t,e),n)}function mi(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function Ac(t){if(!mi(t))throw new TypeError(Tc);return t}const Lc=nn,_c=t=>`Missing ${t}`,Uc=(t,e,n)=>nn(t,e)+"; must be "+Object.keys(n).join(),Bc="Cannot use valueOf",Wc="Invalid calling context",Fc=(t,e)=>`Unknown calendar ${t}; might need ${e}`,Vc=t=>nn("TimeZone",t),rn="Out-of-bounds date",zc=t=>`Invalid substring: ${t}`,pi=jc;function oe(t){throw new RangeError(t)}function Xe(t){throw new TypeError(t)}function es(t,e,n,r,s){return vi(e,((i,a)=>{const o=i[a];return o===void 0&&Xe(_c(a)),o})(t,e),n,r)}function vi(t,e,n,r,s,i){const a=pi(e,n,r);return e!==a&&oe(((o,l,c,u,f)=>Rc(o,l,c,u))(t,e,n,r)),a}function Ye(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 Gc=t=>Yc({name:t}),Yc=(t,e)=>or(n=>({value:n,configurable:1,writable:!1}),t),Zc=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function or(t,e){const n={};for(const r in e)n[r]=t(e[r],r);return n}function $c(t,e){const n={};for(const r of t)n[r]=e;return n}function yi(t){const e={};for(const n of t)e[n]=r=>r[n];return e}function Ei(t,e,n=Object.create(null)){for(const r of t)n[r]=e[r];return n}function lr(t,...e){return(...n)=>t(...e,...n)}function ts(){}function ns(t){return t[0].toUpperCase()+t.substring(1)}function qc(t){return new RegExp(`^${t}$`,"i")}function Xc(t){return parseInt(t.padEnd(9,"0"))}function Kc(t){return t&&t!=="+"?-1:1}function Cn(t){return t===void 0?0:parseInt(t)}function Wt(t,e){return String(e).padStart(t,"0")}const ge=lr(Wt,2);function Qc(t,e){return Math.sign(t-e)}function bi(t,e){const n=t/e;return t%e<0n?n-1n:n}function Si(t,e){const n=bi(t,e);return[n,t-n*e]}function ye(t,e){return[Math.floor(t/e),sn(t,e)]}function sn(t,e){return(t%e+e)%e}function Jc(t,e){return Math.trunc(t/e)||0}function It(t){return Math.abs(t%1)===.5}function ed(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 Ke=void 0;function an(t){return t===Ke?"iso8601":t===0?"gregory":t.id}function td(t,e){return"M"+ge(t)+(e?"L":"")}const nd={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},rd=Object.keys(nd),cr=Mc,on=Ic,St=Nc,dr=kc,wi=Pc,ur=864e11,Di=BigInt(on),Fn=BigInt(St),Me=BigInt(ur),ln=rd.slice(0,6),fr=yi(ln),sd=["day","month","year"];function id(t){return od(t),t}const ad={hour:23,minute:59,second:59};function od(t,e){const n={};for(const r of ln)n[r]=vi(r,t[r],0,ad[r]||999);return n}function hr(t){return Ci(t)*St+xi(t)}function Ci(t){return 3600*t.hour+60*t.minute+t.second}function xi(t){return t.millisecond*on+t.microsecond*cr+t.nanosecond}function ld(t){const[e,n]=ye(t,on),[r,s]=ye(n,cr);return cd(e,r,s)}function cd(t,e=0,n=0){const[r,s]=ye(t,36e5),[i,a]=ye(s,6e4),[o,l]=ye(a,1e3);return{hour:r,minute:i,second:o,millisecond:l,microsecond:e,nanosecond:n}}function rs(t){const[e,n]=Si(t,Fn);return[Number(e),Number(n)]}function dd(t){return gr(t)+BigInt(hr(t))}function gr(t){return BigInt(Ft(t))*Me}function Ft(t){return ht(t.year,t.month,t.day)}function ht(t,e=1,n=1){const r=e-1;return t+=Math.floor(r/12),e=sn(r,12),Date.UTC(t%400-400,e,0)/864e5+146097*(Jc(t,400)+1)+n}function cn(t){const[e,n]=Si(t,Me);return{...ud(Number(e)),...ld(Number(n))}}function ud(t){const e=new Date(864e5*sn(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}function fd(t){return[t,0]}function hd(t,e,n){return{year:t,month:e,day:n}}function Ti(t,e){switch(e){case 2:return dn(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function gd(t){return dn(t)?366:365}function dn(t){return t%4==0&&(t%100!=0||t%400==0)}function mr(t){return sn(ht(t.year,t.month,t.day)+4,7)||7}function Ri(t){return ht(t.year,t.month,t.day)-ht(t.year)+1}function Mi(t){let e=t.year,n=Math.floor((Ri(t)-mr(t)+10)/7),r=xn(e);return n<1?n=r=xn(--e):n>r&&(n=1,r=xn(++e)),{weekOfYear:n,yearOfWeek:e,Be:r}}function xn(t){const e=mr({year:t,month:1,day:1});return e===4||e===3&&dn(t)?53:52}function md({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function pd(t){return vd(t),id(t)}function vd(t){return yd(t),t}function yd(t,e){const{year:n}=t,r=es(t,"month",1,12);return{year:n,month:r,day:es(t,"day",1,Ti(n,r))}}function me(t,e){return t?t.ae(e):e}function Ed(t,e,n){return t?t.L(e,n):fd(n)}function ss(t,e){return t===0?md(e):t&&t.h?.(e)||{}}function bd(t,e,n,r){return t?t.de(e,n,r):hd(e,n,r)}function Sd(t,e){return t?t.j(e):12}function wd(t,e,n){return t?t.o(e,n):Ti(e,n)}function Dd(t,e){const{year:n,month:r}=me(t,e),[s,i]=Ed(t,n,r);return td(s,i)}function Ii(t,e){const{year:n}=me(t,e);return t?t.q(n):dn(n)}function Ni(t,e){const{year:n}=me(t,e);return Sd(t,n)}function ki(t,e){const{year:n,month:r}=me(t,e);return wd(t,n,r)}function Pi(t,e){const{year:n}=me(t,e);return t?t.i(n):gd(n)}function Cd(t,e){if(!t)return Ri(e);const{year:n}=me(t,e),r=bd(t,n,1,1);return Ft(e)-Ft(r)+1}function xd(t,e){return t===Ke?Mi(e).weekOfYear:void 0}function Td(t,e){return t===Ke?Mi(e).yearOfWeek:void 0}const Vt=lr(Rd,"string");function Rd(t,e,n=t){return typeof e!==t&&Xe(Lc(n,e)),e}function Md(t,e="number"){return Number.isInteger(t)||oe(((n,r)=>`Non-integer ${n}: ${r}`)(e,t)),t||0}function Id(t){return typeof t=="symbol"&&Xe("Cannot convert Symbol to string"),String(t)}function Nd(t,e){return mi(t)?String(t):Vt(t,e)}function kd(t,e){return Md(gi(t,e),e)}const Pd={compatible:0,reject:1,earlier:2,later:3},Hd=[Math.floor,t=>It(t)?Math.floor(t):Math.round(t),Math.ceil,t=>It(t)?Math.ceil(t):Math.round(t),Math.trunc,t=>It(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=>It(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)];function Od(t,e,n,r=0){const s=n[t];if(s===void 0)return r;const i=Id(s),a=e[i];return a===void 0&&oe(Uc(t,i,e)),a}const jd=lr(Od,"disambiguation",Pd),Hi=BigInt(1e8)*Me,pr=BigInt(-1e8)*Me,Oi=pr-Me;function Ad(t){const e=gr(t);return Ld(e),e!==Oi||hr(t)||oe(rn),t}function Ld(t,e=1){(t<(e?Oi:pr)||t>Hi)&&oe(rn)}function un(t){return(t<pr||t>Hi)&&oe(rn),t}function _d(t,e){return un(gr(t)+BigInt(hr(t)-e))}function Ud(t){return{epochNanoseconds:t}}function ji(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function Bd(t,e){return Ei(ln,t,Wd(t,e))}function Wd(t,e){return Ei(sd,t,{calendar:e})}function Ai(t){return e=t.epochNanoseconds,Number(bi(e,Di));var e}function Li(t){return t.epochNanoseconds}function Fd(t){return Vd(t,dr,7)}function Vd(t,e,n){return zd(t/e,n)*e}function zd(t,e){return Hd[e](t)}const _i=Ye(Gd,WeakMap);function Gd(t){const{epochNanoseconds:e,timeZone:n}=t,r=n.B(e);return{...cn(e+BigInt(r)),offsetNanoseconds:r}}function Yd(t,e,n=0,r=t.N(e)){if(r.length===1)return r[0];if(n===1&&oe("Ambiguous offset"),r.length)return r[n===3?1:0];const s=dd(e),i=((o,l)=>{const c=o.B(l-Me);return(u=>(u>ur&&oe("Out-of-bounds TimeZone gap"),u))(o.B(l+Me)-c)})(t,s),a=cn(s+BigInt(i*(n===2?-1:1)));return(r=t.N(a))[n===2?0:r.length-1]}const Zd=qc("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function $d(t,e){const n=Zd.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&&oe(zc(i)),o=(Cn(r[2])*wi+Cn(r[3])*dr+Cn(r[4])*St+Xc(r[5]||""))*Kc(r[1]),Math.abs(o)>=ur&&oe("Out-of-bounds offset"),o;var o})(n)}const qd={era:Nd,month:Jr,monthCode(t,e){if(typeof t=="string")return t;if(t&&typeof t=="object"){const n=t.toString;if(typeof n=="function")return Vt(n.call(t),e)}return Vt(t,e)},day:Jr},Xd=$c(ln,ar),Kd=Object.assign({},qd,Xd);({...Kd});const Qd=Intl.DateTimeFormat;function Jd(t,e){e<-864e13&&oe(rn);const n=t.formatToParts(e),r={};for(const s of n)r[s.type]=s.value;return r}const eu={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},Tn=-388152e4;function tu(t){return vr(cn(t.epochNanoseconds))+"Z"}function nu(t){const e=t.calendar,n=t.timeZone,r=n.B(t.epochNanoseconds);return vr(cn(t.epochNanoseconds+BigInt(r)))+Ui(Fd(r))+ou(n.id)+(e===Ke?"":Bi(an(e)))}function ru(t){const e=t.calendar;return vr(t)+(e===Ke?"":Bi(an(e)))}function vr(t,e){return su(t)+"T"+au(t)}function su(t){return iu(t)+"-"+ge(t.day)}function iu(t){const{year:e}=t;return(e<0||e>9999?Fi(e)+Wt(6,Math.abs(e)):Wt(4,e))+"-"+ge(t.month)}function au(t,e){const n=[ge(t.hour),ge(t.minute)];return n.push(ge(t.second)+((r,s,i,a)=>Wi(r*on+s*cr+i))(t.millisecond,t.microsecond,t.nanosecond)),n.join(":")}function Ui(t,e=0){if(e===1)return"";const[n,r]=ye(Math.abs(t),wi),[s,i]=ye(r,dr),[a,o]=ye(i,St);return Fi(t)+ge(n)+":"+ge(s)+(a||o?":"+ge(a)+Wi(o):"")}function ou(t,e){return"["+t+"]"}function Bi(t,e){return"[u-ca="+t+"]"}const lu=/0+$/;function Wi(t,e){let n=Wt(9,t);return n=n.replace(lu,""),n?"."+n:""}function Fi(t){return t<0?"-":"+"}const cu=/^(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$/,du=/[^\w\/:+-]+/;function Vi(t){return uu(Vt(t))}function uu(t){return zi(t).id}function zi(t){const e=t.toUpperCase(),n=(s=>{const i=$d(s);if(i!==void 0)return{id:Ui(i),X:i,m:i}})(e);if(n)return{kind:"fixed",...n};const r=e==="UTC"?"UTC":(s=>(du.test(s)&&oe(Vc(s)),cu.test(s)&&oe("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?ns(o).replace(/island|noronha|murdo|rivadavia|urville/,ns):o)).join("/")))(t);return fu(r)}const fu=Ye(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};const e=t.toUpperCase(),n=hu(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),hu=Ye(t=>new Qd("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Gi(t){const e=zi(t);return gu(e.id,e)}const gu=Ye((t,e)=>e.kind==="named"?new pu(t,e.m,e.format):new mu(t,e.m,e.kind==="fixed"?e.X:0));class mu{constructor(e,n,r){this.id=e,this.m=n,this.X=r}B(){return this.X}N(e){return[_d(e,this.X)]}O(){}}class pu{constructor(e,n,r){this.id=e,this.m=n,this.ke=((s,i)=>{const a=Ye(s),o=Ye(vu),l=86400*i;function c(f){const[h,g]=as(f,l),p=Nt(h),m=Nt(g),b=a(p),C=a(m);return b===C?b:u(o(p,m),b,C,f)}function u(f,h,g,p){let m,b;for(;(p===void 0||(m=p<f[0]?h:p>=f[1]?g:void 0)===void 0)&&(b=f[1]-f[0]);){const C=f[0]+Math.floor(b/2);s(C)===g?f[1]=C:f[0]=C+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 b=c(p);return b===c(m)?[f-b]:h>g?[p,m]:[]},we:c,O:function f(h,g){if(g>0&&h>=864e10)return;if(g<0){if(h<=Tn)return;const w=is()+94867200;if(h>w)return f(w,-1)}const p=g>0?Math.max(h,Tn):h;let[m,b]=as(p,l);const C=l*g,D=g>0?Math.max(h,is())+94867200:Tn,E=()=>g<0?b>D:m<D;for(;E();){const w=Nt(m),T=Nt(b),I=a(w),N=a(T);if(I!==N){const H=o(w,T);u(H,I,N);const k=H[0];if((Qc(k,h)||1)===g)return k}m+=C,b+=C}}}})((s=>i=>{const a=Jd(s,1e3*i);return 86400*ht((o=>{const l=o.relatedYear;if(l!==void 0)return parseInt(l);const c=parseInt(o.year);return o.era!==void 0&&ed(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 eu[i]||60})(e))}B(e){return this.ke.we((n=>rs(n)[0])(e))*St}N(e){const n=86400*Ft(e)+Ci(e),r=xi(e);return this.ke.xe(n).map(s=>un(BigInt(s)*Fn+BigInt(r)))}O(e,n){const[r,s]=rs(e),i=this.ke.O(r+(n>0||s?1:0),n);if(i!==void 0)return BigInt(i)*Fn}}function is(){return Math.floor(Date.now()/1e3)}function vu(t,e){return[t,e]}function as(t,e){const n=Math.floor(t/e)*e;return[n,n+e]}function Nt(t){return pi(t,-1e10,864e10)}function yu(t,e,n){return ji(t.epochNanoseconds,e,n)}function Eu(t,e,n){const r=Yd(e,t,(s=>jd(Hc(s)))(n));return ji(un(r),e,t.calendar)}function bu(t){return Ud(un(BigInt(kd(t))*Di))}function Su(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,b=0;for(const k of Object.keys(l)){const A=l[k];A===void 0||o.has(k)||(i.has(k)?k==="dateStyle"?u=A:k==="timeStyle"?f=A:h[k]=A:k==="era"?g[k]=A:a.has(k)?k==="dateStyle"||k==="timeStyle"?b=1:m=1:p[k]=A)}const C=u!==void 0,D=f!==void 0,E=C||D,w=Object.keys(h).length>0,T=m||b,I=w||C||D,N=Object.keys(g).length>0;(!c&&T||c&&T&&!I||E&&(w||N||m))&&Xe("Invalid formatting options");const H={};return E||I||Object.assign(H,r),Object.assign(H,h,g,p),C&&(s?Object.assign(H,s[u]):H.dateStyle=u),D&&(H.timeStyle=f),H}}const wu={year:"numeric",month:"numeric",day:"numeric"},Du={hour:"numeric",minute:"numeric",second:"numeric"},Cu=Object.assign({},wu,Du),xu=["weekday","year","month","day","dateStyle"],Tu=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],Ru=xu.concat(Tu);({...Cu});const Mu="PlainDateTime",Iu="ZonedDateTime",Nu="Instant";function Qe(t,e,n,...r){return Object.defineProperties(e,Gc(t)),Object.defineProperties(e.prototype,Zc("Temporal."+t)),Object.defineProperties(e.prototype,or(s=>({get(){return s(n(this))},configurable:1}),Object.assign({},...r))),e}const Je=ts.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:ts;function fn(){Xe(Wc)}function yr(){Xe(Bc)}const Er={era(t){return ss(t.calendar,t).era},eraYear(t){return ss(t.calendar,t).eraYear},year(t){return me(t.calendar,t).year},month(t){return me(t.calendar,t).month},monthCode(t){return Dd(t.calendar,t)},day(t){return me(t.calendar,t).day}},ku={daysInMonth(t){return ki(t.calendar,t)},daysInYear(t){return Pi(t.calendar,t)},monthsInYear(t){return Ni(t.calendar,t)},inLeapYear(t){return Ii(t.calendar,t)}},Pu={dayOfWeek(t){return mr(t)},dayOfYear(t){return Cd(t.calendar,t)},weekOfYear(t){return xd(t.calendar,t)},yearOfWeek(t){return Td(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return ki(t.calendar,t)},daysInYear(t){return Pi(t.calendar,t)},monthsInYear(t){return Ni(t.calendar,t)},inLeapYear(t){return Ii(t.calendar,t)}};function zt(t){return yi(Object.keys(t))}const Yi=zt(fr),Zi=zt(Er);zt(ku),zt(Pu);const Rn=32,$i=150,Hu="cal-1",Ou=600,ju=900,Au=1500,Lu=new Set;function _u(t){const e=new Map(t.map(n=>[n.id,n]));return{color:n=>e.get(n)?.color??Hu,name:n=>e.get(n)?.name??""}}function Uu({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:b=Lu,freeOn:C=Bn,scrollTarget:D,todayLead:E,touch:w,className:T}){const I=S.useRef(null),N=S.useRef(new Map),H=S.useRef(t[0]?.date??""),k=S.useRef(0),A=S.useRef(""),G=S.useRef(""),U=S.useRef(!1),W=S.useRef(0),K=S.useRef(0),[ae,Q]=S.useState(s),we=S.useMemo(()=>_u(e),[e]),ne=Lo(t,[r,s,...b]),Y=t[0]?.date??"",le=t[t.length-1]?.date??"";S.useLayoutEffect(()=>{const O=I.current;O&&(Y!==""&&Y<H.current&&(O.scrollTop+=O.scrollHeight-k.current),H.current=Y,k.current=O.scrollHeight,W.current=O.scrollTop)}),S.useEffect(()=>{if(U.current)return;const O=I.current;if(!O)return;U.current=!0;let F=!1;const J=()=>{const j=N.current.get(s);F||!j||(O.scrollTop=j.offsetTop-Rn,W.current=O.scrollTop)};J(),Q(s);const fe=requestAnimationFrame(J);return document.fonts?.ready.then(J),()=>{F=!0,cancelAnimationFrame(fe)}},[s]),S.useEffect(()=>{if(!D)return;const O=I.current,F=N.current.get(D.date);!O||!F||(O.scrollTop=F.offsetTop-Rn,W.current=O.scrollTop,Q(D.date),f(D.date))},[D,f]),S.useEffect(()=>{const O=I.current;if(!O)return;const F=()=>{K.current=Date.now()},J=["wheel","pointerdown","touchstart","touchmove","keydown"],fe=j=>{j.buttons!==0&&F()};for(const j of J)O.addEventListener(j,F,{passive:!0});return O.addEventListener("pointermove",fe,{passive:!0}),()=>{for(const j of J)O.removeEventListener(j,F);O.removeEventListener("pointermove",fe)}},[]);const st=()=>{const O=I.current;if(!O)return;const F=O.scrollTop,J=F-W.current;if(W.current=F,J===0||Date.now()-K.current>Au)return;const fe=[...N.current.entries()].filter(([,ee])=>ee.isConnected).sort((ee,it)=>ee[1].offsetTop-it[1].offsetTop);let j="";for(const[ee,it]of fe){if(it.offsetTop-Rn-8>F)break;j=ee}j!==""&&j!==ae&&(Q(j),f(j)),J<0&&F<Ou&&A.current!==Y&&(A.current=Y,c()),J>0&&F+O.clientHeight>O.scrollHeight-ju&&G.current!==le&&(G.current=le,u())},Ae=O=>F=>{F?N.current.set(O,F):N.current.delete(O)};return d.jsxs("div",{ref:I,onScroll:st,"data-testid":"agenda-strip",className:P("relative min-h-0 flex-1 overflow-y-auto bg-surface",T),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:_o(ae)}),d.jsx("span",{className:"text-xs text-fg-subtle",children:Uo(ae)}),ae===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(os,{label:"Show earlier days",testId:"agenda-load-earlier",onLoad:p,touch:w}),ne.map(O=>d.jsx(Bu,{row:O,lookup:we,density:n,today:r,pending:O.kind==="day"&&b.has(O.day.date),freeOn:C,selectedEventId:i,onSelectEvent:a,onPickSlot:o,onZoomDay:l,anchorRef:Ae(O.kind==="day"?O.day.date:O.from),lead:O.kind==="day"&&O.day.date===r?E:null,touch:w},O.key)),g&&m&&d.jsx(os,{label:"Show later days",testId:"agenda-load-later",onLoad:m,touch:w})]})}function os({label:t,testId:e,onLoad:n,touch:r}){return d.jsx("button",{type:"button",onClick:n,"data-testid":e,className:P("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 Bu({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(Wu,{from:t.from,to:t.to,days:t.days,onPickSlot:l,touch:h})}):s?d.jsx("div",{ref:u,children:d.jsx(Fu,{day:t.day,today:r})}):n==="dots"?d.jsxs("div",{ref:u,children:[f,d.jsx(Vu,{day:t.day,lookup:e,today:r,freeOn:i,onSelectEvent:o,onZoomDay:c,selectedEventId:a})]}):d.jsxs("div",{ref:u,children:[f,d.jsx(Gu,{day:t.day,lookup:e,density:n,today:r,freeOn:i,selectedEventId:a,onSelectEvent:o,onPickSlot:l,onZoomDay:c,touch:h})]})}function Wu({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:P("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(Ec,{className:"size-4 shrink-0 text-accent"}),d.jsx("span",{className:"text-sm font-medium text-fg",children:Bo(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 Fu({day:t,today:e}){const n=t.date===e;return d.jsxs("section",{"aria-busy":"true","data-testid":`agenda-day-pending-${t.date}`,className:P("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:P("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 Vu({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:P("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:P("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:P("size-2 shrink-0 rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring",tn(e.color(c.calendarId)).solid,c.id===s&&"ring-2 ring-ring",c.myRsvp==="declined"&&"opacity-40")},c.id))}),d.jsx(Xi,{day:t,className:"w-24 shrink-0"}),d.jsx("span",{className:"w-24 shrink-0 text-right text-2xs text-fg-subtle",children:zu(t,r)})]})}function zu(t,e){const n=e(t);if(t.timed.length===0&&qi(n))return"clear";const r=n.reduce((s,i)=>Math.max(s,i.minutes),0);return r>=$i?`${Re(r)} free`:`${Re(t.busyMinutes)} booked`}function qi(t){return t.length===1&&t[0].wholeDay}function Gu({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=Wo(t.timed),h=s(t),g=h.filter(b=>!b.wholeDay),p=t.timed.length===0&&qi(h),m=[...f.map(b=>({key:b[0].id,at:ut(b[0].start),node:b.length===1?d.jsx(Qi,{event:b[0],lookup:e,density:n,selected:b[0].id===i,onSelect:()=>a(b[0].id),touch:c}):d.jsx(Xu,{events:b,lookup:e,density:n,selectedEventId:i,onSelectEvent:a,onZoomDay:()=>l(t.date),touch:c})})),...g.map(b=>({key:`free_${b.startMinute}`,at:b.startMinute,node:d.jsx($u,{stretch:b,onPick:()=>o({date:b.date,endDate:b.date,startTime:Ee(b.startMinute),endTime:Ee(Math.min(b.startMinute+60,b.endMinute)),allDay:!1}),touch:c})}))].sort((b,C)=>b.at-C.at);return d.jsxs("section",{className:P("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:P("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:Yu(t)}),d.jsx(Xi,{day:t,className:"hidden w-32 shrink-0 sm:block"}),d.jsxs("button",{type:"button",onClick:()=>l(t.date),className:P("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(rr,{className:"size-3"})]})]}),d.jsxs("div",{className:"flex flex-col gap-1 pb-2",children:[t.allDay.map(b=>d.jsx(qu,{event:b,lookup:e,density:n,selected:b.id===i,onSelect:()=>a(b.id),touch:c},b.id)),p?d.jsx(Zu,{day:t,onPickSlot:o,touch:c}):m.map(b=>d.jsx("div",{children:b.node},b.key))]})]})}function Yu(t){if(t.timed.length===0)return"Nothing booked";const e=[`${t.timed.length} ${t.timed.length===1?"event":"events"}`,`${Re(t.busyMinutes)} booked`];return t.conflicts.length>0&&e.push(`${t.conflicts.length} ${t.conflicts.length===1?"clash":"clashes"}`),e.join(" · ")}function Xi({day:t,className:e}){const n=Gr-Dn;return d.jsx("div",{"aria-hidden":!0,className:P("relative h-1.5 overflow-hidden rounded-full bg-surface-sunken",e),children:Fo(t).map(r=>{const s=Math.max(r.from,Dn),i=Math.min(r.to,Gr);return i<=s?null:d.jsx("span",{className:"absolute inset-y-0 rounded-full bg-fg-subtle",style:{left:`${(s-Dn)/n*100}%`,width:`${(i-s)/n*100}%`}},`${r.from}-${r.to}`)})})}function Zu({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:P("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 $u({stretch:t,onPick:e,touch:n}){const r=t.minutes>=$i;return d.jsxs("button",{type:"button",onClick:e,className:P("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:P("text-xs",r&&"font-medium"),children:[Re(t.minutes)," free"]}),d.jsxs("span",{className:"text-2xs tabular-nums opacity-80",children:[Ee(t.startMinute)," – ",Ee(t.endMinute)]})]})}function Ki(t){return t==="detail"?"comfortable":"compact"}function qu({event:t,lookup:e,density:n,selected:r,onSelect:s,touch:i}){return d.jsx("div",{className:P("mx-row-inset",i&&"min-h-11"),children:d.jsx(ui,{title:t.title,timeText:"",color:e.color(t.calendarId),layout:"row",density:Ki(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 Xu({events:t,lookup:e,density:n,selectedEventId:r,onSelectEvent:s,onZoomDay:i,touch:a}){const o=Math.min(...t.map(c=>ut(c.start))),l=Math.max(...t.map(c=>ut(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(bc,{className:"size-3 shrink-0 text-warning"}),d.jsxs("span",{className:"text-2xs font-medium text-warning",children:[t.length," at once · ",Ee(o)," – ",Ee(l)]}),d.jsx("button",{type:"button",onClick:i,className:P("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(Qi,{event:c,lookup:e,density:n,selected:c.id===r,onSelect:()=>s(c.id),inset:!1,touch:a},c.id))})]})}function Qi({event:t,lookup:e,density:n,selected:r,onSelect:s,inset:i=!0,touch:a}){const o=n==="detail",l=ut(t.end)-ut(t.start),c=[e.name(t.calendarId),t.location].filter(u=>u!=="").join(" · ");return d.jsx("div",{className:P(i?"px-row-inset":"px-2",a&&"min-h-12"),children:d.jsx(ui,{title:t.title,timeText:"",color:e.color(t.calendarId),layout:"row",density:Ki(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:P("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:Re(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(sc,{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(Vo,{className:"size-3"}),t.attendees.length]})]}):void 0})})}function Ku({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:P("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(ls,{icon:d.jsx(Sc,{className:"size-3 text-danger"}),children:"Now"}),o.map(g=>d.jsx(cs,{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(ls,{icon:d.jsx(oc,{className:"size-3"}),children:l?`Next · in ${Re(c)}`:"Next"}),l?d.jsx(cs,{eventId:l.id,title:l.title,color:h(l.calendarId),meta:`${Mn(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," · ",Mn(u.start.slice(0,10),n),u.start.slice(11,16)]})]}),f&&d.jsxs("button",{type:"button",onClick:()=>s(f.date),className:P("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(wc,{className:"size-3.5 shrink-0"}),d.jsxs("span",{className:"text-xs font-medium",children:[Re(f.minutes)," free"]}),d.jsxs("span",{className:"text-2xs tabular-nums opacity-80",children:[Mn(f.date,n),Ee(f.startMinute)," – ",Ee(f.endMinute)]})]})]})}function ls({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 cs({eventId:t,title:e,color:n,meta:r,onSelect:s,touch:i}){const a=tn(n);return d.jsx("button",{type:"button",onClick:()=>s(t),className:P("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 Mn(t,e){return t===e?"":t===zo(e,1)?"tomorrow · ":`${Go(t)} · `}const Ji=`${Mu}Record`,ea=`${Iu}Record`,ta=`${Nu}Record`,Qu=new WeakMap,na=new WeakMap,ra=new WeakMap,sa=new WeakMap;function ia(t){return Ju(t)||fn()}function Ju(t){return Qu.get(t)}function aa(t){return ef(t)||fn()}function ef(t){return na.get(t)}function oa(t,e){na.set(t,e)}function la(t){return tf(t)||fn()}function tf(t){return ra.get(t)}function ca(t,e){ra.set(t,e)}function da(t){return nf(t)||fn()}function nf(t){return sa.get(t)}function ua(t,e){sa.set(t,e)}function fa(t){return ia(t).id}function ha(t){const e=ia(t).ue;return e||oe(Fc(fa(t),"getExotic or getAny")),e}function rf(t){if(t!==void 0)return sf(t)}function sf(t){return ha(t),fa(t)}const ot=da,af=Qe(Ji,class{get calendarId(){return ot(this).calendarId}toJSON(){return ot(this).toJSON()}valueOf(){return ot(this).valueOf()}},ot,Zi,Yi);function of(t){const e=Object.create(af.prototype);return ua(e,t),Je(e),e}function lf(t,e,n,r,s,i,a,o,l,c){return of(new He.PlainDateTime(t,e,n,r,s,i,a,o,l,rf(c)))}function cf(t,e,n){return ga(ot(t).toZonedDateTime(e,n))}const ve=la,df=Qe(ea,class{get calendarId(){return ve(this).calendarId}get timeZoneId(){return ve(this).timeZoneId}get epochMilliseconds(){return ve(this).epochMilliseconds}get epochNanoseconds(){return ve(this).epochNanoseconds}toJSON(){return ve(this).toJSON()}valueOf(){return ve(this).valueOf()}},ve,Zi,Yi);function ga(t){const e=Object.create(df.prototype);return ca(e,t),Je(e),e}function uf(t){return ve(t).offsetNanoseconds}const lt=aa,ff=Qe(ta,class{get epochMilliseconds(){return lt(this).epochMilliseconds}get epochNanoseconds(){return lt(this).epochNanoseconds}toJSON(){return lt(this).toJSON()}valueOf(){return lt(this).valueOf()}});function hf(t){const e=Object.create(ff.prototype);return oa(e,t),Je(e),e}function gf(t){return hf(He.Instant.fromEpochMilliseconds(t))}function mf(t,e){return ga(lt(t).toZonedDateTimeISO(e))}function pf(t){return t===void 0?Ke:vf(t)}function vf(t){return ha(t)()}const jt=da,yf=Qe(Ji,class{get calendarId(){return an(jt(this).calendar)}toJSON(){return ru(jt(this))}valueOf(){return yr()}},jt,Er,fr);function Ef(t){const e=Object.create(yf.prototype);return ua(e,t),Je(e),e}function bf(t,e,n,r=0,s=0,i=0,a=0,o=0,l=0,c){const u=Ad(pd(or(ar,{year:t,month:e,day:n,hour:r,minute:s,second:i,millisecond:a,microsecond:o,nanosecond:l}))),f=pf(c);return Ef(Bd(u,f))}function Sf(t,e,n){return ma(Eu(jt(t),Gi(Vi(e)),n))}const De=la,wf=Qe(ea,class{get calendarId(){return an(De(this).calendar)}get timeZoneId(){return De(this).timeZone.id}get epochMilliseconds(){return Ai(De(this))}get epochNanoseconds(){return Li(De(this))}toJSON(){return nu(De(this))}valueOf(){return yr()}},Df,Er,fr);function ma(t){const e=Object.create(wf.prototype);return ca(e,t),Je(e),e}function Df(t){const e=De(t);return{..._i(e),calendar:e.calendar}}function Cf(t){return _i(De(t)).offsetNanoseconds}const At=aa,xf=Qe(ta,class{get epochMilliseconds(){return Ai(At(this))}get epochNanoseconds(){return Li(At(this))}toJSON(){return tu(At(this))}valueOf(){return yr()}});function Tf(t){const e=Object.create(xf.prototype);return oa(e,t),Je(e),e}function Rf(t){return Tf(bu(t))}function Mf(t,e){return ma(yu(At(t),Gi(Vi(e))))}const If=He?uf:Cf,ds=He?lf:bf,us=He?cf:Sf,Nf=He?gf:Rf,kf=He?mf:Mf;function fs(t,e){let n=Ze(t);return n[2]+=e*7,de(n)}function X(t,e){let n=Ze(t);return n[2]+=e,de(n)}function Ie(t,e){let n=Ze(t);return n[6]+=e,de(n)}function Pf(t,e){return et(t,e)/7}function et(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function Hf(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function Of(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function jf(t,e){return(e.valueOf()-t.valueOf())/1e3}function Af(t,e){let n=V(t),r=V(e);return{years:0,months:0,days:Math.round(et(n,r)),milliseconds:e.valueOf()-r.valueOf()-(t.valueOf()-n.valueOf())}}function pa(t,e){let n=gt(t,e);return n!==null&&n%7===0?n/7:null}function gt(t,e){return We(t)===We(e)?Math.round(et(t,e)):null}function V(t){return de([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function Lf(t){return de([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function _f(t){return de([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function Uf(t){return de([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function Bf(t,e,n){let r=t.getUTCFullYear(),s=In(t,r,e,n);if(s<1)return In(t,r-1,e,n);let i=In(t,r+1,e,n);return i>=1?Math.min(s,i):s}function In(t,e,n,r){let s=de([e,0,1+Wf(e,n,r)]),i=V(t),a=Math.round(et(s,i));return Math.floor(a/7)+1}function Wf(t,e,n){let r=7+e-n;return-((7+de([t,0,r]).getUTCDay()-e)%7)+r-1}function Ff(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function hs(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 Ze(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function de(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function va(t){return!isNaN(t.valueOf())}function We(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}let ya={};function Vf(t,e){ya[t]=e}function zf(t){return new ya[t]}class Gf{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return de(e)}markerToArray(e){return Ze(e)}}Vf("gregory",Gf);function Yf(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 gs(t,e){let n=[],{start:r}=e,s,i;for(t.sort(Zf),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 Zf(t,e){return t.start.valueOf()-e.start.valueOf()}function mt(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 $f(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 br(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function hn(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function xe(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function qf(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 Gt(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 Nn(t){return t%1===0}function kn(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}const Xf=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function _(t,e){return typeof t=="string"?Kf(t):typeof t=="object"&&t?ps(t):typeof t=="number"?ps({[e||"milliseconds"]:t}):null}function Kf(t){let e=Xf.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 ps(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 Qf(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function Jf(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function eh(t){return ze(t)/365}function th(t){return ze(t)/30}function ze(t){return pt(t)/864e5}function pt(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function Vn(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 nh(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",gn(e,!0)))),r}function Sr(t){return t.toISOString().replace(/T.*$/,"")}function gn(t,e=!1){let n=t<0?"-":"+",r=Math.abs(t),s=Math.floor(r/60),i=Math.round(r%60);return e?`${n+kn(s,2)}:${kn(i,2)}`:`GMT${n}${s}${i?`:${kn(i,2)}`:""}`}function ie(t){let e="";for(const n of t)e+=n.value;return e}const rh=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function sh(t){let e=rh.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(va(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 ih{constructor(e){this.timeZone=e.timeZone,this.calendarSystem=zf(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=de(e)),n===null||!va(n)?null:{marker:n,isTimeUnspecified:!1}}parse(e){let n=sh(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 We(e)===We(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)&&r.getMarkerMonth(e)===r.getMarkerMonth(n)?r.getMarkerYear(n)-r.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:r}=this;return We(e)===We(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)?r.getMarkerMonth(n)-r.getMarkerMonth(e)+(r.getMarkerYear(n)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let r=this.diffWholeYears(e,n);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,n),r!==null?{unit:"month",value:r}:(r=pa(e,n),r!==null?{unit:"week",value:r}:(r=gt(e,n),r!==null?{unit:"day",value:r}:(r=Hf(e,n),Nn(r)?{unit:"hour",value:r}:(r=Of(e,n),Nn(r)?{unit:"minute",value:r}:(r=jf(e,n),Nn(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/eh(r):r.months&&(s=this.diffWholeMonths(e,n),s!==null)?s/th(r):r.days&&(s=gt(e,n),s!==null)?s/ze(r):(n.valueOf()-e.valueOf())/pt(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"?Lf(e):n==="minute"?_f(e):n==="second"?Uf(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)):Bf(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=Ie(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)),nh(e,r,n.omitTime)}timestampToMarker(e){if(this.timeZone==="local")return de(Ff(new Date(e)));if(this.timeZone==="UTC")return new Date(e);const n=kf(Nf(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"?-hs(Ze(e)).getTimezoneOffset():this.timeZone==="UTC"?0:If(us(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"?hs(Ze(e)):this.timeZone==="UTC"?new Date(e.valueOf()):new Date(us(ds(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),this.timeZone).epochMilliseconds)}}const ah=new Set(["week","meridiem","omitZeroMinute","omitCommas","forceCommas","omitTrailing","weekdayJustify"]),kt=/([ap])\.?m\.?/i,oh=/,/g,lh=/\u200e/g,ch=/[\s.,]+$/,zn=/^\s+$/;class dh{constructor(e){const n={},r={};for(const s in e)ah.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:gn(e.timeZoneOffset)}];if(this.weekOnly)return hh(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 uh(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 fh(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 Ea(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(lh,""),e.omitCommas&&(o=o.replace(oh,"")),!a){const{meridiem:l}=e;l===!1?o=o.replace(kt,""):l==="narrow"?o=o.replace(kt,(c,u)=>u.toLocaleLowerCase()):l==="short"?o=o.replace(kt,(c,u)=>`${u.toLocaleLowerCase()}m`):l==="lowercase"&&(o=o.replace(kt,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 uh(t,e,n,r){const s=n.timeZoneName==="short"?e.timeZoneOffset==null?"UTC":gn(e.timeZoneOffset):void 0,{lastLiteral:i,anyTzInjected:a}=Ea(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&&zn.test(t[1].value)&&t[r.weekdayJustify==="start"?2:0].type==="weekday"&&t.reverse(),r.forceCommas)for(const o of t)o.type==="literal"&&zn.test(o.value)&&(o.value=`,${o.value}`);return r.omitTrailing&&ba(t),t.filter(o=>o.value)}function fh(t,e,n,r,s){const i=r.timeZoneName==="short";if(Ea(t,s,a=>{if(!i)return;const o=a.source==="endRange"?n.timeZoneOffset:e.timeZoneOffset;return o==null?"UTC":gn(o)}),s.forceCommas)for(const a of t)a.type==="literal"&&zn.test(a.value)&&(a.value=`,${a.value}`);return s.omitTrailing&&ba(t),t.filter(a=>a.value)}function ba(t){const e=t[t.length-1];e?.type==="literal"&&(e.value=e.value.replace(ch,""),e.value||t.pop())}function hh(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 gh{constructor(e){this.cmdStr=e}formatToParts(e,n){const r=n.cmdFormatter(this.cmdStr,Gt(e,null,n));return Array.isArray(r)?r:[{type:"literal",value:r}]}formatRangeToParts(e,n,r){const s=r.cmdFormatter(this.cmdStr,Gt(e,n,r));return Array.isArray(s)?s.map(i=>({source:"shared",...i})):[{source:"shared",type:"literal",value:s}]}}class mh{constructor(e){this.func=e}formatToParts(e,n){return[{type:"literal",value:this.func(Gt(e,null,n))}]}formatRangeToParts(e,n,r){return[{source:"shared",type:"literal",value:this.func(Gt(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 M(...t){return t.filter(Boolean).join(" ")}function vs(t){return t*100+"%"}function Z(t){return typeof t=="object"&&t?new dh(t):typeof t=="string"?new gh(t):typeof t=="function"?new mh(t):null}function be(...t){console.warn("FullCalendar:",...t)}const ys={};function q(t,e){return!t||typeof t=="string"?t:(ph(e),"")}function x(t,e){return typeof t=="function"?n=>q(t(n),e):q(t,e)}function ph(t){ys[t]||(be(`Invalid option \`${t}\`: expected a className string or a falsy value.`),ys[t]=!0)}function mn(t){t.preventDefault()}function vh(t,e){return n=>{let r=n.target.closest(t);r&&e.call(r,n,r)}}function Sa(t,e,n,r){let s=vh(n,r);return t.addEventListener(e,s),()=>{t.removeEventListener(e,s)}}function yh(t,e,n,r){let s;return Sa(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 Es=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Eh(t,e){let n=r=>{e(r),Es.forEach(s=>{t.removeEventListener(s,n)})};Es.forEach(r=>{t.addEventListener(r,n)})}function wr(t){return{onClick:t,...wa(t)}}function wa(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let bs=0;function pe(){return bs+=1,String(bs)}function Dr(){document.body.classList.add(v.notAllowed)}function Cr(){document.body.classList.remove(v.notAllowed)}function bh(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",mn)}function Sh(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",mn)}function wh(t){t.addEventListener("contextmenu",mn)}function Dh(t){t.removeEventListener("contextmenu",mn)}function Ch(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 xh(t,e,n){let r,s;for(r=0;r<n.length;r+=1)if(s=Th(t,e,n[r]),s)return s;return 0}function Th(t,e,n){return n.func?n.func(t,e):Rh(t[n.field],e[n.field])*(n.order||1)}function Rh(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 ce(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((r,s,i)=>r.replace("$"+i,s||""),t):n}function Mh(t,e){return t-e}function Da(t,e){return t===e}function tt(t){const e=t.borderless;return{borderlessX:!!(t.borderlessX??e),borderlessTop:!!(t.borderlessTop??e),borderlessBottom:!!(t.borderlessBottom??e)}}const{hasOwnProperty:$e}=Object.prototype;function Ne(t,e){let n={};for(let r in t)e(t[r],r)&&(n[r]=t[r]);return n}function Oe(t,e){let n={};for(let r in t)n[r]=e(t[r],r);return n}function Ca(t){let e=[];for(let n in t)e.push(t[n]);return e}function xa(t){let e={};for(let n of t)e[n]=!0;return e}function Ih(t,e){return typeof t=="object"&&t&&typeof e=="object"&&e?xr(t,e,ke):t===e}function xr(t,e,n){if(t===e)return!0;for(let r in t)if($e.call(t,r)&&!(r in e))return!1;for(let r in e)if($e.call(e,r)&&(!(r in t)||!n(t[r],e[r],r)))return!1;return!0}function Pn(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?ke(t,e):t===e}function ke(t,e){return xr(t,e,Da)}function Ss(t,e,n){return xr(t,e,(r,s,i)=>{const a=n[i];return a?a(r,s):r===s})}function Nh(t,e){let n=[];for(let r in t)$e.call(t,r)&&(r in e||n.push(r));for(let r in e)$e.call(e,r)&&t[r]!==e[r]&&n.push(r);return n}function kh(t,e){return t?Ph(t,e,Hh):e}function Ph(t,e,n){const r={};for(let s in t)$e.call(t,s)&&(s in e||(r[s]=t[s]));for(let s in e)$e.call(e,s)&&(s in t?r[s]=n(t[s],e[s]):r[s]=e[s]);return r}function Hh(t,e){return Object.assign({},t,e)}function Pt(t,e){return Array.isArray(t)&&Array.isArray(e)?vt(t,e):t===e}function vt(t,e,n=Da){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 ws={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:x,buttonClass:x,defaultAllDayEventDuration:_,defaultTimedEventDuration:_,nextDayThreshold:_,scrollTime:_,scrollTimeReset:Boolean,slotMinTime:_,slotMaxTime:_,popoverFormat:Z,slotDuration:_,snapDuration:_,headerToolbar:y,footerToolbar:y,forceEventDuration:Boolean,dayLaneClass:x,dayLaneInnerClass:x,dayLaneDidMount:y,dayLaneWillUnmount:y,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:y,weekNumbers:Boolean,weekNumberHeaderClass:x,weekNumberHeaderInnerClass:x,weekNumberHeaderContent:y,weekNumberHeaderDidMount:y,weekNumberHeaderWillUnmount:y,inlineWeekNumberClass:x,inlineWeekNumberContent:y,inlineWeekNumberDidMount:y,inlineWeekNumberWillUnmount:y,editable:Boolean,controller:y,nowIndicator:Boolean,nowIndicatorSnap:y,nowIndicatorHeaderClass:x,nowIndicatorHeaderContent:y,nowIndicatorHeaderDidMount:y,nowIndicatorHeaderWillUnmount:y,nowIndicatorDotClass:q,nowIndicatorLineClass:x,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:Ch,eventOrderStrict:Boolean,eventSlicing:Boolean,eventPrintLayout:String,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:y,contentHeight:y,direction:String,colorScheme:String,weekNumberFormat:Z,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:x,eventInnerClass:x,eventTimeClass:x,eventTitleClass:x,eventBeforeClass:x,eventAfterClass:x,listItemEventClass:x,listItemEventInnerClass:x,listItemEventTimeClass:x,listItemEventTitleClass:x,listItemEventBeforeClass:x,listItemEventAfterClass:x,blockEventClass:x,blockEventInnerClass:x,blockEventTimeClass:x,blockEventTitleClass:x,blockEventBeforeClass:x,blockEventAfterClass:x,rowEventClass:x,rowEventInnerClass:x,rowEventTimeClass:x,rowEventTitleClass:x,rowEventTitleSticky:Boolean,rowEventBeforeClass:x,rowEventBeforeContent:y,rowEventAfterClass:x,rowEventAfterContent:y,columnEventClass:x,columnEventInnerClass:x,columnEventTimeClass:x,columnEventTitleClass:x,columnEventTitleSticky:Boolean,columnEventBeforeClass:x,columnEventAfterClass:x,backgroundEventClass:x,backgroundEventDidMount:y,backgroundEventWillUnmount:y,backgroundEventContent:y,backgroundEventInnerClass:x,backgroundEventTitleClass:x,backgroundEventColor:String,selectConstraint:y,selectOverlap:y,selectAllow:y,droppable:Boolean,unselectCancel:String,slotHeaderFormat:y,slotLaneClass:x,slotLaneDidMount:y,slotLaneWillUnmount:y,slotHeaderClass:x,slotHeaderInnerClass:x,slotHeaderContent:y,slotHeaderDidMount:y,slotHeaderWillUnmount:y,slotHeaderAlign:y,slotHeaderSticky:y,slotHeaderRowClass:q,slotHeaderDividerClass:x,dayMaxEvents:y,dayMaxEventRows:y,dayMinWidth:Number,slotHeaderInterval:_,dayHeaderClass:x,dayHeaderInnerClass:x,dayHeaderContent:y,dayHeaderDidMount:y,dayHeaderWillUnmount:y,dayHeaderAlign:y,_dayHeaderSticky:y,dayHeaderRowClass:q,dayHeaderDividerClass:x,dayRowClass:q,dayCellDidMount:y,dayCellWillUnmount:y,dayCellClass:x,dayCellInnerClass:x,dayCellTopContent:y,dayCellTopClass:x,dayCellTopInnerClass:x,dayCellBottomClass:x,allDaySlot:Boolean,allDayText:String,allDayHeaderClass:x,allDayHeaderInnerClass:x,allDayHeaderContent:y,allDayHeaderDidMount:y,allDayHeaderWillUnmount:y,timedText:String,slotMinWidth:Number,slotMinHeight:Number,navLinks:Boolean,eventTimeFormat:Z,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:x,moreLinkInnerClass:x,rowMoreLinkClass:x,rowMoreLinkInnerClass:x,columnMoreLinkClass:x,columnMoreLinkInnerClass:x,navLinkClass:q,monthStartFormat:Z,dayCellFormat:Z,handleCustomRendering:y,customRenderingMetaMap:y,popoverClass:q,popoverCloseClass:q,popoverCloseContent:y,dayNarrowWidth:Number,borderless:Boolean,borderlessX:Boolean,borderlessTop:Boolean,borderlessBottom:Boolean,fillerClass:x,headerToolbarClass:x,footerToolbarClass:x,toolbarClass:x,toolbarSectionClass:x,toolbarTitleClass:q,tableClass:x,tableHeaderClass:x,tableBodyClass:x,nonBusinessHoursClass:q,highlightClass:q,dayHeaders:Boolean,dayHeaderFormat:Z,allDayDividerClass:q,listDaysClass:q,listDayClass:x,listDayFormat:xs,listDayAltFormat:xs,listDayHeaderDidMount:y,listDayHeaderWillUnmount:y,listDayHeaderClass:x,listDayHeaderInnerClass:x,listDayHeaderContent:y,listDayBodyClass:x,noEventsClass:x,noEventsInnerClass:x,noEventsContent:y,noEventsDidMount:y,noEventsWillUnmount:y,multiMonthMaxColumns:Number,singleMonthMinWidth:Number,singleMonthTitleFormat:Z,singleMonthDidMount:y,singleMonthWillUnmount:y,singleMonthClass:x,singleMonthHeaderClass:x,singleMonthHeaderInnerClass:x},Hn={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},Ds={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},Cs={class:x,className:x,viewClass:x,viewDidMount:y,viewWillUnmount:y,views:y,plugins:y,initialEvents:y,events:y,eventSources:y},Oh={type:String,component:y,class:x,className:x,content:y,didMount:y,willUnmount:y,buttonTextKey:String,dateProfileGeneratorClass:y,usesMinMaxTime:Boolean,disallowAmbigTitle:Boolean},_e={dateIncrement:Pn,headerToolbar:Pn,footerToolbar:Pn,buttons:Ih,plugins:Pt,events:Pt,eventSources:Pt,resources:Pt};function Tr(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 xs(t){return t===!1?null:Z(t)}function Ta(t){let e=Math.floor(et(t.start,t.end))||1,n=V(t.start),r=X(n,e);return{start:n,end:r}}function Ra(t,e=_(0)){let n=null,r=null;if(t.end){r=V(t.end);let s=t.end.valueOf()-r.valueOf();s&&s>=pt(e)&&(r=X(r,1))}return t.start&&(n=V(t.start),r&&r<=n&&(r=X(n,1))),{start:n,end:r}}function Fe(t,e,n,r){return r==="year"?_(n.diffWholeYears(t,e),"year"):r==="month"?_(n.diffWholeMonths(t,e),"month"):Af(t,e)}function Rr(t,e){return{instanceId:pe(),defId:t,range:e}}function jh(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 Pe(t,e,n){let{dateEnv:r,pluginHooks:s,options:i}=n,{defs:a,instances:o}=t;o=Ne(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=Ah(c,u,e,r,s.recurringTypes);for(let h of f){let g=Rr(l,{start:h,end:r.add(h,u)});o[g.instanceId]=g}}}return{defs:a,instances:o}}function Ah(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 yt(t,e,n,r,s,i){let a=ue(),o=Nr(n);for(let l of t){let c=Ia(l,e,n,r,o,s,i);c&&Gn(c,a)}return a}function Gn(t,e=ue()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function Mr(t,e){let n=t.instances[e];if(n){let r=t.defs[n.defId],s=pn(t,i=>Lh(r,i));return s.defs[r.defId]=r,s.instances[n.instanceId]=n,s}return ue()}function Lh(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function ue(){return{defs:{},instances:{}}}function Ir(t,e){return{defs:{...t.defs,...e.defs},instances:{...t.instances,...e.instances}}}function pn(t,e){let n=Ne(t.defs,e),r=Ne(t.instances,s=>n[s.defId]);return{defs:n,instances:r}}function _h(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 Uh(t,e){return Array.isArray(t)?yt(t,null,e,!0):typeof t=="object"&&t?yt([t],null,e,!0):t!=null?String(t):null}const Yt={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:y,overlap:y,allow:y,class:q,className:q,color:String,contrastColor:String},Bh={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],color:"",contrastColor:"",className:""};function Zt(t,e){let n=Uh(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 Wh(t){return t.reduce(Fh,Bh)}function Fh(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:M(t.className,e.className)}}const Lt={id:String,groupId:String,title:String,url:String,interactive:Boolean},Ma={start:y,end:y,date:y,allDay:Boolean},Vh={...Lt,...Ma,extendedProps:y};function Ia(t,e,n,r,s=Nr(n),i,a){let{refined:o,extra:l}=Na(t,n,s),c=Gh(e,n),u=jh(o,c,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let h=Yn(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=zh(o,c,n,r);if(f){let h=Yn(o,l,e?e.sourceId:"",f.allDay,f.hasEnd,n,i),g=Rr(h.defId,f.range);return a&&h.publicId&&a[h.publicId]&&(g.instanceId=a[h.publicId]),{def:h,instance:g}}return null}function Na(t,e,n=Nr(e)){return Tr(t,n)}function Nr(t){return{...Yt,...Vh,...t.pluginHooks.eventRefiners}}function Yn(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]:"")||pe(),sourceId:n,allDay:r,hasEnd:s,interactive:t.interactive,ui:Zt(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 zh(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 Gh(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}const Yh={start:y,end:y,allDay:Boolean};function Zh(t,e,n){let r=$h(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 $h(t,e){let{refined:n,extra:r}=Tr(t,Yh),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 qh(t,e){return $f(t.range,e.range)&&t.allDay===e.allDay&&Xh(t,e)}function Xh(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 Kh(t,e){return{...Pa(t.range,e,t.allDay),allDay:t.allDay}}function ka(t,e,n){return{...Pa(t,e,n),timeZone:e.timeZone}}function Pa(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 Qh(t,e,n){let r=Na({editable:!1},n),s=Yn(r.refined,r.extra,"",t.allDay,!0,n);return{def:s,ui:ja(s,e),instance:Rr(s.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function Ha(t,e,n){n.emitter.trigger("select",{...kr(t,n),jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view})}function Jh(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function kr(t,e){let n={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(n,r(t,e));return Object.assign(n,Kh(t,e.dateEnv)),n}function Ts(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 Pr(t,e,n,r){let s=qt(t.defs,e),i=ue();for(let a in t.defs){let o=t.defs[a];i.defs[a]=eg(o,s[a],n,r)}for(let a in t.instances){let o=t.instances[a],l=i.defs[o.defId];i.instances[a]=tg(o,l,s[o.defId],n,r)}return i}function eg(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 tg(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=Ta(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:Ts(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=Ts(e.allDay,l.range.start,s)),l}class Ue{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 Ma)be(`Cannot set date-related event property \`${e}\`. Use a method instead.`);else if(e==="id")n=Lt[e](n),this.mutate({standardProps:{publicId:n}});else if(e in Lt)n=Lt[e](n),this.mutate({standardProps:{[e]:n}});else if(e in Yt){let r=Yt[e](n);e==="editable"?r={startEditable:n,durationEditable:n}:r={[e]:n},this.mutate({standardProps:{ui:r}})}else be(`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=Fe(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=Fe(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=Ta(l));let c=Fe(l.start,a,s,r.granularity);if(o){let u=Fe(l.end,o,s,r.granularity);Qf(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=Z(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=Mr(i,n.instanceId);a=Pr(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:Te(a,s,n),revert(){s.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,n=Oa(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 Ue(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 Oa(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function Te(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 ng(t){return t.eventRange.instance.instanceId}function Rs(t,e,n,r){let s={},i={},a={},o=[],l=[],c=qt(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?Ra(p,r):p,b=mt(m,n);b&&(g.display==="inverse-background"?h.groupId?s[h.groupId].push(b):i[f.defId].push(b):g.display!=="none"&&(g.display==="background"?o:l).push({def:h,ui:g,instance:f,range:b,isStart:m.start&&m.start.valueOf()===b.start.valueOf(),isEnd:m.end&&m.end.valueOf()===b.end.valueOf()}))}for(let u in s){let f=s[u],h=gs(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=gs(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 $t(t,e){t.fcEventRange=e}function qe(t){return t.fcEventRange||t.parentNode.fcEventRange||null}function qt(t,e){return Oe(t,n=>ja(n,e))}function ja(t,e){const n=[],r=e[""],s=e[t.defId];return r&&n.push(r),s&&n.push(s),n.push(t.ui),Wh(n)}function rg(t,e){let n=t.map(sg);return n.sort((r,s)=>xh(r,s,e)),n.map(r=>r._seg)}function sg(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 ig(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 ag(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(Ie(r,-1)).valueOf()!==V(Ie(e.instance.range.end,-1)).valueOf()?r:e.instance.range.end;if(h&&!f.allDay){if(g&&(s||i)&&f.hasEnd){const b=c.formatRangeToParts(p,m,t),C=lg(b);return C!=null?ie(c.formatToParts(p,t))+C+ie(c.formatToParts(m,t)):ie(b)}if(s)return ie(c.formatToParts(p,t))}return""}const og=new Set(["year","month","day"]);function lg(t){let e,n=!1;for(const r of t)r.source==="shared"&&(e=r),og.has(r.type)&&(n=!0);return n?e.value:void 0}function Zn(t,e,n){let r=t.range;return{isPast:r.end<=e.start,isFuture:r.start>=e.end,isToday:e&&xe(e,r.start)}}function cg(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=wa(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 dg=/(^c|C)lass(Name)?$/,ug=/Content$/,fg=/(DidMount|WillUnmount)$/,hg=/^on[A-Z]/,gg={buttons:kh};function mg(...t){const e={};for(const n of t)for(const r in n){const s=n[r];e[r]?e[r]=he(e[r],s):e[r]=s}return e}function he(...t){let e={};for(const n of t)for(let r in n)if(r in e){const s=gg[r]||(dg.test(r)?pg:ug.test(r)?vg:fg.test(r)?yg: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=>M(q(r?t(a):t,n),q(s?e(a):e,n));return i.parts=[t,e],i}return M(q(t,n),q(e,n))}function vg(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 yg(t,e){if(t&&e){const n=(...r)=>{t(...r),e(...r)};return n.parts=[t,e],n}return t||e}function Eg(t,e){const n=Nh(t,e);for(let r of n)if(!hg.test(r))return!1;return!0}function $n(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]||$n(n[a],r[a])))return!1;return!0}return!1}const bg=[],Aa={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"},La={...Aa,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 Sg(t){let e=t.length>0?t[0].code:"en",n=bg.concat(t),r={en:La};for(let s of n)r[s.code]=s;return{map:r,defaultCode:e}}function _a(t,e){return typeof t=="object"&&!Array.isArray(t)?Ua(t.code,[t.code],t):wg(t,e)}function wg(t,e){let n=[].concat(t||[]),r=Dg(n,e)||La;return Ua(t,n,r)}function Dg(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 Ua(t,e,n){let r=he(Aa,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 Ms extends Error{constructor(e,n){super(e),this.response=n}}function Cg(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 Ms("Failure parsing JSON",s)});throw new Ms("Request failed",s)})}function xg(t,e){e.emitter.trigger("datesSet",{...ka(t.activeRange,e.dateEnv),view:e.viewApi})}function Tg(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Te(t,e))}let Rg={ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}};const Mg={name:"array-event-source",eventSourceDefs:[Rg]};function Ig(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 Ng={parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:r}=t.context,s=t.eventSource.meta;Ig(s.bind(null,ka(t.range,r)),i=>e({rawEvents:i}),n)}};const kg={name:"func-event-source",eventSourceDefs:[Ng]},Pg={method:String,extraParams:y,startParam:String,endParam:String,timeZoneParam:String};let Hg={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=jg(r,t.range,t.context);Cg(r.method,r.url,s).then(([i,a])=>{e({rawEvents:i,response:a})},n)}};const Og={name:"json-event-source",eventSourceRefiners:Pg,eventSourceDefs:[Hg]};function jg(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 Ag={name:"change-handler",optionChangeHandlers:{controller(t,e){t._setApi(e.calendarApi)},events(t,e){Is([t],e)},eventSources:Is}};function Is(t,e){let n=Ca(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 Lg={id:String,defaultAllDay:Boolean,url:String,format:String,events:y,eventDataTransform:y,success:y,failure:y};function Ba(t,e,n=Wa(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}=Tr(r,n),a=_g(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:pe(),sourceDefId:a.sourceDefId,meta:a.meta,ui:Zt(s,e),extendedProps:i}}return null}function Wa(t){return{...Yt,...Lg,...t.pluginHooks.eventSourceRefiners}}function _g(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 Ug(t,e,n){let r=e?e.activeRange:null;return Va({},Yg(t,n),r,n)}function Bg(t,e,n,r){let s=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return Va(t,e.sources,s,r);case"REMOVE_EVENT_SOURCE":return Fg(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?za(t,s,r):t;case"FETCH_EVENT_SOURCES":return Hr(t,e.sourceIds?xa(e.sourceIds):Ga(t,r),s,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return Gg(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function Wg(t,e,n){let r=e?e.activeRange:null;return Hr(t,Ga(t,n),r,!0,n)}function Fa(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function Va(t,e,n,r){let s={};for(let i of e)s[i.sourceId]=i;return n&&(s=za(s,n,r)),{...t,...s}}function Fg(t,e){return Ne(t,n=>n.sourceId!==e)}function za(t,e,n){return Hr(t,Ne(t,r=>Vg(r,e,n)),e,!1,n)}function Vg(t,e,n){return Ya(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function Hr(t,e,n,r,s){let i={};for(let a in t){let o=t[a];e[a]?i[a]=zg(o,n,r,s):i[a]=o}return i}function zg(t,e,n,r){let{options:s,calendarApi:i}=r,a=r.pluginHooks.eventSourceDefs[t.sourceDefId],o=pe();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||be(`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 Gg(t,e,n,r){let s=t[e];return s&&n===s.latestFetchId?{...t,[e]:{...s,isFetching:!1,fetchRange:r}}:t}function Ga(t,e){return Ne(t,n=>Ya(n,e))}function Yg(t,e){let n=Wa(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=Ba(i,e,n);a&&s.push(a)}return s}function Ya(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}const Zg={daysOfWeek:y,startTime:_,endTime:_,duration:_,startRecur:y,endRecur:y};let $g={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=Jf(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:r,typeData:n}}return null},expand(t,e,n){let r=mt(e,{start:t.startRecur,end:t.endRecur});return r?Xg(t.daysOfWeek,t.startTime,t.dateEnv,n,r):[]}};const qg={name:"simple-recurring-event",recurringTypes:[$g],eventRefiners:Zg};function Xg(t,e,n,r,s){let i=t?xa(t):null,a=V(s.start),o=s.end,l=[];for(e&&(e.milliseconds<0?o=X(o,1):e.milliseconds>=1e3*60*60*24&&(a=X(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=X(a,1)}return l}const Kg=[Mg,kg,Og,qg,Ag,{name:"misc",isLoadingFuncs:[t=>Fa(t.eventSources)],propSetHandlers:{dateProfile:xg,eventStore:Tg}}];function L(t,e,n){let r,s;return function(...i){if(!r)s=t.apply(this,i);else if(!vt(r,i)){let a=t.apply(this,i);(!e||!e(a,s))&&(s=a)}return r=i,s}}function ct(t,e,n){let r,s;return i=>(r?ke(r,i)||(s=t.call(this,i)):s=t.call(this,i),r=i,s)}const nt=S.createContext({});function Qg(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 je extends S.Component{shouldComponentUpdate(e,n){return!Ss(this.props,e,this.propEquality)||!Ss(this.state,n,this.stateEquality)}}je.addPropsEquality=Jg;je.addStateEquality=em;je.contextType=nt;je.prototype.propEquality={};je.prototype.stateEquality={};class $ extends je{}$.contextType=nt;function Jg(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function em(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function B(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class Or extends ${constructor(){super(...arguments),this.id=pe(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{this.el=e,this.props.elRef&&B(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:r}=n,{customGenerator:s,defaultGenerator:i,renderProps:a}=e,o=Za(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=!tm(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(!vt(e,n)){for(const s of n)s.remove();for(let s of e)r.appendChild(s);this.currentDomNodes=e}}}Or.addPropsEquality({renderProps:ke,attrs:Eg,style:ke});function tm(t,e){return!!(e.handleCustomRendering&&t&&e.customRenderingMetaMap?.[t])}function Za(t,e,n){const r={...t.attrs,ref:n};return(t.className||e)&&(r.className=M(e,t.className,r.className)),t.style&&(r.style=t.style),r}const nm=S.createContext(0);class te extends S.Component{constructor(){super(...arguments),this.InnerContent=rm.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(B(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=R(e.classNameGenerator,e.renderProps);if(e.children){const r=Za(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(Or,{...e,elRef:this.handleEl,tag:e.tag||"div",className:M(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=nm;function rm(t,e){const n=t.props;return S.createElement(Or,{renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context,...e})}function R(t,e){return(typeof t=="function"?t(e):t)||""}function $a(t){return t.text}function Se(t){return t.height==="auto"||t.contentHeight==="auto"}function qa(t){let{tableHeaderSticky:e}=t;return(e==null||e==="auto")&&(e=Se(t)),e}function sm(t){const e=Se(t);let{footerScrollbarSticky:n}=t;return(n==null||n==="auto")&&(n=e),!!n&&e}function im(t){const e=t.scrollerSyncerClass;if(!e)throw new RangeError("Must import @fullcalendar/scrollgrid");return e}class Xa{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:am(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 am(t){let e=V(t),n=X(e,1);return{start:e,end:n}}class Ka{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=qf(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=mt(u,o.range)),u=this.adjustActiveRange(u),u=mt(u,a),f=br(o.range,a),xe(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=Vn(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&&(ze(s)<0&&(a=V(a),a=n.add(a,s)),ze(i)>1&&(o=V(o),o=X(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&&pt(f)<pt(r)?a=Vn(f).unit:a=s}ze(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=X(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=Yf(e,this.props.dateEnv);return n&&(n=Ra(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=X(e,n);return e}}function Qa(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(pa(n.start,n.end)>1)return"week"}else if(t.currentRangeUnit==="day"&>(n.start,n.end)>1)return"day"}function Ja(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 om(t,e,n,r,s){switch(e.type){case"RECEIVE_EVENTS":return lm(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,s);case"RESET_RAW_EVENTS":return cm(t,n[e.sourceId],e.rawEvents,r.activeRange,s);case"ADD_EVENTS":return dm(t,e.eventStore,r?r.activeRange:null,s);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return Ir(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Pe(t,r.activeRange,s):t;case"REMOVE_EVENTS":return _h(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return to(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return pn(t,i=>!i.sourceId);case"REMOVE_ALL_EVENTS":return ue();default:return t}}function lm(t,e,n,r,s,i){if(e&&n===e.latestFetchId){let a=yt(eo(s,e,i),e,i);return r&&(a=Pe(a,r,i)),Ir(to(t,e.sourceId),a)}return t}function cm(t,e,n,r,s){const{defIdMap:i,instanceIdMap:a}=fm(t);let o=yt(eo(n,e,s),e,s,!1,i,a);return Pe(o,r,s)}function eo(t,e,n){let r=n.options.eventDataTransform,s=e?e.eventDataTransform:null;return s&&(t=Ns(t,s)),r&&(t=Ns(t,r)),t}function Ns(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 dm(t,e,n,r){return n&&(e=Pe(e,n,r)),Ir(t,e)}function ks(t,e,n){let{defs:r}=t,s=Oe(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 to(t,e){return pn(t,n=>n.sourceId!==e)}function um(t,e){return{defs:t.defs,instances:Ne(t.instances,n=>!e[n.instanceId])}}function fm(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 rt{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function hm(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function jr(t){return{[t.component.uid]:t}}const qn={};class wt{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){gm(this.handlers,e,n)}off(e,n){mm(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 gm(t,e,n){(t[e]||(t[e]=[])).push(n)}function mm(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 vm(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=Em(r,l),s(a.deps||[])}}}return t&&s(t),s(e),r}function ym(){let t=[],e=[],n;return(r,s)=>((!n||!vt(r,t)||!vt(s,e))&&(n=vm(r,s)),t=r,e=s,n)}function Em(t,e){return{premiumReleaseDate:bm(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:mg(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 bm(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}function Sm(t,e){let n={},r;for(r in t)Xn(r,n,t,e);for(r in e)Xn(r,n,t,e);return n}function Xn(t,e,n,r){if(e[t])return e[t];let s=wm(t,e,n,r);return s&&(e[t]=s),s}function wm(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=Xn(l,e,n,r)}return!o&&c&&(o=c.component),o?{type:t,component:o,defaults:he(c?c.defaults:{},s?s.rawOptions:{}),overrides:he(c?c.overrides:{},i?i.rawOptions:{})}:null}function Ps(t){return Oe(t,Dm)}function Dm(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=Hs(e.content):n&&!(n.prototype instanceof $)&&(n=Hs(n)),{superType:e.type,component:n,rawOptions:e}}function Hs(t){return e=>d.jsx(nt.Consumer,{children:n=>{const{options:r,viewSpec:s}=n,i={...e,nextDayThreshold:r.nextDayThreshold,...tt(r),options:{headerToolbar:r.headerToolbar,footerToolbar:r.footerToolbar},isHeightAuto:Se(r),view:n.viewApi};return d.jsx(te,{tag:"div",className:M(R(r.viewClass,i),R(s.optionDefaults.class,i),R(s.optionDefaults.className,i),R(s.optionOverrides.class,i),R(s.optionOverrides.className,i)),renderProps:i,generatorName:void 0,customGenerator:t,didMount:r.didMount||r.viewDidMount,willUnmount:r.willUnmount||r.viewWillUnmount})}})}function Cm(t,e,n){let r=Ps(t),s=Ps(e.views),i=Sm(r,s);return Oe(i,a=>xm(a,s,e,n))}function xm(t,e,n,r){let s=t.overrides.duration||t.defaults.duration||r.duration||n.duration,i=null,a="",o="",l={};if(s&&(i=Tm(s),i)){let c=Vn(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 Os={};function Tm(t){let e=JSON.stringify(t),n=Os[e];return n===void 0&&(n=_(t),Os[e]=n),n}function Rm(t,e){return e.type==="CHANGE_VIEW_TYPE"&&(t=e.viewType),t}function Mm(t,e){return e.type==="CHANGE_DATE"?e.dateMarker:t}function Im(t,e,n){let r=t.initialDate;return r!=null?e.createMarker(r):n.getDateMarker()}function Nm(t,e){return e.type==="SET_OPTION"?{...t,[e.optionName]:e.rawOptionValue}:t}function km(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 Pm(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function Hm(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function Om(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 jm(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 Am(t,e,n){let r=t.headerToolbar?js(t.headerToolbar,t,e,n):null,s=t.footerToolbar?js(t.footerToolbar,t,e,n):null;return{header:r,footer:s}}function js(t,e,n,r){let s=e.direction==="rtl",i=[],a=!1;function o(c){let u=Lm(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 Lm(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,b;if(h=n[f]){o.push(f);const C=h.optionDefaults.buttonTextKey;p=g.text||(C?e[C]:"")||(h.singleUnit?e[h.singleUnit+"TextLong"]||e[h.singleUnit+"Text"]:"")||f,m=ce(g.hint||e.viewHint,[p,f],p),b=D=>{g?.click?.(D),D.defaultPrevented||r.changeView(f)}}else p=g.text||e[f+"TextLong"]||e[f+"Text"]||f,f==="prevYear"?m=ce(g.hint||e.prevHint,[e.yearText,"year"],p):f==="nextYear"?m=ce(g.hint||e.nextHint,[e.yearText,"year"],p):m=C=>ce(g.hint||e[f+"Hint"],[e[C+"TextLong"]||e[C+"Text"],C],p),b=C=>{g?.click?.(C),C.defaultPrevented||r[f]?.()};return{name:f,isView:!!h,buttonText:p,buttonHint:m,buttonDisplay:g.display,buttonIconClass:g.iconClass,buttonIconContent:g.iconContent,buttonClick:b,buttonIsPrimary:g.isPrimary||!1,buttonClass:g.class??g.className,buttonDidMount:g.didMount,buttonWillUnmount:g.willUnmount}})),viewsWithButtons:o,hasTitle:l}}class _m{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 Um={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",className:"",groupId:"_businessHours"};function Bm(t,e){return yt(Wm(t),null,e)}function Wm(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=>({...Um,...n})),e}function Fm(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,Z(e.titleFormat),i):(s=n.formatRangeToParts(r.start,r.end,Z(As(t,e.disallowAmbigTitle,"long")),i),Vm(s)&&(s=n.formatRangeToParts(r.start,r.end,Z(As(t,e.disallowAmbigTitle,"short")),i))),ie(s)}function As(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=gt(t.currentRange.start,t.currentRange.end);if(s!==null&&s>1)return{year:"numeric",month:n}}return{year:"numeric",month:"long",day:"numeric"}}function Vm(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 Ls{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 zm{constructor(e){this.computeCurrentViewData=L(this._computeCurrentViewData),this.organizeRawLocales=L(Sg),this.buildLocale=L(_a),this.buildPluginHooks=ym(),this.buildDateEnv=L(Gm),this.parseToolbars=L(Am),this.buildViewSpecs=L(Cm),this.buildDateProfileGenerator=ct(Ym),this.buildViewApi=L(Zm),this.buildViewUiProps=ct(Xm),this.buildEventUiBySource=L($m,ke),this.buildEventUiBases=L(qm),this.parseContextBusinessHours=ct(Km),this.buildToolbarProps=L(Qm),this.buildTitle=L(Fm),this.nowManager=new Ls,this.isDrainingActionQueue=!1,this.actionQueue=[],this.optionOverrides={},this.emitter=new wt,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 Ls,this.nowTimer=new Xa(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?{}:Nm(e.dynamicOptionOverrides,r),o=this.computeOptionsData(this.optionOverrides,a,s.calendarApi),l=i?o.calendarOptions.initialView||o.pluginHooks.initialView:Rm(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?Im(o.calendarOptions,o.dateEnv,this.nowManager):Mm(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=km(g,r,h,f,c.dateProfileGenerator)),(r&&(r.type==="PREV"||r.type==="NEXT")||!xe(g.activeRange,h))&&(h=g.currentRange.start);let p=i?Ug(o.calendarOptions,g,u):Bg(e.eventSources,r,g,u),m=i?ue():om(e.eventStore,r,p,g,u),b=Fa(p),C=i?ue():b&&!c.options.progressiveEventRendering&&e.renderableEventStore||m,{eventUiSingleBase:D,selectionConfig:E}=this.buildViewUiProps(u),w=this.buildEventUiBySource(p),T=i?{}:this.buildEventUiBases(C.defs,D,w),I={dynamicOptionOverrides:a,currentViewType:l,currentDate:h,dateProfile:g,eventSources:p,eventStore:m,renderableEventStore:C,selectionConfig:E,eventUiBases:T,businessHours:this.parseContextBusinessHours(u),dateSelection:i?null:Pm(e.dateSelection,r),eventSelection:i?"":Hm(e.eventSelection,r),eventDrag:i?null:Om(e.eventDrag,r),eventResize:i?null:jm(e.eventResize,r),nowDate:f},N={...u,...I};for(let Q of o.pluginHooks.reducers)Object.assign(I,Q(e,r,N));let H=e?_s(e,u):!1,k=_s(I,u);!H&&k?this.emitter.trigger("loading",!0):H&&!k&&this.emitter.trigger("loading",!1);let A=this.buildTitle(g,c.options,o.dateEnv),G=this.buildToolbarProps(c.viewSpec,g,c.dateProfileGenerator,h,f,A),U={viewTitle:A,nowManager:this.nowManager,calendarApi:s.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData,toolbarProps:G,...o,...c,...I},W=o.pluginHooks.optionChangeHandlers,K=n&&n.calendarOptions,ae=o.calendarOptions;if(K&&K!==ae){K.timeZone!==ae.timeZone&&(I.eventSources=U.eventSources=Wg(U.eventSources,g,U),I.eventStore=U.eventStore=ks(U.eventStore,n.dateEnv,U.dateEnv),I.renderableEventStore=U.renderableEventStore=ks(U.renderableEventStore,n.dateEnv,U.dateEnv));for(let Q in W)(this.optionsForHandling.indexOf(Q)!==-1||K[Q]!==ae[Q])&&W[Q](ae[Q],U)}return this.optionsForHandling=[],{state:I,data:U,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}=he(Hn,e,n),i=this.organizeRawLocales(r),a=i.map,o=this.buildLocale(s||i.defaultCode,a).options,l=this.buildPluginHooks(e.plugins||[],Kg),c=this.currentCalendarOptionsRefiners={...ws,...Ds,...Cs,...l.listenerRefiners,...l.optionRefiners},u=he(Hn,...l.optionDefaults,o,Bs(he(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]||_e[m]&&m in h&&_e[m](h[m],u[m])||$n(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={...ws,...Ds,...Cs,...Oh,...n.listenerRefiners,...n.optionRefiners},o=he(Hn,...n.optionDefaults,e.optionDefaults,r,Bs(he(s,e.optionOverrides,i),a)),l={},c=this.currentViewOptionsInput,u=this.currentViewOptionsRefined,f=!1;for(let h in o)o[h]===c[h]||_e[h]&&_e[h](o[h],c[h])||$n(c[h],o[h])?l[h]=u[h]:(o[h]===this.currentCalendarOptionsInput[h]||_e[h]&&_e[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 Gm(t,e,n,r,s,i,a,o){let l=_a(e||o.defaultCode,o.map);return new ih({calendarSystem:"gregory",timeZone:t,locale:l,weekNumberCalculation:n,firstDay:r,weekTextLong:s,weekTextShort:i,cmdFormatter:a.cmdFormatter})}function Ym(t){let e=t.dateProfileGeneratorClass||Ka;return new e(t)}function Zm(t,e,n){return new _m(t,e,n)}function $m(t){return Oe(t,e=>e.ui)}function qm(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 Xm(t){const{options:e}=t;return{eventUiSingleBase:Zt({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:Zt({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function _s(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function Km(t){return Bm(t.options.businessHours,t)}const Us={};function Bs(t,e){const n={};for(const r in t)e[r]?n[r]=t[r]:Us[r]||(be(`Unknown option \`${r}\`.`),Us[r]=!0);return n}function Qm(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&&!xe(e.currentRange,s),isPrevEnabled:o.isValid,isNextEnabled:l.isValid}}class Jm{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):be(`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),Z(n)))}formatRange(e,n,r){let{dateEnv:s}=this.getCurrentData();return ie(s.formatRangeToParts(s.createMarker(e),s.createMarker(n),Z(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=Zh(r,s.dateEnv,_({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Ha(i,null,s))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),Jh(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:Gn({def:a,instance:o})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),s;if(n instanceof Ue)s=n.internalEventSource;else if(typeof n=="boolean")n&&([s]=Ca(r.eventSources));else if(n!=null){let a=this.getEventSourceById(n);if(!a)return be(`Unknown event source ID \`${n}\`.`),null;s=a.internalEventSource}let i=Ia(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:Gn(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:Oa(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 Te(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 Ue(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 Ue(n,r[s]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof Ue)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=Ba(e,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new Ue(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?Ws(a,r):"",a],l={today:{text:r.todayText,hint:ce(r.todayHint,o,r.todayText),isDisabled:!n.isTodayEnabled},prev:{text:r.prevText,hint:ce(r.prevHint,o,r.prevText),isDisabled:!n.isPrevEnabled},next:{text:r.nextText,hint:ce(r.nextHint,o,r.nextText),isDisabled:!n.isNextEnabled},prevYear:{text:r.prevYearText,hint:ce(r.prevHint,[r.yearText,"year"],r.prevYearText),isDisabled:!1},nextYear:{text:r.prevYearText,hint:ce(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?Ws(f,r):"")||c,p=ce(r.viewHint,[g,c],g);l[c]={text:g,hint:p}}return l}}function Ws(t,e){return e[t+"TextLong"]||e[t+"Text"]}class ep extends S.Component{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{ft.flushSync(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{ft.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 tp(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 M(R(t.class,i),R(t.className,i),v.borderBoxRoot,v.isolate,v.flexCol,e?v.calendarPrintRoot:v.calendarScreenRoot)}class np 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 rp extends ${render(){let{props:e}=this,{options:n}=this.context,r=e.widgetGroups.map(s=>this.renderWidgetGroup(s));return S.createElement("div",{className:R(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:M(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(np,{className:l.buttonIconClass,contentGenerator:l.buttonIconContent}));let b=e.length>1&&a,C=b?{hasSelection:o}:null,D={name:c,text:l.buttonText,isPrimary:l.buttonIsPrimary,isSelected:h,isDisabled:g,isIconOnly:p==="icon",buttonGroup:C};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:M(R(s.buttonClass,D),!g&&v.cursorPointer,b&&M(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:M(R(s.buttonGroupClass,{hasSelection:o}),v.isolate)},...i):i[0]}}class Fs extends ${render(){let{props:e}=this,n=this.context.options,{sectionWidgets:r}=e.model;const{borderlessX:s,borderlessTop:i,borderlessBottom:a}=tt(n),o=e.isHeader?n.headerToolbarClass:n.footerToolbarClass;return d.jsxs("div",{className:M(R(o,{borderlessX:s,borderlessTop:i,borderlessBottom:a}),R(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(rp,{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 sp extends rt{constructor(e){super(e),this.handleSegClick=(n,r)=>{let{component:s}=this,{context:i}=s,a=qe(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=Sa(e.el,"click",`.${v.internalEvent}`,this.handleSegClick)}}class ip extends rt{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{qe(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=yh(e.el,`.${v.internalEvent}`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,r){let{component:s}=this,{context:i}=s,a=qe(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 ap extends je{constructor(){super(...arguments),this.buildViewContext=L(Qg),this.buildViewPropTransformers=L(op),this.interactionsStore={},this.calendarInteractions=[],this.registerInteractiveComponent=(e,n)=>{let r=hm(e,n),i=[sp,ip];n.disableHits||(i=i.concat(this.props.pluginHooks.componentInteractions));let a=i.map(o=>new o(r));this.interactionsStore[e.uid]=a,qn[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 qn[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||Se(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(nt.Provider,{value:o,children:[n.header&&d.jsx(Fs,{model:n.header,isHeader:!0,titleId:this.viewTitleId,...e.toolbarProps}),d.jsxs("div",{className:M(v.flexCol,v.rel,v.overflowAnchorNone,v.minHeight0,i&&v.liquid),style:{height:s,aspectRatio:a!=null?String(a):void 0},children:[this.renderView(M((i||s)&&v.liquid,a!=null&&v.fill,v.internalView)),this.buildAppendContent()]}),n.footer&&d.jsx(Fs,{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 op(t){return t.map(e=>new e)}const lp=S.forwardRef((t,e)=>{const n=up(t.id),[r,s]=S.useState("");function i(c,u){(cp(u)?ft.flushSync:dp)(()=>{s(pe())})}const[a]=S.useState(()=>new Jm),[o]=S.useState(()=>new zm({calendarApi:a,onDataChange:i}));S.useEffect(()=>()=>{o.destroy()},[]),S.useImperativeHandle(e,()=>({getApi:()=>a}),[]);const l=o.update(t);return d.jsx(ep,{emitter:l.emitter,children:c=>{const u=l.calendarOptions,f=u.direction==="rtl",h=tp(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(ap,{...l,baseId:n,forPrint:c})})}})});function cp(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 dp(t){t()}let Vs=!1;function up(t){if(Yr.useId)return Yr.useId();const[e]=S.useState(()=>pe());return t?t+":":(Vs||(Vs=!0,be("Missing `id` prop. Provide one for better SSR support in React 17.")),`fc:${e}:`)}function no(t){const e=t.getRootNode();return e instanceof Document?e.body||e.documentElement:e}function Et(t){return getComputedStyle(t).direction==="rtl"}const fp=/(top|left|right|bottom|width|height)$/i;function _t(t,e){for(let n in e)hp(t,n,e[n])}function hp(t,e,n){n==null?t.style[e]="":typeof n=="number"&&fp.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function ro(t){return t.composedPath?.()[0]??t.target}class so extends S.Component{constructor(e,n){super(e,n),this.handleChange=()=>{this.forceUpdate()},this.runner=new Xa(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()}}so.contextType=nt;const gp=Z({year:"numeric",month:"long",day:"numeric"}),mp=Z({week:"long"}),pp=Z({weekday:"long"});function Xt(t){for(const e of t)if(e.type==="weekday")return e.value;return""}function Kt(t){for(const e of t)if(e.type==="day")return e.value;return""}function io(t){for(const e of t)if(e.type==="month")return e.value;return""}function vn(t,e,n="day"){return ie(t.dateEnv.formatToParts(e,n==="week"?mp:gp))}function Ar(t,e,n="day",r=vn(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":ce(a.navLinkHint,[r,l],r),className:M(a.navLinkClass,v.cursorPointer,v.internalNavLink),...s?wr(c):{onClick:c}}}function Lr(t,e,n,r,s){const i=!!(n&&(!n.activeRange||!xe(n.activeRange,t)));return{date:e.toDate(t),dow:t.getUTCDay(),isDisabled:i,isOther:!i&&!!(n&&!xe(n.currentRange,t)),isToday:!i&&!!(r&&xe(r,t)),isPast:!i&&!!(s?t<s:r&&t<r.start),isFuture:!i&&!!(s?t>s:r&&t>=r.end)}}function Kn(t,e){return t!=null&&(t===e||Math.abs(t-e)<.01)}const vp=!0,Qn=new Map,Jn=new Set;let er=!1,On=!1;function dt(t){Jn.add(t),!er&&!On&&(On=!0,requestAnimationFrame(()=>{On=!1,ao()}))}function ao(){for(const t of Jn.values())t(),Jn.delete(t)}const Ht=typeof ResizeObserver<"u"&&new ResizeObserver(t=>{er=!0;for(let e of t){const n=e.target,r=Qn.get(n);let s,i;if(e.borderBoxSize&&vp){const o=e.borderBoxSize[0]||e.borderBoxSize;s=o.inlineSize,i=o.blockSize}else({width:s,height:i}=n.getBoundingClientRect());let a=!1;Kn(r.width,s)||(r.width=s,a=r.watchWidth),Kn(r.height,i)||(r.height=i,a||(a=r.watchHeight)),a&&r.callback(s,i)}ft.flushSync(()=>{ao(),er=!1})});function yn(t,e,n=!0,r=!0){return Qn.set(t,{callback:e,watchWidth:n,watchHeight:r}),Ht&&Ht.observe(t,{box:"border-box"}),()=>{Qn.delete(t),Ht&&Ht.unobserve(t)}}function oo(t,e){return yn(t,e,!0)}function En(t,e){return yn(t,(n,r)=>e(r),!1,!0)}class yp extends ${constructor(){super(...arguments),this.refineRenderProps=ct(Ep)}render(){const{props:e,context:n}=this,{options:r,viewSpec:s}=n,i=this.refineRenderProps({...tt(r),options:{headerToolbar:r.headerToolbar,footerToolbar:r.footerToolbar},isHeightAuto:Se(r),viewApi:n.viewApi});return d.jsx(te,{elRef:e.elRef,tag:e.tag||"div",attrs:e.attrs,style:e.style,className:M(e.className,R(r.viewClass,i),R(s.optionDefaults.class,i),R(s.optionDefaults.className,i),R(s.optionOverrides.class,i),R(s.optionOverrides.className,i)),renderProps:i,generatorName:void 0,didMount:r.didMount||r.viewDidMount,willUnmount:r.willUnmount||r.viewWillUnmount,children:()=>e.children})}}function Ep(t){return{view:t.viewApi,borderlessX:t.borderlessX,borderlessTop:t.borderlessTop,borderlessBottom:t.borderlessBottom,options:t.options,isHeightAuto:t.isHeightAuto}}class bn extends ${constructor(){super(...arguments),this.uid=pe()}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 zs{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 bp{constructor(e){this.el=e,this.emitter=new wt,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 zs(this.handleWheelWait),this.scrollWaiter=new zs(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 Qt extends bn{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 bp(e))},this.handleHRuler=e=>{this.disconnectHRuler&&(this.disconnectHRuler(),this.disconnectHRuler=void 0,this.clientWidth!==void 0&&(this.clientWidth=void 0,B(this.props.clientWidthRef,null))),e&&(this.disconnectHRuler=oo(e,n=>{this._isUnmounting||n!==this.clientWidth&&(this.clientWidth=n,B(this.props.clientWidthRef,n))}))},this.handleVRuler=e=>{this.disconnectVRuler&&(this.disconnectVRuler(),this.disconnectVRuler=void 0,this.clientHeight!==void 0&&(this.clientHeight=void 0,B(this.props.clientHeightRef,null))),e&&(this.disconnectVRuler=En(e,n=>{if(this._isUnmounting)return;n!==this.clientHeight&&(this.clientHeight=n,B(this.props.clientHeightRef,n));const r=Math.round(this.el.getBoundingClientRect().height-n);r!==this.bottomScrollbarWidth&&(this.bottomScrollbarWidth=r,B(this.props.bottomScrollbarWidthRef,r))}))}}render(){const{props:e}=this,n=e.horizontal||e.vertical?"hidden":"";return d.jsxs("div",{ref:this.handleEl,className:M(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?Sp(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&&wp(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 Sp(t){const{scrollLeft:e}=t;return Et(t)?Dp(e,t):e}function wp(t,e){const n=Et(t);t.scrollLeft=n?Cp(e,t):e}function Dp(t,e){switch(lo()){case"positive":return e.scrollWidth-e.clientWidth-t;case"negative":return-t}return t}function Cp(t,e){switch(lo()){case"positive":return e.scrollWidth-e.clientWidth-t;case"negative":return-t}return t}let Gs;function lo(){return Gs||(Gs=xp())}function xp(){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 _r extends ${constructor(){super(...arguments),this.buildPublicEvent=L((e,n,r)=>new z(e,n,r)),this.handleEl=e=>{this.el=e,B(this.props.elRef,e),e&&$t(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??ag(a,s,e.slicedStart,e.slicedEnd,e.isStart,e.isEnd,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd),[l,c,u]=cg(s,n),f=this.buildPublicEvent(n,s.def,s.instance),h=!e.disableDragging&&ig(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:M(R(r.eventTimeClass,p),g&&R(r.blockEventTimeClass,p),e.display==="row"&&R(r.rowEventTimeClass,p),e.display==="column"&&R(r.columnEventTimeClass,p),e.display==="list-item"&&R(r.listItemEventTimeClass,p)),titleClass:M(R(r.eventTitleClass,p),g&&R(r.blockEventTitleClass,p),e.display==="row"&&R(r.rowEventTitleClass,p),e.display==="column"&&R(r.columnEventTitleClass,p),e.display==="list-item"&&R(r.listItemEventTitleClass,p),e.display==="row"&&r.rowEventTitleSticky&&v.stickyS,e.display==="column"&&r.columnEventTitleSticky&&v.stickyT),options:{eventOverlap:!!r.eventOverlap}},b=M(g&&R(r.blockEventClass,m),e.display==="row"&&R(r.rowEventClass,m),e.display==="column"&&R(r.columnEventClass,m),e.display==="list-item"&&R(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),C=M(R(r.eventBeforeClass,m),g&&R(r.blockEventBeforeClass,m),e.display==="row"&&R(r.rowEventBeforeClass,m),e.display==="column"&&R(r.columnEventBeforeClass,m),e.display==="list-item"&&R(r.listItemEventBeforeClass,m)),D=M(R(r.eventAfterClass,m),g&&R(r.blockEventAfterClass,m),e.display==="row"&&R(r.rowEventAfterClass,m),e.display==="column"&&R(r.columnEventAfterClass,m),e.display==="list-item"&&R(r.listItemEventAfterClass,m)),E=M(R(r.eventInnerClass,m),g&&R(r.blockEventInnerClass,m),e.display==="row"&&R(r.rowEventInnerClass,m),e.display==="column"&&R(r.columnEventInnerClass,m),e.display==="list-item"&&R(r.listItemEventInnerClass,m),!e.disableLiquid&&v.liquid),w=e.display==="row"&&r.rowEventBeforeContent,T=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:b,style:{"--fc-event-color":m.color,"--fc-event-contrast-color":m.contrastColor},elRef:this.handleEl,renderProps:m,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:Tp,classNameGenerator:r.eventClass,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount,children:I=>d.jsxs(d.Fragment,{children:[!!(m.isSelected&&g)&&d.jsx("div",{className:e.display==="column"?v.hitX:v.hitY}),(C||w)&&d.jsxs("div",{className:M(C,!e.disableZindexes&&v.z1,m.isStartResizable&&M(e.display==="column"?v.cursorResizeT:v.cursorResizeS,v.internalEventResizer,v.internalEventResizerStart)),children:[w&&d.jsx(te,{tag:"div",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:m,generatorName:void 0,customGenerator:w}),!!(m.isStartResizable&&m.isSelected)&&d.jsx("div",{className:v.hit})]}),d.jsx(I,{tag:"div",className:M(E,!e.disableZindexes&&v.z0)}),(D||T)&&d.jsxs("div",{className:M(D,!e.disableZindexes&&v.z1,m.isEndResizable&&M(e.display==="column"?v.cursorResizeB:v.cursorResizeE,v.internalEventResizer,v.internalEventResizerEnd)),children:[T&&d.jsx(te,{tag:"div",style:{display:"contents"},attrs:{"aria-hidden":!0},renderProps:m,generatorName:void 0,customGenerator:T}),!!(m.isEndResizable&&m.isSelected)&&d.jsx("div",{className:v.hit})]})]})})}componentDidUpdate(e){this.el&&this.props.eventRange!==e.eventRange&&$t(this.el,this.props.eventRange)}}_r.addPropsEquality({seg:ke});function Tp(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 Rp(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function co(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 Mp(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 Ip(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function Np(t,e){return{left:t.left-e.left,top:t.top-e.top}}function kp(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=Op(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 Pp(t,e=!1,n){let r=Ur(t),s=kp(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 Ur(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 Hp(t){let e=uo(t),n=t.getBoundingClientRect();for(let r of e){let s=co(n,r.getBoundingClientRect());if(s)n=s;else return null}return n}function uo(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 Op(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}class jp{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:Ie(e,1)},allDay:!1},n,r,{},s,...i)}_sliceBusinessHours(e,n,r,s,...i){return e?this._sliceEventStore(Pe(e,Ot(n,!!r),s),{},n,r,...i).bg:[]}_sliceEventStore(e,n,r,s,...i){if(e){let a=Rs(e,n,Ot(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=Rs(e.mutatedEvents,n,Ot(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=Ot(n,!!r),l=mt(e.range,o);if(l){e={...e,range:l};let c=Qh(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:X(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 Ot(t,e){let n=t.activeRange;return e?n:{start:Ie(n.start,t.slotMinTime.milliseconds),end:Ie(n.end,t.slotMaxTime.milliseconds-864e5)}}class Ap extends jp{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}const Lp=new Date(2592e5);function _p(t,e,n,r,s,i){const a=Up(t,e,n,r,s,i),o=Qa(n,i.dateEnv);if(e&&o!=="day")for(const l of a.dataConfigs)Ja(l.dateMarker,o,i.dateEnv)&&(l.renderProps.isMajor=!0);return[a]}function Up(t,e,n,r,s,i,a,o){return{isDateRow:!0,renderConfig:Bp(s,e,i),dataConfigs:Wp(t,e,n,r,s,i,a,void 0,void 0,void 0,void 0,o)}}function Bp(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 fo=[];for(let t=0;t<7;t++)fo.push(X(new Date(2592e5),t));function Wp(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,b)=>{const C=Lr(m,h,n,r),D=f!=null,E=p.navLinks&&!C.isDisabled&&t.length>1,w={...C,...l,isMajor:D,isSticky:!1,inPopover:!1,hasNavLink:E,view:g},T=vn(i,m);return{key:o+m.toUTCString(),dateMarker:m,renderProps:w,attrs:{"aria-label":T,...C.isToday?{"aria-current":"date"}:{},"data-date":Sr(m),...c},innerAttrs:E?Ar(i,m,void 0,T):{"aria-hidden":!0},colSpan:a,hasNavLink:E,className:u}}):t.map((m,b)=>{const C=m.getUTCDay(),D=X(Lp,C),E={date:h.toDate(m),dow:C,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},w=f!=null,T={...E,date:fo[C],isMajor:w,isSticky:!1,inPopover:!1,hasNavLink:!1,view:g,...l},I=ie(h.formatToParts(D,pp));return{key:o+String(C),dateMarker:m,renderProps:T,attrs:{"aria-label":I,...c},innerAttrs:{"aria-hidden":!0},colSpan:a,className:u}})}class Ge{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=pe(),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 ho 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=oo(n,r=>{this._isUnmounting||B(e.widthRef,r)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectWidth();const{props:e}=this;e.widthRef&&B(e.widthRef,null)}}function Ce(t){return ng(t)+":"+t.start+(t.standinFor?":standin":t.isSlice?":slice":"")}function Ut(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 Ys(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 Zs(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 Fp extends ${constructor(){super(...arguments),this.buildPublicEvent=L((e,n,r)=>new z(e,n,r)),this.handleEl=e=>{this.el=e,e&&$t(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:R(s.backgroundEventTitleClass,o),options:{eventOverlap:!!s.eventOverlap}},c=M(i.className,v.fill,v.internalEvent,v.internalBgEvent,e.isVertical?v.flexCol:v.flexRow),u=M(R(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:Vp,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&&$t(this.el,this.props.eventRange)}}function Vp(t){let{title:e}=t.event;return e&&d.jsx("div",{className:t.titleClass,children:t.event.title})}function zp(t,e){return d.jsx("div",{className:M(t==="non-business"?e.nonBusinessHoursClass:t==="highlight"?e.highlightClass:void 0,v.fill)})}const jn=10,Gp=1;class Yp extends bn{constructor(){super(...arguments),this.getDateMeta=L(Lr),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=ro(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 Xt(u)},get dayNumberText(){return Kt(u)},view:i},g={...c,isMajor:!1,isNarrow:!1,inPopover:!0,hasNavLink:!1,get weekdayText(){return Xt(u)},get dayNumberText(){return Kt(u)},get monthText(){return io(u)},view:i,text:"",textParts:[],options:{businessHours:!!r.businessHours}},p=Sr(a),{dayHeaderAlign:m}=r,b=typeof m=="function"?m({level:0,inPopover:!0,isNarrow:!1}):m,C=Et(e.alignEl);return ft.createPortal(d.jsxs("div",{"data-date":p,id:e.id,role:"dialog","aria-labelledby":e.titleId,className:M(r.popoverClass,v.flexCol,v.popoverZ,v.abs,v.borderBoxRoot,v.internalPopover),style:{top:0,left:0},dir:C?"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:M(R(r.dayHeaderClass,h),v.flexCol,v.borderOnlyB,b==="center"?v.alignCenter:b==="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:Zp,classNameGenerator:r.dayHeaderInnerClass,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount})}),d.jsx(te,{tag:"button",attrs:{"aria-label":r.closeHint,...wr(this.handleClose)},elRef:this.closeRef,className:M(r.popoverCloseClass,v.flexRow,v.cursorPointer),renderProps:{},customGenerator:r.popoverCloseContent,generatorName:"popoverCloseContent"})]}),d.jsx("div",{className:M(R(r.dayCellClass,g),v.flexCol,v.borderNone),children:d.jsx("div",{className:R(r.dayCellInnerClass,g),children:e.children})}),d.jsx("div",{tabIndex:0,style:{outline:"none"},ref:this.focusEndRef})]}),no(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=Et(e),i=Hp(e);if(i){let a=r.getBoundingClientRect(),o=n?e.closest(n).getBoundingClientRect().top-Gp:i.top,l=s?i.right-a.width:i.left;o=Math.max(o,jn),l=Math.min(l,document.documentElement.clientWidth-jn-a.width),l=Math.max(l,jn);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}_t(r,{top:u,left:f})}}}function Zp(t){return t.text}function $s(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 qs(t){return t.end}function $p(t){return t.reduce(Xp).eventRange.range.start}function qp(t){return t.reduce(Kp).eventRange.range.end}function Xp(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function Kp(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class Qp extends ${constructor(){super(...arguments),this.state={isPopoverOpen:!1},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&B(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:r}=this,{dateEnv:s,options:i}=r,{moreLinkClick:a}=i,o=Xs(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(nt.Consumer,{children:r=>{let{viewApi:s,options:i,calendarApi:a,baseId:o}=r,{moreLinkText:l}=i,c=e.hiddenSegs.length,u=Xs(e),f=o+"popover-"+u.start.toISOString(),h=`+${c}`,g=typeof l=="function"?l.call(a,c):`${h} ${l}`,p=ce(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:M(R(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,...wr(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:Jp,classNameGenerator:i.moreLinkClass,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount,children:b=>d.jsx(b,{tag:"div",className:M(R(i.moreLinkInnerClass,m),R(e.display==="row"?i.rowMoreLinkInnerClass:i.columnMoreLinkInnerClass,m),e.display==="row"?v.stickyS:v.stickyT)})}),n.isPopoverOpen&&d.jsx(Yp,{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 Jp(t){return t.text}function Xs(t){return t.allDayDate?{start:t.allDayDate,end:X(t.allDayDate,1)}:{start:$p(t.hiddenSegs),end:qp(t.hiddenSegs)}}const go=Z({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function mo(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 ev extends ${render(){let{props:e}=this;return d.jsx(Qp,{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(_r,{display:mo(n)?"list-item":"row",eventRange:r,isStart:n.isStart,isEnd:n.isEnd,isDragging:i,isResizing:a,isMirror:!1,isSelected:s===e.eventSelection,defaultTimeFormat:go,defaultDisplayEventEnd:!1,...Zn(r,e.todayRange)})},s)})})})}}class tv extends bn{constructor(){super(...arguments),this.getDateMeta=L(Lr),this.refineRenderProps=ct(sv),this.rootElRef=S.createRef(),this.handleBodyEl=e=>{this.disconnectBodyHeight&&(this.disconnectBodyHeight(),this.disconnectBodyHeight=void 0,B(this.props.headerHeightRef,null),B(this.props.mainHeightRef,null)),e&&(this.disconnectBodyHeight=yn(e,(n,r)=>{if(this._isUnmounting)return;const{props:s}=this,i=e.getBoundingClientRect(),a=this.rootElRef.current.getBoundingClientRect(),o=i.top-a.top;Kn(this.headerHeight,o)||(this.headerHeight=o,B(s.headerHeightRef,o)),s.fgLiquidHeight&&B(s.mainHeightRef,r)}))}}render(){let{props:e,context:n}=this,{options:r,dateEnv:s}=n;const i=e.showDayNumber&&rv(e.date,e.dateProfile.currentRange,s),a=this.getDateMeta(e.date,s,e.dateProfile,e.todayRange),o=M(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:M(R(r.dayCellClass,c),e.className,o),style:{width:e.width}});const u=vn(n,e.date);return d.jsx(te,{tag:"div",elRef:this.rootElRef,className:M(e.className,o),attrs:{...e.attrs,role:"gridcell","aria-label":u,...c.isToday?{"aria-current":"date"}:{},"data-date":Sr(e.date)},style:{width:e.width},renderProps:c,generatorName:"dayCellTopContent",customGenerator:r.dayCellTopContent,defaultGenerator:nv,classNameGenerator:r.dayCellClass,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount,children:f=>d.jsxs(d.Fragment,{children:[d.jsx("div",{className:M(v.rel,R(r.dayCellTopClass,c)),children:e.showDayNumber&&d.jsx(f,{tag:"div",attrs:l?Ar(n,e.date,void 0,u):{"aria-hidden":!0},className:R(r.dayCellTopInnerClass,c)})}),d.jsxs("div",{className:M(v.flexCol,e.fgLiquidHeight?v.liquid:v.grow),ref:this.handleBodyEl,children:[d.jsx("div",{className:R(r.dayCellInnerClass,c),style:{minHeight:e.fgHeight},children:e.fg}),d.jsx(ev,{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:M(v.rel,R(r.dayCellBottomClass,c))})]})})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}}function nv(t){return t.text||d.jsx(d.Fragment,{children:" "})}function rv(t,e,n){const{start:r,end:s}=e,i=Ie(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 sv(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 Xt(o)},get dayNumberText(){return Kt(o)},get monthText(){return io(o)},options:{businessHours:a},view:t.viewApi}}class Ks{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,$s(i,e)),i.isSlice=!0,this.splitSeg(a,i.thickness,i)}this.allowSlicing?(this.hiddenSegs.push({...e,...$s(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?(An(this.placementsByLevel,n.levelIndex,[i]),An(this.levelCoords,n.levelIndex,n.levelCoord)):An(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,[b,C]=Qs(p,e.start,qs),D=b+C;for(;(m=p[D])&&m.start<e.end;){let E=g+m.thickness;E>a&&(a=E,o=m,l=h),E===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]=Qs(r[u],e.end,qs)),{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 An(t,e,n){t.splice(e,0,n)}function Qs(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 iv(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 Ks(t,w=>e.get(Ce(w)),s,l,c,u,i);m.traverseSegs((w,T)=>{Ln(f,w),g.set(Ce(w),T),w.isSlice&&p.set(w.eventRange,!0)});for(const w of m.hiddenSegs)Ln(h,w);if(p.size){g.clear(),m=new Ks(av(t,f),w=>e.get(Ce(w)),s,l,c,u),m.traverseSegs((w,T)=>{g.set(Ce(w),T)});for(const w of m.hiddenSegs)Ln(h,w)}const b=[],C=[],D=[],E=[];for(let w=0;w<n.length;w++)b.push([]),C.push([]),D.push([]),E.push(0);for(const w of t){const{eventRange:T}=w,I=f.get(T)||[],N=h.get(T)||[],H=p.get(T)||!1;if(D[w.start].push(w),H)for(const k of I)D[k.start].push(k);for(const k of I){for(let U=k.start;U<k.end;U++){const W=Zs(k,U);b[U].push(W)}const A=Ce(k),G=g.get(A);if(G!=null){const U=e.get(A);for(let W=k.start;W<k.end;W++)E[W]=Math.max(E[W],G+U)}}for(const k of N)for(let A=k.start;A<k.end;A++){const G=Zs(k,A);b[A].push(G),C[A].push(G)}}return[b,C,D,g,E]}function Ln(t,e){let n=t.get(e.eventRange);n||t.set(e.eventRange,n=[]),n.push(e)}function av(t,e){const n=[];for(const r of t)n.push(...e.get(r.eventRange)||[]);return n}class ov{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=X(r,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let n=this.getDateDayIndex(e.start),r=this.getDateDayIndex(X(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(et(this.dates[0],e));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class lv{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?Ja(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 cv(t,e,n){const r=new ov(t.renderRange,e),s=/year|month|week/.test(t.currentRangeUnit),i=!s&&Qa(t,n);return new lv(r,s,n,i!=="day"?i:void 0)}function dv(t,e,n){return n==null?[void 0,void 0]:n/t<e?[e*t,e]:[n,void 0]}function uv(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 Js(t,e,n){let r,s;if(e!=null)r=t.start*e,s=(n-t.end)*e;else{const i=1/n;r=vs(t.start*i),s=vs(1-t.end*i)}return{insetInlineStart:r,insetInlineEnd:s}}function fv(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 hv(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 gv(t,e){return t.querySelectorAll("[role=row]")[e]}function mv(t,e){return t.querySelectorAll("[role=gridcell]")[e]}const po=60,pv=Z({weekday:"narrow"});function vv(t,e,n){return t||yv(e,n)}function yv(t,e){return t?e>1?Z({weekday:"short",weekdayJustify:"start",day:"numeric",omitCommas:!0,omitTrailing:!0}):Z({weekday:"long",weekdayJustify:"start",day:"numeric",omitCommas:!0,omitTrailing:!0}):Z({weekday:"short"})}class Ev extends S.Component{constructor(){super(...arguments),this.rootElRef=S.createRef()}render(){const{props:e}=this;return d.jsx("div",{className:M(e.className,v.abs),style:e.style,ref:this.rootElRef,children:e.children})}componentDidMount(){this._isUnmounting=!1;const e=this.rootElRef.current;this.disconnectHeight=En(e,n=>{this._isUnmounting||B(this.props.heightRef,n)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),B(this.props.heightRef,null)}}const bv=Z({week:"narrow"});class Sv extends ${constructor(){super(...arguments),this.headerHeightRefMap=new Ge(()=>{dt(this.handleSegPositioning)}),this.mainHeightRefMap=new Ge(()=>{(this.props.dayMaxEvents===!0||this.props.dayMaxEventRows===!0)&&dt(this.handleSegPositioning)}),this.segHeightRefMap=new Ge(()=>{dt(this.handleSegPositioning)}),this.buildWeekNumberRenderProps=L(wv),this.handleRootEl=e=>{this.rootEl=e,B(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=rg(e.fgEventSegs,a.eventOrder),[u,f]=this.computeFgDims(),[h,g,p,m,b]=iv(c,this.segHeightRefMap.current,i,l?f:void 0,a.eventOrderStrict,a.eventSlicing,e.dayMaxEvents,e.dayMaxEventRows),C=[];if(u!=null){let N=0;for(const H of i){const k=r.current.get(H.key);if(k!=null){const A=u-k;C.push(b[N]+A)}else C.push(void 0);N++}}const D=this.getHighlightSegs(),E=this.getMirrorSegs(),w=a.navLinks,T=vn(n,o,"week"),I=this.buildWeekNumberRenderProps(o,n,e.cellIsNarrow,w);return d.jsxs("div",{role:e.role,"aria-label":e.role==="row"?T:void 0,className:M(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:{...w?Ar(n,o,"week",T,!1):{},role:void 0,"aria-hidden":!0},className:v.z1,renderProps:I,generatorName:"inlineWeekNumberContent",customGenerator:a.inlineWeekNumberContent,defaultGenerator:$a,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((N,H)=>{const k=this.renderFgSegs(u,p[H],m,e.todayRange,!1);return d.jsx(tv,{dateProfile:e.dateProfile,todayRange:e.todayRange,date:N.date,isMajor:N.isMajor,showDayNumber:e.showDayNumbers,isNarrow:e.cellIsNarrow,isMicro:e.cellIsMicro,borderStart:!!H,segs:h[H],hiddenSegs:g[H],fgLiquidHeight:l,fg:d.jsx(d.Fragment,{children:k}),eventDrag:e.eventDrag,eventResize:e.eventResize,eventSelection:e.eventSelection,renderProps:N.renderProps,dateSpanProps:N.dateSpanProps,attrs:N.attrs,className:N.className,fgHeight:C[H],width:e.colWidth,headerHeightRef:r.createRef(N.key),mainHeightRef:s.createRef(N.key)},N.key)}),this.renderFgSegs(u,E,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=Ce(p),{standinFor:b,eventRange:C}=p,{instanceId:D}=C.instance;if(b)continue;const{insetInlineStart:E,insetInlineEnd:w}=Js(p,l,f),T=r.get(b?Ce(b):m)??(i?0:void 0),I=e!=null&&T!=null?e+T:void 0,N=!!(a.eventDrag&&a.eventDrag.affectedInstances[D]),H=!!(a.eventResize&&a.eventResize.affectedInstances[D]),k=!i&&(N||H||b||I==null),A=mo(p),G=D===c;g.push(d.jsx(Ev,{className:p.start?v.fakeBorderS:"",style:{visibility:k?"hidden":void 0,top:I,insetInlineStart:E,insetInlineEnd:w,zIndex:G?1e3:0},heightRef:!b&&!i?o.createRef(m):null,children:d.jsx(_r,{display:A?"list-item":"row",eventRange:C,isStart:p.isStart,isEnd:p.isEnd,isDragging:N,isResizing:H,isMirror:i,isSelected:G,isNarrow:a.cellIsNarrow,defaultTimeFormat:go,defaultDisplayEventEnd:h,disableResizing:A,forcedTimeText:u?"":void 0,...Zn(C,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}=Js(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(Fp,{eventRange:c.eventRange,isStart:c.isStart,isEnd:c.isEnd,isNarrow:r.cellIsNarrow,isVertical:!1,...Zn(c.eventRange,i)}):zp(n,s.options)},u))}return d.jsx(d.Fragment,{children:l})}componentDidMount(){this._isUnmounting=!1;const{rootEl:e}=this;this.disconnectHeight=En(e,n=>{B(this.props.heightRef,n)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),B(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 wv(t,e,n,r){const{dateEnv:s,options:i}=e,a=s.computeWeekNumber(t),o=s.formatToParts(t,i.weekNumberFormat||bv),l=ie(o),c=s.toDate(t);return{num:a,text:l,textParts:o,date:c,isNarrow:n,hasNavLink:r}}class vo extends bn{constructor(){super(...arguments),this.splitBusinessHourSegs=L(Ut),this.splitBgEventSegs=L(Cv),this.splitFgEventSegs=L(Ut),this.splitDateSelectionSegs=L(Ut),this.splitEventDrag=L(Ys),this.splitEventResize=L(Ys),this.rowHeightRefMap=new Ge((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=Se(s),m=!e.forPrint&&!p,b=xv(e.visibleWidth,a,p,s);return d.jsx("div",{role:"rowgroup",className:M(e.className,!e.forPrint&&v.flexCol),style:{width:e.width},ref:this.handleRootEl,children:i.map((C,D)=>d.jsx(Sv,{role:"row",dateProfile:e.dateProfile,todayRange:e.todayRange,cells:C,cellIsNarrow:e.cellIsNarrow,cellIsMicro:e.cellIsMicro,showDayNumbers:a>1,showWeekNumbers:a>1&&s.weekNumbers,forPrint:e.forPrint,className:M(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:b,heightRef:r.createRef(C[0].key)},o+":"+C[0].key))})}queryHit(e,n,r,s){const{props:i}=this,a=i.cellRows[0].length,{col:o,left:l,right:c}=fv(n,s,i.colWidth,a,e),{row:u,top:f,bottom:h}=hv(r,i.cellRows,this.rowHeightRefMap.current),g=i.cellRows[u][o],p=g.date,m=X(p,1);return{dateProfile:i.dateProfile,dateSpan:{range:{start:p,end:m},allDay:!0,...g.dateSpanProps},getDayEl:()=>mv(gv(this.rootEl,u),o),rect:{left:l,right:c,top:f,bottom:h},layer:0}}}function Dv(t){return t.eventRange.def.allDay}function Cv(t,e){return Ut(t.filter(Dv),e)}function xv(t,e,n,r){if(t!=null){const s=t/r.aspectRatio/6;return e>6||n?s:0}return 0}class Tv extends ${constructor(){super(...arguments),this.state={},this.buildDayHeaderText=L(Rv),this.handleInnerEl=e=>{this.disconnectSize&&(this.disconnectSize(),this.disconnectSize=void 0),e?this.disconnectSize=yn(e,(n,r)=>{this._isUnmounting||(B(this.props.innerHeightRef,r),this.setState({innerWidth:n}))}):B(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:M(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:$a,classNameGenerator:o?void 0:s.classNameGenerator,didMount:s.didMount,willUnmount:s.willUnmount,children:p=>d.jsx("div",{ref:this.handleInnerEl,className:M(v.flexCol,v.noShrink,v.whiteSpaceNoWrap,h&&v.sticky),style:{left:g,right:g},children:d.jsx(p,{tag:"div",attrs:i.innerAttrs,className:R(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 Rv(t,e,n,r){const s=r.formatToParts(t,e);return{text:ie(s),textParts:s,weekdayText:Xt(s),dayNumberText:n?Kt(s):""}}class Mv extends ${constructor(){super(...arguments),this.innerHeightRefMap=new Ge(()=>{dt(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,B(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:M(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(Tv,{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,B(this.props.innerHeightRef,null)}}class yo extends ${render(){const{props:e}=this,{headerTiers:n}=e;return d.jsx("div",{role:"rowgroup",className:M(e.className,v.flexCol,e.width==null&&v.liquid),style:{width:e.width},children:n.map((r,s)=>S.createElement(Mv,{...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 Iv extends ${constructor(){super(...arguments),this.state={},this.handleScroller=e=>{B(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}=tt(s),{totalWidth:l,clientWidth:c}=n;let u=l!=null&&c!=null?l-c:void 0;u<3&&(u=0);const f=!e.forPrint&&!Se(s),h=!e.forPrint&&qa(s),g=e.cellRows[0].length,p=c!=null?c/g:void 0,m=p!=null&&p<=po,b=m||p!=null&&p<=s.dayNarrowWidth;return d.jsxs(d.Fragment,{children:[s.dayHeaders&&d.jsxs("div",{className:M(R(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(yo,{headerTiers:e.headerTiers,cellIsNarrow:b,cellIsMicro:m}),!!u&&d.jsx("div",{className:M(R(s.fillerClass,{inTableHeader:!0}),v.borderOnlyS),style:{minWidth:u}})]}),d.jsx("div",{className:R(s.dayHeaderDividerClass,{isSticky:h,multiMonthColumns:0,options:{allDaySlot:!!s.allDaySlot}})})]}),d.jsx(Qt,{vertical:f,className:M(R(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(vo,{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:b,cellIsMicro:m,rowHeightRefMap:e.rowHeightRefMap})}),d.jsx(ho,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1}componentWillUnmount(){this._isUnmounting=!0}}class Nv extends ${constructor(){super(...arguments),this.rootElRef=S.createRef()}render(){const{props:e}=this;return d.jsx("div",{ref:this.rootElRef,className:M(v.footerScrollbar,e.isSticky&&v.footerScrollbarSticky),children:d.jsx(Qt,{horizontal:!0,ref:e.scrollerRef,children:d.jsx("div",{style:{minWidth:e.canvasWidth}})})})}componentDidMount(){this._isUnmounting=!1,this.disconnectHeight=En(this.rootElRef.current,e=>{this._isUnmounting||B(this.props.scrollbarWidthRef,e)})}componentWillUnmount(){this._isUnmounting=!0,this.disconnectHeight(),B(this.props.scrollbarWidthRef,null)}}class kv 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}=tt(s),{totalWidth:l,clientWidth:c}=n,u=l!=null&&c!=null?l-c:void 0,f=!e.forPrint&&!Se(s),h=!e.forPrint&&qa(s),g=!e.forPrint&&sm(s),p=e.cellRows[0].length,[m,b]=dv(p,e.dayMinWidth,c),C=b!=null&&b<=po,D=C||b!=null&&b<=s.dayNarrowWidth;return d.jsxs(d.Fragment,{children:[s.dayHeaders&&d.jsxs("div",{className:M(R(s.tableHeaderClass,{isSticky:h,borderlessX:i,borderlessTop:a,borderlessBottom:o,multiMonthColumns:0}),v.printHeader,h&&v.tableHeaderSticky),children:[d.jsxs(Qt,{horizontal:!0,hideScrollbars:!0,className:v.flexRow,ref:this.headerScrollerRef,children:[d.jsx(yo,{headerTiers:e.headerTiers,colWidth:b,viewportWidth:c,width:m,cellIsNarrow:D,cellIsMicro:C}),!!u&&d.jsx("div",{className:M(R(s.fillerClass,{inTableHeader:!0}),v.borderOnlyS),style:{minWidth:u}})]}),d.jsx("div",{className:R(s.dayHeaderDividerClass,{isSticky:h,multiMonthColumns:0,options:{allDaySlot:!!s.allDaySlot}})})]}),d.jsx(Qt,{vertical:f,horizontal:!0,hideScrollbars:g||e.forPrint,className:M(R(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(vo,{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:b,width:m,visibleWidth:l,cellIsNarrow:D,cellIsMicro:C,rowHeightRefMap:e.rowHeightRefMap})}),!!g&&d.jsx(Nv,{isSticky:!0,canvasWidth:m,scrollerRef:this.footerScrollerRef}),d.jsx(ho,{widthRef:this.handleTotalWidth})]})}componentDidMount(){this._isUnmounting=!1;const e=im(this.context.pluginHooks);this.syncedScroller=new e(!0),B(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 Pv extends ${constructor(){super(...arguments),this.scrollerRef=S.createRef(),this.rowHeightRefMap=new Ge(()=>{dt(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=uv(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}=tt(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(yp,{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:M(e.className,v.printRoot,R(r.tableClass,{borderlessX:s,borderlessTop:i,borderlessBottom:a,multiMonthColumns:0})),children:r.dayMinWidth?d.jsx(kv,{...f,dayMinWidth:r.dayMinWidth}):d.jsx(Iv,{...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 Hv extends Ka{buildRenderRange(e,n,r){let s=super.buildRenderRange(e,n,r),{props:i}=this;return Ov({currentRange:s,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}}function Ov(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=fs(i,1))),t.fixedWeekCount){let a=e.startOfWeek(e.startOfMonth(X(n.end,-1))),o=Math.ceil(Pf(a,s));s=fs(s,6-o)}return{start:r,end:s}}class jv extends ${constructor(){super(...arguments),this.buildDayTableModel=L(cv),this.buildDateRowConfigs=L(_p),this.createDayHeaderFormatter=L(vv),this.slicer=new Ap}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(so,{unit:"day",children:(u,f)=>{const h=this.buildDateRowConfigs(a.headerDates,o,r,f,l,n);return d.jsx(Pv,{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 Av={name:"daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:jv,dateProfileGeneratorClass:Hv},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 Lv{constructor(e,n){this.emitter=new wt}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const Eo={};function bo(t,e,n){let{instances:r}=t.mutatedEvents;for(let s in r)if(!hn(e.validRange,r[s].range))return!1;return So({eventDrag:t},n)}function _v(t,e,n){return hn(e.validRange,t.range)?So({dateSelection:t},n):!1}function So(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||Uv)(r,e)}function Uv(t,e,n={},r){return!(t.eventDrag&&!Bv(t,e,n,r)||t.dateSelection&&!Wv(t,e,n,r))}function Bv(t,e,n,r){let s=e.getCurrentData(),i=t.eventDrag,a=i.mutatedEvents,o=a.defs,l=a.instances,c=qt(o,i.isEvent?t.eventUiBases:{"":s.selectionConfig});r&&(c=Oe(c,r));let u=um(t.eventStore,i.affectedEvents.instances),f=u.defs,h=u.instances,g=qt(f,t.eventUiBases);for(let p in l){let m=l[p],b=m.range,C=c[m.defId],D=o[m.defId];if(!wo(C.constraints,b,u,t.businessHours,e))return!1;let{eventOverlap:E}=e.options,w=typeof E=="function"?E:null;for(let I in h){let N=h[I];if(br(b,N.range)&&(g[N.defId].overlap===!1&&i.isEvent||C.overlap===!1||w&&!w(new z(e,f[N.defId],N),new z(e,D,m))))return!1}let T=s.eventStore;for(let I of C.allows){let N={...n,range:m.range,allDay:D.allDay},H=T.defs[D.defId],k=T.instances[p],A;if(H?A=new z(e,H,k):A=new z(e,D),!I(kr(N,e),A))return!1}}return!0}function Wv(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)),!wo(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(br(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(kr(g,e),null))return!1}return!0}function wo(t,e,n,r,s){for(let i of t)if(!Vv(Fv(i,e,n,r,s),e))return!1;return!0}function Fv(t,e,n,r,s){return t==="businessHours"?_n(Pe(r,e,s)):typeof t=="string"?_n(pn(n,i=>i.groupId===t)):typeof t=="object"&&t?_n(Pe(t,e,s)):[]}function _n(t){let{instances:e}=t,n=[];for(let r in e)n.push(e[r].range);return n}function Vv(t,e){for(let n of t)if(hn(n,e))return!0;return!1}Eo.touchMouseIgnoreWait=500;let tr=0,Jt=0,nr=!1;class Do{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()&&zv(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,Gv()}},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 wt,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),Yv()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),Zv()}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(){nr=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?e.target.closest(this.selector):this.containerEl}shouldIgnoreMouse(){return tr||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(nr=!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 zv(t){return t.button===0&&!t.ctrlKey}function Gv(){tr+=1,setTimeout(()=>{tr-=1},Eo.touchMouseIgnoreWait)}function Yv(){Jt+=1,Jt===1&&window.addEventListener("touchmove",Co,{passive:!1})}function Zv(){Jt-=1,Jt||window.removeEventListener("touchmove",Co,{passive:!1})}function Co(t){nr&&t.preventDefault()}class $v{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",_t(r,{left:s.left,top:s.top}),Eh(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(this.mirrorEl.remove(),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&_t(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),_t(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 Br{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 qv extends Br{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 Xv extends Br{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 xo extends Br{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 To extends xo{constructor(e,n){super(new qv(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return Pp(this.scrollController.el)}}class Kv extends xo{constructor(e){super(new Xv,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 ei=typeof performance=="function"?performance.now:Date.now;class Qv{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=ei();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(ei()))}}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 Kv(!1):new To(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 Dt extends Lv{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&&(bh(document.body),wh(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,Sh(document.body),Dh(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 Do(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 $v,this.autoScroller=new Qv}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 Jv{constructor(e){this.el=e,this.origRect=Ur(e),this.isRtl=Et(e),this.scrollCaches=uo(e).map(n=>new To(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(!ey(s.getEventTarget())&&!Rp(r,s.clientRect))return!1;return!0}}function ey(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class Sn{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 wt}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},r=n,s=e.subjectEl,i;s instanceof HTMLElement&&(i=Ur(s),r=Mp(r,i));let a=this.initialHit=this.queryHitForOffset(r.left,r.top);if(a){if(this.useSubjectCenter&&i){let o=co(i,a.rect);o&&(r=Ip(o))}this.coordAdjust=Np(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||!wn(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=Oe(this.droppableStore,e=>(e.component.prepareHits(),new Jv(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 b=o.queryHit(l.isRtl,f,h,p,m);b&&hn(b.dateProfile.activeRange,b.dateSpan.range)&&(this.disablePointCheck||l.el.contains(l.el.getRootNode().elementFromPoint(f+c-window.scrollX,h+u-window.scrollY)))&&(!i||b.layer>i.layer)&&(b.componentId=a,b.context=o.context,b.rect.left+=c,b.rect.right+=c,b.rect.top+=u,b.rect.bottom+=u,i=b)}}}return i}}function wn(t,e){return!t&&!e?!0:!!t!=!!e?!1:qh(t.dateSpan,e.dateSpan)}function Ro(t,e){let n={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(n,r(t,e));return Object.assign(n,ty(t,e.dateEnv)),n}function ty(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class ny extends rt{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&&wn(a,o)){let{context:l}=s,c={...Ro(a.dateSpan,l),dayEl:a.getDayEl(),jsEvent:r.origEvent,view:l.viewApi||l.calendarApi.view};l.emitter.trigger("dateClick",c)}}},this.dragging=new Dt(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new Sn(this.dragging,jr(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class ry extends rt{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?sy(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=iy(f,a,l.pluginHooks.dateSelectionTransformers)),(!c||!_v(c,a.dateProfile,l))&&(u=!0,c=null)}c?l.dispatch({type:"SELECT_DATES",selection:c}):o||l.dispatch({type:"UNSELECT_DATES"}),u?Dr():Cr(),o||(this.dragSelection=c)},this.handlePointerUp=a=>{this.dragSelection?(Ha(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 Dt(e.el);s.touchScrollAllowed=!1,s.minDistance=r.selectMinDistance||0,s.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new Sn(this.dragging,jr(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 sy(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function iy(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(Mh);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 Ct extends rt{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=qe(a.subjectEl)).instance.instanceId;this.relevantEvents=Mr(h.getCurrentData().eventStore,p),c.minDistance=a.isTouch?0:f.eventDragMinDistance,c.delay=a.isTouch&&p!==l.props.eventSelection?oy(l):null,u.parentNode=no(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:ue(),isEvent:!0};if(a){f=a.context;let b=f.options;u===f||b.editable&&b.droppable?(h=ay(c,a,this.eventRange.instance.range.start,f.getCurrentData().pluginHooks.eventDragMutationMassagers),h&&(g=Pr(l,f.getCurrentData().eventUiBases,h,f),m.mutatedEvents=g,bo(m,a.dateProfile,f)||(p=!0,h=null,g=null,m.mutatedEvents=ue()))):f=null}this.displayDrag(f,m),p?Dr():Cr(),o||(u===f&&wn(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:b}=this.hitDragging;if(this.clearDrag(),o.emitter.trigger("eventDragStop",{el:this.subjectEl,event:g,jsEvent:a.origEvent,view:l}),u){if(c===o){let C=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:C,relatedEvents:Te(m,o,h),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:p})}},E={};for(let w of o.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(E,w(u,o));o.emitter.trigger("eventDrop",{...D,...E,el:a.subjectEl,delta:u.datesDelta,jsEvent:a.origEvent,view:l}),o.emitter.trigger("eventChange",D)}else if(c){let C={event:g,relatedEvents:Te(p,o,h),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:p})}};o.emitter.trigger("eventLeave",{...C,draggedEl:a.subjectEl,view:l}),o.dispatch({type:"REMOVE_EVENTS",eventStore:p}),o.emitter.trigger("eventRemove",C);let D=m.defs[f.defId],E=m.instances[h.instanceId],w=new z(c,D,E);c.dispatch({type:"MERGE_EVENTS",eventStore:m});let T={event:w,relatedEvents:Te(m,c,E),revert(){c.dispatch({type:"REMOVE_EVENTS",eventStore:m})}};c.emitter.trigger("eventAdd",T),a.isTouch&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:h.instanceId}),c.emitter.trigger("drop",{...Ro(b.dateSpan,c),draggedEl:a.subjectEl,jsEvent:a.origEvent,view:b.context.viewApi}),c.emitter.trigger("eventReceive",{...T,draggedEl:a.subjectEl,view:b.context.viewApi})}}else o.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:r}=n.context,s=this.dragging=new Dt(e.el);s.pointer.selector=Ct.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new Sn(this.dragging,qn);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:ue(),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}}Ct.SELECTOR=`.${v.internalEventDraggable}, .${v.internalEventResizable}`;function ay(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=Fe(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 oy(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class ly extends rt{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=qe(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=Mr(a.getCurrentData().eventStore,this.eventRange.instance.instanceId);let l=this.querySegEl(i);this.draggingSegEl=l,this.draggingEventRange=qe(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:ue(),isEvent:!0};i&&(i.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,i)||(h=cy(u,i,o.subjectEl.classList.contains(v.internalEventResizerStart),f.range))),h&&(g=Pr(c,l.getCurrentData().eventUiBases,h,l),m.mutatedEvents=g,bo(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?Dr():Cr(),a||(h&&wn(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:Te(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 Dt(e.el);r.pointer.selector=`.${v.internalEventResizer}`,r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.context.options.dragScroll;let s=this.hitDragging=new Sn(this.dragging,jr(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 cy(t,e,n,r){let s=t.context.dateEnv,i=t.dateSpan.range.start,a=e.dateSpan.range.start,o=Fe(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 dy{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=ro(r.origEvent);this.matchesCancel=!!i.closest(s),this.matchesEvent=!!i.closest(Ct.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 Do(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 uy={name:"interaction",componentInteractions:[ny,ry,Ct,ly],calendarInteractions:[dy],elementDraggingImpl:Dt};const fy=[Av,uy],hy={comfortable:3,compact:2},Mo="cal-1",gy={color:Mo,rsvp:"accepted",status:"confirmed",hasThread:!1,isRecurring:!1,zoneCertainty:"local"},my=(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 vy({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,className:g}){const p=S.useRef(null);S.useEffect(()=>{p.current?.getApi().gotoDate(t)},[t]);const m=S.useMemo(()=>e.map(E=>({id:E.id,title:E.title,start:E.start,end:E.end,allDay:E.allDay,editable:h!==void 0&&f(E.id)})),[e,f,h]),b=E=>{E.revert(),h?.(E.event.id,Zr(E.event.startStr,E.event.endStr===""?E.event.startStr:E.event.endStr,E.event.allDay))},C=S.useMemo(()=>new Map(e.map(E=>[E.id,{color:n[E.calendarId]??Mo,rsvp:E.myRsvp,status:E.status,hasThread:E.threadId!=="",isRecurring:E.recurrenceRule!=="",zoneCertainty:E.zoneCertainty}])),[e,n]),D=E=>C.get(E)??gy;return d.jsx("div",{"data-testid":"calendar-grid",className:P("h-full min-h-0 w-full text-fg",g),children:d.jsx(lp,{ref:p,plugins:fy,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:hy[r],dayCellTopContent:E=>{const w=my(E.date,i);return d.jsx("a",{href:c(w),"aria-label":`Open ${E.date.toLocaleDateString("en-GB",{dateStyle:"full",timeZone:i})}`,className:"hover:underline",onClick:T=>{py(T)||(T.preventDefault(),u(w))},children:Number(w.slice(8))})},dayCellDidMount:E=>{E.el.querySelector(":scope [aria-hidden='true']:has(> a)")?.removeAttribute("aria-hidden");const w=E.el.querySelector("a");for(const T of["mousedown","touchstart","pointerdown"])w?.addEventListener(T,I=>I.stopPropagation())},moreLinkClick:"popover",moreLinkText:E=>`+${E}`,displayEventEnd:!1,eventTimeFormat:{hour:"2-digit",minute:"2-digit",hour12:!1},dayHeaderFormat:{weekday:"short"},events:m,eventClick:E=>o(E.event.id),eventDrop:b,eventResize:b,eventDidMount:E=>{E.el.setAttribute("data-event-id",E.event.id)},dateClick:E=>l(qo(E.dateStr,E.allDay)),select:E=>{if(!$o(E.startStr,E.endStr)){E.view.calendar.unselect();return}l(Zr(E.startStr,E.endStr,!0))},viewClass:"bg-surface",tableClass:"border-line",tableHeaderClass:"bg-surface",fillerClass:"border-line",dayHeaderRowClass:"h-pane-header",dayHeaderClass:E=>P("border-b border-line bg-surface",E.isToday?"text-accent":"text-fg-subtle"),dayHeaderInnerClass:"px-1 py-1 text-2xs font-semibold uppercase tracking-wider",dayHeaderDividerClass:"border-b border-line",dayCellClass:E=>P("border-line",E.isOther&&"bg-surface-sunken"),dayCellTopInnerClass:E=>P("px-1 py-0.5 text-2xs tabular-nums",E.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:E=>P(Zo({color:D(E.event.id).color,layout:"row",density:"compact",rsvp:D(E.event.id).rsvp,status:D(E.event.id).status,selected:E.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:E=>{const w=D(E.event.id);return d.jsx(Yo,{title:E.event.title,timeText:r==="compact"?"":E.timeText,layout:"row",rsvp:w.rsvp,hasThread:w.hasThread,isRecurring:w.isRecurring,zoneCertainty:w.zoneCertainty})}})})}function yy(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 Ey({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:P("flex items-center gap-1.5 overflow-x-auto px-row-inset",o),children:t.map(f=>{const h=tn(f.color),g=e.has(f.id);return d.jsxs("label",{className:P("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?P(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:P("size-2 rounded-full border",h.border,g?h.solid:"bg-transparent")}),f.name]},f.id)})}):d.jsx("div",{className:P("flex flex-col gap-3",o),children:yy(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:P("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(Xo,{className:"size-3 shrink-0"}):d.jsx(rr,{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(by,{calendar:p,checked:e.has(p.id),touch:i,onToggle:()=>n(p.id)},p.id))]},f.accountId)})})}function by({calendar:t,checked:e,touch:n,onToggle:r}){const s=tn(t.color),i=t.sync==="paused",a=t.syncError??"";return d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("label",{className:P("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:P("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?P(s.solid,s.border):P("bg-transparent",s.border)),children:e&&d.jsx(Ko,{className:"size-3 text-canvas",strokeWidth:3})}),d.jsx("span",{className:P("min-w-0 flex-1 truncate text-sm",e?"text-fg":"text-fg-subtle"),children:t.name}),i&&d.jsx(cc,{className:"size-3.5 shrink-0 text-fg-subtle","aria-hidden":!0}),a!==""&&d.jsx(Qo,{className:"size-3.5 shrink-0 text-danger","aria-hidden":!0})]}),i&&d.jsx("span",{className:"sr-only",children:`${t.name}: ${dc.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 Un={year:"Year",month:"Month",week:"Week",day:"Day",agenda:"Agenda"},Sy=["day","week","month","year","agenda"];function wy({view:t,title:e,weekNumber:n,views:r=Sy,onChangeView:s,onPrev:i,onNext:a,onToday:o,sidePane:l,trailing:c,touch:u=!1,className:f}){const h=P("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:P("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(bl,{className:"size-5"})}),d.jsx("button",{type:"button",onClick:o,className:P("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 ${Un[t].toLowerCase()}`,className:h,children:d.jsx(Jo,{className:"size-5"})}),d.jsx("button",{type:"button",onClick:a,"aria-label":`Next ${Un[t].toLowerCase()}`,className:h,children:d.jsx(rr,{className:"size-5"})}),d.jsx("h1",{className:P("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(el,{"aria-label":"View",value:t,onChange:g=>{const p=r.find(m=>m===g.target.value);p&&s(p)},className:P("shrink-0",u?"h-11 w-24":"w-28"),children:r.map(g=>d.jsx("option",{value:g,children:Un[g]},g))})]})}function Dy({id:t,onNewEvent:e,newEventRef:n,month:r,calendars:s,className:i}){return d.jsxs("section",{id:t,"aria-label":"Calendar side pane",className:P("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(si,{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 ti({onNewEvent:t,newEventRef:e,className:n}){return d.jsx("button",{ref:e,type:"button","aria-label":"New event",onClick:t,className:P("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(si,{className:"size-6","aria-hidden":"true"})})}function Cy(t){return P("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 xy({options:t,value:e,onChange:n,touch:r,ariaLabel:s,className:i}){const a=S.useId();return d.jsxs("fieldset",{className:P("inline-flex items-center gap-0.5",i),children:[d.jsx("legend",{className:"sr-only",children:s}),t.map(o=>d.jsxs("label",{className:P(Cy(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 Ty(){const t=tl(),{updateEvent:e}=Sl();return S.useCallback(async(n,r,s,i)=>{const{calendarObjectId:a,recurrenceId:o}=oi(n.id),l=await t.fetchQuery({...rl({path:{calendarObjectId:a},query:{calendarId:n.calendarId}}),meta:nl(404),staleTime:0}).catch(h=>({unread:hi(h)}));if("unread"in l)return{kind:"refused",message:l.unread};const c=fc(n,{repeat:"",location:"",notes:""}),u={...c,date:r.date,endDate:r.endDate,startTime:r.startTime,endTime:r.endTime,allDay:r.allDay},f=hc(c,u,{clock:Be(),anchor:Rl(l.icalData,i===""?wl: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 Ve={mode:"idle",dragging:null},Wr=t=>({mode:"quick",dragging:null,draft:t,status:"editing",problem:""}),bt=t=>({range:t,title:"",location:"",calendarId:""});function Io(t,e){return t.dragging?"drag":t.mode==="quick"?"popup":e.eventPopup?"event-popup":e.sidebar?"sidebar":e.nav?"nav":null}function Ry(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}}:Wr(bt(e))}function My(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:bt(e.range)}:Ry(t,e.range);case"click":return t.mode==="quick"?Ve:t.mode==="sidebar"||n.sidebar?{...t,dragging:null}:n.eventPopup?{...t,dragging:null}:Wr(bt(e.range))}}function Iy(t,e){switch(e.type){case"gesture":return My(t,e.gesture,e.layers);case"new-event":return Wr(bt(e.range));case"outside":return t.mode==="quick"?Ve:t;case"escape":{const n=Io(t,e.layers);return n==="drag"?{...t,dragging:null}:n==="popup"?Ve: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 Ve;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:bt(e.range)};case"sidebar-closed":return t.mode==="sidebar"?Ve:t}}function Ny(t){return t.dragging?t.dragging:t.mode==="idle"?null:t.draft.range}const ky="[data-calendar-popover], [data-event-id], [data-time-columns], [data-all-day-row], [role='dialog']";function Py({layers:t,isPhone:e,closeToView:n,closeNav:r,drawnEvents:s}){const[i,a]=S.useReducer(Iy,Ve),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(E=>{const w=o.current,T=w.session.mode==="idle";if(w.isPhone&&E.type==="click"&&T&&!w.layers.eventPopup)return;(E.type==="click"||E.type==="drag-end"||E.type==="keyboard")&&w.layers.eventPopup&&w.closeToView(),T&&(E.type==="click"||E.type==="keyboard")&&(l.current=E.origin),T&&E.type==="drag-end"&&(l.current=document.querySelector("[role='grid'][aria-label='Time grid']")),a({type:"gesture",gesture:E,layers:w.layers})},[]);S.useEffect(()=>{const E=T=>{T.target instanceof Element&&(T.target.closest(ky)||(o.current.layers.eventPopup&&o.current.closeToView(),a({type:"outside"})))},w=T=>{if(T.key!=="Escape"||T.defaultPrevented)return;const{session:I,layers:N}=o.current,H=Io(I,N);H===null||H==="drag"||(T.preventDefault(),H==="event-popup"?o.current.closeToView():H==="sidebar"?c.current?.():H==="nav"?o.current.closeNav():a({type:"escape",layers:N}))};return document.addEventListener("pointerdown",E,!0),window.addEventListener("keydown",w),()=>{document.removeEventListener("pointerdown",E,!0),window.removeEventListener("keydown",w)}},[]),S.useEffect(()=>{const E=i.mode==="quick";h.current&&i.mode==="idle"&&!f.current&&l.current?.focus(),E&&(f.current=!1),h.current=E},[i.mode]),S.useEffect(()=>{if(g===""||s.length===0)return;const E=document.querySelector(`[data-event-id^="${CSS.escape(g)}"]`);E&&(E.focus(),p(""))},[g,s]);const b=t.sidebar;S.useEffect(()=>{b||a({type:"sidebar-closed"})},[b]);const C=S.useCallback(E=>{l.current=E},[]),D=S.useCallback(E=>{f.current=!0,p(E)},[]);return{session:i,dispatch:a,takeGesture:m,setOrigin:C,requestClose:c,carriedFocus:u,focusSaved:D}}const No="remit:calendar-side-pane";function Hy(){try{return localStorage.getItem(No)!=="closed"}catch{return!0}}function Oy(t){try{localStorage.setItem(No,t?"open":"closed")}catch{}}function jy(t,e){return t.includes("sidebar")?!0:!t.some(r=>r!=="intelligence")&&e}function Ay(t){const e=Hl(),n=Ol(),[r,s]=S.useState(Hy),i=!t&&jy(e,r),a=t&&e.includes("nav"),o=S.useCallback(()=>{if(t){n(Kr(e,a?void 0:"nav"));return}const c=!i;Oy(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(Kr(e,c?"nav":void 0))},[e,n]);return{open:i,toggle:o,navOpen:a,setNavOpen:l}}const ko="remit:calendar-density",ni="comfortable";function Ly(){try{return localStorage.getItem(ko)==="compact"?"compact":ni}catch{return ni}}function _y(t){try{localStorage.setItem(ko,t)}catch{}}const Uy=t=>t==="compact"?"pills":"detail";function By({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:b,onReachEnd:C,atStartCap:D,atEndCap:E,onLoadEarlier:w,onLoadLater:T,onVisibleDayChange:I}){const N=S.useMemo(()=>sl(t,i),[t,i]),H=!l.has(r);return c!=null?d.jsx("div",{className:"flex h-full items-center justify-center bg-surface",children:d.jsx(lc,{title:"Couldn't load these days",error:c,onRetry:u})}):d.jsx(Uu,{days:t,calendars:e,density:Uy(n),today:r,focusDate:s,selectedEventId:a,freeOn:o,loadingDates:l,scrollTarget:f,onSelectEvent:h,onPickSlot:g,onZoomDay:p,onReachStart:b,onReachEnd:C,atStartCap:D,atEndCap:E,onLoadEarlier:w,onLoadLater:T,onVisibleDayChange:I,todayLead:H?d.jsx("div",{className:"border-b border-line bg-surface-sunken p-3",children:d.jsx(Ku,{nextUp:N,calendars:e,today:r,onSelectEvent:h,onGoTo:m})}):void 0})}const Wy=400;function Fy({density:t,onPickSlot:e}){const{date:n,calendarIds:r}=sr(),{openEvent:s,setAnchorDate:i,zoomToDay:a}=ir(),o=di(),[l]=S.useState(()=>new Date),c=S.useMemo(()=>Bt(l),[l]),u=S.useMemo(()=>l.toISOString(),[l]),[f,h]=S.useState(()=>Ll(n)),[g,p]=S.useState(),[m,b]=S.useState(n),C=S.useRef(0),D=S.useRef(n),E=S.useCallback(j=>{D.current=j,b(j),h(ee=>_l(ee,j)),C.current+=1,p({date:j,token:C.current})},[]);S.useEffect(()=>{n!==D.current&&E(n)},[n,E]);const w=rc(m,Wy);S.useEffect(()=>{w!==D.current&&(D.current=w,i(w))},[w,i]);const T=S.useMemo(()=>Ul(f),[f]),I=S.useMemo(()=>Bl(T),[T]),{calendars:N,timeZoneByCalendarId:H,shown:k,narrowed:A,resolved:G,isLoading:U}=Ml(r),W=Dl(I,A,G),K=Cl(I),ae=Il(W.instances,H,k),Q=S.useMemo(()=>T.map(j=>il(j,ae,c)),[T,ae,c]),we=S.useMemo(()=>{const j=new Set;if(U||!G)return new Set(T);for(const ee of T)W.pendingWindows.has(Qr(ee))&&j.add(ee);return j},[T,W.pendingWindows,U,G]),ne=S.useMemo(()=>Wl(T,K.spans),[T,K.spans]),Y=S.useCallback(j=>K.pendingWindows.has(Qr(j.date))?Bn(j):ne.get(j.date)??Bn(j),[ne,K.pendingWindows]),le=S.useCallback(j=>{E(j),i(j)},[E,i]),st=S.useCallback(j=>{const ee=oi(j);s(ee.calendarObjectId,ee.recurrenceId)},[s]),Ae=S.useCallback(()=>h(Fl),[]),O=S.useCallback(()=>h(Vl),[]),F=S.useCallback(()=>h(zl),[]),J=S.useCallback(()=>h(Gl),[]),fe=S.useCallback(()=>{W.refetch(),K.refetch()},[W.refetch,K.refetch]);return d.jsx(By,{days:Q,calendars:N,density:t,today:c,anchorDate:n,now:u,selectedEventId:o?li(o.calendarObjectId,o.recurrenceId??""):"",freeOn:Y,loadingDates:we,error:W.error??K.error,onRetry:fe,scrollTarget:g,onSelectEvent:st,onPickSlot:e,onZoomDay:a,onGoToDate:le,onReachStart:Ae,onReachEnd:O,atStartCap:Zl(f),atEndCap:Yl(f),onLoadEarlier:F,onLoadLater:J,onVisibleDayChange:b})}function Po({title:t,error:e,onRetry:n,compact:r=!1}){const s=hi(e);return d.jsxs("div",{role:"alert",className:r?"flex flex-col gap-2 rounded-md border border-danger/40 bg-danger-soft p-3 text-sm":"flex h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[!r&&d.jsx(al,{className:"size-8 text-danger","aria-hidden":"true"}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-danger",children:t}),d.jsx("p",{className:"mt-1 break-words text-sm text-fg-muted",children:s})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:n,className:"inline-flex items-center rounded-md border border-line bg-canvas px-3 py-1.5 text-sm font-medium hover:bg-surface-raised",children:"Retry"}),d.jsx("a",{href:fi(`${t}: ${s}`),target:"_blank",rel:"noreferrer",className:"text-sm font-medium text-accent hover:underline",children:"Report an issue"})]})]})}const Ho="calendar-side-pane";function Vy(t,e){if(t==="day")return[e,e];if(t==="week"){const n=ii(Wn(e),7);return[n[0],n[6]]}return["",""]}function ri({onNewEvent:t,newEventRef:e,onPicked:n,className:r}){const{view:s,date:i,calendarIds:a}=sr(),{goToDate:o,setCalendarIds:l}=ir(),{calendars:c,error:u,retry:f}=ci(),[h,g]=S.useState({for:i,month:i}),p=h.for===i?h.month:i,[m,b]=Vy(s,i),C=new Set(Nl(c,a)),D=E=>{const w=new Set(C);w.has(E)?w.delete(E):w.add(E),l(w.size===c.length?[]:c.map(T=>T.id).filter(T=>w.has(T)))};return d.jsx(Dy,{id:Ho,className:r,onNewEvent:t,newEventRef:e,month:d.jsx(ol,{month:p,today:Bt(new Date),rangeStart:m,rangeEnd:b,onPickDay:E=>{o(E),n?.()},onShowMonth:E=>g({for:i,month:E})}),calendars:u!==null&&c.length===0?d.jsx(Po,{title:"Couldn't load your calendars",error:u,onRetry:f,compact:!0}):d.jsx(Ey,{calendars:c,visible:C,onToggle:D,onToggleAccount:(E,w)=>{const T=new Set(c.filter(N=>N.accountId===E).map(N=>N.id)),I=c.map(N=>N.id).filter(N=>T.has(N)?w:C.has(N));l(I.length===c.length?[]:I)}})})}const zy="This calendar changed while you were writing.",Gy=(t,e)=>{if(e.allDay)return{...t,start:`${e.date}T00:00:00`,end:`${Yy(e.endDate)}T00:00:00`};const n=Be();return{...t,start:$r(e.date,e.startTime,n),end:$r(e.endDate,e.endTime,n)}};function Yy(t){const[e,n,r]=t.split("-").map(Number);return new Date(Date.UTC(e,n-1,r+1)).toISOString().slice(0,10)}function Zy(t,e,n,r){const s=Ty(),[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,E)=>{l(void 0),u(void 0),a(w=>new Map(w).set(D.event.id,D.range)),s(D.event,D.range,E,n[D.event.calendarId]??"").then(w=>{a(T=>{const I=new Map(T);return I.delete(D.event.id),I}),w.kind!=="written"&&(u({text:w.kind==="conflict"?zy:`Couldn't move ${D.event.title}: ${w.message}`,retry:()=>g(D,E),conflict:w.kind==="conflict"}),requestAnimationFrame(()=>f.current?.focus()))})},[s,n]),p=S.useCallback((D,E)=>{const w=t.find(I=>I.id===D);if(!w)return;const T={event:w,range:E};if(w.seriesId!==""){l(T);return}g(T,void 0)},[t,g]),m=S.useMemo(()=>i.size===0?t:t.map(D=>{const E=i.get(D.id);return E?Gy(D,E):D}),[t,i]),b=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(mc,{focusRef:f,failure:{text:c.text,reportHref:fi(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(ll,{className:"size-4"})})]}),C=d.jsx(ai,{open:o!==void 0,onClose:()=>l(void 0),title:"Move a repeating event",children:o&&d.jsx(kl,{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 E=t.find(w=>w.id===D);return E!==void 0&&!h.has(E.calendarId)},onMoveEvent:p,banner:b,prompt:C}}function $y({suggestions:t,busy:e,failure:n,reportHref:r,addBlocked:s,onAdd:i,onChangeFirst:a,onDismiss:o}){const l=t[0],c=l?$l(l.suggestion,""):void 0;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(vc,{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(ql,{className:"px-row-inset",hasCard:l!==void 0,remaining:t.length,blocked:c!==void 0&&!c.settled,blockedReason:Xl,onConfirm:()=>{l&&!e&&s===void 0&&i(l.suggestion.id)},onReject:()=>{l&&!e&&o(l.suggestion.id)},children:l&&d.jsx(Kl,{suggestion:l.suggestion,whenText:l.whenText,onAdd:()=>i(l.suggestion.id),onReview:a&&(()=>a(l.suggestion.id)),onDismiss:()=>o(l.suggestion.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 qy=(t,e)=>e.kind==="refused"?`Couldn't ${t}: ${e.message}`:"";function Xy({onChangeFirst:t}){const{suggestions:e,error:n}=xl(),r=ci(),{defaultCalendarId:s}=r,i=Tl(),[a,o]=S.useState(""),l=e.map(m=>({suggestion:Jl(m,{threadId:"",threadSubject:"",calendarId:s,sender:m.organizer===""?"From your mail":m.organizer}),whenText:Ql(m)})),c=n===null?"":"Couldn't read what your mail is waiting on.";if(l.length===0&&c===""&&a==="")return null;const u=ac(c||a||"pending invitations could not be answered"),f=m=>{const b=e.find(C=>C.suggestionId===m);b&&t(m,nc(b))},h=m=>{const b=e.find(C=>C.suggestionId===m);return b?.zoneCertainty==="Ambiguous"&&b.method!=="Cancel"},g=e[0]?.method==="Cancel",p=(m,b)=>{o(""),b().then(C=>o(qy(m,C)))};return d.jsx($y,{suggestions:l,busy:i.isAnswering,failure:c||a,reportHref:u,addBlocked:ec(tc(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 Ky=["day","month","agenda"],Qy=[{value:"comfortable",label:"Detail",shortLabel:"Detail"},{value:"compact",label:"Glance",shortLabel:"Glance"}],Jy={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 eE({isPhone:t,detail:e}){const{view:n,date:r,calendarIds:s}=sr(),i=!qr(n),{events:a,calendars:o,timeZoneByCalendarId:l,colorByCalendarId:c,isLoading:u,error:f,retry:h,instanceOf:g}=Pl({view:n,date:r,calendarIds:s,enabled:i}),p=Zy(a,o,l,h),m=p.events,{goToView:b,goToToday:C,goToDate:D,openEvent:E,openNewEvent:w,closeToView:T,changeSuggestionFirst:I,zoomToDay:N,dayHref:H}=ir(),k=jl(),A=di(),G=k?void 0:A,U=Al(),[W,K]=S.useState(Ly),ae=S.useCallback(se=>{_y(se),K(se)},[]),Q=S.useCallback(se=>{const Le=g(se);E(Le.calendarObjectId,Le.recurrenceId)},[g,E]),we=U,ne=Ay(t),{session:Y,dispatch:le,takeGesture:st,setOrigin:Ae,requestClose:O,carriedFocus:F,focusSaved:J}=Py({layers:{eventPopup:G!==void 0,sidebar:U,nav:ne.navOpen},isPhone:t,closeToView:T,closeNav:()=>ne.setNavOpen(!1),drawnEvents:m}),fe=S.useCallback(se=>{Y.mode==="quick"&&(F.current=se,le({type:"expand"}),w(cl(Y.draft.range,Be())))},[Y,F,le,w]),j=S.useMemo(()=>({session:Y,dispatch:le,requestClose:O,carriedFocus:F,focusSaved:J}),[Y,le,O,F,J]),ee=Ny(Y),it=ee?{range:ee,title:Y.mode==="idle"?"":Y.draft.title,tone:Y.mode==="sidebar"&&!Y.dragging?"draft":"selection",warning:Y.mode==="quick"&&Y.status==="failed",handles:Y.mode==="sidebar"}:void 0,Fr=new Date().toISOString(),re=yl(n,t),Vr=se=>le({type:"new-event",range:se}),Oo=S.useMemo(()=>{const se={};if(re!=="year")return se;const Le=Be();for(const Mt of m){const at=Mt.allDay?Mt.start.slice(0,10):dl(Mt.start,Le).date;se[at]=(se[at]??0)+1}return se},[m,re]),xt=re==="day"?[r]:re==="week"?ii(Wn(r),7):void 0,zr=G?li(G.calendarObjectId,G.recurrenceId??""):"",Tt=S.useRef(null),Rt=S.useCallback(()=>{const se=Bt(new Date),Le=new Date().getHours()*60,at=ul(xt??[r],se,Le);Ae(document.activeElement instanceof HTMLElement?document.activeElement:Tt.current),G&&T(),le({type:"new-event",range:fl(at.date,at.minute)})},[xt,r,G,T,Ae,le]),jo=re==="week"||re==="day"?hl(re==="week"?Wn(r):r):void 0,Ao=qr(n)?d.jsx(Fy,{density:W,onPickSlot:Vr}):f!=null?d.jsx(Po,{title:Jy[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(gl,{className:"size-6 animate-spin text-fg-subtle"})}):re==="year"?d.jsx(ml,{date:r,today:Bt(new Date),counts:Oo,onPickDay:N}):xt?d.jsx(pl,{days:xt,events:m,colorByCalendarId:c,density:W,timeZone:Be(),now:Fr,selectedEventId:zr,draft:it,onGesture:st,onSelectEvent:Q,onOpenDay:N,touch:t,canMove:p.canMove,onMoveEvent:p.onMoveEvent}):d.jsx(vy,{date:r,events:m,colorByCalendarId:c,density:W,selectedEventId:zr,timeZone:Be(),now:Fr,onSelectEvent:Q,onPickSlot:Vr,dayHref:H,onZoomDay:N,canMove:p.canMove,onMoveEvent:p.onMoveEvent});return d.jsxs(gc.Provider,{value:j,children:[d.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-surface text-fg",children:[d.jsx(wy,{view:re,views:t?Ky:void 0,title:t&&re==="day"?new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"short",timeZone:"UTC"}).format(new Date(`${r}T00:00:00Z`)):vl(re,r),weekNumber:jo,onChangeView:b,onPrev:()=>D(Xr(r,re,-1)),onNext:()=>D(Xr(r,re,1)),onToday:C,touch:t,sidePane:{open:t?ne.navOpen:ne.open,controls:Ho,onToggle:ne.toggle},trailing:re==="week"||re==="day"?d.jsx(xy,{ariaLabel:"Calendar density",options:Qy,value:W,onChange:ae,touch:t,className:"shrink-0"}):void 0}),d.jsxs("div",{className:"relative flex min-h-0 flex-1",children:[ne.open&&d.jsx(ri,{onNewEvent:Rt,newEventRef:Tt}),!(t&&we)&&d.jsxs(d.Fragment,{children:[t&&Y.mode==="idle"&&d.jsx(ti,{onNewEvent:Rt,newEventRef:Tt,className:"fixed right-4 bottom-[calc(var(--app-tab-bar,0px)+1rem)] z-30 size-14 rounded-full"}),!ne.open&&!t&&d.jsx(ti,{onNewEvent:Rt,newEventRef:Tt,className:"absolute top-2 left-2 z-20"}),!U&&d.jsx(Xy,{onChangeFirst:I}),d.jsxs("div",{"data-calendar-body":"",className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[p.banner,Ao]})]}),!we&&e,Y.mode==="quick"&&d.jsx(uc,{session:Y,dispatch:le,onMoreOptions:fe,onSaved:J,touch:t}),we&&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})]})]}),p.prompt,t&&d.jsx(ai,{open:ne.navOpen,onClose:()=>ne.setNavOpen(!1),title:"Calendars",anchor:"left",children:d.jsx(ri,{onNewEvent:Rt,onPicked:()=>ne.setNavOpen(!1),className:"w-full"})})]})}function wE(){const t=yc()==="phone";return d.jsx(eE,{isPhone:t,detail:d.jsx(El,{})})}export{wE as component};
|