exports.id=797,exports.ids=[797],exports.modules={5682:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/silvio/Develop/APP-ESTETICA/cirux/src/app/error.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/silvio/Develop/APP-ESTETICA/cirux/src/app/error.tsx","default")},8688:(a,b,c)=>{"use strict";c.d(b,{ThemeWrapper:()=>f});var d=c(21124),e=c(45523);function f({children:a}){return(0,d.jsx)(e.N,{attribute:"class",defaultTheme:"light",enableSystem:!1,disableTransitionOnChange:!0,children:a})}},9217:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(75338);function e(){return(0,d.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,d.jsx)("div",{className:"size-8 border-4 border-muted border-t-primary rounded-full animate-spin"})})}},9964:(a,b,c)=>{"use strict";c.d(b,{Providers:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call Providers() from the server but Providers is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/silvio/Develop/APP-ESTETICA/cirux/src/components/providers/index.tsx","Providers")},22348:(a,b,c)=>{"use strict";c.d(b,{Sidebar:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/silvio/Develop/APP-ESTETICA/cirux/src/components/layout/Sidebar.tsx","Sidebar")},35284:(a,b,c)=>{"use strict";c.d(b,{$:()=>i});var d=c(21124),e=c(30708),f=c(26691),g=c(44943);let h=(0,f.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function i({className:a,variant:b="default",size:c="default",...f}){return(0,d.jsx)(e.Button,{"data-slot":"button",className:(0,g.cn)(h({variant:b,size:c,className:a})),...f})}},35562:(a,b,c)=>{"use strict";c.d(b,{Topbar:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call Topbar() from the server but Topbar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/silvio/Develop/APP-ESTETICA/cirux/src/components/layout/Topbar.tsx","Topbar")},35609:(a,b,c)=>{Promise.resolve().then(c.bind(c,16076)),Promise.resolve().then(c.bind(c,77554))},37234:(a,b,c)=>{Promise.resolve().then(c.bind(c,76517))},40068:(a,b,c)=>{"use strict";c.d(b,{Cf:()=>r,L3:()=>t,c7:()=>s,lG:()=>o,rr:()=>u});var d=c(21124);c(38301);var e=c(77875),f=c(18239),g=c(88839),h=c(75899),i=c(57925),j=c(39929),k=c(74537),l=c(44943),m=c(35284),n=c(90386);function o({...a}){return(0,d.jsx)(e.D,{"data-slot":"dialog",...a})}function p({...a}){return(0,d.jsx)(f.Z,{"data-slot":"dialog-portal",...a})}function q({className:a,...b}){return(0,d.jsx)(g.X,{"data-slot":"dialog-overlay",className:(0,l.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",a),...b})}function r({className:a,children:b,showCloseButton:c=!0,...e}){return(0,d.jsxs)(p,{children:[(0,d.jsx)(q,{}),(0,d.jsxs)(h.h,{"data-slot":"dialog-content",className:(0,l.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",a),...e,children:[b,c&&(0,d.jsxs)(i.H,{"data-slot":"dialog-close",render:(0,d.jsx)(m.$,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,d.jsx)(n.A,{}),(0,d.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function s({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"dialog-header",className:(0,l.cn)("flex flex-col gap-2",a),...b})}function t({className:a,...b}){return(0,d.jsx)(j.L,{"data-slot":"dialog-title",className:(0,l.cn)("font-heading text-base leading-none font-medium",a),...b})}function u({className:a,...b}){return(0,d.jsx)(k.r,{"data-slot":"dialog-description",className:(0,l.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",a),...b})}},44943:(a,b,c)=>{"use strict";c.d(b,{cn:()=>f});var d=c(43249),e=c(58829);function f(...a){return(0,e.QP)((0,d.$)(a))}},48761:(a,b,c)=>{Promise.resolve().then(c.bind(c,42830)),Promise.resolve().then(c.bind(c,8688))},51472:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>l,metadata:()=>k});var d=c(75338),e=c(54422),f=c.n(e),g=c(39312),h=c.n(g),i=c(16076),j=c(77554);c(61135);let k={title:"Cirux — Plataforma de Atenci\xf3n Inteligente para Cirug\xeda Pl\xe1stica",description:"Cirux automatiza la atenci\xf3n al paciente con IA omnicanal para consultorios y cl\xednicas de cirug\xeda pl\xe1stica."};function l({children:a}){return(0,d.jsx)("html",{lang:"es",className:`${f().variable} ${h().variable} h-full antialiased`,suppressHydrationWarning:!0,children:(0,d.jsxs)("body",{className:"min-h-full flex flex-col bg-background text-foreground",children:[(0,d.jsx)(j.ThemeWrapper,{children:a}),(0,d.jsx)(i.Toaster,{richColors:!0,position:"top-right"})]})})}},56511:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/silvio/Develop/APP-ESTETICA/cirux/src/app/dashboard/error.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/silvio/Develop/APP-ESTETICA/cirux/src/app/dashboard/error.tsx","default")},56750:(a,b,c)=>{"use strict";c.d(b,{Providers:()=>i});var d=c(21124),e=c(38301),f=c(84464),g=c(95558),h=c(74213);function i({children:a}){let{setUser:b,setSession:c,setLoading:i}=(0,g.n)(),{setPendingConversations:j,addPendingConversation:k}=(0,h.i)();return(0,e.useMemo)(()=>(0,f.U)(),[]),(0,d.jsx)(d.Fragment,{children:a})}},61135:()=>{},66521:(a,b,c)=>{"use strict";c.d(b,{Topbar:()=>I});var d=c(21124),e=c(9135),f=c(9189),g=c(35284),h=c(99187),i=c(79898),j=c(74213),k=c(95558),l=c(38301),m=c(31980),n=c(50937),o=c(17492),p=c(42830),q=c(45523),r=c(16816),s=c(2303),t=c(94741),u=c(62059),v=c(3821),w=c(78276),x=c(97657),y=c(84464),z=c(40068),A=c(93758),B=c(68120),C=c(77816),D=c(52601),E=c(44943);function F({className:a,size:b="default",...c}){return(0,d.jsx)(C.l,{"data-slot":"switch","data-size":b,className:(0,E.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",a),...c,children:(0,d.jsx)(D.p,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}let G=o.Ik({name:o.Yj().min(2,"El nombre debe tener al menos 2 caracteres")});function H(){let a=(0,l.useMemo)(()=>(0,y.U)(),[]),b=(0,i.j)(a=>a.activeModal),c=(0,i.j)(a=>a.closeModal),e=(0,k.n)(a=>a.user),f=(0,k.n)(a=>a.role),{theme:h,setTheme:j}=(0,q.D)(),[o,C]=(0,l.useState)(null),[D,E]=(0,l.useState)(!1),H=(0,m.mN)({resolver:(0,n.u)(G),defaultValues:{name:""}}),I=async b=>{if(!e)return;let d=b.name.trim(),{error:f}=await a.from("staff").update({name:d}).eq("id",e.id);if(f)return void p.o.error("Error al actualizar el perfil.");await a.auth.updateUser({data:{display_name:d}}),p.o.success("Perfil actualizado."),c()};return(0,d.jsx)(z.lG,{open:"editProfile"===b,onOpenChange:a=>!a&&c(),children:(0,d.jsxs)(z.Cf,{className:"max-w-sm rounded-[18px]",children:[(0,d.jsxs)(z.c7,{children:[(0,d.jsx)(z.L3,{className:"font-heading text-lg font-semibold",children:"Editar perfil"}),(0,d.jsx)(z.rr,{className:"text-xs text-muted-foreground",children:"Actualiza tus datos personales"})]}),D?(0,d.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,d.jsx)(r.A,{className:"size-5 animate-spin text-muted-foreground"})}):(0,d.jsxs)("form",{onSubmit:H.handleSubmit(I),className:"space-y-4 mt-2",children:[(0,d.jsxs)("div",{className:"space-y-1.5",children:[(0,d.jsxs)(B.J,{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[(0,d.jsx)(s.A,{className:"size-3"}),"Email"]}),(0,d.jsx)(A.p,{value:o?.email??e?.email??"",disabled:!0,className:"rounded-[12px] h-9 text-sm bg-muted/50 cursor-not-allowed"})]}),(0,d.jsxs)("div",{className:"space-y-1.5",children:[(0,d.jsxs)(B.J,{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[(0,d.jsx)(t.A,{className:"size-3"}),"Rol"]}),(0,d.jsx)(A.p,{value:f??"",disabled:!0,className:"rounded-[12px] h-9 text-sm bg-muted/50 cursor-not-allowed capitalize"})]}),(0,d.jsxs)("div",{className:"space-y-1.5",children:[(0,d.jsxs)(B.J,{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[(0,d.jsx)(u.A,{className:"size-3"}),"Nombre"]}),(0,d.jsx)(A.p,{...H.register("name"),placeholder:"Tu nombre completo",className:"rounded-[12px] h-9 text-sm",autoFocus:!0}),H.formState.errors.name&&(0,d.jsx)("p",{className:"text-xs text-destructive",children:H.formState.errors.name.message})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 rounded-[12px] bg-muted/30",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:["dark"===h?(0,d.jsx)(v.A,{className:"size-3.5 text-muted-foreground"}):(0,d.jsx)(w.A,{className:"size-3.5 text-muted-foreground"}),(0,d.jsx)(B.J,{className:"text-xs cursor-pointer",onClick:()=>j("dark"===h?"light":"dark"),children:"Tema oscuro"})]}),(0,d.jsx)(F,{checked:"dark"===h,onCheckedChange:a=>j(a?"dark":"light"),"aria-label":"Cambiar tema"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,d.jsx)(g.$,{type:"button",variant:"outline",className:"flex-1 rounded-[12px]",onClick:c,children:"Cancelar"}),(0,d.jsx)(g.$,{type:"submit",className:"flex-1 bg-primary text-[#0D141D] font-semibold rounded-[12px] hover:bg-primary/90",disabled:H.formState.isSubmitting,children:H.formState.isSubmitting?(0,d.jsx)(r.A,{className:"size-4 animate-spin"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(x.A,{className:"size-3.5 mr-1.5"}),"Guardar"]})})]})]})]})})}function I({title:a}){let b=(0,i.j)(a=>a.toggleSidebar),c=(0,i.j)(a=>a.openModal),m=(0,j.i)(a=>a.unreadCount),n=(0,k.n)(a=>a.user),o=(0,l.useMemo)(()=>n?.email?.slice(0,2).toUpperCase()??"??",[n?.email]);return(0,d.jsxs)("header",{className:"h-16 border-b border-border bg-background/80 backdrop-blur-sm flex items-center px-6 gap-4 sticky top-0 z-20",children:[(0,d.jsx)(g.$,{variant:"ghost",size:"icon",onClick:b,className:"md:hidden","aria-label":"Abrir men\xfa",children:(0,d.jsx)(e.A,{className:"size-4"})}),(0,d.jsx)("h1",{className:"font-heading font-semibold text-lg text-foreground truncate flex-1",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)(g.$,{variant:"ghost",size:"icon","aria-label":"Notificaciones",children:(0,d.jsx)(f.A,{className:"size-4"})}),m>0&&(0,d.jsx)(h.E,{variant:"secondary",className:"absolute -top-1 -right-1 h-4 min-w-4 text-[9px] px-1 flex items-center justify-center",children:m})]}),(0,d.jsx)("button",{onClick:()=>c("editProfile"),className:"size-8 rounded-full bg-primary flex items-center justify-center text-[11px] font-bold text-[#0D141D] hover:bg-primary/80 transition-colors cursor-pointer","aria-label":"Editar perfil",children:o})]}),(0,d.jsx)(H,{})]})}},68120:(a,b,c)=>{"use strict";c.d(b,{J:()=>f});var d=c(21124);c(38301);var e=c(44943);function f({className:a,...b}){return(0,d.jsx)("label",{"data-slot":"label",className:(0,e.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...b})}},68895:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>j});var d=c(75338),e=c(91010),f=c(82161),g=c(22348),h=c(35562),i=c(9964);async function j({children:a}){let b=await (0,e.U)(),{data:{user:c}}=await b.auth.getUser();return c||(0,f.redirect)("/login"),(0,d.jsx)(i.Providers,{children:(0,d.jsxs)("div",{className:"flex h-screen overflow-hidden bg-background",children:[(0,d.jsx)(g.Sidebar,{}),(0,d.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden",children:[(0,d.jsx)(h.Topbar,{title:"Dashboard"}),(0,d.jsx)("main",{className:"flex-1 overflow-y-auto p-8",children:a})]})]})})}},71712:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,54160,23)),Promise.resolve().then(c.t.bind(c,31603,23)),Promise.resolve().then(c.t.bind(c,68495,23)),Promise.resolve().then(c.t.bind(c,75170,23)),Promise.resolve().then(c.t.bind(c,77526,23)),Promise.resolve().then(c.t.bind(c,78922,23)),Promise.resolve().then(c.t.bind(c,29234,23)),Promise.resolve().then(c.t.bind(c,12263,23)),Promise.resolve().then(c.bind(c,82146))},74213:(a,b,c)=>{"use strict";c.d(b,{i:()=>f});var d=c(11453),e=c(33699);let f=(0,d.v)()((0,e.lt)((a,b)=>({pendingConversations:[],systemNotifications:[],unreadCount:0,setPendingConversations:b=>a({pendingConversations:b,unreadCount:b.length},!1,"notifications/setPendingConversations"),addPendingConversation:c=>{b().pendingConversations.some(a=>a.id===c.id)||a(a=>({pendingConversations:[c,...a.pendingConversations],unreadCount:a.unreadCount+1}),!1,"notifications/addPendingConversation")},removePendingConversation:b=>a(a=>({pendingConversations:a.pendingConversations.filter(a=>a.id!==b),unreadCount:Math.max(0,a.unreadCount-1)}),!1,"notifications/removePendingConversation"),setSystemNotifications:b=>a({systemNotifications:b},!1,"notifications/setSystemNotifications"),markAllRead:()=>a({unreadCount:0},!1,"notifications/markAllRead")}),{name:"NotificationStore",enabled:!1}))},74641:(a,b,c)=>{Promise.resolve().then(c.bind(c,5682))},76517:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(21124);c(38301);var e=c(35284);function f({error:a,reset:b}){return(0,d.jsx)("div",{className:"flex items-center justify-center h-96",children:(0,d.jsxs)("div",{className:"text-center space-y-4",children:[(0,d.jsx)("h2",{className:"text-xl font-heading font-bold text-foreground",children:"Error al cargar"}),(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:"No se pudo cargar esta secci\xf3n."}),(0,d.jsx)(e.$,{onClick:b,className:"rounded-[12px]",children:"Reintentar"})]})})}},77554:(a,b,c)=>{"use strict";c.d(b,{ThemeWrapper:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call ThemeWrapper() from the server but ThemeWrapper is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/silvio/Develop/APP-ESTETICA/cirux/src/components/providers/ThemeWrapper.tsx","ThemeWrapper")},78162:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(97523);let e=async a=>[{type:"image/png",sizes:"400x400",url:(0,d.fillMetadataSegment)(".",await a.params,"icon.png")+"?b3ce004bb046cb9b"}]},78335:()=>{},79898:(a,b,c)=>{"use strict";c.d(b,{j:()=>f});var d=c(11453),e=c(33699);let f=(0,d.v)()((0,e.lt)(a=>({sidebarOpen:!0,activeModal:null,modalPayload:null,setSidebarOpen:b=>a({sidebarOpen:b},!1,"ui/setSidebarOpen"),toggleSidebar:()=>a(a=>({sidebarOpen:!a.sidebarOpen}),!1,"ui/toggleSidebar"),openModal:(b,c={})=>a({activeModal:b,modalPayload:c},!1,"ui/openModal"),closeModal:()=>a({activeModal:null,modalPayload:null},!1,"ui/closeModal")}),{name:"UIStore",enabled:!1}))},81007:(a,b,c)=>{Promise.resolve().then(c.bind(c,22348)),Promise.resolve().then(c.bind(c,35562)),Promise.resolve().then(c.bind(c,9964))},84464:(a,b,c)=>{"use strict";c.d(b,{U:()=>e});var d=c(74706);function e(){return(0,d.createBrowserClient)("https://supabase.silvioalzate.shop","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzc5MTYzNDQ1LCJleHAiOjE5MzY4NDM0NDV9.RGVwyQdA7oigXmMylP2Df7DKpNno_8_rSTwd0471zLk")}},84864:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,81170,23)),Promise.resolve().then(c.t.bind(c,23597,23)),Promise.resolve().then(c.t.bind(c,36893,23)),Promise.resolve().then(c.t.bind(c,89748,23)),Promise.resolve().then(c.t.bind(c,6060,23)),Promise.resolve().then(c.t.bind(c,7184,23)),Promise.resolve().then(c.t.bind(c,69576,23)),Promise.resolve().then(c.t.bind(c,73041,23)),Promise.resolve().then(c.t.bind(c,51384,23))},89255:(a,b,c)=>{Promise.resolve().then(c.bind(c,96538)),Promise.resolve().then(c.bind(c,66521)),Promise.resolve().then(c.bind(c,56750))},90321:(a,b,c)=>{Promise.resolve().then(c.bind(c,96908))},91010:(a,b,c)=>{"use strict";c.d(b,{U:()=>f,Z:()=>g});var d=c(67596),e=c(86802);async function f(){let a=await (0,e.UL)();return(0,d.createServerClient)("https://supabase.silvioalzate.shop","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzc5MTYzNDQ1LCJleHAiOjE5MzY4NDM0NDV9.RGVwyQdA7oigXmMylP2Df7DKpNno_8_rSTwd0471zLk",{cookies:{getAll:()=>a.getAll(),setAll(b){try{b.forEach(({name:b,value:c,options:d})=>a.set(b,c,d))}catch{}}}})}function g(){let a=process.env.SUPABASE_SERVICE_ROLE_KEY;if(!a)throw Error("SUPABASE_SERVICE_ROLE_KEY environment variable is not set.");return(0,d.createServerClient)("https://supabase.silvioalzate.shop",a,{cookies:{getAll:()=>[],setAll(){}}})}},93758:(a,b,c)=>{"use strict";c.d(b,{p:()=>g});var d=c(21124);c(38301);var e=c(17542),f=c(44943);function g({className:a,type:b,...c}){return(0,d.jsx)(e.p,{type:b,"data-slot":"input",className:(0,f.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",a),...c})}},95558:(a,b,c)=>{"use strict";c.d(b,{n:()=>f});var d=c(11453),e=c(33699);let f=(0,d.v)()((0,e.lt)(a=>({session:null,user:null,role:null,isLoading:!0,setSession:b=>a({session:b},!1,"auth/setSession"),setUser:b=>{let c=b?.app_metadata?.role??null;a({user:b,role:c},!1,"auth/setUser")},setRole:b=>a({role:b},!1,"auth/setRole"),setLoading:b=>a({isLoading:b},!1,"auth/setLoading"),reset:()=>a({session:null,user:null,role:null,isLoading:!1},!1,"auth/reset")}),{name:"AuthStore",enabled:!1}))},96487:()=>{},96538:(a,b,c)=>{"use strict";c.d(b,{Sidebar:()=>C});var d=c(21124),e=c(38301),f=c(3991),g=c.n(f),h=c(42378),i=c(24515),j=c(45523),k=c(35748),l=c(99802),m=c(64705),n=c(10620),o=c(88137),p=c(79401),q=c(90386),r=c(9135),s=c(80207),t=c(44943),u=c(79898),v=c(74213),w=c(95558),x=c(84464),y=c(42830),z=c(35284),A=c(99187);let B=[{label:"Calendario",href:"/dashboard/calendar",icon:k.A},{label:"Pacientes",href:"/dashboard/patients",icon:l.A},{label:"Citas",href:"/dashboard/appointments",icon:m.A},{label:"Notificaciones",href:"/dashboard/notifications",icon:n.A},{label:"Procedimientos",href:"/dashboard/procedures",icon:o.A,adminOnly:!0},{label:"Configuraci\xf3n",href:"/dashboard/settings",icon:p.A,adminOnly:!0}];function C(){let a=(0,h.usePathname)(),b=(0,h.useRouter)(),c=(0,u.j)(a=>a.sidebarOpen),f=(0,u.j)(a=>a.toggleSidebar),k=(0,v.i)(a=>a.unreadCount),l=(0,w.n)(a=>a.role),m=(0,w.n)(a=>a.reset),n=(0,e.useMemo)(()=>(0,x.U)(),[]),{resolvedTheme:o}=(0,j.D)(),p=(0,e.useCallback)(async()=>{let{error:a}=await n.auth.signOut();if(a)return void y.o.error("Error al cerrar sesi\xf3n");m(),b.push("/login")},[m,b,n]);return(0,d.jsxs)("aside",{className:(0,t.cn)("flex flex-col bg-sidebar border-r border-sidebar-border transition-all duration-300 z-30","fixed inset-y-0 left-0 md:relative md:translate-x-0",c?"w-60 translate-x-0":"w-16 -translate-x-full md:translate-x-0"),children:[(0,d.jsxs)("div",{className:"flex items-center justify-between px-4 py-5 border-b border-sidebar-border",children:[c&&(0,d.jsx)(g(),{href:"/dashboard",className:"flex items-center hover:opacity-80 transition-opacity",children:(0,d.jsx)(i.default,{src:"dark"===o?"/logo-cirux-dark.webp":"/logo-cirux-light.webp",alt:"Cirux",width:120,height:32,className:"h-8 w-auto",priority:!0,suppressHydrationWarning:!0})}),(0,d.jsx)(z.$,{variant:"ghost",size:"icon",onClick:f,className:"text-sidebar-foreground hover:bg-sidebar-accent ml-auto","aria-label":c?"Colapsar sidebar":"Expandir sidebar",children:c?(0,d.jsx)(q.A,{className:"size-4"}):(0,d.jsx)(r.A,{className:"size-4"})})]}),(0,d.jsx)("nav",{className:"flex-1 py-4 px-2 space-y-1 overflow-y-auto",children:B.filter(a=>!a.adminOnly||"admin"===l).map(b=>{let e=a.startsWith(b.href),f=b.icon,h="/dashboard/notifications"===b.href;return(0,d.jsxs)(g(),{href:b.href,className:(0,t.cn)("flex items-center gap-3 rounded-[12px] px-3 py-2.5 text-sm font-medium transition-colors","text-sidebar-foreground hover:bg-sidebar-accent hover:text-primary",e&&"bg-primary/10 text-primary"),title:c?void 0:b.label,children:[(0,d.jsxs)("div",{className:"relative flex-shrink-0",children:[(0,d.jsx)(f,{className:"size-4"}),h&&k>0&&(0,d.jsx)("span",{className:"absolute -top-1.5 -right-1.5 size-2 bg-secondary rounded-full"})]}),c&&(0,d.jsx)("span",{className:"truncate",children:b.label}),c&&h&&k>0&&(0,d.jsx)(A.E,{variant:"secondary",className:"ml-auto text-[10px] px-1.5 py-0 h-5",children:k})]},b.href)})}),(0,d.jsx)("div",{className:"px-2 py-3 border-t border-sidebar-border",children:(0,d.jsxs)("button",{onClick:p,className:(0,t.cn)("flex items-center gap-3 rounded-[12px] px-3 py-2.5 text-sm font-medium w-full","text-sidebar-foreground hover:bg-destructive/10 hover:text-destructive transition-colors"),title:c?void 0:"Cerrar sesi\xf3n",children:[(0,d.jsx)(s.A,{className:"size-4 flex-shrink-0"}),c&&(0,d.jsx)("span",{children:"Cerrar sesi\xf3n"})]})})]})}},96908:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(21124);c(38301);var e=c(35284);function f({error:a,reset:b}){return(0,d.jsx)("html",{children:(0,d.jsx)("body",{className:"bg-background flex items-center justify-center min-h-screen",children:(0,d.jsxs)("div",{className:"text-center space-y-4 p-8",children:[(0,d.jsx)("h2",{className:"text-xl font-heading font-bold text-foreground",children:"Algo sali\xf3 mal"}),(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:"Ha ocurrido un error inesperado."}),(0,d.jsx)(e.$,{onClick:b,className:"rounded-[12px]",children:"Reintentar"})]})})})}},97482:(a,b,c)=>{Promise.resolve().then(c.bind(c,56511))},99187:(a,b,c)=>{"use strict";c.d(b,{E:()=>i});var d=c(68195),e=c(18127),f=c(26691),g=c(44943);let h=(0,f.F)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function i({className:a,variant:b="default",render:c,...f}){return(0,e.C)({defaultTagName:"span",props:(0,d.v6)({className:(0,g.cn)(h({variant:b}),a)},f),render:c,state:{slot:"badge",variant:b}})}}};