@remit/web-client-dist 0.0.675 → 0.0.676
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{AppFrame-R9FR9SH9.js → AppFrame-DSPG81Mk.js} +1 -1
- package/assets/{BriefPane-BzlqkW4r.js → BriefPane-Cfl-uWfm.js} +1 -1
- package/assets/CalendarEventEditor-COnJXvRd.js +1 -0
- package/assets/CalendarEventPopup-CqHE2vrc.js +1 -0
- package/assets/CalendarLoadFailed-CxL15r1A.js +1 -0
- package/assets/CalendarQuickCreate-DxgU3bNP.js +1 -0
- package/assets/CalendarSession-BKwK9s2o.js +1 -0
- package/assets/{EmptyState-dD_YhGMH.js → EmptyState-BUOSmldo.js} +1 -1
- package/assets/{ErrorState-nA0Ptq3g.js → ErrorState-KjDYblD5.js} +1 -1
- package/assets/{FlaggedPane-BwhUf1qN.js → FlaggedPane-Dw-wR4tp.js} +1 -1
- package/assets/{FullCompose-dJ4mfUrX.js → FullCompose-Djp_h4BT.js} +1 -1
- package/assets/{LabelApplyTrigger-BA7ANeDk.js → LabelApplyTrigger-oS5sxATE.js} +1 -1
- package/assets/{MailShell-0sTtK1xD.js → MailShell-LIuV2C3h.js} +1 -1
- package/assets/{MailViewChrome-BEx9Dr1Z.js → MailViewChrome-yffBJjbO.js} +1 -1
- package/assets/{MailboxPane-DYgnYeOy.js → MailboxPane-DUCZVAx6.js} +1 -1
- package/assets/{MessageBody-Deha778B.js → MessageBody-C89PSL_p.js} +1 -1
- package/assets/MessageToolbar-UJadqHyA.js +1 -0
- package/assets/{NavMenuButton-C-7-t18I.js → NavMenuButton-B-goW-G5.js} +1 -1
- package/assets/{OnboardingWizard-hfP07hpw.js → OnboardingWizard-Cvqq2aP_.js} +1 -1
- package/assets/{OutboxPane-gEXLW7BJ.js → OutboxPane-ce4uTAzW.js} +1 -1
- package/assets/_calendarObjectId-lcrg9Fhc.js +1 -0
- package/assets/_mailboxId-BzKo-TnK.js +1 -0
- package/assets/_messageId-C7U0TsBv.js +1 -0
- package/assets/_messageId-CGB3gt7C.js +1 -0
- package/assets/_messageId-D2Qjacn6.js +1 -0
- package/assets/_outboxMessageId-FUbJ3RF8.js +1 -0
- package/assets/_recurrenceId-DpQOCGAd.js +1 -0
- package/assets/_threadId-BmZ2vl5z.js +1 -0
- package/assets/_threadId-Bs84eLjr.js +1 -0
- package/assets/_threadId-DySupNzi.js +1 -0
- package/assets/_view._date-DYujYKtx.js +1 -0
- package/assets/{account-service-status-Kz9s3jOk.js → account-service-status-oYDwuPLn.js} +1 -1
- package/assets/{accounts-B5C8kCn6.js → accounts-DhSbRlEm.js} +1 -1
- package/assets/{advanced-CudHnY-7.js → advanced-B50NfkTy.js} +1 -1
- package/assets/{appearance-BTH52atO.js → appearance-CYNOlHLz.js} +1 -1
- package/assets/{avatar-vPm9XfmM.js → avatar-uWJajuSb.js} +1 -1
- package/assets/{bottom-sheet-BTdseD_6.js → bottom-sheet-Bc0vwv2J.js} +1 -1
- package/assets/brief-DPWE6nMF.js +1 -0
- package/assets/{brief-DuHUqR8b.js → brief-bdXCpAmW.js} +1 -1
- package/assets/{calendar-BQjH3OHS.js → calendar-7SdvLY_h.js} +1 -1
- package/assets/calendar-event-popup-DsPmxVye.js +1 -0
- package/assets/calendar-event-sidebar-soFGsDRR.js +1 -0
- package/assets/{calendar-failure-note-BUFaaizf.js → calendar-failure-note-BtZLcaiZ.js} +1 -1
- package/assets/calendar-format-BwCpz-JZ.js +1 -0
- package/assets/calendar-guests-BR4hC59z.js +1 -0
- package/assets/calendar-suggestion-8jcpefeR.js +1 -0
- package/assets/calendar-tMekVEGW.js +1 -0
- package/assets/calendars-bLB0g-E-.js +1 -0
- package/assets/{card-865cdsJK.js → card-CPL-TrL1.js} +1 -1
- package/assets/{checkbox-Qon94b1C.js → checkbox-CGG1nAhQ.js} +1 -1
- package/assets/{circle-check-big-CyVG6r7N.js → circle-check-big-BsCwNdJZ.js} +1 -1
- package/assets/{circle-check-Db07NpOC.js → circle-check-i3jeyeTf.js} +1 -1
- package/assets/{circle-help-CVShnhWn.js → circle-help-CVWHf1ow.js} +1 -1
- package/assets/{clock-B9kFW89H.js → clock-NnulNCOv.js} +1 -1
- package/assets/compose._-_outboxMessageId_-Be8c22eR.js +1 -0
- package/assets/compose._-_outboxMessageId_-BuomqJqQ.js +1 -0
- package/assets/compose._-_outboxMessageId_-Bv9hyiuT.js +1 -0
- package/assets/compose._-_outboxMessageId_-CvUr9awX.js +1 -0
- package/assets/{config-import-C2ovEkHy.js → config-import-DmOMXQ5W.js} +1 -1
- package/assets/{confirm-dialog-CgMAaLI3.js → confirm-dialog-q8tbS_22.js} +1 -1
- package/assets/{copy-CIKgpUwt.js → copy-LUCWJAE6.js} +1 -1
- package/assets/{credential-steps-BWguS0eW.js → credential-steps-DVglyUgf.js} +1 -1
- package/assets/{download-A4hq8dWf.js → download-SQdHw0Vd.js} +1 -1
- package/assets/draft-Y5XWTm_J.js +1 -0
- package/assets/edit-DMorYaTV.js +1 -0
- package/assets/edit-Dr5FEVcd.js +1 -0
- package/assets/{external-link-DaKTW3eK.js → external-link-BDqA_mVy.js} +1 -1
- package/assets/{file-json-DiHW8YBd.js → file-json-DQGozYSr.js} +1 -1
- package/assets/{filters-1uKuLkQU.js → filters-DFLdTFEB.js} +1 -1
- package/assets/flagged-CCXBAY09.js +1 -0
- package/assets/{flagged-BIza20sq.js → flagged-CyMautVT.js} +1 -1
- package/assets/{folders-Bd16ltK4.js → folders-DtchKvEA.js} +1 -1
- package/assets/{help-copy-N4JgEUmu.js → help-copy-B2iT8EG_.js} +1 -1
- package/assets/{import-DJptfpxt.js → import-DqNA5XIM.js} +1 -1
- package/assets/index-BaEsIFAV.js +1 -0
- package/assets/index-Biz6TlId.js +1 -0
- package/assets/index-BkMAx0hv.js +1 -0
- package/assets/{index-BzL5-pGT.js → index-CL_fwLHN.js} +88 -88
- package/assets/index-CZYy2P_j.js +1 -0
- package/assets/index-CqsCZrgd.js +1 -0
- package/assets/{index-C8VKP1dT.css → index-Cr6oUxXl.css} +1 -1
- package/assets/index-CvDZvwnj.js +1 -0
- package/assets/index-D2Qjacn6.js +1 -0
- package/assets/{index-BWAq8iOl.js → index-DZb7rV9A.js} +4 -4
- package/assets/index-DoTwMLuw.js +1 -0
- package/assets/index-DrtbTKeC.js +1 -0
- package/assets/index-wVOTkeaF.js +1 -0
- package/assets/{kbd-B9MFmWVU.js → kbd-CDJCJUnp.js} +1 -1
- package/assets/{labels-DeCZEWet.js → labels-rv-5Xb0f.js} +1 -1
- package/assets/{mail-CSUpbRUP.js → mail-SW3rbFnq.js} +1 -1
- package/assets/{menu-CGw_RHKl.js → menu-CcLh9Whg.js} +1 -1
- package/assets/new-Zmtsd7wU.js +1 -0
- package/assets/onboarding-BbZUe6dp.js +1 -0
- package/assets/{onboarding-completion-DbgUYeRa.js → onboarding-completion-DoF3_MyG.js} +1 -1
- package/assets/outbox-ZJk7VidB.js +1 -0
- package/assets/{pencil-DOoqyGzC.js → pencil-LSmMSKiW.js} +1 -1
- package/assets/{popover-menu-CNiMANtf.js → popover-menu-fjlAfNO1.js} +1 -1
- package/assets/{refresh-cw-D1SQy8O7.js → refresh-cw-5OKnYRBy.js} +1 -1
- package/assets/{reply-CQarAZxU.js → reply-DvdgFS16.js} +1 -1
- package/assets/{rich-text-DgI7vzll.js → rich-text-BBwYPM6F.js} +1 -1
- package/assets/{rich-text-spellcheck-worker-provider-paPOw9As.js → rich-text-spellcheck-worker-provider-Bk8cqxyg.js} +1 -1
- package/assets/{rotate-ccw-DPB71584.js → rotate-ccw-CENCKp2Z.js} +1 -1
- package/assets/{roving-focus-Coea111y.js → roving-focus-FWOr5tBU.js} +1 -1
- package/assets/{row-actions-CiZruXil.js → row-actions-DA6zLLAB.js} +1 -1
- package/assets/{search-mirror-_Dap9COg.js → search-mirror-Dri4pWEq.js} +1 -1
- package/assets/{search-token-index-DQHE1g7A.js → search-token-index-B1HU1d2-.js} +1 -1
- package/assets/{sections-C6oVXjho.js → sections-Rf3k05-_.js} +1 -1
- package/assets/{senders-DIVpkzIq.js → senders-ikMjTlbx.js} +1 -1
- package/assets/settings-Bk7jziSO.js +1 -0
- package/assets/{settings-screen-4md2ibPl.js → settings-screen-DBP3ABLE.js} +1 -1
- package/assets/{shield-check-BcUXVpR8.js → shield-check-CdR23I2B.js} +1 -1
- package/assets/{sparkles-C1l6GCPT.js → sparkles-Bcn4ZRhZ.js} +1 -1
- package/assets/{suggested-vips-iEt-4yp9.js → suggested-vips-D-8cU8GT.js} +1 -1
- package/assets/suggestion._suggestionId-D6z0CuYD.js +1 -0
- package/assets/task._calendarTaskId-BYRN0yW3.js +1 -0
- package/assets/{undo-2-DHJ6nykB.js → undo-2-Bdx8L5xj.js} +1 -1
- package/assets/useCalendarData-DXhaM_NM.js +2 -0
- package/assets/useCalendarScheduling-BpjmrzdY.js +1 -0
- package/assets/useCalendarSuggestions-D3Jza1d7.js +1 -0
- package/assets/useCalendarTasks-D_NZ0GM6.js +1 -0
- package/assets/{useDebouncedValue-B7157ZPO.js → useDebouncedValue-BTZsNKEh.js} +1 -1
- package/assets/{useFilters-C3bLY42W.js → useFilters-CIuC8WLg.js} +1 -1
- package/assets/{useLabels-DYdHiHXI.js → useLabels-BZFMPVjT.js} +1 -1
- package/assets/useLayoutTier-DrLg7_rq.js +1 -0
- package/assets/{useMediaQuery-7Q3jBluO.js → useMediaQuery-DiQ0fGER.js} +1 -1
- package/assets/{useMessageBodyContent-CWGtiddz.js → useMessageBodyContent-D-LJBFh4.js} +1 -1
- package/assets/{useQueries-Sm8S3Cgh.js → useQueries-hChzM5ru.js} +1 -1
- package/assets/{useRefreshControl-bA8HK_j-.js → useRefreshControl-B6YIG0w2.js} +1 -1
- package/assets/{useResultFolderIndex-BaqajWHb.js → useResultFolderIndex-6TeGdWgp.js} +1 -1
- package/assets/{useSignature-sxHvGfKr.js → useSignature-BkzkUbjz.js} +1 -1
- package/assets/{warnings-ByqpxH4J.js → warnings-BdQvV6Kc.js} +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/CalendarEventEditor-BpGmPZ2Z.js +0 -1
- package/assets/CalendarEventPopup-Brcgx7tV.js +0 -1
- package/assets/CalendarQuickCreate-CwkBXqAB.js +0 -1
- package/assets/CalendarSession--XFP5lXS.js +0 -1
- package/assets/MessageToolbar-5T47fDWC.js +0 -1
- package/assets/_calendarObjectId-Dbrtihva.js +0 -1
- package/assets/_mailboxId-B587Zr5T.js +0 -1
- package/assets/_messageId-BxlZMqGk.js +0 -1
- package/assets/_messageId-CRIBYDCW.js +0 -1
- package/assets/_messageId-DTs144Nv.js +0 -1
- package/assets/_outboxMessageId-BxdPyrXI.js +0 -1
- package/assets/_recurrenceId-QBmk5dbN.js +0 -1
- package/assets/_threadId-8Y3P5szz.js +0 -1
- package/assets/_threadId-AMQdO9xw.js +0 -1
- package/assets/_threadId-mpk_WkaQ.js +0 -1
- package/assets/_view._date-BfJq9sBQ.js +0 -1
- package/assets/brief-BC_KN7ph.js +0 -1
- package/assets/calendar-LLRgZQzl.js +0 -1
- package/assets/calendar-event-popup-Mft0N_sd.js +0 -1
- package/assets/calendar-event-sidebar-D5vjFGdS.js +0 -1
- package/assets/calendar-report-CzeBcU6C.js +0 -1
- package/assets/calendar-suggestion-ClsxDTZs.js +0 -1
- package/assets/calendars-zYfPB3b8.js +0 -1
- package/assets/compose._-_outboxMessageId_-BkKmzR39.js +0 -1
- package/assets/compose._-_outboxMessageId_-BnYGu6ez.js +0 -1
- package/assets/compose._-_outboxMessageId_-C5Aukg6m.js +0 -1
- package/assets/compose._-_outboxMessageId_-Ck-eEtzy.js +0 -1
- package/assets/edit-CxVYhmi5.js +0 -1
- package/assets/edit-DXN-G3Tu.js +0 -1
- package/assets/flagged-DmSptMzm.js +0 -1
- package/assets/index-B18BvpkW.js +0 -1
- package/assets/index-B4pYEqZI.js +0 -1
- package/assets/index-B77HnSA5.js +0 -1
- package/assets/index-BZdYp7ae.js +0 -1
- package/assets/index-BiCNOLIH.js +0 -1
- package/assets/index-CoCVPZ34.js +0 -1
- package/assets/index-CroyVnhC.js +0 -1
- package/assets/index-DTs144Nv.js +0 -1
- package/assets/index-DsgtllX4.js +0 -1
- package/assets/index-DupXMcS6.js +0 -1
- package/assets/new-DVwQ9Ia3.js +0 -1
- package/assets/onboarding-CDWqPDW8.js +0 -1
- package/assets/outbox-Ct7VdX2v.js +0 -1
- package/assets/settings-Cv257vpL.js +0 -1
- package/assets/suggestion._suggestionId-BQw9qGr-.js +0 -1
- package/assets/useCalendarData-Bz4EDHDO.js +0 -2
- package/assets/useCalendarSuggestions-DcYFtQhb.js +0 -1
- package/assets/useLayoutTier-5aJYrTut.js +0 -1
package/assets/brief-BC_KN7ph.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,O as i}from"./index-BzL5-pGT.js";import{a as m}from"./MailShell-0sTtK1xD.js";import{B as o}from"./BriefPane-BzlqkW4r.js";import"./reply-CQarAZxU.js";import{a as p}from"./search-token-index-DQHE1g7A.js";import{u as e}from"./search-mirror-_Dap9COg.js";import"./useMessageBodyContent-CWGtiddz.js";import"./FullCompose-dJ4mfUrX.js";import"./ErrorState-nA0Ptq3g.js";import"./index-BWAq8iOl.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./useMediaQuery-7Q3jBluO.js";import"./confirm-dialog-CgMAaLI3.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./MessageToolbar-5T47fDWC.js";import"./roving-focus-Coea111y.js";import"./EmptyState-dD_YhGMH.js";import"./popover-menu-CNiMANtf.js";import"./avatar-vPm9XfmM.js";import"./useQueries-Sm8S3Cgh.js";import"./undo-2-DHJ6nykB.js";import"./download-A4hq8dWf.js";import"./calendar-suggestion-ClsxDTZs.js";import"./sparkles-C1l6GCPT.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-failure-note-BUFaaizf.js";import"./checkbox-Qon94b1C.js";import"./clock-B9kFW89H.js";import"./shield-check-BcUXVpR8.js";import"./calendar-LLRgZQzl.js";import"./useLayoutTier-5aJYrTut.js";import"./menu-CGw_RHKl.js";import"./useFilters-C3bLY42W.js";import"./useRefreshControl-bA8HK_j-.js";import"./circle-check-big-CyVG6r7N.js";import"./refresh-cw-D1SQy8O7.js";import"./LabelApplyTrigger-BA7ANeDk.js";import"./useLabels-DYdHiHXI.js";import"./wizard-selection-zWa1qc6-.js";function _(){const t=p();return e({to:"/mail/brief"}),r.jsx(o,{thread:t,children:r.jsx(m,{phone:r.jsx(o.Phone,{}),list:r.jsx(o.List,{}),reading:r.jsx(i,{}),intelligence:r.jsx(o.Intelligence,{}),hasThread:!!t})})}export{_ as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as O,r as d,u as b,J as u,cA as F,cC as E,ce as T}from"./index-BzL5-pGT.js";import{g as C}from"./reply-CQarAZxU.js";function R(e,n){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const a=!!(e.condition??!0),t=e.blockerFn;return{shouldBlockFn:async()=>a&&t!==void 0?await t():a,enableBeforeUnload:a,withResolver:t===void 0}}function y(e,n){const{shouldBlockFn:a,enableBeforeUnload:t=!0,disabled:s=!1,withResolver:f=!1}=R(e),c=O(),{history:i}=c,[v,o]=d.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return d.useEffect(()=>{const r=async m=>{function B(h){const w=c.parseLocation(h),p=c.getMatchedRoutes(w.pathname);return p.foundRoute===void 0?{routeId:"__notFound__",fullPath:w.pathname,pathname:w.pathname,params:p.routeParams,search:c.options.parseSearch(h.search)}:{routeId:p.foundRoute.id,fullPath:p.foundRoute.fullPath,pathname:w.pathname,params:p.routeParams,search:c.options.parseSearch(h.search)}}const g=B(m.currentLocation),I=B(m.nextLocation);if(g.routeId==="__notFound__"&&I.routeId!=="__notFound__")return!1;const k=await a({action:m.action,current:g,next:I});if(!f)return k;if(!k)return!1;const _=await new Promise(h=>{o({status:"blocked",current:g,next:I,action:m.action,proceed:()=>h(!1),reset:()=>h(!0)})});return o({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),_};return s?void 0:i.block({blockerFn:r,enableBeforeUnload:t})},[a,t,s,f,i,c]),v}const l="/calendar/$view/$date",$="/calendar/$view/$date/suggestion/$suggestionId";function j(){const e=u({from:l,shouldThrow:!1}),n=F({from:l,shouldThrow:!1}),a=e?.view??"",t=e?.date??"",s=n?.calendarId;return d.useMemo(()=>({...E({view:a,date:t},T(new Date)),calendarIds:s??[]}),[a,t,s])}function P(){const e=u({from:"/calendar/$view/$date/$calendarObjectId",shouldThrow:!1}),n=u({from:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",shouldThrow:!1}),a=e?.calendarObjectId,t=n?.recurrenceId;return d.useMemo(()=>a?{calendarObjectId:a,recurrenceId:t}:void 0,[a,t])}function U(){return u({from:$,shouldThrow:!1})?.suggestionId}function S(){const e=u({from:"/calendar/$view/$date/$calendarObjectId/edit",shouldThrow:!1}),n=u({from:"/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit",shouldThrow:!1}),a=e?.calendarObjectId??n?.calendarObjectId,t=n?.recurrenceId;return d.useMemo(()=>a?{calendarObjectId:a,recurrenceId:t}:void 0,[a,t])}function x(){const e=F({from:"/calendar/$view/$date/new",shouldThrow:!1}),n=e?.start,a=e?.end,t=e!==void 0;return d.useMemo(()=>t?{start:n,end:a}:void 0,[t,n,a])}function D(){const e=S(),n=u({from:"/calendar/$view/$date/new",shouldThrow:!1}),a=u({from:$,shouldThrow:!1});return n!==void 0||a!==void 0||e!==void 0}function L(){const e=b(),n=O(),a=C(),{view:t,date:s}=j(),c=P()!==void 0,i=d.useCallback(o=>{e({to:l,params:o,search:!0,hash:a})},[e,a]),v=d.useCallback(o=>n.buildLocation({to:l,params:{view:"day",date:o},search:!0,hash:a}).href,[n,a]);return d.useMemo(()=>({goToView:o=>i({view:o,date:s}),goToToday:()=>i({view:t,date:T(new Date)}),goToDate:o=>i({view:t,date:o}),setCalendarIds:o=>e({to:l,params:{view:t,date:s},search:r=>({...r,calendarId:o.length===0?void 0:[...o]}),hash:!0,replace:!0}),setAnchorDate:o=>{c||e({to:l,params:{view:t,date:o},search:!0,hash:a,replace:!0})},zoomToDay:o=>e({href:v(o)}),dayHref:v,openEvent:(o,r)=>e(r===void 0||r===""?{to:"/calendar/$view/$date/$calendarObjectId",params:{view:t,date:s,calendarObjectId:o},search:!0,hash:a,replace:c,state:{openedFromView:!0}}:{to:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",params:{view:t,date:s,calendarObjectId:o,recurrenceId:r},search:!0,hash:a,replace:c,state:{openedFromView:!0}}),closeToView:()=>{if(n.state.location.state.openedFromView===!0){n.history.back();return}e({to:l,params:{view:t,date:s},search:o=>({calendarId:o.calendarId}),hash:a,replace:!0})},openNewEvent:o=>e({to:"/calendar/$view/$date/new",params:{view:t,date:s},search:r=>({...r,...o}),hash:a,replace:c,state:{openedFromView:!0}}),setNewEventBounds:o=>e({to:"/calendar/$view/$date/new",params:{view:t,date:s},search:r=>({...r,...o}),hash:!0,replace:!0,state:r=>r}),openEditor:(o,r)=>e(r===void 0||r===""?{to:"/calendar/$view/$date/$calendarObjectId/edit",params:{view:t,date:s,calendarObjectId:o},search:!0,hash:a,replace:c,state:{openedFromView:!0}}:{to:"/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit",params:{view:t,date:s,calendarObjectId:o,recurrenceId:r},search:!0,hash:a,replace:c,state:{openedFromView:!0}}),changeSuggestionFirst:(o,r)=>e({to:$,params:{view:t,date:r,suggestionId:o},search:!0,hash:a})}),[i,e,v,a,t,s,n,c])}function M(){const e=b();return d.useCallback((n,a,t)=>{if(t===""){e({to:"/calendar/$view/$date/$calendarObjectId",params:{view:"day",date:n,calendarObjectId:a}});return}e({to:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",params:{view:"day",date:n,calendarObjectId:a,recurrenceId:t}})},[e])}function A(){const e=b();return d.useCallback((n,a)=>{e({to:$,params:{view:"day",date:n,suggestionId:a}})},[e])}function G(e,n){const a=d.useRef(n);a.current=n,y({shouldBlockFn:({action:t})=>t!=="BACK"?!1:a.current(),enableBeforeUnload:!1,disabled:!e})}export{j as a,L as b,P as c,S as d,y as e,M as f,A as g,G as h,x as i,U as j,D as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,T as g,X as j,o as N,C as v,bX as C}from"./index-BzL5-pGT.js";import{P as y}from"./pencil-DOoqyGzC.js";import{M as k}from"./calendar-report-CzeBcU6C.js";function z({failure:s,focusRef:a}){return e.jsxs("div",{ref:a,role:"alert",tabIndex:-1,className:"flex flex-col gap-2 rounded-md border border-danger/40 bg-danger-soft p-3 text-sm outline-none",children:[e.jsx("p",{className:"text-danger",children:s.text}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{type:"button",onClick:s.onRetry,className:"rounded-md border border-line bg-surface px-3 py-1 text-sm font-medium hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",children:s.retryLabel??"Try again"}),e.jsx("a",{href:s.reportHref,target:"_blank",rel:"noreferrer",className:"text-sm font-medium text-accent hover:underline",children:"Report an issue"})]})]})}const l="flex size-9 items-center justify-center rounded-full text-fg-muted outline-none hover:bg-surface-sunken hover:text-fg focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40";function T({headingId:s,headingRef:a,title:n,color:o,when:c,location:r,calendarName:x,availability:m,onEdit:t,onDelete:i,deleting:u=!1,onClose:f,failure:d,failureRef:b,children:h}){const p=C(o);return e.jsxs("div",{className:"flex flex-col gap-3 p-3",children:[e.jsxs("div",{className:"flex justify-end gap-1",children:[t&&e.jsx("button",{type:"button","aria-label":"Edit",onClick:t,className:l,children:e.jsx(y,{className:"size-4"})}),i&&e.jsx("button",{type:"button","aria-label":"Delete",onClick:i,disabled:u,className:l,children:e.jsx(g,{className:"size-4"})}),e.jsx("button",{type:"button","aria-label":"Close",onClick:f,className:l,children:e.jsx(j,{className:"size-4"})})]}),e.jsxs("div",{className:"flex gap-3 px-2",children:[e.jsx("span",{className:N("mt-1.5 size-3.5 shrink-0 rounded-sm",p.solid),"aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{id:s,ref:a,tabIndex:-1,className:"text-xl font-normal break-words text-fg outline-none",children:n===""?"(No title)":n}),e.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:c})]})]}),e.jsxs("dl",{className:"flex flex-col gap-2 px-2 text-sm",children:[r!==""&&e.jsxs("div",{className:"flex gap-3",children:[e.jsx("dt",{children:e.jsx(k,{className:"size-4 text-fg-subtle","aria-label":"Location"})}),e.jsx("dd",{className:"min-w-0 break-words",children:r})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("dt",{children:e.jsx(v,{className:"size-4 text-fg-subtle","aria-label":"Calendar"})}),e.jsxs("dd",{children:[x," · ",m]})]})]}),h,d&&e.jsx(z,{failure:d,focusRef:b})]})}function E({headingId:s,onClose:a,closeRef:n}){return e.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[e.jsx("h2",{id:s,className:"text-base font-medium text-fg",children:"This event was deleted or moved"}),e.jsx("button",{ref:n,type:"button",onClick:a,className:"self-end rounded-md border border-line px-3 py-1.5 text-sm font-medium hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",children:"Close"})]})}export{z as C,E as a,T as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as F,o as b,j as s,au as h,fG as C,c4 as j,fH as R,at as _,X as I}from"./index-BzL5-pGT.js";import{C as z}from"./calendar-event-popup-Mft0N_sd.js";const U=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],W=["January","February","March","April","May","June","July","August","September","October","November","December"],B=["first","second","third","fourth","last"],y="";function H(e,t){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return[];const[n,r,i]=e.split("-").map(Number),d=new Date(Date.UTC(n,r-1,i)),o=U[d.getUTCDay()],u=B[Math.min(Math.floor((i-1)/7),4)],l=t===""?"":`, ${t}`,c=d.getUTCDay()>=1&&d.getUTCDay()<=5;return[`Every day${l}`,...c?[`Every weekday${l}`]:[],`Every week on ${o}${l}`,`Every month on the ${u} ${o}${l}`,`Every year on ${i} ${W[r-1]}${l}`]}const g=({draft:e,onChange:t},n,r)=>t({...e,[n]:r});function x({label:e,children:t}){return s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:e}),t]})}function E(e){return e.date===""||e.endDate===""?!1:e.allDay?e.endDate<e.date:e.startTime===""||e.endTime===""?!1:`${e.endDate}T${e.endTime}`<`${e.date}T${e.startTime}`}function J(e,t){return t===""?{...e,date:t}:e.endDate===""?{...e,date:t,endDate:t}:e.date===""?{...e,date:t}:{...e,date:t,endDate:j(t,R(e.date,e.endDate))}}function L(e,t){const n=e.date!==""&&e.endDate===j(e.date,1)&&e.startTime!==""&&e.endTime!==""&&e.endTime<e.startTime;return t&&n?{...e,allDay:t,endDate:e.date}:!t&&e.date!==""&&e.endDate===e.date&&e.startTime!==""&&e.endTime!==""&&e.endTime<e.startTime?{...e,allDay:t,endDate:j(e.date,1)}:{...e,allDay:t}}function P({draft:e,onChange:t,touch:n}){const r=n?"min-h-11":"",i=E(e),d=F.useId(),o={"aria-invalid":i,"aria-describedby":i?d:void 0},u=b("w-40",r,i&&"border-danger/60"),l=b("w-28",r,i&&"border-danger/60");return s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx(h,{type:"date",value:e.date,"aria-label":"Date",...o,onChange:c=>t(J(e,c.target.value)),className:u}),!e.allDay&&s.jsx(h,{type:"time",value:e.startTime,"aria-label":"Start time",...o,onChange:c=>g({draft:e,onChange:t},"startTime",c.target.value),className:l}),s.jsx("span",{className:"text-sm text-fg-subtle",children:"to"}),s.jsx(h,{type:"date",value:e.endDate,"aria-label":"End date",min:e.date===""?void 0:e.date,...o,onChange:c=>g({draft:e,onChange:t},"endDate",c.target.value),className:u}),!e.allDay&&s.jsx(h,{type:"time",value:e.endTime,"aria-label":"End time",...o,onChange:c=>g({draft:e,onChange:t},"endTime",c.target.value),className:l}),s.jsxs("label",{className:"flex items-center gap-2 text-sm text-fg-muted",children:[s.jsx("input",{type:"checkbox",checked:e.allDay,onChange:c=>t(L(e,c.target.checked)),className:"size-4 accent-current"}),"All day"]})]}),i&&s.jsx("p",{id:d,className:"text-xs text-danger",role:"alert",children:e.allDay?`Ends before it starts. Move the end to ${e.date} or later.`:`Ends before it starts. Move the end past ${e.date} ${e.startTime}, or start earlier.`})]})}function G({draft:e,onChange:t,touch:n,repeatEditable:r=!0,onCustom:i}){return r?s.jsx(K,{value:e.repeat,date:e.date,startTime:e.startTime,onChange:d=>g({draft:e,onChange:t},"repeat",d),onCustom:i,className:n?"min-h-11":""}):s.jsxs("p",{className:"flex items-center gap-2 text-sm text-fg-muted",children:[s.jsx(C,{className:"size-4 shrink-0 text-fg-subtle","aria-hidden":!0}),e.repeat===y?"Does not repeat":e.repeat]})}const k="__custom__";function K({value:e,date:t,startTime:n,onChange:r,onCustom:i,className:d}){const o=H(t,n),u=e===y||o.includes(e)?o:[e,...o];return s.jsxs(_,{icon:s.jsx(C,{className:"size-4"}),"aria-label":"Repeat",value:e,onChange:l=>{if(l.target.value===k){i?.();return}r(l.target.value)},className:d,children:[s.jsx("option",{value:y,children:"Does not repeat"}),u.map(l=>s.jsx("option",{value:l,children:l},l)),i&&s.jsx("option",{value:k,children:"Custom…"})]})}const X="h-9 w-full rounded-md border border-line bg-surface-sunken px-2 text-sm text-fg outline-none focus-visible:border-line-strong focus-visible:ring-2 focus-visible:ring-ring/30 disabled:opacity-60";function Q({heading:e,draft:t,onChange:n,calendars:r,calendarEditable:i,repeatEditable:d,timeZone:o,timeZones:u,onTimeZone:l,busy:c,onBusy:w,onSave:$,onCancel:N,saving:v=!1,saveLabel:S="Save",problem:f="",failure:T,failureRef:A,titleRef:M,touch:m=!1,children:O}){const p=b(X,m&&"h-11"),D=E(t);return s.jsxs("form",{"aria-label":e,"data-event-sidebar":"",className:"flex h-full min-h-0 flex-col bg-surface",onSubmit:a=>{a.preventDefault(),!v&&!D&&$()},children:[s.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-line px-4 py-2",children:[s.jsx("h2",{className:"text-base font-medium text-fg",children:e}),s.jsx("button",{type:"button","aria-label":"Close",onClick:N,className:b("flex items-center justify-center rounded-full text-fg-muted outline-none hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",m?"size-11":"size-8"),children:s.jsx(I,{className:"size-4"})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 py-4",children:[s.jsx("input",{ref:M,"aria-label":"Title",placeholder:"Add title",value:t.title,onChange:a=>n({...t,title:a.target.value}),className:"border-b-2 border-line bg-transparent pb-1 text-xl text-fg outline-none placeholder:text-fg-subtle focus:border-accent"}),s.jsx(P,{draft:t,onChange:n,touch:m}),s.jsx(x,{label:"Time zone",children:s.jsx("select",{"aria-label":"Time zone",value:o,onChange:a=>l(a.target.value),className:p,children:u.map(a=>s.jsx("option",{value:a,children:a},a))})}),s.jsx(x,{label:"Repeat",children:s.jsx(G,{draft:t,onChange:n,touch:m,repeatEditable:d})}),s.jsx(x,{label:"Calendar",children:s.jsx("select",{"aria-label":"Calendar",value:t.calendarId,disabled:!i,onChange:a=>n({...t,calendarId:a.target.value}),className:p,children:r.map(a=>s.jsx("option",{value:a.id,children:a.name},a.id))})}),s.jsx(x,{label:"Location",children:s.jsx("input",{"aria-label":"Location",placeholder:"Add location",value:t.location,onChange:a=>n({...t,location:a.target.value}),className:p})}),s.jsx(x,{label:"Show as",children:s.jsxs("select",{"aria-label":"Show as",value:c?"busy":"free",onChange:a=>w(a.target.value==="busy"),className:p,children:[s.jsx("option",{value:"busy",children:"Busy"}),s.jsx("option",{value:"free",children:"Free"})]})}),s.jsx(x,{label:"Description",children:s.jsx("textarea",{"aria-label":"Description",placeholder:"Add description",rows:5,value:t.notes,onChange:a=>n({...t,notes:a.target.value}),className:"w-full rounded-md border border-line bg-surface-sunken px-3 py-2 text-sm text-fg outline-none focus-visible:ring-2 focus-visible:ring-ring/30"})}),O]}),s.jsxs("div",{className:"flex shrink-0 flex-col gap-2 border-t border-line px-4 py-3",children:[f!==""&&s.jsx("p",{role:"alert",className:"text-sm text-danger",children:f}),T&&s.jsx(z,{failure:T,focusRef:A}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{type:"button",onClick:N,className:b("rounded-md border border-line px-4 text-sm font-medium hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",m?"min-h-11":"h-9"),children:"Cancel"}),s.jsx("button",{type:"submit",disabled:v||D,className:b("rounded-md bg-accent px-5 text-sm font-medium text-accent-fg hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",m?"min-h-11":"h-9"),children:v?"Saving…":S})]})]})]})}export{Q as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as s,aC as i,aD as m}from"./index-BzL5-pGT.js";const D=s("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),o=new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"long"}),a=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1}),c=new Intl.DateTimeFormat(void 0,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"}),f=new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"long",timeZone:"UTC"});function l(t){return f.format(new Date(`${t}T00:00:00Z`))}function y(t){if(t.allDay)return`${l(t.start.slice(0,10))}, all day`;const n=new Date(t.start),e=new Date(t.end),r=o.format(n);return o.format(e)===r?`${r}, ${a.format(n)} – ${a.format(e)}`:`${r}, ${a.format(n)} – ${o.format(e)}, ${a.format(e)}`}function C(t){return c.format(new Date(`${t}T00:00:00Z`))}function $(t){return a.format(new Date(`1970-01-01T${t}:00`))}function w(t){return a.format(new Date(t))}function g(t){return i(m({title:`Calendar invitation: ${t}`,errorMessage:t}))}function I(t){return i(m({title:`Calendar event: ${t}`,errorMessage:t}))}export{D as M,g as a,w as b,I as c,C as d,l as e,y as f,$ as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as G,j as n,c7 as q,o as x,c8 as H,r as k,X,ah as Y,aa as T,f5 as K,e0 as J,d as z,aL as Q,ce as w,f6 as p,f7 as V,f8 as ee,f9 as $,fa as L,b_ as A}from"./index-BzL5-pGT.js";import{S as te}from"./sparkles-C1l6GCPT.js";import{N as ne}from"./reply-CQarAZxU.js";import"./useCalendarSuggestions-DcYFtQhb.js";import{b as O,e as g,f as se,g as R,d as ae}from"./calendar-report-CzeBcU6C.js";const re=G("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);function Ae({title:e,timeText:t,color:a,layout:s,density:r,rsvp:i,status:d,hasThread:h,isRecurring:b,zoneCertainty:o,selected:l,onClick:c,leading:f,trailing:v,detail:j}){const N=s==="column";return n.jsxs("button",{type:"button",onClick:c,"aria-pressed":l,className:x("group flex w-full min-w-0 text-left outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface",N?"h-full":"items-start",f!==void 0&&"gap-2"),children:[f,n.jsx("span",{className:x(H({color:a,layout:s,density:r,rsvp:i,status:d,selected:l,stacked:j!==void 0}),"flex-1",N&&"h-full"),children:n.jsx(q,{title:e,timeText:t,layout:s,rsvp:i,hasThread:h,isRecurring:b,zoneCertainty:o,trailing:v,detail:j})})]})}const M=96,ie=6;function Oe({children:e,hasCard:t,onConfirm:a,onReject:s,blocked:r,blockedReason:i,remaining:d,confirmLabel:h="Add",emptyText:b="Nothing in your mail is waiting on a decision about time.",className:o}){const[l,c]=k.useState(0),[f,v]=k.useState(null);if(!t)return n.jsxs("div",{className:x("flex flex-col items-center gap-2 p-6 text-center",o),children:[n.jsx(te,{className:"size-6 text-fg-subtle","aria-hidden":!0}),n.jsx("p",{className:"text-sm text-fg-muted",children:b})]});const j=Math.abs(l)>M,N=l>0;return n.jsxs("div",{className:x("flex flex-col gap-3",o),children:[n.jsxs("div",{className:"relative",children:[n.jsx("div",{className:"touch-pan-y select-none",style:{transform:`translateX(${l}px) rotate(${l/40}deg)`,transition:f===null?"transform 180ms ease-out":"none"},onPointerDown:u=>{v(u.clientX)},onPointerMove:u=>{if(f===null)return;const S=u.clientX-f;Math.abs(S)>ie&&!u.currentTarget.hasPointerCapture(u.pointerId)&&u.currentTarget.setPointerCapture(u.pointerId),c(S)},onPointerUp:()=>{Math.abs(l)>M&&(l>0&&!r&&a(),l<0&&s()),v(null),c(0)},onPointerCancel:()=>{v(null),c(0)},children:e}),j&&n.jsx("span",{className:x("pointer-events-none absolute top-3 rounded-md px-2 py-1 text-xs font-semibold",N?"right-3 bg-accent-soft text-accent":"left-3 bg-danger-soft text-danger"),children:N?r?i:h:"Not this"})]}),n.jsxs("p",{className:"text-center text-2xs text-fg-subtle",children:[d," left · swipe right to accept, left to drop, or use the buttons"]})]})}const oe="Pick a clock first. The mail never said, and the reader will not choose for you.";function le(e,t){const a=e.zoneOptions;return a===void 0?{settled:!0,timeZone:""}:a.some(s=>s.timeZone===t)?{settled:!0,timeZone:t}:{settled:!1,reason:oe}}function Z(e){return e.threadSubject===""?e.sender:`${e.sender} — ${e.threadSubject}`}function ce(e){return e>=.85?"Read cleanly":e>=.6?"Read with gaps":"Barely read"}function Re({suggestion:e,whenText:t,onAdd:a,onReview:s,onDismiss:r,onOpenThread:i,busy:d=!1,addBlocked:h=!1,zoneChoice:b,onZoneChoice:o,addLabel:l="Add",touch:c,className:f}){const[v,j]=k.useState(""),[N,u]=k.useState(!1),S=k.useId(),I=b??v,W=m=>{u(!1),o?o(m):j(m)},y=le(e,I),E=m=>()=>{if(!y.settled){u(!0);return}m(y.timeZone)};return n.jsxs("article",{"aria-label":e.title,className:x("flex flex-col gap-2 rounded-lg border border-dashed border-line-strong bg-surface-sunken p-3",f),children:[n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsxs("span",{className:"block text-2xs uppercase tracking-wider text-fg-subtle",children:["Suggested from mail · ",ce(e.confidence)]}),n.jsx("span",{className:"block truncate text-sm font-medium text-fg",children:e.title}),n.jsx("span",{className:"block text-xs text-fg-muted",children:t}),e.location!==""&&n.jsx("span",{className:"block truncate text-xs text-fg-muted",children:e.location})]}),n.jsx("button",{type:"button","aria-label":"Dismiss suggestion",onClick:r,disabled:d,className:x("flex shrink-0 items-center justify-center rounded-md text-fg-subtle outline-none hover:bg-surface hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",c?"size-11":"size-7"),children:n.jsx(X,{className:"size-4"})})]}),e.ambiguity!==""&&n.jsxs("p",{className:"flex items-start gap-1.5 text-2xs text-warning",children:[n.jsx(Y,{className:"mt-0.5 size-3 shrink-0","aria-hidden":!0}),e.ambiguity]}),i?n.jsxs("button",{type:"button",onClick:i,className:"flex w-full min-w-0 items-center gap-1.5 rounded-sm text-left text-2xs text-accent-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring",children:[n.jsx(T,{className:"size-3 shrink-0"}),n.jsx("span",{className:"truncate",children:Z(e)})]}):n.jsxs("p",{className:"flex w-full min-w-0 items-center gap-1.5 text-2xs text-fg-subtle",children:[n.jsx(T,{className:"size-3 shrink-0"}),n.jsx("span",{className:"truncate",children:Z(e)})]}),e.zoneOptions&&n.jsxs("div",{className:"flex flex-col gap-1.5 rounded-md border border-warning/40 p-2",children:[n.jsxs("p",{className:"flex items-center gap-1.5 text-2xs font-semibold text-warning",children:[n.jsx(K,{className:"size-3 shrink-0","aria-hidden":!0}),"Which clock is this on?"]}),e.zoneOptions.map(m=>n.jsxs("button",{type:"button","aria-pressed":I===m.timeZone,onClick:()=>W(m.timeZone),className:x("rounded-md border px-2 py-1 text-left outline-none focus-visible:ring-2 focus-visible:ring-ring",c&&"min-h-11",I===m.timeZone?"border-accent bg-accent-soft":"border-line bg-surface hover:border-line-strong"),children:[n.jsx("span",{className:"block text-xs font-medium text-fg",children:m.label}),n.jsx("span",{className:"block text-2xs text-fg-subtle",children:m.note})]},m.timeZone))]}),!y.settled&&n.jsx(J,{id:S,reason:y.reason,nudged:N,className:"text-2xs text-warning"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(z,{variant:"primary",size:c?"md":"sm",icon:n.jsx(Q,{className:"size-3.5"}),onClick:E(a),disabled:d||h,"aria-describedby":y.settled?void 0:S,className:x(c&&"min-h-11 flex-1",!y.settled&&"opacity-55"),children:l}),s&&n.jsx(z,{variant:"secondary",size:c?"md":"sm",icon:n.jsx(re,{className:"size-3.5"}),onClick:E(s),disabled:d,"aria-describedby":y.settled?void 0:S,className:x(c&&"min-h-11",!y.settled&&"opacity-55"),children:"Change first"})]})]})}function Me(e){return e.defaultCalendarId!==""?"ready":e.error!==null?"failed":e.isLoading?"loading":"none"}function Ze(e,t){if(e!=="ready")return e==="loading"?"Reading your calendars…":e==="failed"?n.jsxs(n.Fragment,{children:["Couldn't read your calendars, so there is nowhere to add this yet. Reload to try again."," ",n.jsx("a",{href:t,target:"_blank",rel:"noreferrer",className:"font-medium text-accent hover:underline",children:"Report an issue"})]}):n.jsxs(n.Fragment,{children:["You have no calendar yet, so there is nowhere to add this."," ",n.jsx(ne,{to:"/settings/calendars",className:"font-medium text-accent hover:underline",children:"Create a calendar"})]})}const de=24,P=7,fe=52,D=fe*7,me=e=>({from:p(e,-10),to:p(e,de),floor:p(e,-D),ceiling:p(e,D)}),ue=e=>e.from<=e.floor,xe=e=>e.to>=e.ceiling,pe=(e,t)=>e>t?e:t,he=(e,t)=>e<t?e:t,ye=e=>ue(e)?e:{...e,from:pe(p(e.from,-P),e.floor)},be=e=>xe(e)?e:{...e,to:he(p(e.to,P),e.ceiling)},_e=e=>ye({...e,floor:p(e.from,-D)}),$e=e=>be({...e,ceiling:p(e.to,D)});function Le(e,t){return t>=e.from&&t<=e.to?e:me(t)}function Pe(e){const t=new Map;for(const a of e){const s=$("week",a);t.has(s.from)||t.set(s.from,s)}return[...t.values()]}const Be=e=>$("week",e).from,ve=1440,_=e=>e.getHours()*60+e.getMinutes();function B(e,t){const a=new Set(e),s=new Map;for(const r of t){const i=new Date(r.start),d=new Date(r.end);if(Number.isNaN(i.getTime())||Number.isNaN(d.getTime())||d.getTime()<=i.getTime())continue;const h=w(i),b=w(new Date(d.getTime()-1));for(let o=h;o<=b;o=p(o,1)){if(!a.has(o))continue;const l=o===h?_(i):0,c=w(d)===o?_(d):ve;if(c<=l)continue;const f=s.get(o);f?f.push({from:l,to:c}):s.set(o,[{from:l,to:c}])}}for(const[r,i]of s)s.set(r,V(i));return s}function Fe(e,t){const a=B(e,t);return new Map(e.map(s=>[s,L(s,a.get(s)??[])]))}const Ue=e=>ee(e.from,e.to),C=30,Ne=6,F={Local:"local",Explicit:"explicit",Ambiguous:"ambiguous"},je="The invitation's time zone could not be resolved. Add opens the editor so you can set the time.",Se="The invitation's time zone could not be resolved.";function We(e){return e.method==="Cancel"?e.state==="Pending"?{state:"cancelled",rsvp:"noReply"}:void 0:e.state==="Dismissed"?{state:"dismissed",rsvp:"noReply"}:e.state==="Superseded"?{state:"superseded",rsvp:"noReply"}:e.state==="Accepted"?{state:"answered",rsvp:"accepted"}:e.state==="Declined"?{state:"answered",rsvp:"declined"}:e.state==="Tentative"?{state:"answered",rsvp:"tentative"}:{state:"pending",rsvp:"noReply"}}const ke=e=>e.source!=="TextHeuristic";function Ge(e){return e.allDay?e.dtStart.slice(0,10):w(new Date(e.dtStart))}const U=e=>e.summary===""?"Untitled event":e.summary;function qe(e){if(e.allDay){const t=e.dtStart.slice(0,10),a=e.dtEnd.slice(0,10),s=a>t?p(a,-1):t;return s===t?`${g(t)}, all day`:`${g(t)} – ${g(s)}, all day`}return se({start:e.dtStart,end:e.dtEnd,allDay:e.allDay})}function Ce(e,t){return{id:e.suggestionId,calendarId:t.calendarId,title:U(e),start:e.dtStart,end:e.dtEnd,allDay:e.allDay,location:e.location,notes:"",attendees:[],myRsvp:"noReply",threadId:t.threadId,threadSubject:t.threadSubject,timeZone:"",zoneCertainty:F[e.zoneCertainty],recurrenceRule:"",seriesId:"",seriesException:!1,status:"confirmed"}}function He(e,t,a){const s=e.organizer===""?a.senderName:e.organizer;return{id:e.suggestionId,threadId:a.threadId,proposed:Ce(e,a),organizerName:s===""?"The sender":s,organizerEmail:e.organizer,method:"ics",evidence:"",state:t,sequence:e.sequence}}function we(e){return e.zoneCertainty!=="Ambiguous"?"":e.method==="Cancel"?Se:je}function Xe(e,t){return{id:e.suggestionId,title:U(e),start:e.dtStart,end:e.dtEnd,allDay:e.allDay,location:e.location,threadId:t.threadId,threadSubject:t.threadSubject,sender:t.sender,senderAddress:e.organizer,confidence:ke(e)?1:.6,ambiguity:we(e),suggestedCalendarId:t.calendarId,timeZone:"",zoneCertainty:F[e.zoneCertainty]}}const De=(e,t)=>Date.parse(t.start)<Date.parse(e.end)&&Date.parse(t.end)>Date.parse(e.start);function Ye(e,t){return t.filter(a=>De(e,a)).map(a=>({id:`${a.start}/${a.end}`,label:`Busy ${O(a.start)} – ${O(a.end)}`}))}function Ke(e,t){const a=B([e],t).get(e)??[],s=[];for(const r of L(e,a,C))for(let i=r.startMinute;i+C<=r.endMinute&&s.length<Ne;i+=C)s.push({date:e,endDate:e,startTime:A(i),endTime:A(i+C),allDay:!1});return s}function Je(e,t,a){const s=t.filter(r=>a.includes(r.startTime)).map(r=>`${R(r.startTime)} – ${R(r.endTime)}`);return`${ae(e)}: ${s.join(", ")}`}export{Ae as C,Re as E,oe as Z,Le as a,Be as b,be as c,Ue as d,ye as e,Fe as f,$e as g,xe as h,ue as i,Oe as j,qe as k,_e as l,Ze as m,Me as n,Ge as o,ke as p,We as q,me as r,le as s,Xe as t,Ye as u,He as v,Pe as w,Ke as x,Je as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as N,j as e,at as G,r,au as C,B as j,d as f,aL as V,T as R,f as P,b1 as B,a as K,b2 as Q,g as S,aE as A,b3 as Z,b4 as W,b5 as X,s as O,e as L,b6 as T,aw as J,b7 as Y,b8 as q,b9 as ee,u as se,aK as ae,aM as te}from"./index-BzL5-pGT.js";import{S as ne}from"./settings-screen-4md2ibPl.js";import{C as I,a as F,b as z,c as E}from"./card-865cdsJK.js";import{U as w,u as U,a as re,b as ie}from"./useCalendarSuggestions-DcYFtQhb.js";import{C as $}from"./confirm-dialog-CgMAaLI3.js";import{E as de,f as M}from"./ErrorState-nA0Ptq3g.js";import{R as oe}from"./refresh-cw-D1SQy8O7.js";import{C as le}from"./copy-CIKgpUwt.js";import"./avatar-vPm9XfmM.js";import"./menu-CGw_RHKl.js";import"./circle-help-CVShnhWn.js";import"./useQueries-Sm8S3Cgh.js";const ce=N("CalendarPlus",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M19 16v6",key:"tddt3s"}]]);const me=N("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);const ue=N("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);const he=N("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const pe=N("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),xe=s=>({title:`Delete ${s}?`,description:`This removes ${s} and every event in it, and any subscription address stops working. It cannot be undone.`}),be=s=>s.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,64),k=Intl.supportedValuesOf("timeZone");function _({id:s,value:n,disabled:t,onChange:a}){const i=n===w||k.includes(n)?k:[n,...k];return e.jsxs(G,{id:s,value:n,disabled:t,onChange:o=>a(o.target.value),children:[e.jsx("option",{value:w,children:"None (read as UTC)"}),i.map(o=>e.jsx("option",{value:o,children:o},o))]})}function ge({isBusy:s,problem:n,onCreate:t}){const[a,i]=r.useState(""),[o,c]=r.useState(void 0),[l,m]=r.useState(w),u=r.useId(),h=r.useId(),x=r.useId(),d=r.useId(),p=o??be(a),b=a.trim()!==""&&p.trim()!=="";return e.jsxs(I,{className:"max-w-xl",role:"region","aria-labelledby":u,children:[e.jsx(F,{children:e.jsx(z,{id:u,children:"New calendar"})}),e.jsx(E,{children:e.jsxs("form",{className:"space-y-3",onSubmit:g=>{g.preventDefault(),b&&t({displayName:a.trim(),urlSegment:p.trim(),timezone:l}).then(v=>{v&&(i(""),c(void 0),m(w))})},children:[e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{htmlFor:h,className:"text-xs font-medium text-fg-muted",children:"Name"}),e.jsx(C,{id:h,value:a,maxLength:140,disabled:s,onChange:g=>i(g.target.value)})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{htmlFor:x,className:"text-xs font-medium text-fg-muted",children:"Address"}),e.jsx(C,{id:x,value:p,maxLength:64,disabled:s,onChange:g=>c(g.target.value)})]}),e.jsxs("div",{className:"space-y-1 sm:col-span-2",children:[e.jsx("label",{htmlFor:d,className:"text-xs font-medium text-fg-muted",children:"Time zone"}),e.jsx(_,{id:d,value:l,disabled:s,onChange:m})]})]}),e.jsx("p",{className:"text-xs text-fg-muted",children:"The address names the calendar for CalDAV clients and cannot be changed later. The name and zone can."}),n!==""&&e.jsxs(j,{tone:"danger",variant:"soft",children:[e.jsx("p",{className:"font-medium",children:"The calendar was not added."}),e.jsx("p",{className:"mt-0.5 break-words",children:n})]}),e.jsx(f,{type:"submit",variant:"primary",size:"sm",disabled:s||!b,icon:e.jsx(V,{className:"size-3.5"}),children:s?"Adding…":"Add calendar"})]})})]})}function fe({calendarName:s,timezone:n,isBusy:t,problem:a,onSave:i,onDelete:o}){const[c,l]=r.useState(s),[m,u]=r.useState(n),[h,x]=r.useState(!1),d=r.useId(),p=r.useId(),b=c.trim(),g=b!==s||m!==n,v=xe(s);return e.jsxs(e.Fragment,{children:[e.jsxs("form",{className:"space-y-3",onSubmit:y=>{y.preventDefault(),!(!g||b==="")&&i({displayName:b,timezone:m})},children:[e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{htmlFor:d,className:"text-xs font-medium text-fg-muted",children:"Name"}),e.jsx(C,{id:d,value:c,maxLength:140,disabled:t,onChange:y=>l(y.target.value)})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{htmlFor:p,className:"text-xs font-medium text-fg-muted",children:"Time zone"}),e.jsx(_,{id:p,value:m,disabled:t,onChange:u})]})]}),a!==""&&e.jsxs(j,{tone:"danger",variant:"soft",children:[e.jsxs("p",{className:"font-medium",children:[s," was not changed."]}),e.jsx("p",{className:"mt-0.5 break-words",children:a})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(f,{type:"submit",variant:"secondary",size:"sm",disabled:t||!g||b==="",icon:e.jsx(pe,{className:"size-3.5"}),children:"Save changes"}),e.jsx(f,{type:"button",variant:"danger",size:"sm",disabled:t,icon:e.jsx(R,{className:"size-3.5"}),onClick:()=>x(!0),children:"Delete calendar"})]})]}),e.jsx($,{isOpen:h,title:v.title,description:v.description,confirmLabel:"Delete calendar",destructive:!0,onConfirm:()=>{x(!1),o()},onCancel:()=>x(!1)})]})}const ve="/feeds/calendar/",je=".ics",ye=(s,n)=>`webcal://${s}${ve}${n}${je}`;function Ce(s){const n=P(),[t,a]=r.useState(""),i=B({path:{calendarId:s}}),o=K({...Q({path:{calendarId:s}}),meta:O(404,403),retry:!1}),c=()=>{n.invalidateQueries({queryKey:i})},l=r.useRef(()=>{}),m=S({...Z(),meta:A,onMutate:()=>{l.current()},onSuccess:()=>{a(""),c()}}),u=S({...W(),meta:A,gcTime:0,onMutate:()=>{m.reset()},onSuccess:H=>{a(ye(window.location.host,H.feedToken)),c()}});l.current=u.reset;const{mutate:h,reset:x}=u,{mutate:d}=m,p=r.useCallback(()=>{h({path:{calendarId:s}})},[s,h]),b=r.useCallback(()=>{d({path:{calendarId:s}})},[s,d]),g=r.useCallback(()=>{a(""),x()},[x]),{refetch:v}=o,y=r.useCallback(()=>{v()},[v]);return{state:Ne(o),mintedUrl:t,isBusy:u.isPending||m.isPending,actionError:u.error??m.error,mint:p,revoke:b,dismissMinted:g,retry:y}}function Ne(s){return s.error?X(s.error)?{status:"absent"}:{status:"unreadable",error:s.error}:s.isPending?{status:"loading"}:s.data?{status:"active",createdAt:s.data.createdAt,rotatedAt:s.data.rotatedAt}:{status:"absent"}}const Se=s=>({title:`Replace the address for ${s}?`,description:"Every client already subscribed to the current address stops updating and has to be pointed at the new one. The new address is shown once."}),we=s=>({title:`Stop sharing ${s}?`,description:"The address stops working immediately and every client subscribed to it stops updating. Sharing again mints a different address."});function ke({calendarName:s,url:n,onDismiss:t}){const[a,i]=r.useState(!1),[o,c]=r.useState(!1),l=r.useRef(0);r.useEffect(()=>()=>window.clearTimeout(l.current),[]);const m=()=>{navigator.clipboard.writeText(n).then(()=>{c(!1),i(!0),l.current=window.setTimeout(()=>i(!1),2e3)}).catch(()=>c(!0))};return e.jsxs("div",{className:"mt-3 space-y-2 rounded-sm border border-accent-2/40 bg-accent-2/10 px-3 py-2.5",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"Subscribe with this address. It is shown once and cannot be read back."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx("input",{readOnly:!0,value:n,"aria-label":`Subscription address for ${s}`,onFocus:u=>u.currentTarget.select(),className:"min-w-0 flex-1 rounded-sm border border-line bg-surface px-2 py-1.5 font-mono text-xs text-fg"}),e.jsx(f,{variant:"primary",size:"sm",icon:a?e.jsx(J,{className:"size-3.5"}):e.jsx(le,{className:"size-3.5"}),onClick:m,children:a?"Copied":"Copy address"})]}),o&&e.jsx(j,{tone:"warning",variant:"soft",children:"The address could not be copied to the clipboard. Select it above and copy it by hand before leaving this page."}),e.jsx("p",{className:"text-xs text-fg-muted",children:"Anyone holding this address can read every event in this calendar, without signing in. Rotate it if it reaches the wrong person."}),e.jsx(f,{variant:"ghost",size:"sm",onClick:t,children:"I've saved it"})]})}function Te({createdAt:s,rotatedAt:n,isBusy:t,onRotate:a,onRevoke:i}){return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(L,{tone:"positive",children:"shared"}),e.jsxs("span",{className:"text-xs text-fg-muted",children:["Address created ",T(s,"medium"),n>0?`, last replaced ${T(n,"medium")}`:""]})]}),e.jsx("p",{className:"text-sm text-fg-muted",children:"The address itself is not stored in readable form, so it cannot be shown again. Replace it if you no longer know where it went."}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(f,{variant:"secondary",size:"sm",disabled:t,icon:e.jsx(oe,{className:"size-3.5"}),onClick:a,children:"Replace address"}),e.jsx(f,{variant:"danger",size:"sm",disabled:t,icon:e.jsx(R,{className:"size-3.5"}),onClick:i,children:"Stop sharing"})]})]})}function Ie({calendarName:s,details:n,state:t,mintedUrl:a,isBusy:i,actionError:o,onMint:c,onRevoke:l,onDismissMinted:m,onRetry:u}){const[h,x]=r.useState("none"),d=r.useId(),p=()=>{const g=h;x("none"),g==="rotate"&&c(),g==="revoke"&&l()},b=h==="revoke"?we(s):Se(s);return e.jsxs(I,{className:"max-w-xl",role:"region","aria-labelledby":d,children:[e.jsx(F,{children:e.jsx(z,{id:d,children:s})}),e.jsxs(E,{children:[n&&e.jsx("div",{className:"mb-4 border-b border-line pb-4",children:n}),t.status==="loading"&&a===""&&e.jsx("div",{className:"h-12 animate-pulse rounded-sm bg-surface-sunken","aria-busy":"true","aria-label":`Loading the subscription address for ${s}`}),t.status==="unreadable"&&a===""&&e.jsx(de,{variant:"inline",title:`Couldn't read whether ${s} is shared`,error:t.error,onRetry:u}),t.status==="absent"&&a===""&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm text-fg-muted",children:"Give this calendar a secret address and Apple Calendar, Google Calendar, Outlook and Thunderbird can subscribe to it read-only. Nobody signs in — the address is the credential, so treat it like a password."}),e.jsx(f,{variant:"primary",size:"sm",disabled:i,icon:e.jsx(me,{className:"size-3.5"}),onClick:c,children:i?"Creating…":"Create subscription address"})]}),t.status==="active"&&e.jsx(Te,{createdAt:t.createdAt,rotatedAt:t.rotatedAt,isBusy:i,onRotate:()=>x("rotate"),onRevoke:()=>x("revoke")}),o!=null&&e.jsxs(j,{tone:"danger",variant:"soft",className:"mt-3",children:[e.jsxs("p",{className:"font-medium",children:["The subscription address for ",s," was not changed."]}),e.jsx("p",{className:"mt-0.5 break-words",children:M(o)})]}),a!==""&&e.jsx(ke,{calendarName:s,url:a,onDismiss:m})]}),e.jsx($,{isOpen:h!=="none",title:b.title,description:b.description,confirmLabel:h==="revoke"?"Stop sharing":"Replace address",destructive:!0,onConfirm:p,onCancel:()=>x("none")})]})}function Fe({calendarId:s,calendarName:n,details:t}){const a=Ce(s);return e.jsx(Ie,{calendarName:n,details:t,state:a.state,mintedUrl:a.mintedUrl,isBusy:a.isBusy,actionError:a.actionError,onMint:a.mint,onRevoke:a.revoke,onDismissMinted:a.dismissMinted,onRetry:a.retry})}function ze({calendarId:s,calendarName:n,timezone:t,subscription:a}){const{updateCalendar:i,deleteCalendar:o,isWriting:c}=U(),[l,m]=r.useState(""),u=h=>m(h.kind==="refused"?h.message:"");return e.jsx(Fe,{calendarId:s,calendarName:n,details:e.jsxs(e.Fragment,{children:[a,e.jsx(fe,{calendarName:n,timezone:t,isBusy:c,problem:l,onSave:h=>{m(""),i(s,h).then(u)},onDelete:()=>{m(""),o(s).then(u)}},`${n}\0${t}`)]})})}const Ee="Subscribe to a calendar";function Me({isBusy:s,error:n,onSubscribe:t}){const a=r.useId(),i=r.useId(),o=r.useId(),[c,l]=r.useState(""),[m,u]=r.useState(""),h=c.trim()!==""&&m.trim()!=="",x=d=>{d.preventDefault(),h&&t({displayName:c,url:m},()=>{l(""),u("")})};return e.jsxs(I,{className:"max-w-xl",role:"region","aria-labelledby":a,children:[e.jsx(F,{children:e.jsx(z,{id:a,children:Ee})}),e.jsx(E,{children:e.jsxs("form",{className:"space-y-3",onSubmit:x,children:[e.jsx("p",{className:"text-sm text-fg-muted",children:"Paste the secret iCal address from Google Calendar, a published Outlook calendar or any other feed. It shows here read-only and refreshes on its own."}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{htmlFor:i,className:"text-sm font-medium text-fg",children:"Calendar name"}),e.jsx(C,{id:i,value:c,onChange:d=>l(d.target.value),placeholder:"Team rota",autoComplete:"off"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{htmlFor:o,className:"text-sm font-medium text-fg",children:"Calendar address"}),e.jsx(C,{id:o,value:m,onChange:d=>u(d.target.value),placeholder:"https://calendar.google.com/calendar/ical/…/basic.ics",autoComplete:"off",spellCheck:!1,inputMode:"url"}),e.jsx("p",{className:"text-xs text-fg-muted",children:"For Google Calendar the address is the password to the calendar. Reader never shows it in full again."})]}),e.jsx(f,{type:"submit",variant:"primary",size:"sm",disabled:!h||s,icon:e.jsx(ce,{className:"size-3.5"}),children:s?"Subscribing…":"Subscribe"}),n!=null&&e.jsxs(j,{tone:"danger",variant:"soft",children:[e.jsx("p",{className:"font-medium",children:"The calendar was not added."}),e.jsx("p",{className:"mt-0.5 break-words",children:M(n)})]})]})})]})}const Ae=s=>URL.canParse(s)?new URL(s).host:"an iCalendar feed";function De({calendarName:s,subscriptionUrl:n,enabled:t,fetchedAt:a,error:i,isBusy:o,actionError:c,onSetEnabled:l}){return e.jsxs("div",{className:"mb-4 space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(L,{tone:t?"positive":"neutral",children:t?"subscribed":"paused"}),e.jsxs("span",{className:"text-xs text-fg-muted",children:["Read-only, from ",Ae(n),a>0?`. Last updated ${T(a,"medium")}`:""]})]}),i!==""&&e.jsxs(j,{tone:"warning",variant:"soft",children:[e.jsxs("p",{className:"font-medium",children:[s," was not refreshed."]}),e.jsx("p",{className:"mt-0.5 break-words",children:i})]}),e.jsx("p",{className:"text-sm text-fg-muted",children:t?"Events are read from the feed on a schedule and cannot be edited here.":"Updates are paused. The events already here stay until you resume or remove the calendar."}),e.jsx(f,{variant:"secondary",size:"sm",disabled:o,icon:t?e.jsx(ue,{className:"size-3.5"}):e.jsx(he,{className:"size-3.5"}),onClick:()=>l(!t),children:t?"Pause updates":"Resume updates"}),c!=null&&e.jsxs(j,{tone:"danger",variant:"soft",children:[e.jsxs("p",{className:"font-medium",children:["Updates for ",s," were not changed."]}),e.jsx("p",{className:"mt-0.5 break-words",children:M(c)})]})]})}const D=O(400,404),Re=()=>`subscribed-${crypto.randomUUID().slice(0,8)}`;function Pe(){const s=P(),n=re(),t=()=>{s.invalidateQueries({queryKey:ee()}),n()},a=S({...Y(),meta:D,onSuccess:t}),i=S({...q(),meta:D,onSuccess:t}),{mutate:o}=a,c=r.useCallback((u,h)=>{o({body:{urlSegment:Re(),displayName:u.displayName.trim(),subscriptionUrl:u.url.trim()}},{onSuccess:h})},[o]),{mutate:l}=i,m=r.useCallback((u,h)=>{l({path:{calendarId:u},body:{subscriptionEnabled:h}})},[l]);return{subscribe:c,isSubscribing:a.isPending,subscribeError:a.error,setEnabled:m,togglingCalendarId:i.isPending?i.variables?.path.calendarId??"":"",toggleFailure:{calendarId:i.variables?.path.calendarId??"",error:i.error}}}const Oe=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Each calendar has a name, a time zone its floating times are read in, and an address CalDAV clients reach it by. The address is fixed when the calendar is added; the name and zone can change. Deleting a calendar deletes every event in it. The default calendar is where accepted invitations land, so it cannot be deleted."}),e.jsx("p",{children:"A subscription address lets Apple Calendar, Google Calendar, Outlook and Thunderbird show a calendar from here, read-only and kept up to date."}),e.jsx("p",{children:"Those clients never sign in, so the address itself is the credential. Anyone who has it can read the calendar; nobody who has it can change anything."}),e.jsx("p",{children:"Only a hash of the address is stored, so it is shown once and cannot be looked up later. Replacing it breaks every subscription built on the old one, which is how a shared address is taken back."}),e.jsx("p",{children:"Subscribing works the other way round: paste another calendar's iCal address and its events show here, read-only, refreshed on a schedule."})]});function Xe(){const s=se(),[n,t]=r.useState(!0),{calendars:a,collections:i,timeZoneByCalendarId:o,isLoading:c}=ie(),l=Pe(),{createCalendar:m,isWriting:u}=U(),[h,x]=r.useState("");return e.jsx(ne,{items:ae,activeId:"calendars",title:"Calendars",description:"Add, rename and delete calendars, subscribe to a calendar feed, and share one with any client that can subscribe to a URL.",help:Oe,helpOpen:n,onToggleHelp:()=>t(d=>!d),onSelect:d=>{const p=te[d];p&&s({to:p})},onBackToMail:()=>{s({to:"/mail"})},children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading calendars"}):e.jsxs("div",{className:"space-y-4",children:[a.map(d=>{const p=i.find(b=>b.calendarId===d.id);return e.jsx(ze,{calendarId:d.id,calendarName:d.name,timezone:o[d.id]??"",subscription:p?.source==="Subscribed"&&e.jsx(De,{calendarName:p.displayName,subscriptionUrl:p.subscriptionUrl,enabled:p.subscriptionEnabled,fetchedAt:p.subscriptionFetchedAt,error:p.subscriptionError,isBusy:l.togglingCalendarId===d.id,actionError:l.toggleFailure.calendarId===d.id?l.toggleFailure.error:void 0,onSetEnabled:b=>l.setEnabled(d.id,b)})},d.id)}),e.jsx(Me,{isBusy:l.isSubscribing,error:l.subscribeError,onSubscribe:l.subscribe}),e.jsx(ge,{isBusy:u,problem:h,onCreate:d=>(x(""),m(d).then(p=>p.kind==="written"?!0:(x(p.message),!1)))})]})})}export{Xe as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-dJ4mfUrX.js";import"./index-BzL5-pGT.js";import"./ErrorState-nA0Ptq3g.js";import"./index-BWAq8iOl.js";import"./useMessageBodyContent-CWGtiddz.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./confirm-dialog-CgMAaLI3.js";const F=o;export{F as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-dJ4mfUrX.js";import"./index-BzL5-pGT.js";import"./ErrorState-nA0Ptq3g.js";import"./index-BWAq8iOl.js";import"./useMessageBodyContent-CWGtiddz.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./confirm-dialog-CgMAaLI3.js";const F=o;export{F as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-dJ4mfUrX.js";import"./index-BzL5-pGT.js";import"./ErrorState-nA0Ptq3g.js";import"./index-BWAq8iOl.js";import"./useMessageBodyContent-CWGtiddz.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./confirm-dialog-CgMAaLI3.js";const F=o;export{F as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-dJ4mfUrX.js";import"./index-BzL5-pGT.js";import"./ErrorState-nA0Ptq3g.js";import"./index-BWAq8iOl.js";import"./useMessageBodyContent-CWGtiddz.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./confirm-dialog-CgMAaLI3.js";const F=o;export{F as component};
|
package/assets/edit-CxVYhmi5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fM as o,j as i}from"./index-BzL5-pGT.js";import{a as m}from"./CalendarEventEditor-BpGmPZ2Z.js";import"./confirm-dialog-CgMAaLI3.js";import"./calendar-event-popup-Mft0N_sd.js";import"./pencil-DOoqyGzC.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-event-sidebar-D5vjFGdS.js";import"./useCalendarData-Bz4EDHDO.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./ErrorState-nA0Ptq3g.js";import"./useQueries-Sm8S3Cgh.js";import"./CalendarSession--XFP5lXS.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./calendar-LLRgZQzl.js";import"./CalendarQuickCreate-CwkBXqAB.js";function O(){const{calendarObjectId:r,recurrenceId:t}=o.useParams();return i.jsx(m,{calendarObjectId:r,recurrenceId:t})}export{O as component};
|
package/assets/edit-DXN-G3Tu.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fJ as o,j as r}from"./index-BzL5-pGT.js";import{a as i}from"./CalendarEventEditor-BpGmPZ2Z.js";import"./confirm-dialog-CgMAaLI3.js";import"./calendar-event-popup-Mft0N_sd.js";import"./pencil-DOoqyGzC.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-event-sidebar-D5vjFGdS.js";import"./useCalendarData-Bz4EDHDO.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./ErrorState-nA0Ptq3g.js";import"./useQueries-Sm8S3Cgh.js";import"./CalendarSession--XFP5lXS.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./calendar-LLRgZQzl.js";import"./CalendarQuickCreate-CwkBXqAB.js";function v(){const{calendarObjectId:t}=o.useParams();return r.jsx(i,{calendarObjectId:t})}export{v as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,O as i}from"./index-BzL5-pGT.js";import{a as m}from"./MailShell-0sTtK1xD.js";import{F as r}from"./FlaggedPane-BwhUf1qN.js";import"./reply-CQarAZxU.js";import{a as p}from"./search-token-index-DQHE1g7A.js";import{u as e}from"./search-mirror-_Dap9COg.js";import"./useMessageBodyContent-CWGtiddz.js";import"./FullCompose-dJ4mfUrX.js";import"./ErrorState-nA0Ptq3g.js";import"./index-BWAq8iOl.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./useMediaQuery-7Q3jBluO.js";import"./confirm-dialog-CgMAaLI3.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./MessageToolbar-5T47fDWC.js";import"./roving-focus-Coea111y.js";import"./EmptyState-dD_YhGMH.js";import"./popover-menu-CNiMANtf.js";import"./avatar-vPm9XfmM.js";import"./useQueries-Sm8S3Cgh.js";import"./undo-2-DHJ6nykB.js";import"./download-A4hq8dWf.js";import"./calendar-suggestion-ClsxDTZs.js";import"./sparkles-C1l6GCPT.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-failure-note-BUFaaizf.js";import"./checkbox-Qon94b1C.js";import"./clock-B9kFW89H.js";import"./shield-check-BcUXVpR8.js";import"./calendar-LLRgZQzl.js";import"./useLayoutTier-5aJYrTut.js";import"./menu-CGw_RHKl.js";import"./useFilters-C3bLY42W.js";import"./MailViewChrome-BEx9Dr1Z.js";import"./refresh-cw-D1SQy8O7.js";import"./wizard-selection-zWa1qc6-.js";function X(){const t=p();return e({to:"/mail/flagged"}),o.jsx(r,{thread:t,children:o.jsx(m,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(i,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!t})})}export{X as component};
|
package/assets/index-B18BvpkW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fI as o,j as r}from"./index-BzL5-pGT.js";import{C as m}from"./CalendarEventPopup-Brcgx7tV.js";import"./calendar-event-popup-Mft0N_sd.js";import"./pencil-DOoqyGzC.js";import"./calendar-report-CzeBcU6C.js";import"./useCalendarData-Bz4EDHDO.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./ErrorState-nA0Ptq3g.js";import"./useQueries-Sm8S3Cgh.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./calendar-LLRgZQzl.js";function l(){const{calendarObjectId:t}=o.useParams();return r.jsx(m,{calendarObjectId:t})}export{l as component};
|
package/assets/index-B4pYEqZI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-BzL5-pGT.js";import{O as t}from"./OutboxPane-gEXLW7BJ.js";import"./roving-focus-Coea111y.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useMessageBodyContent-CWGtiddz.js";import"./circle-check-big-CyVG6r7N.js";import"./clock-B9kFW89H.js";import"./row-actions-CiZruXil.js";import"./rotate-ccw-DPB71584.js";import"./NavMenuButton-C-7-t18I.js";import"./menu-CGw_RHKl.js";import"./outbox-status-BlKn6P0x.js";function d(){return o.jsx(t.Reading,{})}export{d as component};
|
package/assets/index-B77HnSA5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-BzL5-pGT.js";import{B as o}from"./BriefPane-BzlqkW4r.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useMessageBodyContent-CWGtiddz.js";import"./MessageToolbar-5T47fDWC.js";import"./roving-focus-Coea111y.js";import"./search-token-index-DQHE1g7A.js";import"./useQueries-Sm8S3Cgh.js";import"./EmptyState-dD_YhGMH.js";import"./ErrorState-nA0Ptq3g.js";import"./popover-menu-CNiMANtf.js";import"./avatar-vPm9XfmM.js";import"./index-BWAq8iOl.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./undo-2-DHJ6nykB.js";import"./download-A4hq8dWf.js";import"./calendar-suggestion-ClsxDTZs.js";import"./sparkles-C1l6GCPT.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-failure-note-BUFaaizf.js";import"./checkbox-Qon94b1C.js";import"./clock-B9kFW89H.js";import"./shield-check-BcUXVpR8.js";import"./calendar-LLRgZQzl.js";import"./useLayoutTier-5aJYrTut.js";import"./menu-CGw_RHKl.js";import"./useFilters-C3bLY42W.js";import"./confirm-dialog-CgMAaLI3.js";import"./useRefreshControl-bA8HK_j-.js";import"./circle-check-big-CyVG6r7N.js";import"./refresh-cw-D1SQy8O7.js";import"./LabelApplyTrigger-BA7ANeDk.js";import"./useLabels-DYdHiHXI.js";import"./wizard-selection-zWa1qc6-.js";function S(){return r.jsx(o.Reading,{})}export{S as component};
|
package/assets/index-BZdYp7ae.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-BzL5-pGT.js";import{F as r}from"./FlaggedPane-BwhUf1qN.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useMessageBodyContent-CWGtiddz.js";import"./MessageToolbar-5T47fDWC.js";import"./roving-focus-Coea111y.js";import"./search-token-index-DQHE1g7A.js";import"./useQueries-Sm8S3Cgh.js";import"./EmptyState-dD_YhGMH.js";import"./ErrorState-nA0Ptq3g.js";import"./popover-menu-CNiMANtf.js";import"./avatar-vPm9XfmM.js";import"./index-BWAq8iOl.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./undo-2-DHJ6nykB.js";import"./download-A4hq8dWf.js";import"./calendar-suggestion-ClsxDTZs.js";import"./sparkles-C1l6GCPT.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-failure-note-BUFaaizf.js";import"./checkbox-Qon94b1C.js";import"./clock-B9kFW89H.js";import"./shield-check-BcUXVpR8.js";import"./calendar-LLRgZQzl.js";import"./useLayoutTier-5aJYrTut.js";import"./menu-CGw_RHKl.js";import"./useFilters-C3bLY42W.js";import"./confirm-dialog-CgMAaLI3.js";import"./MailViewChrome-BEx9Dr1Z.js";import"./refresh-cw-D1SQy8O7.js";import"./wizard-selection-zWa1qc6-.js";function M(){return o.jsx(r.Reading,{})}export{M as component};
|
package/assets/index-BiCNOLIH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,ad as o}from"./index-BzL5-pGT.js";const n=()=>t.jsx(o,{to:"/settings/accounts"});export{n as component};
|
package/assets/index-CoCVPZ34.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fL as t,j as m}from"./index-BzL5-pGT.js";import{C as p}from"./CalendarEventPopup-Brcgx7tV.js";import"./calendar-event-popup-Mft0N_sd.js";import"./pencil-DOoqyGzC.js";import"./calendar-report-CzeBcU6C.js";import"./useCalendarData-Bz4EDHDO.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./ErrorState-nA0Ptq3g.js";import"./useQueries-Sm8S3Cgh.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./calendar-LLRgZQzl.js";function l(){const{calendarObjectId:r,recurrenceId:o}=t.useParams();return m.jsx(p,{calendarObjectId:r,recurrenceId:o})}export{l as component};
|
package/assets/index-CroyVnhC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-BzL5-pGT.js";import{M as i}from"./MailboxPane-DYgnYeOy.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useMessageBodyContent-CWGtiddz.js";import"./useRefreshControl-bA8HK_j-.js";import"./circle-check-big-CyVG6r7N.js";import"./refresh-cw-D1SQy8O7.js";import"./useQueries-Sm8S3Cgh.js";import"./MessageToolbar-5T47fDWC.js";import"./roving-focus-Coea111y.js";import"./search-token-index-DQHE1g7A.js";import"./EmptyState-dD_YhGMH.js";import"./ErrorState-nA0Ptq3g.js";import"./popover-menu-CNiMANtf.js";import"./avatar-vPm9XfmM.js";import"./index-BWAq8iOl.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./undo-2-DHJ6nykB.js";import"./download-A4hq8dWf.js";import"./calendar-suggestion-ClsxDTZs.js";import"./sparkles-C1l6GCPT.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-failure-note-BUFaaizf.js";import"./checkbox-Qon94b1C.js";import"./clock-B9kFW89H.js";import"./shield-check-BcUXVpR8.js";import"./calendar-LLRgZQzl.js";import"./useLayoutTier-5aJYrTut.js";import"./menu-CGw_RHKl.js";import"./useFilters-C3bLY42W.js";import"./confirm-dialog-CgMAaLI3.js";import"./MailViewChrome-BEx9Dr1Z.js";import"./LabelApplyTrigger-BA7ANeDk.js";import"./useLabels-DYdHiHXI.js";import"./NavMenuButton-C-7-t18I.js";import"./bottom-sheet-BTdseD_6.js";import"./circle-help-CVShnhWn.js";import"./circle-check-Db07NpOC.js";function W(){return o.jsx(i.Reading,{})}export{W as component};
|
package/assets/index-DTs144Nv.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-BzL5-pGT.js";import{M as r}from"./MailboxPane-DYgnYeOy.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useMessageBodyContent-CWGtiddz.js";import"./useRefreshControl-bA8HK_j-.js";import"./circle-check-big-CyVG6r7N.js";import"./refresh-cw-D1SQy8O7.js";import"./useQueries-Sm8S3Cgh.js";import"./MessageToolbar-5T47fDWC.js";import"./roving-focus-Coea111y.js";import"./search-token-index-DQHE1g7A.js";import"./EmptyState-dD_YhGMH.js";import"./ErrorState-nA0Ptq3g.js";import"./popover-menu-CNiMANtf.js";import"./avatar-vPm9XfmM.js";import"./index-BWAq8iOl.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./undo-2-DHJ6nykB.js";import"./download-A4hq8dWf.js";import"./calendar-suggestion-ClsxDTZs.js";import"./sparkles-C1l6GCPT.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-failure-note-BUFaaizf.js";import"./checkbox-Qon94b1C.js";import"./clock-B9kFW89H.js";import"./shield-check-BcUXVpR8.js";import"./calendar-LLRgZQzl.js";import"./useLayoutTier-5aJYrTut.js";import"./menu-CGw_RHKl.js";import"./useFilters-C3bLY42W.js";import"./confirm-dialog-CgMAaLI3.js";import"./MailViewChrome-BEx9Dr1Z.js";import"./LabelApplyTrigger-BA7ANeDk.js";import"./useLabels-DYdHiHXI.js";import"./NavMenuButton-C-7-t18I.js";import"./bottom-sheet-BTdseD_6.js";import"./circle-help-CVShnhWn.js";import"./circle-check-Db07NpOC.js";function W(){return o.jsx(r.Reading,{})}export{W as component};
|
package/assets/index-DsgtllX4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-BzL5-pGT.js";import{B as o}from"./BriefPane-BzlqkW4r.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useMessageBodyContent-CWGtiddz.js";import"./MessageToolbar-5T47fDWC.js";import"./roving-focus-Coea111y.js";import"./search-token-index-DQHE1g7A.js";import"./useQueries-Sm8S3Cgh.js";import"./EmptyState-dD_YhGMH.js";import"./ErrorState-nA0Ptq3g.js";import"./popover-menu-CNiMANtf.js";import"./avatar-vPm9XfmM.js";import"./index-BWAq8iOl.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./undo-2-DHJ6nykB.js";import"./download-A4hq8dWf.js";import"./calendar-suggestion-ClsxDTZs.js";import"./sparkles-C1l6GCPT.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-failure-note-BUFaaizf.js";import"./checkbox-Qon94b1C.js";import"./clock-B9kFW89H.js";import"./shield-check-BcUXVpR8.js";import"./calendar-LLRgZQzl.js";import"./useLayoutTier-5aJYrTut.js";import"./menu-CGw_RHKl.js";import"./useFilters-C3bLY42W.js";import"./confirm-dialog-CgMAaLI3.js";import"./useRefreshControl-bA8HK_j-.js";import"./circle-check-big-CyVG6r7N.js";import"./refresh-cw-D1SQy8O7.js";import"./LabelApplyTrigger-BA7ANeDk.js";import"./useLabels-DYdHiHXI.js";import"./wizard-selection-zWa1qc6-.js";function Q(){return r.jsx(o.Reading,{})}export{Q as component};
|
package/assets/index-DupXMcS6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-BzL5-pGT.js";import{F as r}from"./FlaggedPane-BwhUf1qN.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./useMessageBodyContent-CWGtiddz.js";import"./MessageToolbar-5T47fDWC.js";import"./roving-focus-Coea111y.js";import"./search-token-index-DQHE1g7A.js";import"./useQueries-Sm8S3Cgh.js";import"./EmptyState-dD_YhGMH.js";import"./ErrorState-nA0Ptq3g.js";import"./popover-menu-CNiMANtf.js";import"./avatar-vPm9XfmM.js";import"./index-BWAq8iOl.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./undo-2-DHJ6nykB.js";import"./download-A4hq8dWf.js";import"./calendar-suggestion-ClsxDTZs.js";import"./sparkles-C1l6GCPT.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-failure-note-BUFaaizf.js";import"./checkbox-Qon94b1C.js";import"./clock-B9kFW89H.js";import"./shield-check-BcUXVpR8.js";import"./calendar-LLRgZQzl.js";import"./useLayoutTier-5aJYrTut.js";import"./menu-CGw_RHKl.js";import"./useFilters-C3bLY42W.js";import"./confirm-dialog-CgMAaLI3.js";import"./MailViewChrome-BEx9Dr1Z.js";import"./refresh-cw-D1SQy8O7.js";import"./wizard-selection-zWa1qc6-.js";function N(){return o.jsx(r.Reading,{})}export{N as component};
|
package/assets/new-DVwQ9Ia3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as o}from"./CalendarEventEditor-BpGmPZ2Z.js";import"./index-BzL5-pGT.js";import"./confirm-dialog-CgMAaLI3.js";import"./calendar-event-popup-Mft0N_sd.js";import"./pencil-DOoqyGzC.js";import"./calendar-report-CzeBcU6C.js";import"./calendar-event-sidebar-D5vjFGdS.js";import"./useCalendarData-Bz4EDHDO.js";import"./useCalendarSuggestions-DcYFtQhb.js";import"./ErrorState-nA0Ptq3g.js";import"./useQueries-Sm8S3Cgh.js";import"./CalendarSession--XFP5lXS.js";import"./reply-CQarAZxU.js";import"./useMediaQuery-7Q3jBluO.js";import"./calendar-LLRgZQzl.js";import"./CalendarQuickCreate-CwkBXqAB.js";const v=o;export{v as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n,f as i,u as a,r as m,j as s}from"./index-BzL5-pGT.js";import{O as p}from"./OnboardingWizard-hfP07hpw.js";import{c}from"./onboarding-completion-DbgUYeRa.js";import"./checkbox-Qon94b1C.js";import"./kbd-B9MFmWVU.js";import"./credential-steps-BWguS0eW.js";import"./card-865cdsJK.js";import"./account-form-helpers-DhckT_PN.js";import"./file-json-DiHW8YBd.js";function O(){const o=n(),e=i(),t=a(),r=m.useCallback(l=>{c({queryClient:e,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[o,e]);return s.jsx(p,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{t({to:"/import"})}})}export{O as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,O as i}from"./index-BzL5-pGT.js";import{a as m}from"./MailShell-0sTtK1xD.js";import{u as p,O as t}from"./OutboxPane-gEXLW7BJ.js";import"./reply-CQarAZxU.js";import{u as s}from"./search-mirror-_Dap9COg.js";import"./useMessageBodyContent-CWGtiddz.js";import"./FullCompose-dJ4mfUrX.js";import"./ErrorState-nA0Ptq3g.js";import"./index-BWAq8iOl.js";import"./useSignature-sxHvGfKr.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B7157ZPO.js";import"./sections-C6oVXjho.js";import"./useMediaQuery-7Q3jBluO.js";import"./confirm-dialog-CgMAaLI3.js";import"./roving-focus-Coea111y.js";import"./MessageBody-Deha778B.js";import"./kbd-B9MFmWVU.js";import"./search-scope-UI1H6AzA.js";import"./circle-check-big-CyVG6r7N.js";import"./clock-B9kFW89H.js";import"./row-actions-CiZruXil.js";import"./rotate-ccw-DPB71584.js";import"./NavMenuButton-C-7-t18I.js";import"./menu-CGw_RHKl.js";import"./outbox-status-BlKn6P0x.js";function w(){const r=p();return s({to:"/mail/outbox"}),o.jsx(t,{outboxMessageId:r,children:o.jsx(m,{phone:o.jsx(t.Phone,{}),list:o.jsx(t.List,{}),reading:o.jsx(i,{})})})}export{w as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,O as o}from"./index-BzL5-pGT.js";const n=()=>t.jsx(o,{});export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,X as Z,o as O,f6 as R,fb as $,f9 as v,r as u,cj as E,fK as F}from"./index-BzL5-pGT.js";import{E as L,C as W}from"./EmptyState-dD_YhGMH.js";import{C as z}from"./calendar-event-sidebar-D5vjFGdS.js";import{C as B}from"./calendar-failure-note-BUFaaizf.js";import{b as j,k as H,d as h,l as U,t as _,U as S,q as P,i as M,m as V}from"./useCalendarSuggestions-DcYFtQhb.js";import{e as w,p as q,a as G,b as K}from"./CalendarSession--XFP5lXS.js";import{f as X,a as N}from"./calendar-report-CzeBcU6C.js";import"./reply-CQarAZxU.js";import{j as Y,b as J}from"./calendar-LLRgZQzl.js";import"./calendar-event-popup-Mft0N_sd.js";import"./pencil-DOoqyGzC.js";import"./ErrorState-nA0Ptq3g.js";import"./useQueries-Sm8S3Cgh.js";import"./useMediaQuery-7Q3jBluO.js";function I({title:e,subtitle:a,onClose:r,children:s,className:i}){return o.jsxs("section",{className:O("flex h-full w-full flex-col bg-surface",i),children:[o.jsxs("header",{className:"flex h-pane-header shrink-0 items-center gap-2 border-b border-line px-row-inset",children:[o.jsx("h2",{className:"shrink-0 text-xs font-medium text-fg",children:e}),a!==void 0&&a!==""&&o.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-fg-muted",children:a}),o.jsx("button",{type:"button","aria-label":"Close editor",onClick:r,className:"ml-auto flex size-7 shrink-0 items-center justify-center rounded-md text-fg-subtle outline-none hover:bg-surface-sunken hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",children:o.jsx(Z,{className:"size-4"})})]}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-row-inset py-5",children:o.jsx("div",{className:"mx-auto w-full max-w-2xl",children:s})})]})}function Q(e,a,r){const s={title:e.summary,location:e.location};if(e.allDay){const t=e.dtStart.slice(0,10),c=e.dtEnd.slice(0,10);return{...w(t,a),...s,allDay:!0,startTime:"",endDate:c>t?R(c,-1):t,endTime:""}}const i=t=>e.zoneCertainty==="Ambiguous"?t:$(t,r),l=i(e.dtStart),d=i(e.dtEnd);return{...w(l.slice(0,10),a),...s,startTime:l.slice(11,16),endDate:d.slice(0,10),endTime:d.slice(11,16)}}function ee(e,a,r,s){const i=q(a,r,s);if(!i.ok)return i;const d=e.zoneCertainty==="Ambiguous"||i.patch.start!==void 0?{...i.patch,...G(r,s.clock),allDay:r.allDay,timeZone:s.anchor}:i.patch;return{ok:!0,input:{calendarId:r.calendarId,event:d}}}const te=[],ae={from:"",to:""};function ne(e,a=""){const{timeZoneByCalendarId:r}=j(),s=e.date!==""&&!e.allDay&&e.endDate!==""&&e.startTime!==""&&e.endTime!==""&&`${e.endDate}T${e.endTime}`>`${e.date}T${e.startTime}`,{instances:i,isLoading:l,error:d}=H({...s?{from:v("week",e.date).from,to:v("week",e.endDate).to}:ae,calendarIds:te,enabled:s}),t=h();return u.useMemo(()=>{if(!s||l||d)return;const c=E(e.date,e.startTime,t),p=E(e.endDate,e.endTime,t),f=i.filter(m=>U(m)&&m.calendarObjectId!==a).map(m=>_(m,r[m.calendarId]??S,t));return F({start:c,end:p},f).map(m=>({id:m.id,label:`${m.title}, ${X(m)}`}))},[s,l,d,e.date,e.endDate,e.startTime,e.endTime,t,i,a,r])}const y="Add from mail",se="The invitation named a time zone nothing could resolve. The time below is as the mail wrote it — check it before adding.";function ie({suggestionId:e,onClose:a}){const{suggestion:r,isLoading:s,error:i}=P(e),l=r??void 0,[d,t]=u.useState(void 0);l!==void 0&&d===void 0&&t(l);const c=d??l;if(c!==void 0)return o.jsx(oe,{suggestion:c,onClose:a},c.suggestionId);if(i!==null){const p="Couldn't read what your mail is waiting on.";return o.jsx(I,{title:y,onClose:a,children:o.jsx(B,{text:`${p} Close this and try again.`,reportHref:N(p),className:"m-row-inset"})})}return o.jsx(I,{title:y,onClose:a,children:o.jsx(L,{message:s?"Reading the suggestion…":"This suggestion is no longer waiting on you. It was answered, or a later message replaced it."})})}function oe({suggestion:e,onClose:a}){const{calendars:r,defaultCalendarId:s,timeZoneByCalendarId:i}=j(),l=r.filter(n=>!n.readOnly),d=M(),[t]=u.useState(()=>Q(e,"",h())),[c,p]=u.useState(t),f=K()?.dispatch;u.useEffect(()=>{f?.({type:"sidebar-range",range:{date:t.date,endDate:t.endDate,startTime:t.allDay?"":t.startTime,endTime:t.allDay?"":t.endTime,allDay:t.allDay}})},[t,f]);const[m,D]=u.useState(""),[k,A]=u.useState(),b=ne(c),g=l.some(n=>n.id===s)?s:l[0]?.id??"";u.useEffect(()=>{g!==""&&p(n=>n.calendarId===""?{...n,calendarId:g}:n)},[g]);const x=()=>{const n=ee(e,t,c,{clock:h(),anchor:V(i[c.calendarId]??S)});if(!n.ok){D(n.problem);return}D(""),d.acceptEdited(e.suggestionId,n.input).then(C=>{if(C.kind==="answered"){a();return}const T=`Couldn't add this to your calendar: ${C.message}`;A({text:T,reportHref:N(T),onRetry:x})})};return o.jsx(z,{heading:y,draft:c,onChange:n=>{p(n),f?.({type:"sidebar-range",range:{date:n.date,endDate:n.endDate,startTime:n.allDay?"":n.startTime,endTime:n.allDay?"":n.endTime,allDay:n.allDay}})},calendars:l,calendarEditable:!0,repeatEditable:!1,timeZone:h(),timeZones:[h()],onTimeZone:()=>{},busy:!0,onBusy:()=>{},onSave:x,onCancel:a,saving:d.isAnswering,saveLabel:"Add",failure:k,problem:m!==""?m:e.zoneCertainty==="Ambiguous"?se:"",children:b&&o.jsx(W,{clashes:b})})}function Ce(){const e=Y(),{closeToView:a}=J();return e===void 0?null:o.jsx(ie,{suggestionId:e,onClose:a})}export{Ce as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as x,j as d,o as v,d as A,f9 as k}from"./index-BzL5-pGT.js";import{m as R,b as O,d as P,l as W,t as M,U as Z,k as B,n as z,g as U,r as F}from"./useCalendarSuggestions-DcYFtQhb.js";const l=8,j=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n)),q=(e,t)=>e.width>0&&e.height>0&&e.left<t.width&&e.left+e.width>0&&e.top<t.height&&e.top+e.height>0;function L(e,t){return{left:Math.max(l,(t.width-e.width)/2),top:Math.max(l,(t.height-e.height)/2),side:"center"}}function Y(e,t,n){if(!e||!q(e,n))return L(t,n);const s=j(e.top,l,n.height-t.height-l),i=e.left+e.width+l;if(i+t.width<=n.width-l)return{left:i,top:s,side:"right"};const o=e.left-l-t.width;if(o>=l)return{left:o,top:s,side:"left"};const a=j(e.left,l,n.width-t.width-l),c=e.top+e.height+l;if(c+t.height<=n.height-l)return{left:a,top:c,side:"below"};const g=e.top-l-t.height;return g>=l?{left:a,top:g,side:"above"}:L(t,n)}const H='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function Q({anchor:e,anchorKey:t,labelledBy:n,children:s,header:i,wrapTab:o=!1,panelRef:a,className:c}){const g=x.useRef(null),[w,y]=x.useState(null),[p,b]=x.useState({key:t,x:0,y:0}),f=p.key===t?p:{x:0,y:0};x.useLayoutEffect(()=>{const r=g.current;if(!r||t==="")return;const u=()=>{const h=(typeof e=="string"?document.querySelector(e):e)?.getBoundingClientRect();y(Y(h?{left:h.left,top:h.top,width:h.width,height:h.height}:null,{width:r.offsetWidth,height:r.offsetHeight},{width:window.innerWidth,height:window.innerHeight}))};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[e,t]);const C=r=>{if(r.button!==0||r.target instanceof Element&&r.target.closest("button, input, select, a"))return;r.preventDefault();const u={x:r.clientX-f.x,y:r.clientY-f.y},m=D=>b({key:t,x:D.clientX-u.x,y:D.clientY-u.y}),h=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",h)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",h)},I=r=>{if(!o||r.key!=="Tab")return;const u=Array.from(r.currentTarget.querySelectorAll(H));if(u.length===0)return;const m=u[0],h=u[u.length-1];r.shiftKey&&document.activeElement===m?(r.preventDefault(),h.focus()):!r.shiftKey&&document.activeElement===h&&(r.preventDefault(),m.focus())};return d.jsxs("div",{ref:r=>{g.current=r,typeof a=="function"?a(r):a&&(a.current=r)},role:"dialog","aria-modal":"false","aria-labelledby":n,"data-calendar-popover":"",onKeyDown:I,className:v("fixed z-40 w-[26rem] max-w-[calc(100vw-1rem)] rounded-xl border border-line bg-surface-raised text-fg shadow-xl shadow-black/20",w===null&&"opacity-0",c),style:{left:(w?.left??0)+f.x,top:(w?.top??0)+f.y},children:[i?.({onPointerDown:C}),s]})}const V=[{scope:"this",label:"This event",note:"Leaves the rest of the series alone"},{scope:"following",label:"This and everything after",note:"Splits the series here"},{scope:"all",label:"The whole series",note:"Rewrites the rule itself"}];function $({title:e,ruleText:t,instanceText:n,onChoose:s,onCancel:i,touch:o,className:a}){return d.jsxs("div",{className:v("flex flex-col gap-3",a),children:[d.jsxs("div",{children:[d.jsxs("h2",{className:"text-md font-semibold text-fg",children:[e," repeats"]}),d.jsx("p",{className:"text-xs text-fg-muted",children:t}),d.jsxs("p",{className:"text-xs text-fg-subtle",children:["You clicked ",n,"."]})]}),d.jsx("p",{className:"text-sm text-fg",children:"What should the change apply to?"}),d.jsx("div",{className:"flex flex-col gap-1.5",children:V.map(c=>d.jsxs("button",{type:"button",onClick:()=>s(c.scope),className:v("flex flex-col rounded-md border border-line bg-surface px-3 py-2 text-left outline-none transition-colors hover:border-line-strong hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",o&&"min-h-11 justify-center"),children:[d.jsx("span",{className:"text-sm font-medium text-fg",children:c.label}),d.jsx("span",{className:"text-2xs text-fg-subtle",children:c.note})]},c.scope))}),d.jsx(A,{variant:"ghost",size:o?"md":"sm",onClick:i,className:v("self-start",o&&"min-h-11"),children:"Cancel"})]})}const S=e=>e.replace(/\r?\n[ \t]/g,""),N=e=>e.replace(/\\n/gi,`
|
|
2
|
-
`).replace(/\\,/g,",").replace(/\\;/g,";").replace(/\\\\/g,"\\");function E(e,t){let n=!1;for(let s=t.length;s<e.length;s+=1){const i=e[s];if(s===t.length&&i!==";"&&i!==":")return;if(i==='"'){n=!n;continue}if(!n&&i===":")return e.slice(s+1).trim()}}function T(e,t){for(const n of S(e).split(/\r?\n/)){if(!n.startsWith(t))continue;const s=E(n,t);if(s!==void 0)return s}return""}const ee=e=>T(e,"RRULE"),te=e=>({location:N(T(e,"LOCATION")),description:N(T(e,"DESCRIPTION"))});function ne(e,t){const n=S(e).split(/\r?\n/).find(i=>i.startsWith("DTSTART")&&E(i,"DTSTART")!==void 0);if(n===void 0)return R(t);const s=/;TZID="?([^;:"]+)"?/i.exec(n)?.[1];return s!==void 0?Intl.supportedValuesOf("timeZone").includes(s)?s:t:E(n,"DTSTART")?.toUpperCase().endsWith("Z")?"":t}function X(e,t){const n=e.map(o=>o.id);if(t.length===0)return n;const s=new Set(t),i=n.filter(o=>s.has(o));return i.length===0?n:i}function G(e){const{calendars:t,colorByCalendarId:n,timeZoneByCalendarId:s,isLoading:i}=O(),o=X(t,e),a=o.length===t.length?[]:o,c=e.length===0||t.length>0;return{calendars:t,colorByCalendarId:n,timeZoneByCalendarId:s,shown:o,narrowed:a,resolved:c,isLoading:i}}function _(e,t,n){const s=n.join(",");return x.useMemo(()=>{const i=P(),o=new Set(s===""?[]:s.split(","));return e.filter(a=>W(a)&&o.has(a.calendarId)).map(a=>M(a,t[a.calendarId]??Z,i))},[e,t,s])}function se({view:e,date:t,calendarIds:n,enabled:s=!0}){const{calendars:i,colorByCalendarId:o,timeZoneByCalendarId:a,shown:c,narrowed:g,resolved:w,isLoading:y}=G(n),p=k(e,t),b=s&&w,f=B({...p,calendarIds:g,enabled:b});z(e,t,g,b);const C=_(f.instances,a,c),I=x.useMemo(()=>new Set(f.instances.filter(r=>r.transparency==="Transparent").map(r=>U(r.calendarObjectId,r.recurrenceId))),[f.instances]);return{calendars:i,events:C,colorByCalendarId:o,timeZoneByCalendarId:a,isLoading:y||f.isLoading,error:f.error,retry:f.refetch,instanceOf:F,freeIds:I}}export{Q as C,$ as R,_ as a,X as b,se as c,ee as r,ne as s,te as t,G as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fb as _,a as C,fc as J,r as d,f as b,g as m,fd as H,fe as V,ff as X,aY as I,s as E,b9 as ee,b7 as te,b8 as ne,fg as ae,cc as w,fh as O,f9 as se,cs as re,fi as oe,fj as ie,fk as ce,fl as de,fm as ue,fn as le,fo as fe,fp as ge}from"./index-BzL5-pGT.js";import{f as A}from"./ErrorState-nA0Ptq3g.js";import{u as B}from"./useQueries-Sm8S3Cgh.js";const x=()=>Intl.DateTimeFormat().resolvedOptions().timeZone,q="";function Ne(e){if(e!==q)return e;const t=x();return Intl.supportedValuesOf("timeZone").includes(t)?t:q}const pe={Cal1:"cal-1",Cal2:"cal-2",Cal3:"cal-3",Cal4:"cal-4",Cal5:"cal-5",Cal6:"cal-6"},me={Local:"local",Explicit:"explicit",Ambiguous:"ambiguous"},K="#";function Ce(e,t){return t===""?e:`${e}${K}${t}`}function R(e){const t=e.indexOf(K);return t===-1?{calendarObjectId:e,recurrenceId:""}:{calendarObjectId:e.slice(0,t),recurrenceId:e.slice(t+1)}}const G=(e,t)=>{const n=[...e].sort((a,s)=>Date.parse(a.start)-Date.parse(s.start));return n.find(a=>Date.parse(a.end)>Date.parse(t))??n[0]};function _e(e,t,n){const a=G(e.filter(s=>{const o=R(s.id);return o.calendarObjectId===t&&o.recurrenceId!==""}),n);return a?R(a.id):void 0}function W(e,t,n,a){const s=G(e.filter(o=>o.calendarObjectId===t&&he(o)).map(o=>ye(o,"",a)),n);if(s)return{...R(s.id),calendarId:s.calendarId,date:s.start.slice(0,10)}}function Ee(e){return{id:e.calendarId,accountId:e.accountConfigId,accountLabel:"",name:e.displayName,color:pe[e.color]??"cal-1",...e.source==="Subscribed"?{readOnly:!0,sync:e.subscriptionEnabled?"live":"paused",syncError:e.subscriptionError}:{}}}function ye(e,t,n){return{id:Ce(e.calendarObjectId,e.recurrenceId),calendarId:e.calendarId,title:e.summary,start:e.allDay?e.start.slice(0,10):_(e.start,n),end:e.allDay?e.end.slice(0,10):_(e.end,n),allDay:e.allDay,location:"",notes:"",attendees:[],myRsvp:"accepted",threadId:"",threadSubject:"",timeZone:t,zoneCertainty:me[e.zoneCertainty]??"explicit",recurrenceRule:e.hasRecurrence?"Repeats":"",seriesId:e.hasRecurrence?e.icalUid:"",seriesException:!1,status:e.status==="Tentative"?"tentative":"confirmed"}}const he=e=>e.status!=="Cancelled";function qe(){const{data:e,isLoading:t,error:n,refetch:a}=C(J());return d.useMemo(()=>{const s=e?.items??[],o=s.map(Ee);return{calendars:o,collections:s,colorByCalendarId:Object.fromEntries(o.map(i=>[i.id,i.color])),timeZoneByCalendarId:Object.fromEntries(s.map(i=>[i.calendarId,i.timezone])),defaultCalendarId:(s.find(i=>i.source==="Default")??s[0])?.calendarId??"",isLoading:t,error:n??null,retry:()=>{a()}}},[e,t,n,a])}const k=E(400,404,412),Se=new Set(["calendarEventOperationsListCalendarEvents","calendarEventDetailOperationsGetCalendarEvent","calendarFreeBusyOperationsListCalendarFreeBusy"]),j={kind:"written"},F=e=>I(e)===412?{kind:"conflict"}:{kind:"refused",message:A(e)},Oe={this:"This",following:"Following",all:"All"};function Z(){const e=b();return d.useCallback(()=>{e.invalidateQueries({predicate:t=>{const n=t.queryKey[0];if(typeof n!="object"||n===null)return!1;const a=n._id;return typeof a=="string"&&Se.has(a)}})},[e])}const Q=({scope:e,recurrenceId:t})=>e===void 0?{}:{scope:Oe[e],recurrenceId:t};function We(){const e=Z(),t=m({...H(),meta:k,onSuccess:e}),n=m({...V(),meta:k,onSuccess:e}),a=m({...X(),meta:k,onSuccess:e}),s=d.useCallback(r=>t.mutateAsync({body:r}).then(u=>({kind:"created",calendarObjectId:u.calendarObjectId})).catch(u=>I(u)===412?{kind:"conflict"}:{kind:"refused",message:A(u)}),[t]),o=d.useCallback((r,u)=>n.mutateAsync({path:{calendarObjectId:r.calendarObjectId},query:{calendarId:r.calendarId,...Q(r)},headers:{"If-Match":r.etag},body:u}).then(()=>j).catch(F),[n]),i=d.useCallback(r=>a.mutateAsync({path:{calendarObjectId:r.calendarObjectId},query:{calendarId:r.calendarId,...Q(r)},headers:{"If-Match":r.etag}}).then(()=>j).catch(F),[a]);return d.useMemo(()=>({createEvent:s,updateEvent:o,deleteEvent:i,isWriting:t.isPending||n.isPending||a.isPending}),[s,o,i,t.isPending,n.isPending,a.isPending])}const M=E(400,404),L={kind:"written"},P=e=>({kind:"refused",message:A(e)});function je(){const e=b(),t=Z(),n=d.useCallback(()=>e.invalidateQueries({queryKey:ee()}),[e]),a=d.useCallback(()=>(t(),n()),[t,n]),s=m({...te(),meta:M,onSuccess:n}),o=m({...ne(),meta:M,onSuccess:a}),i=m({...ae(),meta:M,onSuccess:a}),r=d.useCallback(c=>s.mutateAsync({body:c}).then(()=>L).catch(P),[s]),u=d.useCallback((c,g)=>o.mutateAsync({path:{calendarId:c},body:g}).then(()=>L).catch(P),[o]),f=d.useCallback(c=>i.mutateAsync({path:{calendarId:c}}).then(()=>L).catch(P),[i]);return d.useMemo(()=>({createCalendar:r,updateCalendar:u,deleteCalendar:f,isWriting:s.isPending||o.isPending||i.isPending}),[r,u,f,s.isPending,o.isPending,i.isPending])}const ve=E(404);function Fe(e,t){const{data:n,isLoading:a,error:s,refetch:o}=C({...w({path:{calendarObjectId:e},query:{calendarId:t}}),meta:ve,enabled:e!==""&&t!==""});return{resource:n,isLoading:a,error:s,refetch:()=>{o()}}}const Y=E(400,404),D=5*6e4,T=({from:e,to:t,calendarIds:n})=>({query:n.length===0?{from:e,to:t}:{from:e,to:t,calendarId:[...n]}});function Qe(e){const{data:t,isLoading:n,error:a,refetch:s}=C({...O(T(e)),meta:Y,staleTime:D,enabled:e.enabled??!0});return{instances:t?.items??[],isLoading:n,error:a,refetch:()=>{s()}}}function Ue(e,t,n){const a=B({queries:e.map(c=>({...O(T({...c,calendarIds:t})),meta:Y,staleTime:D,enabled:n}))}),s=e.map(c=>c.from).join("|"),o=a.map(c=>c.data),i=a.map(c=>c.isPending).join("|"),r=a.find(c=>c.error)?.error??null,u=d.useMemo(()=>o.flatMap(c=>c?.items??[]),[s,i]),f=d.useMemo(()=>{const c=new Set;return e.forEach((g,l)=>{a[l]?.isPending&&c.add(g.from)}),c},[s,i]);return{instances:u,pendingWindows:f,error:r,refetch:()=>{for(const c of a)c.error&&c.refetch()}}}function $e(e,t,n,a){const s=b(),o=[...n].join(",");d.useEffect(()=>{if(!a)return;const i=o===""?[]:o.split(",");for(const r of[-1,1]){const u=se(e,re(t,e,r));s.prefetchQuery({...O(T({...u,calendarIds:i})),staleTime:D})}},[s,e,t,o,a])}const be=E(400,404);function we(e){const t=B({queries:e.map(r=>({...oe({query:{from:r.from,to:r.to}}),meta:be,staleTime:D}))}),n=e.map(r=>r.from).join("|"),a=t.map(r=>r.data),s=t.map(r=>r.isPending).join("|"),o=d.useMemo(()=>a.flatMap(r=>r?.items??[]),[n,s]),i=d.useMemo(()=>{const r=new Set;return e.forEach((u,f)=>{t[f]?.isPending&&r.add(u.from)}),r},[n,s]);return{spans:o,pendingWindows:i,error:t.find(r=>r.error)?.error??null,refetch:()=>{for(const r of t)r.error&&r.refetch()}}}const U=365*24*60*6e4,Ie=1440*6e4,$=E(),Ae=E(404),v=e=>new Date(e).toISOString().replace(/\.\d{3}Z$/,"+00:00"),De=e=>{const t=e instanceof Error&&e.message!==""?e.message:"no reason given",n=I(e);return n===void 0?t:`${t} (HTTP ${n})`};function Be(e,t){const[n]=d.useState(()=>Date.now()),a=x(),s=new Date(n).toISOString(),o=C({...O({query:{from:v(n),to:v(n+U),calendarObjectId:e}}),meta:$,retry:!1,enabled:t}),i=o.data?W(o.data.items,e,s,a):void 0,r=C({...w({path:{calendarObjectId:e}}),meta:Ae,retry:!1,enabled:t&&o.data!==void 0&&i===void 0}),u=Date.parse(r.data?.dtStart??""),f=r.data!==void 0&&Number.isNaN(u),c=Number.isNaN(u)?0:u-Ie,g=C({...O({query:{from:v(c),to:v(c+U),calendarObjectId:e}}),meta:$,retry:!1,enabled:t&&r.data!==void 0&&!f}),l=g.data?W(g.data.items,e,s,a):void 0;if(!t)return{kind:"Idle"};if(i)return{kind:"Found",jump:i};if(l)return{kind:"Found",jump:l};const p=I(r.error)===404,N=[o.error,p?null:r.error,g.error].find(z=>z!==null);return N!==void 0?{kind:"Failed",reason:De(N)}:p?{kind:"Deleted"}:f?{kind:"Failed",reason:`the stored event names no readable start (${r.data?.dtStart??""})`}:g.data!==void 0?{kind:"NoOccurrenceFound"}:{kind:"Searching"}}const y=E(400,404),ke=new Set(["calendarSuggestionOperationsListCalendarSuggestions","messageCalendarSuggestionOperationsListMessageCalendarSuggestions","calendarEventOperationsListCalendarEvents","calendarEventDetailOperationsGetCalendarEvent","calendarFreeBusyOperationsListCalendarFreeBusy","filterOperationsListFilters"]),Me=e=>e.invalidateQueries({predicate:t=>{const n=t.queryKey[0];if(typeof n!="object"||n===null)return!1;const a=n._id;return typeof a=="string"&&ke.has(a)}});function xe(e){const{data:t,isLoading:n,error:a}=C({...ie({path:{messageId:e}}),meta:y});return{suggestions:t?.items??[],isLoading:n,error:a??null}}function Ke(){const{data:e,isLoading:t,error:n}=C({...fe({query:{state:"Pending"}}),meta:y});return{suggestions:e?.items??[],isLoading:t,error:n??null}}const Le=async(e,t)=>{let n;do{const{data:a}=await ge({query:{state:"Pending",continuationToken:n},signal:t,throwOnError:!0}),s=a.items.find(o=>o.suggestionId===e);if(s)return s;n=a.continuationToken}while(n);return null};function Ge(e){const{data:t,isLoading:n,error:a}=C({queryKey:[{_id:"calendarSuggestionOperationsListCalendarSuggestions",suggestionId:e}],queryFn:({signal:s})=>Le(e,s),meta:y});return{suggestion:t,isLoading:n,error:a??null}}const h={kind:"answered"},S=e=>({kind:"refused",message:A(e)});function Ze(){const e=b(),t=d.useCallback(()=>Me(e),[e]),n=m({...ce(),meta:y,onSuccess:t}),a=m({...de(),meta:y,onSuccess:t}),s=m({...ue(),meta:y,onSuccess:t}),o=m({...le(),meta:y,onSuccess:t}),i=d.useCallback((l,p)=>n.mutateAsync({path:{suggestionId:l},body:{calendarId:p}}).then(()=>h).catch(S),[n]),r=d.useCallback((l,p)=>n.mutateAsync({path:{suggestionId:l},body:{calendarId:p,answer:"Tentative"}}).then(()=>h).catch(S),[n]),u=d.useCallback((l,p)=>n.mutateAsync({path:{suggestionId:l},body:p}).then(()=>h).catch(S),[n]),f=d.useCallback(l=>a.mutateAsync({path:{suggestionId:l}}).then(()=>h).catch(S),[a]),c=d.useCallback((l,p)=>s.mutateAsync({path:{suggestionId:l},body:{muteSender:p}}).then(()=>h).catch(S),[s]),g=d.useCallback(l=>o.mutateAsync({path:{suggestionId:l}}).then(()=>h).catch(S),[o]);return d.useMemo(()=>({accept:i,tentative:r,acceptEdited:u,decline:f,dismiss:c,reopen:g,isAnswering:n.isPending||a.isPending||s.isPending||o.isPending}),[i,r,u,f,c,g,n.isPending,a.isPending,s.isPending,o.isPending])}export{q as U,Z as a,qe as b,We as c,x as d,Ue as e,we as f,Ce as g,Ke as h,Ze as i,xe as j,Qe as k,he as l,Ne as m,$e as n,Fe as o,Be as p,Ge as q,R as r,_e as s,ye as t,je as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./index-BzL5-pGT.js";import{a as s,D as e}from"./useMediaQuery-7Q3jBluO.js";const i=768,a=t=>t!=="desktop",p=()=>{const t=s(`(min-width: ${i}px)`);return s(e)?"desktop":t?"tablet":"phone"};export{a as i,p as u};
|