@innosolutions/inno-calendar 1.0.34 → 1.0.35
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/dist/agenda-widget-CuQxfYVI.cjs +2 -0
- package/dist/agenda-widget-CuQxfYVI.cjs.map +1 -0
- package/dist/{agenda-widget-BwL7DItQ.js → agenda-widget-CyRPG-1p.js} +1229 -1149
- package/dist/agenda-widget-CyRPG-1p.js.map +1 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/components/inno-calendar.d.ts +8 -2
- package/dist/components/inno-calendar.d.ts.map +1 -1
- package/dist/components/views/day-view.d.ts.map +1 -1
- package/dist/components/views/timeline-view.d.ts.map +1 -1
- package/dist/components/views/week-view.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/types.d.ts +32 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/utils/grid-utils.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.mjs +1 -1
- package/dist/{tailwind-calendar-CE6o8RLM.cjs → tailwind-calendar-BaJAw6io.cjs} +2 -2
- package/dist/{tailwind-calendar-CE6o8RLM.cjs.map → tailwind-calendar-BaJAw6io.cjs.map} +1 -1
- package/dist/{tailwind-calendar-BxW1RSkc.js → tailwind-calendar-D-8ALvNh.js} +2 -2
- package/dist/{tailwind-calendar-BxW1RSkc.js.map → tailwind-calendar-D-8ALvNh.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.mjs +56 -52
- package/dist/utils.mjs.map +1 -1
- package/dist/{week-view-jpcXSE6k.js → week-view-5nw-Hvod.js} +242 -232
- package/dist/{week-view-jpcXSE6k.js.map → week-view-5nw-Hvod.js.map} +1 -1
- package/dist/{week-view-DT8XnNbp.cjs → week-view-C0iWG7_6.cjs} +3 -3
- package/dist/{week-view-DT8XnNbp.cjs.map → week-view-C0iWG7_6.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/agenda-widget-B8blZmlr.cjs +0 -2
- package/dist/agenda-widget-B8blZmlr.cjs.map +0 -1
- package/dist/agenda-widget-BwL7DItQ.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),re=require("./use-calendar-DR89bZu5.cjs"),v=require("react"),x=require("./index-D2U2F80P.cjs"),g=require("./week-view-C0iWG7_6.cjs"),ze=require("./slot-selection-context-Bx3FKJfR.cjs"),P=require("./utils.cjs");function Ae({view:t,className:s=""}){return e.jsx("div",{className:s,style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"400px",backgroundColor:"#f9fafb",borderRadius:"0.5rem",border:"1px dashed #d1d5db"},children:e.jsxs("div",{style:{textAlign:"center",color:"#6b7280"},children:[e.jsxs("p",{style:{fontSize:"1.125rem",fontWeight:500},children:[t.charAt(0).toUpperCase()+t.slice(1)," View"]}),e.jsx("p",{style:{fontSize:"0.875rem"},children:"Implementation pending"})]})})}function pe({view:t,className:s}){return e.jsx(Ae,{view:t,className:s})}function Be(t){const{events:s,resources:n,scheduleTypes:r,initialView:o="week",initialDate:i,initialFilters:f,preferences:m,locale:l,slots:d,renderEvent:w,onViewChange:C,onDateChange:E,onEventClick:W,onSlotSelect:H,onFiltersChange:N,className:p,children:D}=t,k=re.useOptionalCalendarContext();if(k)return e.jsx("div",{className:p,style:{position:"relative"},children:D??e.jsx(pe,{view:k.view,className:p})});const T=re.useCalendar({events:s,resources:n,scheduleTypes:r,initialView:o,initialDate:i,initialFilters:f,preferences:m,locale:l,onViewChange:C,onDateChange:E,onEventClick:W,onSlotSelect:H,onFiltersChange:N});return e.jsx(re.CalendarProvider,{value:T,children:e.jsx("div",{className:p,style:{position:"relative"},children:D??e.jsx(pe,{view:T.view,className:p})})})}function Pe({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}),e.jsx("path",{d:"m15 5 4 4"})]})}function He({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M3 6h18"}),e.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),e.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}),e.jsx("line",{x1:"10",x2:"10",y1:"11",y2:"17"}),e.jsx("line",{x1:"14",x2:"14",y1:"11",y2:"17"})]})}function le({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})}function Re({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m4.9 4.9 14.2 14.2"})]})}function ie({className:t}){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:e.jsx("path",{d:"M20 6 9 17l-5-5"})})}function Oe({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]})}function _e({className:t}){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:e.jsx("path",{d:"m6 9 6 6 6-6"})})}function $e({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"9",cy:"7",r:"4"}),e.jsx("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),e.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}function Ve({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("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"}),e.jsx("circle",{cx:"12",cy:"10",r:"3"})]})}function Ue({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M8 2v4"}),e.jsx("path",{d:"M16 2v4"}),e.jsx("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),e.jsx("path",{d:"M3 10h18"})]})}function Ye({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),e.jsx("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),e.jsx("path",{d:"M10 9H8"}),e.jsx("path",{d:"M16 13H8"}),e.jsx("path",{d:"M16 17H8"})]})}function ne({className:t}){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:x.cn("animate-spin",t),children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}const Ge={edit:"Edit",delete:"Delete",cancel:"Cancel Event",close:"Close",going:"Going",notGoing:"Not Going",confirmMeeting:"Confirm meeting took place",completed:"Completed",canceled:"Canceled",participants:"Participants",guest:"guest",guests:"guests",confirmed:"confirmed",organizer:"Organizer",client:"Client",more:"more",noDateProvided:"No date provided",eventNotFound:"Event not found",cancellationNote:"Cancellation Note",canceledOn:"Canceled on",acceptThisEvent:"Accept this event only",acceptAllEvents:"Accept all events",deleteConfirmTitle:"Delete Event",deleteConfirmDescription:"Are you sure you want to delete this event? This action cannot be undone."},ae=v.forwardRef(({onClick:t,label:s,children:n,className:r,variant:o="ghost",...i},f)=>e.jsxs(g.Tooltip,{children:[e.jsx(g.TooltipTrigger,{asChild:!0,children:e.jsx("button",{type:"button",ref:f,onClick:t,className:x.cn("h-8 w-8 rounded-full flex items-center justify-center transition-colors",o==="ghost"&&"hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",o==="destructive"&&"hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",r),"aria-label":s,...i,children:n})}),e.jsx(g.TooltipContent,{side:"bottom",className:"text-xs",children:s})]}));ae.displayName="IconButton";function qe({src:t,alt:s,initials:n,className:r,isClient:o}){const[i,f]=v.useState(!1);return e.jsx("div",{className:x.cn("relative h-7 w-7 rounded-full overflow-hidden shrink-0",r),children:t&&!i?e.jsx("img",{src:t,alt:s,className:"h-full w-full object-cover",onError:()=>f(!0)}):e.jsx("div",{className:x.cn("h-full w-full flex items-center justify-center text-[10px] font-medium",o?"bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300":"bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-300"),children:n})})}function je({participant:t,isEventCanceled:s=!1,labels:n}){const r=t.name||"Unknown",o=r.split(" ").map(E=>E[0]).join("").toUpperCase().slice(0,2),i=t.isOrganizer??!1,f=t.isConfirmed,m=f===!0,l=f===!1,d=t.isClient??!1,w=t.profilePicture||t.avatar,C=s;return e.jsxs("div",{className:x.cn("flex items-center gap-3 py-0",C&&"opacity-60"),children:[e.jsxs("div",{className:"relative",children:[e.jsx(qe,{src:w,alt:r,initials:o,isClient:d,className:x.cn(C&&"grayscale")}),C||l?e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center",children:e.jsx("div",{className:"h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center",children:e.jsx(le,{className:"h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]"})})}):m?e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center",children:e.jsx("div",{className:"h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center",children:e.jsx(ie,{className:"h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]"})})}):null]}),e.jsxs("div",{className:"!h-fit min-w-0 gap-0",children:[e.jsx("div",{className:"gap-0",children:e.jsx("span",{className:x.cn("text-sm text-zinc-900 dark:text-zinc-100 truncate",C&&"line-through text-zinc-500 dark:text-zinc-500"),children:r})}),d&&e.jsx("div",{className:"text-[10px] px-1.5 w-fit py-0.5 rounded bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 font-medium",children:n.client}),i&&!C&&e.jsx("div",{className:"text-xs text-zinc-500",children:n.organizer})]})]})}function Ke({open:t,onOpenChange:s,title:n,children:r}){return v.useEffect(()=>{if(!t)return;const o=i=>{i.key==="Escape"&&s(!1)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[t,s]),v.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),t?e.jsxs("div",{className:"fixed inset-0 z-50",children:[e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>s(!1),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&s(!1)}}),e.jsx("div",{className:"fixed inset-x-4 top-[50%] translate-y-[-50%] max-w-md mx-auto",children:e.jsxs("div",{className:"bg-white dark:bg-zinc-900 rounded-2xl shadow-xl overflow-hidden",children:[n&&e.jsx("div",{className:"sr-only",children:n}),r]})})]}):null}function Je({open:t,onOpenChange:s,title:n,description:r,cancelLabel:o,confirmLabel:i,onConfirm:f,isLoading:m}){return t?e.jsxs("div",{className:"fixed inset-0 z-[60]",children:[e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>s(!1),onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&s(!1)}}),e.jsx("div",{className:"fixed inset-x-4 top-[50%] translate-y-[-50%] max-w-md mx-auto",children:e.jsxs("div",{className:"bg-white dark:bg-zinc-900 rounded-lg shadow-xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:n}),e.jsx("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:r}),e.jsxs("div",{className:"mt-4 flex justify-end gap-3",children:[e.jsx(g.Button,{variant:"outline",size:"sm",onClick:()=>s(!1),children:o}),e.jsxs(g.Button,{variant:"destructive",size:"sm",onClick:f,disabled:m,children:[m&&e.jsx(ne,{className:"h-4 w-4 mr-2"}),e.jsx(He,{className:"h-4 w-4 mr-2"}),i]})]})]})})]}):null}function Xe(t,s){return t.toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric"})}function Qe(t,s){const n={hour:"2-digit",minute:"2-digit",hour12:!1};return`${t.toLocaleTimeString(void 0,n)} – ${s.toLocaleTimeString(void 0,n)}`}function Ze(t){return t.toLocaleDateString(void 0,{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})}function et(t){const[s,n]=v.useState(()=>typeof window<"u"?window.matchMedia(t).matches:!1);return v.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia(t),o=i=>n(i.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[t]),s}function ve({event:t,labels:s,isLoading:n,onClose:r,onEdit:o,onDelete:i,onCancel:f,onAccept:m,onDecline:l,onConfirmMeeting:d,canEdit:w=!0,canDelete:C=!1,canCancel:E=!0,isCurrentUserParticipant:W=!1,isCurrentUserClient:H=!1,currentUserAcceptStatus:N,isAcceptLoading:p=!1,isDeclineLoading:D=!1,isConfirmLoading:k=!1,isDeleteLoading:T=!1,renderParticipant:I,renderHeaderActions:q,renderCancelReason:V,renderDeleteConfirmation:R,formatDate:A=Xe,formatTimeRange:$=Qe}){const[O,B]=v.useState(!1),Y=!(t.isCanceled||t.meetingTookPlace),h=t.isRecurring??!1,a=t.participantDetails,u=t.participantsNames||[],j=a&&a.length>0,b=N===!0,y=N===!1,z=W&&!H&&Y,M=j?a.filter(L=>L.isConfirmed).length:t.isAccepted?u.length:0,_=j?a.length:u.length,X=t.scheduleTypeColor||t.hexColor||"#039BE5",K=v.useCallback(()=>t.startDate?A(t.startDate):s.noDateProvided,[t.startDate,A,s.noDateProvided]),J=v.useCallback(()=>t.startDate&&t.endDate?$(t.startDate,t.endDate):null,[t.startDate,t.endDate,$]),se=()=>{r(),o?.(t)},c=()=>{r(),f?.(t)},S=()=>{B(!0)},F=()=>{i?.(t),B(!1)};return n?e.jsx("div",{className:"flex h-48 items-center justify-center",children:e.jsx(ne,{className:"h-6 w-6 text-zinc-400"})}):e.jsxs(g.TooltipProvider,{delayDuration:300,children:[e.jsxs("div",{className:"flex flex-col gap-0.5 p-3",children:[e.jsx("div",{className:"flex items-start justify-end gap-0.5",children:q?q({onClose:r}):e.jsxs(e.Fragment,{children:[Y&&w&&o&&e.jsx(ae,{onClick:se,label:s.edit,children:e.jsx(Pe,{className:"h-[18px] w-[18px]"})}),Y&&E&&f&&e.jsx(ae,{onClick:c,label:s.cancel,children:e.jsx(Re,{className:"h-[18px] w-[18px]"})}),C&&i&&e.jsx(ae,{onClick:S,label:s.delete,variant:"destructive",children:e.jsx(He,{className:"h-[18px] w-[18px]"})}),e.jsx(ae,{onClick:r,label:s.close,children:e.jsx(le,{className:"h-[18px] w-[18px]"})})]})}),e.jsx("div",{children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded mt-1 shrink-0",style:{backgroundColor:X}}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h2",{className:x.cn("text-[22px] font-normal text-zinc-900 dark:text-zinc-100 leading-tight",t.isCanceled&&"line-through opacity-60"),children:t.title}),t.meetingTookPlace&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 text-xs font-medium",children:[e.jsx(Oe,{className:"h-3 w-3"}),s.completed]}),t.isCanceled&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400 text-xs font-medium",children:[e.jsx(le,{className:"h-3 w-3"}),s.canceled]})]}),e.jsxs("div",{className:"mt-1 text-sm text-zinc-600 dark:text-zinc-400",children:[e.jsx("span",{children:K()}),J()&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-1.5",children:"·"}),e.jsx("span",{children:J()})]})]}),h&&t.recurrenceSummary&&e.jsx("div",{className:"text-sm text-zinc-500 dark:text-zinc-500",children:t.recurrenceSummary})]})]})}),t.isCanceled&&e.jsx("div",{className:"mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30",children:V?V(t):e.jsx("div",{className:"flex items-start gap-0",children:e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-red-700 dark:text-red-400",children:s.cancellationNote}),t.cancelReason&&e.jsxs("div",{className:"mt-1 text-sm text-red-600/80 dark:text-red-400/80 italic",children:['"',t.cancelReason,'"']}),t.canceledDate&&e.jsxs("div",{className:"mt-1.5 text-xs text-red-500/70 dark:text-red-400/60",children:[s.canceledOn," ",Ze(t.canceledDate)]})]})})}),e.jsxs("div",{className:"space-y-0.5",children:[t.address&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Ve,{className:"h-5 w-5 text-zinc-400 mt-0.5 shrink-0"}),e.jsx("span",{className:"text-sm text-zinc-700 dark:text-zinc-300",children:t.address})]}),(j||u.length>0)&&e.jsxs("div",{className:"flex items-start gap-2 py-0",children:[e.jsx($e,{className:"h-5 w-5 text-zinc-400 mt-0.5 shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-0",children:[e.jsxs("span",{className:"text-sm text-zinc-900 dark:text-zinc-100 font-medium",children:[_," ",_!==1?s.guests:s.guest]}),_>0&&e.jsxs("span",{className:"text-xs text-zinc-500",children:["(",M," ",s.confirmed,")"]})]}),e.jsxs("div",{className:"mt-2 space-y-2",children:[j?a.slice(0,6).map((L,U)=>I?I(L,U):e.jsx(je,{participant:L,isEventCanceled:t.isCanceled,labels:s},L.id)):u.slice(0,6).map((L,U)=>{const Q={id:String(U),name:L,email:"",isConfirmed:t.isAccepted,isOrganizer:U===0,isClient:!1};return I?I(Q,U):e.jsx(je,{participant:Q,isEventCanceled:t.isCanceled,labels:s},L)}),_>6&&e.jsxs("div",{className:"text-xs text-zinc-500 py-1.5 pl-10",children:["+",_-6," ",s.more]})]})]})]}),t.description&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Ye,{className:"h-5 w-5 text-zinc-400 mt-0.5 shrink-0"}),e.jsx("p",{className:"text-sm text-zinc-700 dark:text-zinc-300 whitespace-pre-wrap",children:t.description})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Ue,{className:"h-5 w-5 text-zinc-400 mt-0.5 shrink-0"}),e.jsx("div",{className:"text-sm text-zinc-700 dark:text-zinc-300",children:j&&a.find(L=>L.isOrganizer)?.name||u[0]||"Calendar"})]})]}),z&&m&&l&&e.jsx("div",{className:"border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[h?e.jsxs(g.DropdownMenu,{children:[e.jsx(g.DropdownMenuTrigger,{asChild:!0,children:e.jsxs("div",{className:"flex",children:[e.jsx(g.Button,{size:"sm",variant:"outline",className:x.cn("rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",b&&"!bg-green-700 !text-white hover:!bg-green-700"),onClick:L=>{L.stopPropagation(),b||m(t)},disabled:p,children:p?e.jsx(ne,{className:"h-3.5 w-3.5"}):e.jsxs(e.Fragment,{children:[b&&e.jsx(ie,{className:"h-3.5 w-3.5"}),s.going]})}),e.jsx(g.Button,{size:"sm",variant:"outline",className:x.cn("rounded-l-none px-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",b&&"!bg-green-700 !text-white hover:!bg-green-700"),children:e.jsx(_e,{className:"h-3.5 w-3.5"})})]})}),e.jsxs(g.DropdownMenuContent,{align:"start",children:[e.jsxs(g.DropdownMenuItem,{className:x.cn("gap-1.5 h-8 !border-none !bg-green-50 text-green-800 hover:!bg-green-100",b&&"!bg-green-700 !text-white hover:!bg-green-700"),onClick:()=>m(t),children:[e.jsx(ie,{className:"h-3.5 w-3.5 mr-2 text-green-600"}),s.acceptThisEvent]}),e.jsxs(g.DropdownMenuItem,{onClick:()=>m(t),children:[e.jsx(ie,{className:"h-3.5 w-3.5 mr-2 text-green-600"}),s.acceptAllEvents]})]})]}):e.jsx(g.Button,{size:"sm",variant:"outline",className:x.cn("gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",b&&"!bg-green-700 !text-white hover:!bg-green-700"),onClick:()=>{b||m(t)},disabled:p,children:p?e.jsx(ne,{className:"h-3.5 w-3.5"}):e.jsxs(e.Fragment,{children:[b&&e.jsx(ie,{className:"h-3.5 w-3.5"}),s.going]})}),e.jsx(g.Button,{size:"sm",variant:"outline",className:x.cn("gap-1.5 h-8 !border-none !bg-rose-100 text-rose-800 hover:!bg-rose-200",y&&"!bg-rose-700 !text-white hover:!bg-rose-700"),onClick:()=>{y||l(t)},disabled:D,children:D?e.jsx(ne,{className:"h-3.5 w-3.5"}):e.jsxs(e.Fragment,{children:[y&&e.jsx(le,{className:"h-3.5 w-3.5"}),s.notGoing]})})]})}),W&&b&&!t.meetingTookPlace&&!t.isCanceled&&d&&e.jsx("div",{className:"border-t border-zinc-100 dark:border-zinc-800 py-3",children:e.jsxs(g.Button,{size:"sm",variant:"outline",className:"w-full h-9 hover:!bg-green-100 hover:text-green-700 text-green-700 !bg-green-100 !border-none dark:text-green-400 dark:hover:bg-green-950/30",onClick:()=>d(t),disabled:k,children:[k&&e.jsx(ne,{className:"h-4 w-4 mr-2"}),s.confirmMeeting]})})]}),R?O&&R({onConfirm:F,onCancel:()=>B(!1),isLoading:T}):e.jsx(Je,{open:O,onOpenChange:B,title:s.deleteConfirmTitle,description:s.deleteConfirmDescription,cancelLabel:s.cancel,confirmLabel:s.delete,onConfirm:F,isLoading:T})]})}function tt({event:t,children:s,open:n,onOpenChange:r,isLoading:o,labels:i,onEdit:f,onDelete:m,onCancel:l,onAccept:d,onDecline:w,onConfirmMeeting:C,canEdit:E=!0,canDelete:W=!1,canCancel:H=!0,isCurrentUserParticipant:N,isCurrentUserClient:p,currentUserAcceptStatus:D,isAcceptLoading:k,isDeclineLoading:T,isConfirmLoading:I,isDeleteLoading:q,renderParticipant:V,renderHeaderActions:R,renderCancelReason:A,renderDeleteConfirmation:$,formatDate:O,formatTimeRange:B,className:Y,width:h=360}){const a=et("(min-width: 768px)"),u={...Ge,...i},j=v.useCallback(()=>{r?.(!1)},[r]),b={event:t,labels:u,isLoading:o,onClose:j,onEdit:f,onDelete:m,onCancel:l,onAccept:d,onDecline:w,onConfirmMeeting:C,canEdit:E,canDelete:W,canCancel:H,isCurrentUserParticipant:N,isCurrentUserClient:p,currentUserAcceptStatus:D,isAcceptLoading:k,isDeclineLoading:T,isConfirmLoading:I,isDeleteLoading:q,renderParticipant:V,renderHeaderActions:R,renderCancelReason:A,renderDeleteConfirmation:$,formatDate:O,formatTimeRange:B};return a?e.jsxs(g.Popover,{open:n??!1,onOpenChange:r??(()=>{}),children:[e.jsx(g.PopoverTrigger,{asChild:!0,children:s}),e.jsx(g.PopoverContent,{className:x.cn("p-0 shadow-lg !rounded-2xl bg-white dark:bg-zinc-900 overflow-hidden border z-50",Y),style:{width:h},align:"center",side:"bottom",sideOffset:4,children:e.jsx(ve,{...b})})]}):e.jsxs(e.Fragment,{children:[s,e.jsx(Ke,{open:n??!1,onOpenChange:r??(()=>{}),title:t.title,children:e.jsx(ve,{...b})})]})}const xe=44,we=4,st=56,be=8,he=80,oe=140,ye=100,ke=2,nt=8,rt=18;function ot(t){return t.split(" ").map(s=>s[0]).join("").toUpperCase().slice(0,2)}function it(t,s){const n=[];for(let r=0;r<s;r++){const o=new Date(t);o.setDate(o.getDate()+r),n.push(o)}return n}function at(t,s,n){const r=[];return t.forEach((o,i)=>{for(let f=s;f<n;f++)r.push({hour:f,dayIndex:i,date:o})}),r}function lt(t){return`${t.toString().padStart(2,"0")}:00`}function ct(t){return t.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})}function Ne(t){const s=[...t].sort((o,i)=>o.startCol!==i.startCol?o.startCol-i.startCol:i.spanCols-o.spanCols),n=[],r=[];for(const o of s){let i=0;for(;r[i]!==void 0&&r[i]>o.startCol;)i++;r[i]=o.startCol+o.spanCols,n.push({...o,stackIndex:i})}return n}function dt({src:t,alt:s,fallback:n,className:r}){return e.jsx("div",{className:x.cn("relative flex shrink-0 overflow-hidden rounded-sm border bg-muted",r),children:t?e.jsx("img",{src:t,alt:s,className:"aspect-square h-full w-full object-cover"}):e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-muted text-muted-foreground",children:n})})}const ut=7;function ce({daysToShow:t=ut,events:s,users:n=[],selectedDate:r,onDateChange:o,onEventClick:i,visibleHours:f,className:m,getEventUserId:l,renderPopover:d,slots:w,classNames:C}){const E=v.useRef(null),W=r??new Date,H=!0,N=f?.from??nt,p=f?.to??rt,D=p-N,k=v.useMemo(()=>{const a=new Date(W);if(t===1||t===3)return a.setHours(0,0,0,0),a;const u=a.getDay(),j=u===0?-6:1-u;return a.setDate(a.getDate()+j),a.setHours(0,0,0,0),a},[W,t]),T=v.useMemo(()=>it(k,t),[k,t]),I=v.useMemo(()=>at(T,N,p),[H,T,N,p]),V=l??(a=>{const u=a.data;if(u?.userId)return String(u.userId);if(u?.user&&typeof u.user=="object"&&u.user.id)return String(u.user.id);if(a.user?.id)return a.user.id;if(a.participants?.[0]?.id)return a.participants[0].id}),R=v.useMemo(()=>{const a=new Map;for(const u of n)a.set(u.id,{id:u.id,name:u.name,avatar:u.avatar??void 0,email:u.email});for(const u of s){const b=u.data?.user;b?.id&&!a.has(b.id)&&a.set(b.id,{id:b.id,name:b.name??"",avatar:b.avatar??void 0,email:b.email}),u.user?.id&&!a.has(u.user.id)&&a.set(u.user.id,{id:u.user.id,name:u.user.name,avatar:u.user.avatar??void 0,email:u.user.email});for(const y of u.participants||[])y.id&&!a.has(y.id)&&a.set(y.id,{id:y.id,name:y.name,avatar:y.avatar??void 0,email:y.email})}return Array.from(a.values())},[n,s]),A=v.useMemo(()=>{const a=[],u=new Map;for(const y of R)u.set(y.id,[]);u.set("unassigned",[]);for(const y of s){const z=V(y)??"unassigned";(u.get(z)??u.get("unassigned")).push(y)}const j=y=>{const z=[];for(const M of y){const _=M.startDate.getHours()+M.startDate.getMinutes()/60,X=M.endDate.getHours()+M.endDate.getMinutes()/60;for(let K=0;K<T.length;K++){const J=T[K],se=P.startOfDay(J),c=P.endOfDay(J);if(M.startDate<=c&&M.endDate>=se){let S=N,F=p;if(M.startDate>=se&&(S=Math.max(N,_)),M.endDate<=c&&(F=Math.min(p,X)),S=Math.max(N,Math.min(p,S)),F=Math.max(N,Math.min(p,F)),F>S){const L=K*D+Math.floor(S-N),U=K*D+Math.ceil(F-N);z.push({event:M,startCol:L,spanCols:Math.max(1,U-L)})}}}}return z};for(const y of R){const z=u.get(y.id)??[],M=j(z),_=Ne(M),X=_.reduce((K,J)=>Math.max(K,J.stackIndex+1),0);a.push({user:y,events:_,maxStack:Math.max(X,1)})}const b=u.get("unassigned")??[];if(b.length>0){const y=j(b),z=Ne(y),M=z.reduce((_,X)=>Math.max(_,X.stackIndex+1),0);a.push({user:{id:"unassigned",name:"Unassigned",avatar:void 0,email:void 0},events:z,maxStack:Math.max(M,1)})}return a.filter(y=>y.events.length>0)},[R,s,T,H,D,N,p,V]),$=v.useMemo(()=>{const a=new Map;for(const u of A)for(const j of u.events)if(j.spanCols===1){const b=a.get(j.startCol)??0;a.set(j.startCol,b+1)}return a},[A]),O=v.useMemo(()=>{const a=I.length,u=he,j=[];for(let b=0;b<a;b++){const y=$.get(b)??0;y>ke?j.push(ye+(y-ke)*20):y>0?j.push(Math.max(u,ye)):j.push(u)}return j},[H,I.length,T.length,$]),B=a=>Math.max(st,a*(xe+we)+be*2),Y=oe+O.reduce((a,u)=>a+u,0),h=v.useMemo(()=>{const a=[0];for(let u=0;u<O.length;u++)a.push(a[u]+O[u]);return a},[O]);return v.useLayoutEffect(()=>{const a=E.current;if(!a)return;const u=()=>{let j=-1;const y=new Date().getHours();{for(let z=0;z<I.length;z++){const M=I[z];if(M&&P.isToday(M.date)&&M.hour<=y&&M.hour+1>y){j=z;break}}if(j===-1)for(let z=0;z<I.length;z++){const M=I[z];if(M&&P.isToday(M.date)){j=z;break}}}if(j!==-1){const z=(h[j]??0)+oe,M=a.clientWidth,_=Math.max(0,z-M/3);a.scrollTo({left:_,behavior:"instant"})}};requestAnimationFrame(()=>{requestAnimationFrame(u)})},[W,I,T,h,H]),e.jsx("div",{className:x.cn("flex h-full flex-col",m),children:e.jsx("div",{className:"ic-timeline-scroll-container flex-1",ref:E,children:e.jsxs("div",{className:"relative",style:{minWidth:Y},children:[e.jsx("div",{className:"ic-timeline-header sticky top-0 z-20 border-b bg-background",children:e.jsxs("div",{className:"flex flex-col",children:[t>1&&e.jsxs("div",{className:"flex border-b",children:[e.jsx("div",{className:"flex shrink-0 items-center border-r bg-background px-2 py-1",style:{width:oe},children:e.jsx("span",{className:"text-[10px] font-medium uppercase text-muted-foreground",children:"Resources"})}),T.map((a,u)=>{const j=P.isToday(a),b=u*D,y=O.slice(b,b+D).reduce((z,M)=>z+M,0);return e.jsx("div",{className:x.cn("flex shrink-0 items-center justify-center border-r py-1.5 font-medium",j?"bg-primary/10 text-primary":"bg-muted/30"),style:{width:y},children:e.jsx("span",{className:"text-xs",children:ct(a)})},`day-${a.toISOString()}`)})]}),e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:x.cn("flex shrink-0 items-center border-r bg-background px-2 py-2",t>1&&"sticky left-0 z-10"),style:{width:oe},children:t===1&&e.jsx("span",{className:"text-[10px] font-medium uppercase text-muted-foreground",children:"Resources"})}),I.map((a,u)=>{const j=a.hour===N,b=P.isToday(a.date),y=O[u]??he;return e.jsx("div",{className:x.cn("flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",j&&u>0?"border-l-2 border-l-border":"border-r border-r-border/50",b&&"bg-primary/5"),style:{width:y},children:lt(a.hour)},`hour-${a.dayIndex}-${a.hour}`)})]})]})}),A.map(a=>{const u=B(a.maxStack);return e.jsxs("div",{className:x.cn("relative flex border-b",C?.resourceRow),style:{height:u},children:[e.jsx("div",{className:"sticky left-0 z-10",style:{width:oe},children:e.jsxs("div",{className:x.cn("flex h-full items-center gap-2 sm:gap-3 border-r bg-background px-2 sm:px-4",C?.resourceHeader),children:[e.jsx(dt,{className:"size-7",src:a.user.avatar,alt:a.user.name,fallback:ot(a.user.name)}),e.jsx("span",{className:"truncate text-xs sm:text-sm font-medium",children:a.user.name})]})}),e.jsxs("div",{className:"relative flex",children:[I.map((j,b)=>{const y=j.hour===N&&b>0,z=O[b]??he;return e.jsx("div",{className:x.cn("shrink-0",y?"border-l-2 border-l-border":"border-r border-r-border/50",P.isToday(j.date)&&"bg-primary/5"),style:{width:z}},`cell-${j.dayIndex}-${j.hour}`)}),a.events.map(j=>{const b=(h[j.startCol]??0)+2,y=h[j.startCol+j.spanCols]??h[h.length-1]??0,z=h[j.startCol]??0,M=y-z-4,_=be+j.stackIndex*(xe+we);return e.jsx("div",{className:"absolute",style:{left:b,width:Math.max(M,0),top:_,height:xe},children:e.jsx(g.EventCard,{event:j.event,variant:"compact",onClick:i,renderPopover:d,className:x.cn("h-full w-full",C?.eventCardCompact)})},j.event.id)})]})]},a.user.id)}),A.length===0&&e.jsx("div",{className:"flex items-center justify-center py-20 text-muted-foreground",children:"No users or events to display"})]})})})}const xt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ht=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ce(t){const s=t.hexColor;return s?{backgroundColor:s}:{}}function mt({day:t,date:s,events:n,isCurrentMonth:r,onDayClick:o}){const i=P.isToday(s),f=3,m=n.length;return e.jsxs("button",{type:"button",onClick:()=>o?.(s),className:x.cn("flex h-9 sm:h-11 flex-1 flex-col items-center justify-start gap-0.5 rounded-md pt-0.5 sm:pt-1","hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","transition-colors",!r&&"opacity-40"),children:[e.jsx("div",{className:x.cn("flex size-5 sm:size-6 items-center justify-center rounded-full text-[10px] sm:text-xs font-medium",i&&"bg-primary font-semibold text-primary-foreground"),children:t}),m>0&&e.jsx("div",{className:"mt-0.5 flex items-center gap-0.5",children:m<=f?n.map(l=>e.jsx("div",{className:"size-1 sm:size-1.5 rounded-full bg-primary",style:Ce(l)},l.id)):e.jsxs(e.Fragment,{children:[n.slice(0,f).map(l=>e.jsx("div",{className:"size-1 sm:size-1.5 rounded-full bg-primary",style:Ce(l)},l.id)),e.jsxs("span",{className:"text-[6px] sm:text-[7px] font-medium text-muted-foreground",children:["+",m-f]})]})})]})}function ft({date:t,events:s,onMonthClick:n,onDayClick:r}){const o=v.useMemo(()=>P.generateMonthGrid(t,0),[t]);return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("button",{type:"button",onClick:()=>n?.(t),className:x.cn("w-full rounded-t-lg border px-2 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm font-semibold","hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","transition-colors"),children:ht[t.getMonth()]}),e.jsxs("div",{className:"flex-1 space-y-1.5 sm:space-y-2 rounded-b-lg border border-t-0 p-2 sm:p-3",children:[e.jsx("div",{className:"grid grid-cols-7 gap-x-0.5 text-center",children:xt.map((i,f)=>e.jsxs("div",{className:"text-[9px] sm:text-xs font-medium text-muted-foreground",children:[e.jsx("span",{className:"sm:hidden",children:i[0]}),e.jsx("span",{className:"hidden sm:inline",children:i})]},f))}),e.jsx("div",{className:"grid grid-cols-7 gap-x-0.5 gap-y-1",children:o.map((i,f)=>{const m=P.getEventsForDay(s,i.date);return e.jsx(mt,{day:i.date.getDate(),date:i.date,events:m,isCurrentMonth:i.isCurrentMonth,onDayClick:r},`${f+1}-${i.date.toISOString()}`)})})]})]})}function Le({events:t,year:s,onMonthClick:n,onDayClick:r,className:o,slots:i,classNames:f}){const m=v.useMemo(()=>P.getYearMonths(s),[s]);return e.jsxs("div",{className:x.cn("flex flex-col h-full",o),children:[e.jsx("div",{className:"flex items-center justify-center border-b px-4 py-3",children:e.jsx("h2",{className:"text-lg font-semibold",children:s})}),e.jsx("div",{className:"flex-1 overflow-auto p-4",children:e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:m.map(l=>e.jsx(ft,{date:l,events:t,onMonthClick:n,onDayClick:r},l.getMonth()))})})]})}function gt(t){switch(t){case"day":case"week":return"time";default:return"day"}}function pt({onEventClick:t,onSlotClick:s,onSlotSelect:n,onAddEvent:r,className:o,showHeader:i=!0,minSelectionMinutes:f=30,showMoreEventsInPopover:m=!1,isLoading:l=!1,slots:d,classNames:w,settingsContent:C,filterContent:E,headerActions:W,renderPopover:H,calendarRef:N}){const{view:p,setView:D,selectedDate:k,setSelectedDate:T,slotDuration:I,filteredEvents:q,users:V,visibleHours:R,workingHours:A,badgeVariant:$,showWorkingHoursOnly:O}=re.useInnoCalendar(),B=v.useMemo(()=>{if(!O||!A)return{startHour:R.start,endHour:R.end};let c=24,S=0;for(const F of Object.keys(A)){const L=A[Number(F)];!L||L.enabled===!1||(L.from<c&&(c=L.from),L.to>S&&(S=L.to))}return c>=S?{startHour:R.start,endHour:R.end}:{startHour:c,endHour:S}},[O,A,R]),Y=B,h=v.useRef(null);v.useImperativeHandle(N,()=>({scrollToToday:()=>{const c=new Date;T(c,p),requestAnimationFrame(()=>{requestAnimationFrame(()=>{const S=h.current?.querySelector(".ic-timeline-scroll-container, [class*='overflow-auto']");if(!S)return;const U=(c.getHours()-B.startHour)*96;U>0&&S.scrollTo({top:Math.max(0,U-100),behavior:"smooth"})})})},scrollToWorkingHours:()=>{let c=8;if(A)for(const S of Object.keys(A)){const F=A[Number(S)];F?.enabled&&F.from<c&&(c=Math.max(F.from-1,0))}requestAnimationFrame(()=>{requestAnimationFrame(()=>{const S=h.current?.querySelector(".ic-timeline-scroll-container, [class*='overflow-auto']");if(!S)return;const L=(c-B.startHour)*96;S.scrollTo({top:Math.max(0,L),behavior:"smooth"})})})},getViewRect:()=>h.current?.getBoundingClientRect()??null}),[T,p,B,A]);const a=v.useMemo(()=>gt(p),[p]),u=v.useCallback(c=>{if(n){n(c);return}if(s){const S=c.startDate.getHours();s(c.startDate,S)}},[n,s]),j=v.useCallback(c=>{D("day"),T(c,"day")},[T,D]),b=v.useCallback(c=>{D("month"),T(c,"month")},[T,D]),y=v.useCallback(c=>{t?.(c)},[t]),z=()=>{const c=q,S=y,F=H;switch(p){case"day":return e.jsx(g.DayView,{events:c,date:k,visibleHours:Y,workingHours:A,slotDuration:I,badgeVariant:$,onEventClick:S,renderPopover:F,...d&&{slots:d},...w&&{classNames:w}});case"week":return e.jsx(g.WeekView,{events:c,date:k,visibleHours:Y,workingHours:A,slotDuration:I,badgeVariant:$,onEventClick:S,renderPopover:F,...d&&{slots:d},...w&&{classNames:w}});case"month":return e.jsx(g.MonthView,{events:c,date:k,badgeVariant:$,onEventClick:S,onDayClick:j,renderPopover:F,showMoreEventsInPopover:m,...d&&{slots:d},...w&&{classNames:w}});case"year":return e.jsx(Le,{events:c,year:k.getFullYear(),onMonthClick:b,onDayClick:j,...d&&{slots:d},...w&&{classNames:w}});case"agenda":return e.jsx(g.AgendaView,{events:c,date:k,onEventClick:S,renderPopover:F,...d&&{slots:d},...w&&{classNames:w}});case"timeline-day":return e.jsx(ce,{daysToShow:1,events:c,users:V,selectedDate:k,visibleHours:{from:B.startHour,to:B.endHour},onEventClick:S,renderPopover:F,...d&&{slots:d},...w&&{classNames:w}});case"timeline-3day":return e.jsx(ce,{daysToShow:3,events:c,users:V,selectedDate:k,visibleHours:{from:B.startHour,to:B.endHour},onEventClick:S,renderPopover:F,...d&&{slots:d},...w&&{classNames:w}});case"timeline-week":return e.jsx(ce,{daysToShow:7,events:c,users:V,selectedDate:k,visibleHours:{from:B.startHour,to:B.endHour},onEventClick:S,renderPopover:F,...d&&{slots:d},...w&&{classNames:w}});default:return e.jsx(g.MonthView,{events:c,date:k,badgeVariant:$,onEventClick:S,onDayClick:j,...d&&{slots:d},...w&&{classNames:w}})}},M=v.useRef(null),[_,X]=v.useState(!1),[K,J]=v.useState(null);v.useEffect(()=>{h.current=M.current}),v.useEffect(()=>{const c=M.current;if(!c)return;const S=()=>{for(const G of Array.from(c.children))if(G instanceof HTMLElement&&G.scrollHeight>G.clientHeight+2){for(const te of Array.from(G.children))if(te instanceof HTMLElement&&te.scrollHeight>te.clientHeight+2)return te;return G}return null},F=()=>{const{scrollLeft:G,scrollWidth:te,clientWidth:ue}=c;X(G+ue<te-2)},L=()=>{const G=c.scrollHeight>c.clientHeight+2?c:S();if(G){const te=c.getBoundingClientRect(),ue=G.getBoundingClientRect(),We=G.scrollTop+G.clientHeight/2,Fe=ue.top-te.top+We;J(Fe)}else J(null)},U=()=>{F(),L()};U(),c.addEventListener("scroll",U,{passive:!0});const Q=S();Q&&Q!==c&&Q.addEventListener("scroll",L,{passive:!0});const de=new ResizeObserver(U);de.observe(c);for(const G of Array.from(c.children))de.observe(G);return()=>{c.removeEventListener("scroll",U),Q&&Q!==c&&Q.removeEventListener("scroll",L),de.disconnect()}},[p]);const se=v.useCallback(()=>{M.current?.scrollBy({left:250,behavior:"smooth"})},[]);return e.jsx(ze.SlotSelectionProvider,{mode:a,onSelect:u,minDurationMinutes:f,slotDurationMinutes:I,enabled:!!(n||s),children:e.jsxs("div",{className:x.cn("inno-calendar-root flex flex-col h-full p-4",w?.root,o),children:[i&&e.jsx(g.CalendarHeader,{currentDate:k,view:p,events:q,onViewChange:D,onNavigateToday:()=>T(new Date,p),onNavigatePrev:()=>{const c=new Date(k);p==="day"||p==="timeline-day"?c.setDate(c.getDate()-1):p==="timeline-3day"?c.setDate(c.getDate()-3):p==="week"||p==="timeline-week"?c.setDate(c.getDate()-7):p==="month"?c.setMonth(c.getMonth()-1):p==="year"?c.setFullYear(c.getFullYear()-1):c.setDate(c.getDate()-7),T(c,p)},onNavigateNext:()=>{const c=new Date(k);p==="day"||p==="timeline-day"?c.setDate(c.getDate()+1):p==="timeline-3day"?c.setDate(c.getDate()+3):p==="week"||p==="timeline-week"?c.setDate(c.getDate()+7):p==="month"?c.setMonth(c.getMonth()+1):p==="year"?c.setFullYear(c.getFullYear()+1):c.setDate(c.getDate()+7),T(c,p)},availableViews:["day","week","month","agenda"],showTimelineViews:!0,showSettings:!!C,...!W&&r&&{onAddEvent:r},actions:W,settingsContent:C,filterContent:E}),e.jsxs("div",{className:"relative flex-1 min-h-0",children:[e.jsx("div",{ref:M,className:x.cn("h-full border rounded-lg bg-white overflow-x-auto",w?.viewContainer),children:z()}),l&&e.jsx("div",{className:"inno-calendar-loading-overlay",children:e.jsx("div",{className:"inno-calendar-spinner"})}),_&&e.jsx("button",{type:"button",onClick:se,className:"inno-scroll-right-btn","aria-label":"Scroll right",...K!==null&&{style:{top:K,transform:"translateY(-50%)"}},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m9 18 6-6-6-6"})})})]})]})})}function jt({events:t,users:s=[],scheduleTypes:n=[],initialView:r="week",initialDate:o,initialSelectedUserId:i,initialScheduleTypeIds:f,initialParticipantIds:m,initialWorkingHoursView:l,initialSearchQuery:d,preferencesConfig:w,onEventClick:C,onSlotClick:E,onSlotSelect:W,onAddEvent:H,onEventDrop:N,onDateChange:p,onViewChange:D,className:k,showHeader:T=!0,minSelectionMinutes:I=30,showMoreEventsInPopover:q=!1,isLoading:V=!1,renderPopover:R,slots:A,classNames:$,settingsContent:O,filterContent:B,headerActions:Y},h){return e.jsx(ze.DragDropProvider,{...N&&{onEventDrop:N},children:e.jsx(re.InnoCalendarProvider,{initialEvents:t,initialUsers:s,initialScheduleTypes:n,initialView:r,...o&&{initialDate:o},...i&&{initialSelectedUserId:i},...f&&{initialScheduleTypeIds:f},...m&&{initialParticipantIds:m},...l&&{initialWorkingHoursView:l},...d&&{initialSearchQuery:d},...w&&{preferencesConfig:w},...p&&{onDateChange:p},...D&&{onViewChange:D},children:e.jsx(pt,{...C&&{onEventClick:C},...E&&{onSlotClick:E},...W&&{onSlotSelect:W},...H&&{onAddEvent:H},...R&&{renderPopover:R},className:k,showHeader:T,minSelectionMinutes:I,showMoreEventsInPopover:q,isLoading:V,...A&&{slots:A},...$&&{classNames:$},settingsContent:O,filterContent:B,headerActions:Y,calendarRef:h})})})}const vt=v.forwardRef(jt),ee=v.forwardRef(({className:t,children:s,...n},r)=>e.jsx("select",{ref:r,className:x.cn("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm","ring-offset-background","focus:outline-none focus:ring-1 focus:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","[&>option]:bg-background",t),...n,children:s}));ee.displayName="Select";const Z=v.forwardRef(({className:t,...s},n)=>e.jsx("label",{ref:n,className:x.cn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...s}));Z.displayName="Label";function wt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 16v-4"}),e.jsx("path",{d:"M12 8h.01"})]})}function bt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}const yt=[{value:15,label:"15 minutes"},{value:30,label:"30 minutes"},{value:60,label:"1 hour"}];function kt({value:t,onChange:s,isLocked:n=!1,className:r,labels:o={}}){const i={title:"Slot duration",lockedMessage:"This setting is locked by the administrator",infoMessage:"Set the time slot duration for day and week calendar views.",...o},f=m=>{n||s(Number(m.target.value))};return e.jsxs("div",{className:x.cn("flex flex-col gap-3",r),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"text-sm font-semibold",children:i.title}),n?e.jsx(g.TooltipProvider,{delayDuration:100,children:e.jsxs(g.Tooltip,{children:[e.jsx(g.TooltipTrigger,{children:e.jsx(bt,{className:"size-3 text-muted-foreground"})}),e.jsx(g.TooltipContent,{children:e.jsx("p",{children:i.lockedMessage})})]})}):e.jsx(g.TooltipProvider,{delayDuration:100,children:e.jsxs(g.Tooltip,{children:[e.jsx(g.TooltipTrigger,{children:e.jsx(wt,{className:"size-3 text-muted-foreground"})}),e.jsx(g.TooltipContent,{className:"max-w-64 text-center",children:e.jsx("p",{children:i.infoMessage})})]})})]}),e.jsx(ee,{value:t.toString(),onChange:f,disabled:n,className:"h-9 w-[128px] text-sm",children:yt.map(m=>e.jsx("option",{value:m.value.toString(),children:m.label},m.value))})]})}function Nt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 16v-4"}),e.jsx("path",{d:"M12 8h.01"})]})}function Ct({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}const Dt=[{value:"dot",label:"Dot indicator"},{value:"colored",label:"Full color"},{value:"mixed",label:"Mixed"}];function Mt({value:t,onChange:s,isLocked:n=!1,className:r,labels:o={}}){const i={title:"Event display",lockedMessage:"This setting is locked by the administrator",infoMessage:"Choose how events are displayed. Dot shows a small indicator, colored fills the entire event, mixed uses both.",options:{dot:"Dot indicator",colored:"Full color",mixed:"Mixed"},...o},f=l=>i.options?.[l]??l,m=l=>{n||s(l.target.value)};return e.jsxs("div",{className:x.cn("flex flex-col gap-3",r),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"text-sm font-semibold",children:i.title}),n?e.jsx(g.TooltipProvider,{delayDuration:100,children:e.jsxs(g.Tooltip,{children:[e.jsx(g.TooltipTrigger,{children:e.jsx(Ct,{className:"size-3 text-muted-foreground"})}),e.jsx(g.TooltipContent,{children:e.jsx("p",{children:i.lockedMessage})})]})}):e.jsx(g.TooltipProvider,{delayDuration:100,children:e.jsxs(g.Tooltip,{children:[e.jsx(g.TooltipTrigger,{children:e.jsx(Nt,{className:"size-3 text-muted-foreground"})}),e.jsx(g.TooltipContent,{className:"max-w-64 text-center",children:e.jsx("p",{children:i.infoMessage})})]})})]}),e.jsx(ee,{value:t,onChange:m,disabled:n,className:"h-9 w-[128px] text-sm",children:Dt.map(l=>e.jsx("option",{value:l.value,children:f(l.value)},l.value))})]})}function Tt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 16v-4"}),e.jsx("path",{d:"M12 8h.01"})]})}function St({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}function Et(){return Array.from({length:25},(t,s)=>({value:s,label:`${String(s).padStart(2,"0")}:00`}))}function zt({value:t,onChange:s,isLocked:n=!1,className:r,labels:o={}}){const i={title:"Visible hours",from:"From",to:"To",lockedMessage:"This setting is locked by the administrator",infoMessage:"Set the visible hour range for day and week views. Hours outside this range will be hidden.",...o},f=Et(),m=d=>{if(n)return;const w=Number(d.target.value);w<t.endHour&&s({...t,startHour:w})},l=d=>{if(n)return;const w=Number(d.target.value);w>t.startHour&&s({...t,endHour:w})};return e.jsxs("div",{className:x.cn("flex flex-col gap-3",r),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"text-sm font-semibold",children:i.title}),n?e.jsx(g.TooltipProvider,{delayDuration:100,children:e.jsxs(g.Tooltip,{children:[e.jsx(g.TooltipTrigger,{children:e.jsx(St,{className:"size-3 text-muted-foreground"})}),e.jsx(g.TooltipContent,{children:e.jsx("p",{children:i.lockedMessage})})]})}):e.jsx(g.TooltipProvider,{delayDuration:100,children:e.jsxs(g.Tooltip,{children:[e.jsx(g.TooltipTrigger,{children:e.jsx(Tt,{className:"size-3 text-muted-foreground"})}),e.jsx(g.TooltipContent,{className:"max-w-64 text-center",children:e.jsx("p",{children:i.infoMessage})})]})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(Z,{className:"text-xs text-muted-foreground",children:i.from}),e.jsx(ee,{value:t.startHour.toString(),onChange:m,disabled:n,className:"h-9 w-[88px] text-sm",children:f.map(d=>e.jsx("option",{value:d.value.toString(),disabled:d.value>=t.endHour,children:d.label},d.value))})]}),e.jsx("span",{className:"mt-5 text-muted-foreground",children:"—"}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(Z,{className:"text-xs text-muted-foreground",children:i.to}),e.jsx(ee,{value:t.endHour.toString(),onChange:l,disabled:n,className:"h-9 w-[88px] text-sm",children:f.map(d=>e.jsx("option",{value:d.value.toString(),disabled:d.value<=t.startHour,children:d.label},d.value))})]})]})]})}function Ht({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 16v-4"}),e.jsx("path",{d:"M12 8h.01"})]})}function Lt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}function It({className:t}){return e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})})}const Wt=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function Ft(){return Array.from({length:25},(t,s)=>({value:s,label:`${String(s).padStart(2,"0")}:00`}))}const De={sunday:"Sun",monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat"};function At({dayLabel:t,config:s,onChange:n,disabled:r,hourOptions:o}){const i=()=>{r||n({...s,enabled:!s.enabled})},f=l=>{if(r)return;const d=Number(l.target.value);d<s.to&&n({...s,from:d})},m=l=>{if(r)return;const d=Number(l.target.value);d>s.from&&n({...s,to:d})};return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",role:"checkbox","aria-checked":s.enabled,"aria-label":`Enable ${t}`,onClick:i,disabled:r,className:x.cn("flex size-5 shrink-0 items-center justify-center rounded border transition-colors",s.enabled?"border-primary bg-primary text-primary-foreground":"border-input bg-background",r&&"cursor-not-allowed opacity-50"),children:s.enabled&&e.jsx(It,{className:"size-3"})}),e.jsx("span",{className:x.cn("w-10 text-sm",!s.enabled&&"text-muted-foreground"),children:t}),e.jsx(ee,{value:s.from.toString(),onChange:f,disabled:r||!s.enabled,className:"h-8 w-[76px] text-xs",children:o.map(l=>e.jsx("option",{value:l.value.toString(),disabled:l.value>=s.to,children:l.label},l.value))}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"}),e.jsx(ee,{value:s.to.toString(),onChange:m,disabled:r||!s.enabled,className:"h-8 w-[76px] text-xs",children:o.map(l=>e.jsx("option",{value:l.value.toString(),disabled:l.value<=s.from,children:l.label},l.value))})]})}function Bt({value:t,onChange:s,isLocked:n=!1,className:r,labels:o={}}){const i={title:"Working hours",lockedMessage:"This setting is locked by the administrator",infoMessage:"Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",days:De,...o},f=Ft(),m=(l,d)=>{n||s({...t,[l]:d})};return e.jsxs("div",{className:x.cn("flex flex-col gap-3",r),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"text-sm font-semibold",children:i.title}),n?e.jsx(g.TooltipProvider,{delayDuration:100,children:e.jsxs(g.Tooltip,{children:[e.jsx(g.TooltipTrigger,{children:e.jsx(Lt,{className:"size-3 text-muted-foreground"})}),e.jsx(g.TooltipContent,{children:e.jsx("p",{children:i.lockedMessage})})]})}):e.jsx(g.TooltipProvider,{delayDuration:100,children:e.jsxs(g.Tooltip,{children:[e.jsx(g.TooltipTrigger,{children:e.jsx(Ht,{className:"size-3 text-muted-foreground"})}),e.jsx(g.TooltipContent,{className:"max-w-64 text-center",children:e.jsx("p",{children:i.infoMessage})})]})})]}),e.jsx("div",{className:"flex flex-col gap-2",children:Wt.map(l=>e.jsx(At,{dayLabel:i.days?.[l]??De[l],config:t[l],onChange:d=>m(l,d),disabled:n,hourOptions:f},l))})]})}const Pt={sunday:{enabled:!1,from:8,to:18},monday:{enabled:!0,from:8,to:18},tuesday:{enabled:!0,from:8,to:18},wednesday:{enabled:!0,from:8,to:18},thursday:{enabled:!0,from:8,to:18},friday:{enabled:!0,from:8,to:18},saturday:{enabled:!1,from:8,to:18}};function me({className:t}){return e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Rt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function Ot({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function fe({checked:t,onCheckedChange:s,className:n,children:r}){return e.jsx("button",{type:"button",role:"checkbox","aria-checked":t,onClick:()=>s(!t),className:n,children:r})}function _t({src:t,alt:s,fallback:n,className:r}){const[o,i]=v.useState(!1);return!t||o?e.jsx("div",{className:x.cn("flex items-center justify-center bg-zinc-200 text-zinc-600 font-medium text-sm",r),children:n||"?"}):e.jsx("img",{src:t,alt:s||"",className:x.cn("object-cover",r),onError:()=>i(!0)})}function Me({value:t,onChange:s,placeholder:n,className:r}){return e.jsxs("div",{className:x.cn("relative",r),children:[e.jsx(Rt,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"text",value:t,onChange:o=>s(o.target.value),placeholder:n,className:"h-9 w-full rounded-lg border border-border bg-white pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"})]})}function Te(t,s,n,r=.3){if(!s.trim())return t;const o=s.toLowerCase();return t.filter(i=>n(i).some(m=>m?m.toLowerCase().includes(o):!1))}const $t={title:"Filters",subtitle:"Filter calendar events",scheduleTypes:"Event Types",participants:"Participants",clearAll:"Clear all",selectAll:"Select all",unselectAll:"Unselect all",searchScheduleTypes:"Search event types...",searchParticipants:"Search participants...",noScheduleTypes:"No event types found",noParticipants:"No participants found"};function Vt({scheduleTypes:t,users:s,selectedScheduleTypeIds:n,onScheduleTypeChange:r,selectedUserIds:o,onUserChange:i,onClearAll:f,className:m,scheduleTypesLoading:l=!1,usersLoading:d=!1,labels:w,getScheduleTypeName:C}){const E={...$t,...w},[W,H]=v.useState(""),[N,p]=v.useState(""),D=v.useMemo(()=>W.trim()?Te(t,W,h=>[h.name,C?.(h)||h.name]):t,[t,W,C]),k=v.useMemo(()=>N.trim()?Te(s,N,h=>[h.name,h.email||""]):s,[s,N]),T=D.length>0&&D.every(h=>n.includes(h.id)),I=k.length>0&&k.every(h=>o.includes(h.id)),q=n.length+o.length,V=(h,a)=>{const u=a?[...n,h]:n.filter(j=>j!==h);r(u)},R=()=>{if(T){const h=new Set(D.map(a=>a.id));r(n.filter(a=>!h.has(a)))}else{const h=new Set([...n,...D.map(a=>a.id)]);r(Array.from(h))}},A=(h,a)=>{const u=a?[...o,h]:o.filter(j=>j!==h);i(u)},$=()=>{if(I){const h=new Set(k.map(a=>a.id));i(o.filter(a=>!h.has(a)))}else{const h=new Set([...o,...k.map(a=>a.id)]);i(Array.from(h))}},O=()=>{r([]),i([]),f?.()},B=h=>C?C(h):h.name,Y=h=>h.colorHex||h.color||"#069AD7";return e.jsxs("div",{className:x.cn("flex min-w-72 max-w-72 flex-col rounded-lg border bg-white shadow-sm",m),children:[e.jsxs("header",{className:"flex items-start justify-between gap-2 px-4 pb-2 pt-4",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("h3",{className:"text-base font-semibold text-foreground",children:E.title}),e.jsx("p",{className:"text-xs text-muted-foreground",children:E.subtitle})]}),q>0&&e.jsxs("button",{type:"button",onClick:O,className:"flex h-auto items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-destructive transition-colors hover:bg-destructive/10",children:[e.jsx(Ot,{className:"h-3.5 w-3.5"}),E.clearAll]})]}),e.jsx("div",{className:"h-px w-full bg-border/60"}),e.jsxs("section",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("h4",{className:"text-sm font-medium text-foreground",children:E.scheduleTypes}),e.jsx("button",{type:"button",onClick:R,className:"text-xs font-medium text-primary transition-colors hover:text-primary/80",children:T?E.unselectAll:E.selectAll})]}),t.length>6&&e.jsx("div",{className:"px-4 pb-3",children:e.jsx(Me,{value:W,onChange:H,placeholder:E.searchScheduleTypes})}),e.jsxs("div",{className:"flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin",children:[l?Array.from({length:4}).map((h,a)=>e.jsxs("div",{className:"flex animate-pulse items-center gap-2 rounded-md border border-border/60 bg-muted/40 p-2",children:[e.jsx("div",{className:"h-5 w-5 rounded bg-muted-foreground/20"}),e.jsx("div",{className:"h-3 w-24 rounded bg-muted-foreground/20"})]},`skeleton-${a}`)):D.map(h=>{const a=n.includes(h.id),u=Y(h);return e.jsxs(fe,{checked:a,onCheckedChange:j=>V(h.id,j),className:x.cn("relative flex w-full cursor-pointer items-center justify-between gap-3 rounded-md border border-border bg-white px-3 py-2 transition-colors hover:border-primary/50",a&&"border-primary bg-primary/5"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:x.cn("flex h-4 w-4 items-center justify-center rounded border border-border text-xs transition-colors",a&&"border-primary bg-primary text-primary-foreground"),children:a&&e.jsx(me,{className:"h-3 w-3"})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:B(h)})]}),e.jsx("div",{className:"h-4 w-4 rounded-full border",style:{backgroundColor:u,borderColor:u}})]},h.id)}),!l&&D.length===0&&e.jsx("p",{className:"px-2 py-1 text-xs text-muted-foreground",children:E.noScheduleTypes})]})]}),e.jsx("div",{className:"h-px w-full bg-border/60"}),e.jsxs("section",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("h4",{className:"text-sm font-medium text-foreground",children:E.participants}),e.jsx(fe,{checked:I,onCheckedChange:()=>$(),className:x.cn("flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",I&&"border-primary bg-primary text-primary-foreground"),children:I&&e.jsx(me,{className:"h-3.5 w-3.5"})})]}),e.jsx("div",{className:"px-4 pb-3",children:e.jsx(Me,{value:N,onChange:p,placeholder:E.searchParticipants})}),e.jsxs("div",{className:"flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin",children:[d?Array.from({length:4}).map((h,a)=>e.jsxs("div",{className:"flex animate-pulse items-center gap-3 rounded-md border border-border/60 bg-muted/40 p-3",children:[e.jsx("div",{className:"h-5 w-5 rounded bg-muted-foreground/20"}),e.jsx("div",{className:"h-10 w-10 rounded-full bg-muted-foreground/20"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-3 w-24 rounded bg-muted-foreground/20"}),e.jsx("div",{className:"h-2 w-32 rounded bg-muted-foreground/10"})]})]},`p-skeleton-${a}`)):k.map(h=>{const a=o.includes(h.id);return e.jsxs(fe,{checked:a,onCheckedChange:u=>A(h.id,u),className:x.cn("relative flex w-full cursor-pointer items-start gap-2 rounded-lg border border-border bg-white p-2 transition-colors hover:border-primary/50",a&&"border-primary bg-zinc-50"),children:[e.jsx("span",{className:x.cn("flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border border-border transition-colors",a&&"border-primary bg-primary text-primary-foreground"),children:a&&e.jsx(me,{className:"h-2.5 w-2.5"})}),e.jsxs("div",{className:"flex flex-1 items-start gap-2",children:[e.jsx(_t,{src:h.avatar??null,alt:h.name,fallback:h.name?.[0]?.toUpperCase()??"?",className:"h-10 w-10 rounded-lg"}),e.jsxs("div",{className:"flex max-w-[140px] flex-col gap-0.5 overflow-hidden",children:[e.jsx("span",{className:"line-clamp-1 text-sm font-medium text-foreground",children:h.name}),e.jsx("span",{className:"truncate text-[11px] text-muted-foreground",title:h.email,children:h.email})]})]})]},h.id)}),!d&&k.length===0&&e.jsx("p",{className:"px-4 text-xs text-muted-foreground",children:E.noParticipants})]})]})]})}function Ut({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}),e.jsx("circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor"})]})}function Yt({scheduleTypes:t,value:s,onChange:n,allLabel:r="All types",className:o,label:i}){const f=l=>{n(l.target.value)},m=t.find(l=>String(l.id)===s);return e.jsxs("div",{className:x.cn("flex flex-col gap-1",o),children:[i&&e.jsx(Z,{className:"text-xs text-muted-foreground",children:i}),e.jsxs("div",{className:"relative",children:[m?e.jsx("span",{className:"pointer-events-none absolute left-2.5 top-1/2 size-3 -translate-y-1/2 rounded-full",style:{backgroundColor:m.color}}):e.jsx(Ut,{className:"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsxs(ee,{value:s,onChange:f,className:"h-9 w-full min-w-[140px] pl-8 pr-8 text-sm",children:[e.jsx("option",{value:"all",children:r}),t.map(l=>e.jsx("option",{value:String(l.id),children:l.label},l.id))]})]})]})}function Gt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"9",cy:"7",r:"4"}),e.jsx("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),e.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}function qt({users:t,value:s,onChange:n,allLabel:r="All users",className:o,label:i}){const f=m=>{n(m.target.value)};return e.jsxs("div",{className:x.cn("flex flex-col gap-1",o),children:[i&&e.jsx(Z,{className:"text-xs text-muted-foreground",children:i}),e.jsxs("div",{className:"relative",children:[e.jsx(Gt,{className:"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsxs(ee,{value:s,onChange:f,className:"h-9 w-full min-w-[120px] pl-8 pr-8 text-sm",children:[e.jsx("option",{value:"all",children:r}),t.map(m=>e.jsx("option",{value:m.id,children:m.name},m.id))]})]})]})}function Kt({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M8 2v4"}),e.jsx("path",{d:"M16 2v4"}),e.jsx("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),e.jsx("path",{d:"M3 10h18"}),e.jsx("path",{d:"M8 14h.01"}),e.jsx("path",{d:"M12 14h.01"}),e.jsx("path",{d:"M16 14h.01"}),e.jsx("path",{d:"M8 18h.01"}),e.jsx("path",{d:"M12 18h.01"}),e.jsx("path",{d:"M16 18h.01"})]})}function Jt({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5"}),e.jsx("path",{d:"M16 2v4"}),e.jsx("path",{d:"M8 2v4"}),e.jsx("path",{d:"M3 10h5"}),e.jsx("path",{d:"M17.5 17.5 16 16.3V14"}),e.jsx("circle",{cx:"16",cy:"16",r:"6"})]})}function Xt({className:t}){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:t,children:e.jsx("path",{d:"m9 18 6-6-6-6"})})}function Qt({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M15 3h6v6"}),e.jsx("path",{d:"M10 14 21 3"}),e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})]})}function Zt(t){const s=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${s}-${n}-${r}`}function Se(t){const s=t.getHours(),n=t.getMinutes(),r=s>=12?"PM":"AM",o=s%12||12,i=String(n).padStart(2,"0");return`${o}:${i} ${r}`}function es(t){const s=Se(t.startDate),n=Se(t.endDate);return`${s} - ${n}`}function ts(t){const s=P.addDays(new Date,1);return t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth()&&t.getDate()===s.getDate()}function ss(t){if(P.isToday(t))return"Today";if(ts(t))return"Tomorrow";const s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=s[t.getDay()],o=n[t.getMonth()],i=t.getDate();return`${r}, ${o} ${i}`}function ns(t,s){const n=new Map;for(const r of t){const o=Zt(r.startDate),i=n.get(o)??[];i.push(r),n.set(o,i)}return Array.from(n.entries()).map(([r,o])=>{const i=[...o].sort((m,l)=>m.startDate.getTime()-l.startDate.getTime()),f=s>0?i.slice(0,s):i;return{date:new Date(r),dateKey:r,events:f,hasMore:s>0&&i.length>s}}).sort((r,o)=>r.date.getTime()-o.date.getTime())}function rs(t){const s=P.startOfDay(new Date),n=P.endOfDay(new Date);return t.filter(r=>r.startDate>=s&&r.startDate<=n).length}function ge({className:t}){return e.jsx("div",{className:x.cn("animate-pulse rounded-md bg-muted",t)})}function os({event:t,onClick:s}){return e.jsxs("button",{type:"button",onClick:()=>s?.(t),className:x.cn("w-full text-left rounded-lg transition-colors","hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","flex items-start gap-3 p-2"),children:[e.jsx("div",{className:"shrink-0 rounded-full mt-1.5 size-2",style:{backgroundColor:t.color??"#3b82f6"}}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:t.title}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:es(t)})]}),s&&e.jsx(Xt,{className:"shrink-0 size-4 text-muted-foreground/50 mt-1"})]})}function is({group:t,onEventClick:s}){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[e.jsx("h3",{className:x.cn("text-xs font-semibold",P.isToday(t.date)&&"text-primary"),children:ss(t.date)}),t.hasMore&&e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",t.events.length," more"]})]}),e.jsx("div",{className:"space-y-0.5",children:t.events.map(n=>e.jsx(os,{event:n,onClick:s},n.id))})]})}function as({events:t,isLoading:s=!1,className:n,daysAhead:r=7,maxEventsPerDay:o=3,onEventClick:i,onNavigateToAgenda:f}){const[m,l]=v.useState(!1),d=v.useMemo(()=>{const H=P.startOfDay(new Date),N=P.addDays(H,r);return t.filter(p=>p.endDate>=H&&p.startDate<N)},[t,r]),w=v.useMemo(()=>ns(d,o),[d,o]),C=v.useMemo(()=>rs(t),[t]),E=H=>{l(!1),i?.(H)},W=()=>{l(!1),f?.()};return e.jsxs(g.Popover,{open:m,onOpenChange:l,children:[e.jsxs(g.PopoverTrigger,{className:x.cn("relative rounded-xl hover:text-zinc-700 hover:!bg-zinc-300 !bg-zinc-200 text-zinc-600 shadow-none !px-2.5 p-2 max-h-10",n),children:[e.jsx(Kt,{className:"h-4 w-4"}),C>0&&e.jsx(g.Badge,{variant:"destructive",className:"absolute -right-4 -top-4 m-3 flex h-5 w-5 items-center justify-center rounded-full bg-primary p-0 text-[10px] font-medium hover:bg-primary",children:C>99?"99+":C})]}),e.jsxs(g.PopoverContent,{className:"w-80 rounded-xl p-0",align:"end",side:"bottom",sideOffset:8,children:[e.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Upcoming"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:C>0?`${C} event${C>1?"s":""} today`:"No events today"})]}),f&&e.jsxs("button",{type:"button",onClick:W,className:"text-xs text-primary hover:underline flex items-center gap-1",children:["View all",e.jsx(Qt,{className:"size-3"})]})]}),e.jsx("div",{className:"max-h-80 overflow-y-auto p-2",children:s?e.jsx("div",{className:"space-y-2 p-2",children:Array.from({length:3}).map((H,N)=>e.jsxs("div",{className:"flex space-x-3",children:[e.jsx(ge,{className:"h-2 w-2 rounded-full mt-2"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(ge,{className:"h-4 w-full"}),e.jsx(ge,{className:"h-3 w-3/4"})]})]},N))}):w.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(Jt,{className:"mb-2 h-8 w-8 text-muted-foreground/50"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"No upcoming events"}),e.jsxs("p",{className:"text-xs text-muted-foreground/70",children:["Your schedule is clear for the next ",r," days"]})]}):e.jsx("div",{className:"space-y-3 divide-y",children:w.map(H=>e.jsx(is,{group:H,onEventClick:E},H.dateKey))})})]})]})}function ls({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5"}),e.jsx("path",{d:"M16 2v4"}),e.jsx("path",{d:"M8 2v4"}),e.jsx("path",{d:"M3 10h5"}),e.jsx("path",{d:"M17.5 17.5 16 16.25V14"}),e.jsx("circle",{cx:"16",cy:"16",r:"6"})]})}function Ie({className:t}){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:e.jsx("path",{d:"m9 18 6-6-6-6"})})}function cs(t){const s=new Date;return s.setDate(s.getDate()+1),t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth()&&t.getDate()===s.getDate()}function Ee(t){const s=t.getHours(),n=t.getMinutes(),r=s>=12?"PM":"AM";return`${s%12||12}:${n.toString().padStart(2,"0")} ${r}`}function ds(t){return new Intl.DateTimeFormat("en-US",{weekday:"long",month:"short",day:"numeric"}).format(t)}function us(t){const s=Ee(t.startDate),n=Ee(t.endDate);return`${s} - ${n}`}function xs(t){return P.isToday(t)?"Today":cs(t)?"Tomorrow":ds(t)}function hs(t,s){const n=new Map;for(const r of t){const o=P.formatDateISO(r.startDate),i=n.get(o)??[];i.push(r),n.set(o,i)}return Array.from(n.entries()).map(([r,o])=>{const i=[...o].sort((m,l)=>m.startDate.getTime()-l.startDate.getTime()),f=s>0?i.slice(0,s):i;return{date:new Date(r),dateKey:r,events:f,hasMore:s>0&&i.length>s}}).sort((r,o)=>r.date.getTime()-o.date.getTime())}function ms({event:t,onClick:s,compact:n}){return e.jsxs("button",{type:"button",onClick:()=>s?.(t),className:x.cn("w-full text-left rounded-lg transition-colors","hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","flex items-start gap-3",n?"p-2":"p-3"),children:[e.jsx("div",{className:x.cn("shrink-0 rounded-full mt-1",n?"size-2":"size-2.5"),style:{backgroundColor:t.color??"#3b82f6"}}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:x.cn("font-medium truncate",n?"text-xs":"text-sm"),children:t.title}),e.jsx("p",{className:x.cn("text-muted-foreground truncate",n?"text-[10px]":"text-xs"),children:us(t)})]}),s&&e.jsx(Ie,{className:x.cn("shrink-0 text-muted-foreground/50",n?"size-3":"size-4")})]})}function fs({group:t,onEventClick:s,onViewMore:n,compact:r}){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:x.cn("flex items-center justify-between px-2",r?"py-1":"py-1.5"),children:[e.jsx("h3",{className:x.cn("font-semibold",r?"text-xs":"text-sm",P.isToday(t.date)&&"text-primary"),children:xs(t.date)}),t.hasMore&&n&&e.jsx("button",{type:"button",onClick:()=>n(t.date),className:x.cn("text-primary hover:underline",r?"text-[10px]":"text-xs"),children:"+more"})]}),e.jsx("div",{className:"space-y-0.5",children:t.events.map(o=>e.jsx(ms,{event:o,onClick:s,compact:r},o.id))})]})}function gs({events:t,daysAhead:s=7,maxEventsPerDay:n=3,onEventClick:r,onViewAll:o,className:i,emptyState:f,title:m="Upcoming",showHeader:l=!0,compact:d=!1}){const w=re.useOptionalCalendarContext(),C=w?.filteredEvents,E=w?.currentDate??new Date,W=t??C??[],H=v.useMemo(()=>{const D=P.startOfDay(E),k=new Date(D);return k.setDate(k.getDate()+s),W.filter(T=>T.endDate>=D&&T.startDate<k)},[W,s,E]),N=v.useMemo(()=>hs(H,n),[H,n]),p=H.length;return N.length===0?e.jsxs("div",{className:x.cn("rounded-lg border bg-card",i),children:[l&&e.jsx("div",{className:x.cn("border-b px-4 flex items-center justify-between",d?"py-2":"py-3"),children:e.jsx("h2",{className:x.cn("font-semibold",d?"text-sm":"text-base"),children:m})}),e.jsx("div",{className:x.cn("flex flex-col items-center justify-center text-center",d?"py-6 px-4":"py-10 px-6"),children:f??e.jsxs(e.Fragment,{children:[e.jsx(ls,{className:x.cn("text-muted-foreground/50 mb-2",d?"size-8":"size-10")}),e.jsx("p",{className:x.cn("text-muted-foreground",d?"text-xs":"text-sm"),children:"No upcoming events"})]})})]}):e.jsxs("div",{className:x.cn("rounded-lg border bg-card overflow-hidden",i),children:[l&&e.jsxs("div",{className:x.cn("border-b px-4 flex items-center justify-between",d?"py-2":"py-3"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:x.cn("font-semibold",d?"text-sm":"text-base"),children:m}),e.jsx("span",{className:x.cn("text-muted-foreground bg-muted rounded-full px-2",d?"text-[10px] py-0":"text-xs py-0.5"),children:p})]}),o&&e.jsxs("button",{type:"button",onClick:()=>o(),className:x.cn("text-primary hover:underline flex items-center gap-0.5",d?"text-xs":"text-sm"),children:["View all",e.jsx(Ie,{className:"size-3"})]})]}),e.jsx("div",{className:x.cn("divide-y overflow-auto",d?"p-2 max-h-[280px]":"p-3 max-h-[400px]"),children:N.map(D=>e.jsx(fs,{group:D,onEventClick:r,onViewMore:o?k=>o(k):void 0,compact:d},D.dateKey))})]})}exports.AgendaDropdown=as;exports.AgendaWidget=gs;exports.BadgeVariantSetting=Mt;exports.Calendar=Be;exports.CalendarFilterSidebar=Vt;exports.DEFAULT_WEEK_WORKING_HOURS=Pt;exports.EventPopover=tt;exports.InnoCalendar=vt;exports.ScheduleTypeFilter=Yt;exports.SlotDurationSetting=kt;exports.TimelineView=ce;exports.UserFilter=qt;exports.VisibleHoursSetting=zt;exports.WorkingHoursSetting=Bt;exports.YearView=Le;
|
|
2
|
+
//# sourceMappingURL=agenda-widget-CuQxfYVI.cjs.map
|