ultisuite-client/out/_next/static/chunks/app/agenda/layout-50ab4a0ac8765042.js
R3D347HR4Y d6d18f911b
Some checks failed
E2E / Playwright e2e (push) Has been cancelled
Lots of stuff and mobile app
2026-06-17 00:13:28 +02:00

1 line
55 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8292],{1138:(e,t,r)=>{"use strict";r.d(t,{RJ:()=>n,iN:()=>s,zm:()=>a});let a=(0,r(46298).v)()(e=>({identities:[],hydrated:!1,hydrateFromApi:t=>e({identities:t,hydrated:!0}),clear:()=>e({identities:[],hydrated:!1})}));function n(){return a.getState().identities}function s(e){let t=n();if(0===t.length)return null;if(e){let r=t.filter(t=>t.accountId===e);return r.find(e=>e.isDefault)??r[0]??null}return t.find(e=>e.isDefault)??t[0]??null}},1559:(e,t,r)=>{"use strict";r.d(t,{DU:()=>u,IF:()=>m,M4:()=>f,sp:()=>c});var a=r(98306),n=r(39927),s=r(17745),l=r(94927),i=r(18747);let o=["mail-signatures"];async function d(){let e=await l.uE.get("/mail/signatures");return Array.isArray(e)?e:e.signatures??[]}function c(){let{ready:e,authenticated:t}=(0,i.v)();return(0,a.I)({queryKey:o,queryFn:d,staleTime:3e5,enabled:e&&t})}function u(){let e=(0,n.jE)();return(0,s.n)({mutationFn:e=>l.uE.post("/mail/signatures",e),onSuccess:()=>{e.invalidateQueries({queryKey:o})}})}function m(){let e=(0,n.jE)();return(0,s.n)({mutationFn:({signatureId:e,...t})=>l.uE.put(`/mail/signatures/${e}`,t),onSuccess:()=>{e.invalidateQueries({queryKey:o}),e.invalidateQueries({queryKey:["identities"]})}})}function f(){let e=(0,n.jE)();return(0,s.n)({mutationFn:e=>l.uE.delete(`/mail/signatures/${e}`),onSuccess:()=>{e.invalidateQueries({queryKey:o}),e.invalidateQueries({queryKey:["identities"]})}})}},3793:(e,t,r)=>{"use strict";r.d(t,{l:()=>P});var a=r(4208),n=r(58113),s=r(52084),l=r(91356),i=r(12551),o=r(13746),d=r(22581),c=r(46424),u=r(57070),m=r(59557),f=r(90324),x=r(80936),p=r(7651),h=r(80361),g=r(51765),b=r(1138);let v=[{type:"mailbox",value:"spam",label:"Spam"},{type:"mailbox",value:"trash",label:"Corbeille"},{type:"mailbox",value:"promotions",label:"Promotions"},{type:"mailbox",value:"social",label:"R\xe9seaux sociaux"},{type:"mailbox",value:"updates",label:"Notifications"}];function j(e,t){return e.toLowerCase().includes(t.toLowerCase())}let w=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function y({items:e,onChange:t,placeholder:r,allowedTypes:s,emptyHint:N}){let[k,_]=(0,l.useState)(""),[C,S]=(0,l.useState)(!1),[A,M]=(0,l.useState)(0),E=(0,l.useRef)(null),z=(0,l.useMemo)(()=>new Set(e.map(d.yD)),[e]),D=function(e,t,r){let{contacts:a}=(0,x.D)(),n=(0,b.zm)(e=>e.identities),{data:s=[]}=(0,f.HM)(),i=(0,l.useMemo)(()=>(0,h.vi)(n,s.map(e=>e.email)),[n,s]),{data:o=[]}=(0,c.b0)(),{data:w=[]}=(0,u.FL)("all"),{folders:y=[]}=(0,m.Q)();return(0,l.useMemo)(()=>{let s=e.trim(),l=r?.types,c=e=>!l||l.includes(e),u=[],m=new Set,f=e=>{m.has(e.id)||(m.add(e.id),u.push(e))};if(c("not_in_contacts")){let e={type:"not_in_contacts",value:"",label:"Toute personne pas dans les contacts"},r=(0,d.yD)(e);!t.has(r)&&(!s||j(e.label,s))&&f({...e,id:r,group:"R\xe8gles contacts"});let a=new Set;for(let e of n){let r=(0,g.US)(e.email,e.accountId);if(a.has(r))continue;a.add(r);let n={type:"not_in_contacts",value:r,label:`Personnes pas dans les contacts de ${e.name||e.email}`},l=(0,d.yD)(n);!t.has(l)&&(!s||j(n.label,s)||j(e.email,s))&&f({...n,id:l,group:"R\xe8gles contacts"})}}if(c("identity"))for(let e of i){let r={type:"identity",value:e.key,label:e.label},a=(0,d.yD)(r);!t.has(a)&&(!s||j(e.label,s)||j(e.key,s))&&f({...r,id:a,group:"Mails de destination"})}if(c("contact"))for(let e of a){let r=(0,p.t)(e);for(let{value:a}of e.emails){if(!a)continue;let e={type:"contact",value:a,label:r?`${r} <${a}>`:a},n=(0,d.yD)(e);if(!t.has(n)&&(!s||j(e.label,s)||j(a,s))&&(f({...e,id:n,group:"Contacts"}),u.length>40))break}}if(c("email")&&s.includes("@")){let e={type:"email",value:s,label:s},r=(0,d.yD)(e);t.has(r)||f({...e,id:r,group:"Adresses"})}if(c("label"))for(let e of o){let r={type:"label",value:e.name,label:`Libell\xe9 \xb7 ${e.name}`},a=(0,d.yD)(r);!t.has(a)&&(!s||j(e.name,s))&&f({...r,id:a,group:"Libell\xe9s"})}if(c("folder"))for(let e of[...w.map(e=>({value:e.id,label:`Dossier \xb7 ${e.name}`})),...y.map(e=>({value:e.name,label:`Dossier \xb7 ${e.name}`}))]){let r={type:"folder",value:e.value,label:e.label},a=(0,d.yD)(r);!t.has(a)&&(!s||j(e.label,s))&&f({...r,id:a,group:"Dossiers"})}if(c("mailbox"))for(let e of v){let r=(0,d.yD)(e);!t.has(r)&&(!s||j(e.label,s))&&f({...e,id:r,group:"Bo\xeetes mail"})}return u.slice(0,12)},[a,n,i,o,w,y,e,t,r?.types])}(k,z,{types:s}),$=r=>{z.has((0,d.yD)(r))||(t([...e,r]),_(""),M(0))},I=r=>{t(e.filter(e=>(0,d.yD)(e)!==r))},R=C&&(D.length>0||w.test(k.trim())),F=(0,l.useMemo)(()=>{let e=new Map;for(let t of D){let r=e.get(t.group)??[];r.push(t),e.set(t.group,r)}return[...e.entries()]},[D]),q=-1;return(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsxs)("div",{className:(0,n.cn)("min-h-9 rounded-md border border-input bg-background px-2 py-1.5","focus-within:ring-2 focus-within:ring-ring/40"),children:[e.length>0?(0,a.jsx)("div",{className:"mb-1 flex flex-wrap gap-1",children:e.map(e=>(0,a.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-[11px] text-foreground",children:[(0,a.jsx)("span",{className:"truncate",children:e.label}),(0,a.jsx)("button",{type:"button",className:"shrink-0 rounded-full p-0.5 hover:bg-background/80","aria-label":`Retirer ${e.label}`,onClick:()=>I((0,d.yD)(e)),children:(0,a.jsx)(i.A,{className:"size-3"})})]},(0,d.yD)(e)))}):null,(0,a.jsx)(o.p,{value:k,placeholder:0===e.length?r:"Ajouter…",className:"h-7 border-0 bg-transparent px-0 text-xs shadow-none focus-visible:ring-0",onChange:e=>{_(e.target.value),M(0)},onFocus:()=>{E.current&&window.clearTimeout(E.current),S(!0)},onBlur:()=>{E.current=window.setTimeout(()=>S(!1),120)},onKeyDown:t=>{if("Backspace"===t.key&&!k&&e.length>0)return void I((0,d.yD)(e[e.length-1]));if("Enter"===t.key||","===t.key){if(t.preventDefault(),D[A])$(D[A]);else{let e;e=k.trim().replace(/[,;]$/,""),w.test(e)&&$({type:"email",value:e,label:e})}return}R&&0!==D.length&&("ArrowDown"===t.key?(t.preventDefault(),M(e=>(e+1)%D.length)):"ArrowUp"===t.key&&(t.preventDefault(),M(e=>(e-1+D.length)%D.length)))}})]}),R?(0,a.jsx)("ul",{className:"max-h-44 overflow-y-auto rounded-md border border-border bg-popover py-1 shadow-md",children:F.map(([e,t])=>(0,a.jsxs)("li",{children:[(0,a.jsx)("p",{className:"px-2 py-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e}),t.map(e=>{let t=q+=1;return(0,a.jsx)("button",{type:"button",className:(0,n.cn)("block w-full px-2 py-1.5 text-left text-xs hover:bg-muted",t===A&&"bg-muted"),onMouseDown:t=>{t.preventDefault(),$(e)},children:e.label},e.id)})]},e))}):null,N&&0===e.length?(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:N}):null]})}var N=r(11808),k=r(24177),_=r(19096),C=r(89342),S=r(93371),A=r(6931),M=r(6224),E=r(24818),z=r(4023),D=r(44410);let $=[{id:"light",label:"Clair"},{id:"dark",label:"Sombre"},{id:"system",label:"Syst\xe8me"}];function I({title:e,description:t,action:r,children:s,variant:l="panel"}){return(0,a.jsxs)("section",{className:(0,n.cn)("space-y-2 border-b border-border px-4 py-3","page"===l&&D.tv),children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-sm font-medium text-foreground",children:e}),t?(0,a.jsx)("p",{className:"mt-0.5 text-[11px] leading-snug text-muted-foreground",children:t}):null]}),r]}),s]})}function R({label:e,children:t}){return(0,a.jsxs)("div",{className:"grid grid-cols-[minmax(0,0.72fr)_minmax(9.75rem,1.18fr)] items-center gap-2 py-1",children:[(0,a.jsx)(_.J,{className:"min-w-0 text-xs font-normal text-muted-foreground",children:e}),(0,a.jsx)("div",{className:"min-w-0",children:t})]})}function F(e){let t=Math.floor(e/60);return`${String(t).padStart(2,"0")}:${String(e%60).padStart(2,"0")}`}function q(e){let[t,r]=e.split(":").map(Number);return Number.isFinite(t)&&Number.isFinite(r)?60*t+r:0}function P({variant:e="panel",onOpenThemeDialog:t}){let r,i=(0,A.S)(),c=(0,M.g)(),{themeMode:u,setThemeMode:m}=(0,E.U)(),x=(0,g._R)(e=>e.defaultVideoProvider),p=(0,g._R)(e=>e.setDefaultVideoProvider),v=(0,g._R)(e=>e.videoProviderApiKeys),j=(0,g._R)(e=>e.setVideoProviderApiKey),w=(0,g._R)(e=>e.defaultInvitationIdentityKey),D=(0,g._R)(e=>e.setDefaultInvitationIdentityKey),T=(0,g._R)(e=>e.autoImportInvitationSources),B=(0,g._R)(e=>e.setAutoImportInvitationSources),L=(0,g._R)(e=>e.invitationImportExclusions),U=(0,g._R)(e=>e.setInvitationImportExclusions),V=(0,g._R)(e=>e.weekStart),K=(0,g._R)(e=>e.setWeekStart),H=(0,g._R)(e=>e.defaultQuickDurationMinutes),O=(0,g._R)(e=>e.setDefaultQuickDurationMinutes),Q=(0,g._R)(e=>e.visibleHoursStart),Z=(0,g._R)(e=>e.visibleHoursEnd),W=(0,g._R)(e=>e.setVisibleHoursStart),J=(0,g._R)(e=>e.setVisibleHoursEnd),G=(0,g._R)(e=>e.timeFormat),Y=(0,g._R)(e=>e.setTimeFormat),X=(0,g._R)(e=>e.dragSnapMinutes),ee=(0,g._R)(e=>e.setDragSnapMinutes),et=(0,g._R)(e=>e.buttonSnapMinutes),er=(0,g._R)(e=>e.setButtonSnapMinutes),ea=(r=(0,b.zm)(e=>e.identities),(0,l.useMemo)(()=>{let e=new Set,t=[];for(let a of r){let r=(0,g.US)(a.email,a.accountId);e.has(r)||(e.add(r),t.push({key:r,label:`${a.name} <${a.email}>`}))}return t},[r])),en=function(){let e=(0,b.zm)(e=>e.identities),{data:t=[]}=(0,f.HM)();return(0,l.useMemo)(()=>(0,h.vi)(e,t.map(e=>e.email)),[e,t])}(),es=i.orgEnforcesTheme?i.themeMode:u,el=i.orgEnforcesVideoProvider?i.defaultVideoProvider:x,ei=!i.orgEnforcesVideoProvider&&"ultimeet"!==el&&"none"!==el,eo=(0,h.R6)(T,en),ed=(0,h.BP)(L,en),ec="page"===e,eu=(0,a.jsxs)(a.Fragment,{children:[ec||c?null:(0,a.jsxs)(I,{title:"Th\xe8me",variant:e,action:t?(0,a.jsx)("button",{type:"button",className:"shrink-0 text-xs text-[#1a73e8] hover:underline disabled:opacity-50",disabled:i.orgEnforcesTheme,onClick:t,children:"Arri\xe8re-plan"}):null,children:[i.orgEnforcesTheme?(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Th\xe8me impos\xe9 par votre organisation."}):null,(0,a.jsx)("div",{className:"grid grid-cols-3 gap-1.5",children:$.map(e=>(0,a.jsxs)("button",{type:"button",disabled:i.orgEnforcesTheme,onClick:()=>m(e.id),className:(0,n.cn)("rounded-lg border-2 p-1 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50",es===e.id?"border-primary bg-accent/60":"border-border hover:border-muted-foreground/50 hover:bg-accent/40"),children:[(0,a.jsx)(k.NB,{mode:e.id,className:"h-9"}),(0,a.jsx)("span",{className:"mt-0.5 block text-center text-[11px] text-foreground",children:e.label})]},e.id))})]}),(0,a.jsxs)(I,{title:"Affichage",variant:e,children:[(0,a.jsx)(R,{label:"Premier jour",children:(0,a.jsxs)(C.l6,{value:String(V),onValueChange:e=>K("auto"===e?"auto":Number(e)),children:[(0,a.jsx)(C.bq,{className:"h-8 w-full text-xs",children:(0,a.jsx)(C.yv,{children:(0,S.GY)(V)})}),(0,a.jsx)(C.gC,{children:d.oV.map(e=>(0,a.jsx)(C.eb,{value:String(e.value),children:e.label},String(e.value)))})]})}),(0,a.jsx)(R,{label:"Format horaire",children:(0,a.jsxs)(C.l6,{value:G,onValueChange:e=>Y(e),children:[(0,a.jsx)(C.bq,{className:"h-8 w-full text-xs",children:(0,a.jsx)(C.yv,{children:(0,S.BP)(G)})}),(0,a.jsxs)(C.gC,{children:[(0,a.jsx)(C.eb,{value:"24h",children:"24 h"}),(0,a.jsx)(C.eb,{value:"12h",children:"AM / PM"})]})]})}),(0,a.jsx)(R,{label:"Heures visibles",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-1.5",children:[(0,a.jsx)(o.p,{type:"time",className:"h-8 text-xs [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none",value:F(Q),onChange:e=>W(q(e.target.value))}),(0,a.jsx)(o.p,{type:"time",className:"h-8 text-xs [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none",value:F(Z),onChange:e=>J(q(e.target.value))})]})})]}),(0,a.jsxs)(I,{title:"Cr\xe9ation rapide",variant:e,children:[(0,a.jsx)(R,{label:"Dur\xe9e par d\xe9faut",children:(0,a.jsxs)(C.l6,{value:String(H),onValueChange:e=>O(Number(e)),children:[(0,a.jsx)(C.bq,{className:"h-8 w-full text-xs",children:(0,a.jsx)(C.yv,{children:(0,S.nZ)(H)})}),(0,a.jsx)(C.gC,{children:d.DO.map(e=>(0,a.jsx)(C.eb,{value:String(e.minutes),children:e.label},e.minutes))})]})}),(0,a.jsx)(R,{label:"Arrondi glisser",children:(0,a.jsxs)(C.l6,{value:String(X),onValueChange:e=>ee(Number(e)),children:[(0,a.jsx)(C.bq,{className:"h-8 w-full text-xs",children:(0,a.jsx)(C.yv,{children:(0,S.U)(X)})}),(0,a.jsx)(C.gC,{children:d.mF.map(e=>(0,a.jsx)(C.eb,{value:String(e),children:(0,S.U)(e)},e))})]})}),(0,a.jsx)(R,{label:"Arrondi boutons +/-",children:(0,a.jsxs)(C.l6,{value:String(et),onValueChange:e=>er(Number(e)),children:[(0,a.jsx)(C.bq,{className:"h-8 w-full text-xs",children:(0,a.jsx)(C.yv,{children:(0,S.U)(et)})}),(0,a.jsx)(C.gC,{children:d.mF.map(e=>(0,a.jsx)(C.eb,{value:String(e),children:(0,S.U)(e)},e))})]})})]}),(0,a.jsxs)(I,{title:"Visioconf\xe9rence",variant:e,description:i.orgEnforcesVideoProvider?"Fournisseur impos\xe9 par votre organisation.":void 0,children:[(0,a.jsx)(R,{label:"Fournisseur",children:(0,a.jsxs)(C.l6,{value:el,disabled:i.orgEnforcesVideoProvider,onValueChange:e=>p(e),children:[(0,a.jsx)(C.bq,{className:"h-8 w-full text-xs",children:(0,a.jsx)(C.yv,{children:(0,a.jsx)(N.h,{provider:el})})}),(0,a.jsx)(C.gC,{children:d.uI.map(e=>(0,a.jsx)(C.eb,{value:e,children:(0,a.jsx)(N.h,{provider:e})},e))})]})}),ei?(0,a.jsxs)("div",{className:"pt-1",children:[(0,a.jsxs)(_.J,{htmlFor:"agenda-video-api-key",className:"text-[11px] text-muted-foreground",children:["Cl\xe9 API ",(0,S.PF)(el)]}),(0,a.jsx)(o.p,{id:"agenda-video-api-key",type:"password",autoComplete:"off",className:"mt-1 h-8 text-xs",placeholder:"Optionnel si configur\xe9e par l'organisation",value:v[el]??"",onChange:e=>j(el,e.target.value)})]}):null]}),(0,a.jsxs)(I,{title:"Invitations par mail",variant:e,description:"Import automatique des fichiers .ics re\xe7us et envoi des r\xe9ponses.",children:[(0,a.jsx)(R,{label:"Envoi par d\xe9faut",children:(0,a.jsxs)(C.l6,{value:w??"auto",onValueChange:e=>D("auto"===e?null:e),children:[(0,a.jsx)(C.bq,{className:"h-8 w-full text-xs",children:(0,a.jsx)(C.yv,{placeholder:"Identit\xe9 par d\xe9faut"})}),(0,a.jsxs)(C.gC,{children:[(0,a.jsx)(C.eb,{value:"auto",children:"Identit\xe9 mail par d\xe9faut"}),ea.map(e=>(0,a.jsx)(C.eb,{value:e.key,children:e.label},e.key))]})]})}),(0,a.jsxs)("div",{className:"space-y-1 pt-1",children:[(0,a.jsx)(_.J,{className:"text-xs font-normal text-muted-foreground",children:"Import automatique depuis"}),(0,a.jsx)(y,{items:eo,allowedTypes:["identity","contact"],placeholder:"Mails de destination ou contacts…",emptyHint:"Bo\xeetes qui re\xe7oivent les .ics, ou exp\xe9diteurs \xe0 importer.",onChange:e=>B((0,h.R6)(e,en))})]}),(0,a.jsxs)("div",{className:"space-y-1 pt-2",children:[(0,a.jsx)(_.J,{className:"text-xs font-normal text-muted-foreground",children:"Ne pas importer automatiquement"}),(0,a.jsx)(y,{items:ed,placeholder:"Contact, adresse, dossier, libell\xe9…",emptyHint:"Excluez exp\xe9diteurs, dossiers ou r\xe8gles contacts.",onChange:e=>U((0,h.BP)(e,en))})]})]}),(0,a.jsx)(s.Mp,{variant:e})]});return ec?(0,a.jsx)(z.I,{columns:2,children:eu}):eu}},4023:(e,t,r)=>{"use strict";r.d(t,{I:()=>i});var a=r(4208),n=r(91356),s=r(58113);function l({children:e}){return(0,a.jsx)("div",{className:"flex min-w-0 flex-1 flex-col gap-4 lg:gap-5",children:e})}function i({columns:e,children:t,className:r}){let o=n.Children.toArray(t).filter(Boolean);if(1===e)return(0,a.jsx)("div",{className:(0,s.cn)("flex w-full flex-col gap-4",r),children:t});let d=o.filter((e,t)=>t%2==0),c=o.filter((e,t)=>t%2==1);return(0,a.jsxs)("div",{className:(0,s.cn)("w-full",r),children:[(0,a.jsx)("div",{className:"flex flex-col gap-4 lg:hidden",children:o.map((e,t)=>(0,a.jsx)("div",{className:"min-w-0",children:e},t))}),(0,a.jsxs)("div",{className:"hidden items-start gap-5 lg:flex",children:[(0,a.jsx)(l,{children:d.map((e,t)=>(0,a.jsx)("div",{className:"min-w-0",children:e},t))}),(0,a.jsx)(l,{children:c.map((e,t)=>(0,a.jsx)("div",{className:"min-w-0",children:e},t))})]})]})}},9483:(e,t,r)=>{"use strict";r.d(t,{p:()=>l});var a=r(46298),n=r(22029),s=r(91025);let l=(0,a.v)()((0,n.Zr)(e=>({themeMode:"system",setThemeMode:t=>e({themeMode:t})}),{name:"ultimail-demo-theme",storage:s.$,partialize:e=>({themeMode:e.themeMode})}))},10093:(e,t,r)=>{"use strict";r.d(t,{hR:()=>o,yZ:()=>d});var a=r(83233);let n=new Map,s=new Map,l=new Map;function i(e){let t=e.uid||e.path||`${e.full_name}:${e.email??""}`,r=[e.uid,e.path,e.etag,e.full_name,e.email,e.raw_vcard?.length??0].join("|");if(s.get(t)===r){let e=n.get(t);if(e)return e}let l=(0,a.hZ)(e);return n.set(t,l),s.set(t,r),l}function o(e,t){let r;if(!t)return[];let a=l.get(e);if(a&&a.apiContacts===t)return a.fullContacts;if(a&&t.length===a.apiContacts.length+1){let r=!0;for(let e=0;e<a.apiContacts.length;e++)if(t[e]!==a.apiContacts[e]){r=!1;break}if(r){let r=i(t[t.length-1]),n=[...a.fullContacts,r];return l.set(e,{apiContacts:t,fullContacts:n}),n}}return a&&t.length===a.apiContacts.length&&t.every((e,t)=>e===a.apiContacts[t])?a.fullContacts:(r=t.map(i),l.set(e,{apiContacts:t,fullContacts:r}),r)}function d(e){e?l.delete(e):(l.clear(),n.clear(),s.clear())}},11808:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var a=r(4208),n=r(30206),s=r(93371),l=r(58113);function i({provider:e,className:t,iconClassName:r}){return(0,a.jsxs)("span",{className:(0,l.cn)("inline-flex min-w-0 items-center gap-2",t),children:[(0,a.jsx)(n.e,{provider:e,className:(0,l.cn)("size-4 shrink-0",r)}),(0,a.jsx)("span",{className:"truncate",children:(0,s.PF)(e)})]})}},12197:(e,t,r)=>{"use strict";r.d(t,{a:()=>n});var a=r(91356);function n(){let[e,t]=a.useState(void 0);return a.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),r=()=>{t(window.innerWidth<768)};return e.addEventListener("change",r),t(window.innerWidth<768),()=>e.removeEventListener("change",r)},[]),!!e}},21019:(e,t,r)=>{"use strict";r.d(t,{AgendaAppShell:()=>C});var a=r(4208),n=r(91356),s=r(12646),l=r(93021),i=r(52590);function o(){let{data:e}=(0,l.i)(),t=(0,n.useRef)(null),r=e?.org_agenda?.enforce_org_theme??!1,a=e?.org_agenda?.default_theme_mode;return(0,n.useEffect)(()=>{r&&a&&t.current!==a&&(i.x.getState().themeMode!==a&&i.x.getState().setThemeMode(a),t.current=a)},[r,a]),null}var d=r(35855),c=r.n(d),u=r(12551),m=r(61554),f=r(5251),x=r(3793),p=r(60428),h=r(51765),g=r(49845),b=r(58113);function v(){let e=(0,h._R)(e=>e.quickSettingsOpen),t=(0,h._R)(e=>e.setQuickSettingsOpen),r=(0,i.x)(e=>e.themeDialogOpen),n=(0,i.x)(e=>e.setThemeDialogOpen);return(0,a.jsx)(f.cj,{open:e,onOpenChange:e=>!e&&t(!1),children:(0,a.jsxs)(f.h,{side:"right",hideClose:!0,overlayClassName:(0,b.cn)("bg-black/20",r&&"hidden"),"aria-label":"Configuration rapide Agenda","aria-describedby":void 0,className:"w-full gap-0 border-border bg-mail-surface p-0 text-foreground sm:max-w-[360px]",onInteractOutside:e=>{r&&e.preventDefault()},onEscapeKeyDown:e=>{r&&e.preventDefault()},children:[(0,a.jsxs)("header",{className:"flex shrink-0 items-center justify-between gap-2 px-4 pt-5 pb-3",children:[(0,a.jsx)(f.qp,{className:"text-base font-normal text-foreground dark:text-white",children:"Configuration rapide"}),(0,a.jsx)(m.$,{type:"button",variant:"ghost",size:"icon",className:"size-9 text-muted-foreground","aria-label":"Fermer",onClick:()=>t(!1),children:(0,a.jsx)(u.A,{className:"size-5"})})]}),(0,a.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto pb-6",children:[(0,a.jsx)("div",{className:"px-4 pb-4",children:(0,a.jsx)(m.$,{variant:"outline",className:"h-10 w-full rounded-full border-[#1a73e8] text-[#1a73e8] hover:bg-[#e8f0fe]/50 dark:border-[#9aa0a6] dark:text-white dark:hover:bg-[#3c4043]/50",asChild:!0,children:(0,a.jsx)(c(),{href:`${g.gH}/agenda`,onClick:()=>t(!1),children:"Voir tous les param\xe8tres"})})}),(0,a.jsx)(x.l,{onOpenThemeDialog:()=>n(!0)})]})]})})}function j(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{}),(0,a.jsx)(p.h,{})]})}var w=r(42125),y=r(36003),N=r(94883),k=r(69899),_=r(12197);function C({children:e,routeRoot:t}){let r=(0,_.a)(),l=(0,h.ZF)(e=>e.sidebarCollapsed),i=(0,h.ZF)(e=>e.setSidebarCollapsed);return(0,n.useLayoutEffect)(()=>{r||i(!1)},[r,i]),(0,n.useEffect)(()=>{r&&i(!0)},[r,i]),(0,a.jsx)(y.r_,{routeRoot:t,children:(0,a.jsx)(N.SuiteThemeShell,{children:(0,a.jsx)(k.Bc,{delayDuration:400,children:(0,a.jsxs)("div",{className:"ultimail-app relative flex h-dvh flex-col overflow-hidden bg-app-canvas","data-agenda-app":!0,children:[r&&!l&&(0,a.jsx)("button",{type:"button","aria-label":"Fermer le menu",className:"absolute inset-0 z-40 bg-black/20",onClick:()=>i(!0)}),e,(0,a.jsx)(s.H,{}),(0,a.jsx)(w._,{}),(0,a.jsx)(o,{}),(0,a.jsx)(j,{})]})})})})}},24177:(e,t,r)=>{"use strict";r.d(t,{AY:()=>f,JB:()=>b,LN:()=>u,NB:()=>k,Rw:()=>c,TM:()=>p,VU:()=>x,Yo:()=>h,a0:()=>g,pS:()=>m,zD:()=>d});var a=r(4208),n=r(58113);let s="bg-[#dadce0] dark:bg-[#5f6368]",l="bg-[#f1f3f4] dark:bg-[#3c4043]",i="bg-[#e8f0fe] dark:bg-[#394457]";function o({children:e,className:t}){return(0,a.jsx)("div",{className:(0,n.cn)("flex h-9 w-14 shrink-0 items-center justify-center rounded border border-[#dadce0] bg-white p-1 dark:border-[#5f6368] dark:bg-[#303134]",t),"aria-hidden":!0,children:e})}function d(){return(0,a.jsx)(o,{children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 flex-1 rounded-full",s)}),(0,a.jsx)("div",{className:"h-1.5 w-4 shrink-0 rounded-full bg-[#1a73e8]/70 dark:bg-[#8ab4f8]/70"})]}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-3/4 rounded-full",s)})]})})}function c(){return(0,a.jsx)(o,{children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 flex-1 rounded-full",s)}),(0,a.jsx)("svg",{viewBox:"0 0 8 8",className:"h-2 w-2 shrink-0 text-[#5f6368] dark:text-[#9aa0a6]",children:(0,a.jsx)("path",{d:"M2 1h4v1H5v4H4V2H2V1z",fill:"currentColor"})})]}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-3/4 rounded-full",s)})]})})}function u(){return(0,a.jsx)(o,{children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-px",children:[(0,a.jsx)("div",{className:(0,n.cn)("h-px w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-px w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-px w-full rounded-full",s)})]})})}function m(){return(0,a.jsx)(o,{children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-0.5",children:[(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-4/5 rounded-full",s)})]})})}function f(){return(0,a.jsx)(o,{children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 flex-1 rounded-full",s)}),(0,a.jsx)("div",{className:"h-1 w-1 shrink-0 rotate-45 bg-[#f4cc70]"})]}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-3/4 rounded-full",s)})]})})}function x(){return(0,a.jsx)(o,{children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 flex-1 rounded-full",s)}),(0,a.jsx)("div",{className:"h-1.5 w-1.5 shrink-0 rounded-sm bg-[#1a73e8] dark:bg-[#8ab4f8]"})]}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-3/4 rounded-full",s)})]})})}function p(){return(0,a.jsx)(o,{children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 flex-1 rounded-full",s)}),(0,a.jsx)("div",{className:"h-1.5 w-1.5 shrink-0 text-[#f4cc70]",children:"★"})]}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-3/4 rounded-full",s)})]})})}function h(){return(0,a.jsx)(o,{children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-0.5",children:[(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-0.5 w-full rounded-full",s)})]})})}function g(){return(0,a.jsx)(o,{className:"p-0.5",children:(0,a.jsxs)("div",{className:"flex h-full w-full gap-px",children:[(0,a.jsxs)("div",{className:(0,n.cn)("flex flex-1 flex-col gap-px p-0.5",l),children:[(0,a.jsx)("div",{className:(0,n.cn)("h-px w-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-px w-full",s)})]}),(0,a.jsxs)("div",{className:(0,n.cn)("flex w-5 flex-col gap-px p-0.5",i),children:[(0,a.jsx)("div",{className:"h-0.5 w-full rounded-full bg-[#1a73e8]/40 dark:bg-[#8ab4f8]/50"}),(0,a.jsx)("div",{className:(0,n.cn)("h-px w-full",s)})]})]})})}function b(){return(0,a.jsx)(o,{className:"p-0.5",children:(0,a.jsxs)("div",{className:"flex h-full w-full flex-col gap-px",children:[(0,a.jsxs)("div",{className:(0,n.cn)("flex flex-1 flex-col gap-px p-0.5",l),children:[(0,a.jsx)("div",{className:(0,n.cn)("h-px w-full",s)}),(0,a.jsx)("div",{className:(0,n.cn)("h-px w-full",s)})]}),(0,a.jsx)("div",{className:(0,n.cn)("h-3",i)})]})})}function v({children:e,className:t,...r}){return(0,a.jsx)("div",{className:(0,n.cn)("flex w-full flex-col overflow-hidden rounded-md border border-border",t),style:{backgroundColor:"#ffffff"},"aria-hidden":!0,...r,children:e})}function j({headerBg:e,sidebarBg:t,listBg:r,contentBg:n,lineBg:s}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"h-2 shrink-0",style:{backgroundColor:e}}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,a.jsx)("div",{className:"w-[24%] shrink-0",style:{backgroundColor:t}}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col p-0.5",style:{backgroundColor:r},children:[(0,a.jsx)("div",{className:"h-px w-full",style:{backgroundColor:s}}),(0,a.jsx)("div",{className:"mt-0.5 h-px w-3/4",style:{backgroundColor:s}}),(0,a.jsx)("div",{className:"mt-0.5 h-px w-1/2",style:{backgroundColor:s}})]}),(0,a.jsx)("div",{className:"w-[30%] shrink-0",style:{backgroundColor:n}})]})]})}function w({className:e}){return(0,a.jsx)(v,{className:(0,n.cn)("h-12",e),"data-mail-theme-preview":"light",children:(0,a.jsx)(j,{headerBg:"#ffffff",sidebarBg:"#f1f3f4",listBg:"#ffffff",contentBg:"#e8f0fe",lineBg:"#dadce0"})})}function y({className:e}){return(0,a.jsx)(v,{className:(0,n.cn)("h-12",e),"data-mail-theme-preview":"dark",style:{backgroundColor:"#202124"},children:(0,a.jsx)(j,{headerBg:"#202124",sidebarBg:"#3c4043",listBg:"#202124",contentBg:"#394457",lineBg:"#5f6368"})})}function N({className:e}){return(0,a.jsx)(v,{className:(0,n.cn)("h-12",e),"data-mail-theme-preview":"system",style:{backgroundColor:"#ffffff"},children:(0,a.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex w-1/2 min-w-0 flex-col",children:[(0,a.jsx)("div",{className:"h-2 shrink-0",style:{backgroundColor:"#ffffff"}}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,a.jsx)("div",{className:"w-[24%] shrink-0",style:{backgroundColor:"#f1f3f4"}}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col p-0.5",style:{backgroundColor:"#ffffff"},children:[(0,a.jsx)("div",{className:"h-px w-full",style:{backgroundColor:"#dadce0"}}),(0,a.jsx)("div",{className:"mt-0.5 h-px w-3/4",style:{backgroundColor:"#dadce0"}})]})]})]}),(0,a.jsxs)("div",{className:"flex w-1/2 min-w-0 flex-col",children:[(0,a.jsx)("div",{className:"h-2 shrink-0",style:{backgroundColor:"#202124"}}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,a.jsx)("div",{className:"w-[24%] shrink-0",style:{backgroundColor:"#3c4043"}}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col p-0.5",style:{backgroundColor:"#202124"},children:[(0,a.jsx)("div",{className:"h-px w-full",style:{backgroundColor:"#5f6368"}}),(0,a.jsx)("div",{className:"mt-0.5 h-px w-3/4",style:{backgroundColor:"#5f6368"}})]})]})]})]})})}function k({mode:e,className:t}){return"light"===e?(0,a.jsx)(w,{className:t}):"dark"===e?(0,a.jsx)(y,{className:t}):(0,a.jsx)(N,{className:t})}},24818:(e,t,r)=>{"use strict";r.d(t,{U:()=>l});var a=r(9483),n=r(6224),s=r(52590);function l(){let e=(0,n.g)(),t=(0,s.x)(e=>e.themeMode),r=(0,s.x)(e=>e.setThemeMode),l=(0,a.p)(e=>e.themeMode),i=(0,a.p)(e=>e.setThemeMode);return e?{themeMode:l,setThemeMode:i}:{themeMode:t,setThemeMode:r}}},26938:(e,t,r)=>{"use strict";r.d(t,{PV:()=>o,X6:()=>d,qH:()=>i,zt:()=>c});var a=r(49347),n=r(80691),s=r(26362),l=r(4433);let i="/account",o=[{id:"home",label:"Accueil",description:"Vue d'ensemble de votre compte Ulti",href:i,icon:a.A},{id:"personal-info",label:"Informations personnelles",description:"Nom, adresse e-mail et identifiant",href:`${i}/informations`,icon:n.A},{id:"usage-ia",label:"Usage IA",description:"Consommation LLM et cl\xe9s API personnelles",href:`${i}/usage-ia`,icon:s.A},{id:"security",label:"S\xe9curit\xe9",description:"Mot de passe, sessions et appareils",href:`${i}/securite`,icon:l.A}];function d(e,t){return t.href===i?e===i||e===`${i}/accueil`:e===t.href||!!e?.startsWith(`${t.href}/`)}function c(e){let t=e?.[0],r=o.find(e=>"home"===e.id?!t||"accueil"===t:e.href.endsWith(`/${t}`));return r?.id??"home"}},28094:(e,t,r)=>{Promise.resolve().then(r.bind(r,21019))},28292:(e,t,r)=>{"use strict";r.d(t,{d5:()=>s,tg:()=>a});let a="UltiCal",n="Ultimail";function s(e){let t=e?.replace(/\s+/g," ").trim();if(t){var r;return r=function(e,t=48){let r=e.replace(/\s+/g," ").trim();return r?r.length<=t?r:`${r.slice(0,t-1).trimEnd()}`:""}(t),`${r} - ${n}`}return"Bo\xeete mail - Ultimail"}},30925:(e,t,r)=>{"use strict";r.d(t,{S:()=>o});var a=r(4208);r(91356);var n=r(28879),s=r(68183),l=r(35019),i=r(58113);function o({className:e,checked:t,...r}){return(0,a.jsx)(n.bL,{"data-slot":"checkbox",className:(0,i.cn)("peer border-[1.5px] border-mail-row-checkbox-border bg-background dark:bg-mail-surface-muted data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 cursor-pointer rounded-[4px] shadow-xs transition-all outline-none hover:border-foreground/60 hover:shadow-sm focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...r,checked:t,children:(0,a.jsx)(n.C1,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:"indeterminate"===t?(0,a.jsx)(s.A,{className:"size-3 stroke-[2.5] text-inherit"}):(0,a.jsx)(l.A,{className:"size-3.5 text-inherit stroke-[2.5]"})})})}},36003:(e,t,r)=>{"use strict";r.d(t,{LT:()=>o,r_:()=>i});var a=r(4208),n=r(91356);let s="agenda",l=(0,n.createContext)(s);function i({routeRoot:e=s,children:t}){return(0,a.jsx)(l.Provider,{value:e,children:t})}function o(){return(0,n.useContext)(l)}},42125:(e,t,r)=>{"use strict";r.d(t,{_:()=>f,g:()=>x});var a=r(91356),n=r(5807),s=r(18747),l=r(93051),i=r(90324),o=r(94927),d=r(1559),c=r(93652),u=r(1138);async function m(e){let t=await o.uE.get(`/mail/accounts/${e}/identities`);return Array.isArray(t)?t:t.identities??[]}function f(){let e=(0,l.qU)(),{ready:t,authenticated:r}=(0,s.v)(),{data:o=[],isSuccess:f}=(0,i.HM)(),{data:x=[],isSuccess:p}=(0,d.sp)(),h=(0,a.useMemo)(()=>new Map(x.map(e=>[e.id,e])),[x]),g=(0,n.E)({queries:o.map(e=>({queryKey:["identities",e.id],queryFn:()=>m(e.id),enabled:t&&r&&!!e.id,staleTime:3e5}))}),b=g.map(e=>e.dataUpdatedAt).join("|"),v=(0,a.useMemo)(()=>t&&r&&f&&p&&0!==o.length?g.some(e=>e.isPending&&"idle"!==e.fetchStatus)?null:(0,c.A1)(g.flatMap(e=>(e.data??[]).map(e=>(0,c.U9)(e,h)))):[],[t,r,f,p,o.length,b,g,h]);return(0,a.useEffect)(()=>{e||(t&&r?null!==v&&u.zm.getState().hydrateFromApi(v):u.zm.getState().clear())},[e,t,r,v]),null}function x(e){let t=(0,u.zm)(e=>e.identities),r=(0,u.zm)(e=>e.hydrated),a=e?t.filter(t=>t.accountId===e):t,n=a.length>0?a:t,s=n.find(e=>e.isDefault)??n[0]??null;return{identities:n,defaultIdentity:s,hydrated:r}}},44410:(e,t,r)=>{"use strict";r.d(t,{$i:()=>m,$p:()=>R,AO:()=>c,Az:()=>h,Bh:()=>I,Cc:()=>v,DO:()=>W,E1:()=>y,E7:()=>F,Fr:()=>P,G7:()=>K,HU:()=>X,I8:()=>E,IK:()=>L,KZ:()=>u,LQ:()=>M,Mz:()=>C,PG:()=>S,Q5:()=>G,QU:()=>N,R5:()=>ee,RA:()=>f,Sh:()=>i,TN:()=>Z,Un:()=>o,Ww:()=>Q,Yh:()=>O,Yj:()=>p,a9:()=>x,c7:()=>b,d9:()=>er,gS:()=>l,h6:()=>k,hf:()=>D,hn:()=>V,hz:()=>n,i1:()=>_,il:()=>j,j7:()=>U,l9:()=>d,lK:()=>$,lQ:()=>B,l_:()=>g,nr:()=>s,pK:()=>T,sF:()=>Y,th:()=>z,tv:()=>en,uU:()=>w,wC:()=>et,wJ:()=>A,wf:()=>J,wo:()=>ea,yv:()=>H});var a=r(58113);let n=(0,a.cn)("min-w-[220px] rounded-lg border border-border bg-popover p-0 py-1 text-popover-foreground shadow-lg","[&_[data-slot=dropdown-menu-item]]:gap-3 [&_[data-slot=dropdown-menu-item]]:rounded-none","[&_[data-slot=dropdown-menu-item]]:px-3 [&_[data-slot=dropdown-menu-item]]:py-2 [&_[data-slot=dropdown-menu-item]]:text-sm","[&_[data-slot=dropdown-menu-item]]:focus:bg-accent [&_[data-slot=dropdown-menu-item]]:focus:text-accent-foreground","[&_[data-slot=dropdown-menu-sub-trigger]]:gap-3 [&_[data-slot=dropdown-menu-sub-trigger]]:rounded-none","[&_[data-slot=dropdown-menu-sub-trigger]]:px-3 [&_[data-slot=dropdown-menu-sub-trigger]]:py-2","[&_[data-slot=dropdown-menu-sub-trigger]]:text-sm","[&_[data-slot=dropdown-menu-sub-trigger]]:focus:bg-accent","[&_[data-slot=dropdown-menu-sub-trigger]]:data-[state=open]:bg-accent","[&_[data-slot=dropdown-menu-sub-content]]:min-w-[200px]","[&_[data-slot=dropdown-menu-sub-content]]:rounded-lg","[&_[data-slot=dropdown-menu-sub-content]]:border [&_[data-slot=dropdown-menu-sub-content]]:border-border","[&_[data-slot=dropdown-menu-sub-content]]:bg-popover","[&_[data-slot=dropdown-menu-sub-content]]:p-0 [&_[data-slot=dropdown-menu-sub-content]]:py-1","[&_[data-slot=dropdown-menu-sub-content]]:shadow-lg","[&_[data-slot=dropdown-menu-separator]]:mx-0 [&_[data-slot=dropdown-menu-separator]]:my-1","[&_[data-slot=dropdown-menu-separator]]:bg-border","[&_[data-slot=context-menu-item]]:focus:bg-accent [&_[data-slot=context-menu-item]]:focus:text-accent-foreground","[&_[data-slot=context-menu-sub-trigger]]:focus:bg-accent","[&_[data-slot=context-menu-sub-content]]:border-border [&_[data-slot=context-menu-sub-content]]:bg-popover"),s=(0,a.cn)(n,"min-w-[280px]"),l=(0,a.cn)("min-w-[240px] border-border bg-popover p-0 py-1.5 text-popover-foreground shadow-md","[&_[data-slot=dropdown-menu-label]]:text-muted-foreground","[&_[data-slot=dropdown-menu-item]]:text-popover-foreground","[&_[data-slot=dropdown-menu-item]]:focus:bg-accent [&_[data-slot=dropdown-menu-item]]:focus:text-accent-foreground","[&_[data-slot=dropdown-menu-sub-trigger]]:text-popover-foreground","[&_[data-slot=dropdown-menu-sub-trigger]]:focus:bg-accent","[&_[data-slot=dropdown-menu-sub-trigger]]:data-[state=open]:bg-accent","[&_[data-slot=context-menu-label]]:text-muted-foreground","[&_[data-slot=context-menu-item]]:text-popover-foreground","[&_[data-slot=context-menu-item]]:focus:bg-accent [&_[data-slot=context-menu-item]]:focus:text-accent-foreground","[&_[data-slot=context-menu-sub-trigger]]:text-popover-foreground","[&_[data-slot=context-menu-sub-trigger]]:focus:bg-accent","[&_[data-slot=context-menu-sub-trigger]]:data-[state=open]:bg-accent"),i=(0,a.cn)("mx-1 flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm text-popover-foreground","focus:bg-accent focus:text-accent-foreground"),o=(0,a.cn)("mx-1 cursor-pointer rounded-sm px-2 py-2 text-popover-foreground","focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent"),d=(0,a.cn)("mx-1 cursor-pointer px-3 py-2 text-sm text-popover-foreground focus:bg-accent focus:text-accent-foreground"),c="my-1.5 bg-border",u="border-border bg-mail-surface ring-offset-background hover:ring-muted-foreground focus-visible:ring-ring",m=(0,a.cn)("min-w-[180px] border-border bg-popover p-2 text-popover-foreground shadow-md"),f="text-muted-foreground hover:bg-accent hover:text-accent-foreground";(0,a.cn)("border border-border bg-mail-surface-elevated text-foreground shadow-xl"),(0,a.cn)("h-9 w-9 shrink-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground");let x="dark:!text-white",p="min-h-0 flex-1 overflow-y-auto overflow-x-hidden overscroll-y-contain [scrollbar-gutter:stable] outline-none max-sm:pb-16 [scrollbar-color:color-mix(in_srgb,var(--muted-foreground)_55%,transparent)_transparent] [scrollbar-width:auto] [&::-webkit-scrollbar]:w-2.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/45",h="bg-gradient-to-b from-transparent via-mail-surface/90 to-mail-surface pt-3",g=(0,a.cn)("inline-flex shrink-0 items-center gap-2 whitespace-nowrap rounded-full border border-border","bg-mail-surface px-6 py-2.5 text-sm font-medium text-foreground shadow-sm","transition-shadow hover:bg-accent hover:shadow-md"),b=(0,a.cn)("mx-6 mb-4 rounded-xl border border-border bg-mail-invitation px-4 py-3 shadow-sm"),v="hover:bg-accent/60",j=(0,a.cn)("flex h-10 shrink-0 cursor-pointer items-center rounded-t-lg bg-muted px-3","dark:bg-[#2d2e30]"),w=(0,a.cn)("border-border bg-popover p-3 text-popover-foreground shadow-lg"),y="bg-accent text-accent-foreground",N=(0,a.cn)("flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground disabled:opacity-40"),k="bg-accent text-foreground",_="mx-0.5 h-5 w-px bg-border",C=(0,a.cn)("flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground"),S="bg-accent text-foreground",A=(0,a.cn)("inline-flex h-9 items-center bg-primary text-primary-foreground","hover:bg-primary/90 hover:shadow-md transition-all"),M="ml-3 border-b border-border",E="bg-primary/10",z="hover:bg-accent",D=(0,a.cn)("inline-flex items-center gap-1 rounded-full bg-muted py-0.5 pl-0.5 pr-2 text-sm text-foreground","hover:bg-accent transition-colors"),$=(0,a.cn)("absolute inset-0 z-50 flex items-center justify-center rounded-lg border-2 border-dashed border-primary","bg-primary/5");(0,a.cn)("pointer-events-auto size-9 shrink-0 rounded-full border border-border","bg-mail-surface/80 text-muted-foreground shadow-md backdrop-blur","hover:bg-accent hover:text-accent-foreground");let I="border border-border bg-popover text-popover-foreground shadow-md",R="",F=(0,a.cn)("relative box-border w-full max-w-full overflow-hidden rounded-xl border border-border","bg-mail-surface text-foreground shadow-md ring-1 ring-primary/15"),q=(0,a.cn)("size-4 min-h-4 min-w-4 shrink-0 border-[1.5px] border-mail-row-checkbox-border bg-transparent shadow-none","dark:bg-transparent focus-visible:ring-mail-row-checkbox-border/30","data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"),P=(0,a.cn)(q,"rounded-full"),T=(0,a.cn)(q,"rounded-[2.5px]"),B="divide-y divide-mail-list-divider";(0,a.cn)("relative flex min-w-0 flex-1 items-center rounded-full border border-border","bg-mail-surface-elevated shadow-sm transition-shadow focus-within:shadow-md");let L="border-mail-border",U=(0,a.cn)("border-mail-list-chip-border bg-mail-list-chip-muted text-mail-list-chip-text"),V=(0,a.cn)("rounded-md border border-solid !border-mail-border bg-mail-surface-muted text-foreground shadow-none","focus-visible:!border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","dark:!border-mail-border dark:!bg-mail-surface-muted"),K=(0,a.cn)("size-4 border-[1.5px] border-mail-row-checkbox-border bg-mail-surface-muted shadow-none","dark:bg-mail-surface-muted","data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground","data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground"),H=(0,a.cn)("bg-mail-surface-elevated/80 backdrop-blur-xl backdrop-saturate-150","supports-[backdrop-filter]:bg-mail-surface-elevated/65"),O=(0,a.cn)("absolute left-0 right-0 top-full z-50 mt-1 overflow-hidden rounded-lg border text-foreground shadow-lg",L,H),Q=(0,a.cn)("absolute left-0 top-full z-50 mt-1 max-h-[80vh] overflow-y-auto rounded-lg border",L,"bg-mail-surface-elevated text-foreground shadow-lg","data-mail-search-advanced","sm:min-w-[34rem] sm:max-w-[min(42rem,calc(100vw-5rem))]","md:min-w-[38rem]","lg:right-0 lg:min-w-0 lg:max-w-none"),Z=(0,a.cn)("z-[101] flex h-[100dvh] max-h-[100dvh] w-full flex-col gap-0 rounded-none border-0","bg-mail-surface text-foreground p-0 shadow-xl","duration-300 ease-out","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom","pb-[env(safe-area-inset-bottom)]","data-mail-mobile-search"),W=(0,a.cn)("max-sm:bg-app-canvas/80 max-sm:backdrop-blur-xl max-sm:backdrop-saturate-150 max-sm:supports-[backdrop-filter]:bg-app-canvas/65","sm:bg-transparent"),J="mail-sidebar-blur-surface",G="mail-sidebar-overlay-panel",Y=(0,a.cn)("flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground","outline-none hover:bg-accent/80 focus-visible:ring-2 focus-visible:ring-ring/50");function X(e){return(0,a.cn)("transition-colors",e.isSelected?"bg-mail-nav-selected text-mail-nav-selected font-medium":e.isOver?"bg-mail-nav-drop text-foreground":e.rowHoverHeld?"bg-mail-nav-hover text-foreground":e.hasUnread?"text-foreground hover:bg-mail-nav-hover":"text-muted-foreground hover:bg-mail-nav-hover",e.extra)}let ee="flex min-h-0 min-w-0 flex-1 flex-col px-1 pb-1 max-sm:px-0 max-sm:pb-0",et="flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl bg-mail-surface shadow-sm max-sm:rounded-none max-sm:shadow-none",er=(0,a.cn)("flex h-auto w-fit max-w-full flex-wrap gap-1.5","[&_[data-slot=tabs-trigger]]:flex-none"),ea=(0,a.cn)("mail-settings-card rounded-lg border border-mail-border bg-mail-surface shadow-sm","dark:bg-mail-surface-elevated dark:shadow-[0_1px_4px_rgba(0,0,0,0.35)]"),en=(0,a.cn)("mail-settings-masonry-section border-border px-0 py-5","lg:rounded-xl lg:border lg:border-mail-border lg:bg-mail-surface lg:px-5 lg:py-5 lg:shadow-sm","dark:lg:bg-mail-surface-elevated dark:lg:shadow-[0_1px_4px_rgba(0,0,0,0.35)]")},49845:(e,t,r)=>{"use strict";r.d(t,{IJ:()=>u,bZ:()=>b,bx:()=>g,gH:()=>c,oB:()=>x,si:()=>f});var a=r(28292),n=r(28397),s=r(20911),l=r(84651),i=r(192),o=r(30426),d=r(68817);let c="/settings",u=[{id:"display",label:"Affichage",description:"Densit\xe9, th\xe8me, bo\xeete de r\xe9ception, volet de lecture",href:c,icon:n.A},{id:"accounts",label:"Comptes mail",description:"IMAP, SMTP, identit\xe9s d'envoi et signatures",href:`${c}/accounts`,icon:s.A},{id:"labels",label:"Libell\xe9s et dossiers",description:"Organisation unifi\xe9e cross-comptes",href:`${c}/labels`,icon:l.A},{id:"notifications",label:"Notifications",description:"Alertes desktop, mobile et e-mail",href:`${c}/notifications`,icon:i.A},{id:"automation",label:"Automatisations",description:"R\xe8gles, webhooks, LLM, recherche web, tokens API",href:`${c}/automation`,icon:o.A},{id:"agenda",label:a.tg,description:"Affichage, visio, invitations, agendas et vues",href:`${c}/agenda`,icon:d.A}];function m(e){return e===c||e?.startsWith(`${c}/`)===!0}function f(e,t){return t.href===c?e===c||e===`${c}/display`:e===t.href||!!e?.startsWith(`${t.href}/`)}function x(e){let t=e?.[0],r=u.find(e=>"display"===e.id?!t||"display"===t:e.href.endsWith(`/${t}`));return r?.id??"display"}let p=["display","automation","agenda"],h=["accounts"];function g(e){return!!m(e)&&u.some(t=>p.includes(t.id)&&f(e,t))}function b(e){return!!m(e)&&u.some(t=>h.includes(t.id)&&f(e,t))}},57070:(e,t,r)=>{"use strict";r.d(t,{FL:()=>o,N0:()=>u,vS:()=>c,w1:()=>m,yr:()=>d});var a=r(98306),n=r(39927),s=r(17745),l=r(94927),i=r(18747);function o(e="all"){let{ready:t,authenticated:r}=(0,i.v)();return(0,a.I)({queryKey:["unified-folders",e],queryFn:async()=>{var t;return Array.isArray(t=await l.uE.get("/mail/unified-folders","all"===e?void 0:"global"===e?{account_id:"global"}:{account_id:e}))?t:t.folders??[]},enabled:t&&r,staleTime:6e4,retry:1})}function d(){let e=(0,n.jE)();return(0,s.n)({mutationFn:e=>l.uE.post("/mail/unified-folders",e),onSuccess:()=>{e.invalidateQueries({queryKey:["unified-folders"]})}})}function c(){let e=(0,n.jE)();return(0,s.n)({mutationFn:e=>l.uE.delete(`/mail/unified-folders/${e}`),onSuccess:()=>{e.invalidateQueries({queryKey:["unified-folders"]})}})}function u(){let e=(0,n.jE)();return(0,s.n)({mutationFn:({id:e,...t})=>l.uE.put(`/mail/unified-folders/${e}`,t),onSuccess:()=>{e.invalidateQueries({queryKey:["unified-folders"]})}})}function m(){let e=(0,n.jE)();return(0,s.n)({mutationFn:e=>l.uE.post("/mail/unified-folders/reorder",{items:e}),onSuccess:()=>{e.invalidateQueries({queryKey:["unified-folders"]})}})}},59557:(e,t,r)=>{"use strict";r.d(t,{Q:()=>d,m:()=>c});var a=r(5807),n=r(98306),s=r(94927),l=r(18747),i=r(90324);function o(e){return Array.isArray(e)?e:e.folders??[]}function d(){let{ready:e,authenticated:t}=(0,l.v)(),{data:r=[]}=(0,i.HM)(),n=(0,a.E)({queries:r.map(r=>({queryKey:["folders",r.id],queryFn:async()=>o(await s.uE.get("/mail/folders",{account_id:r.id})),enabled:e&&t&&!!r.id,staleTime:6e4,retry:1}))}),d=n.some(e=>e.isLoading),c=0===r.length||n.every(e=>e.isFetched);return{folders:n.flatMap(e=>e.data??[]),isLoading:d,isFetched:c}}function c(e){let{ready:t,authenticated:r}=(0,l.v)();return(0,n.I)({queryKey:["folders",e],queryFn:async()=>o(await s.uE.get("/mail/folders",{account_id:e})),enabled:t&&r&&!!e,staleTime:6e4,retry:1})}},59680:(e,t,r)=>{"use strict";r.d(t,{CN:()=>n,TR:()=>a});let a=(0,r(46298).v)()(e=>({signatures:[],hydrated:!1,hydrateFromApi:t=>e({signatures:t,hydrated:!0}),clear:()=>e({signatures:[],hydrated:!1})}));function n(e){if(!e)return null;let t=a.getState().signatures.find(t=>t.id===e);return t?.html?.trim()?t.html:null}},60142:(e,t,r)=>{"use strict";r.d(t,{N:()=>s});var a=r(4208);r(91356);var n=r(17996);function s({children:e,scriptProps:t,...r}){let l={...t,type:"application/json"};return(0,a.jsx)(n.N,{...r,scriptProps:l,children:e})}},60428:(e,t,r)=>{"use strict";r.d(t,{h:()=>o});var a=r(4208),n=r(18166),s=r(58113),l=r(81893),i=r(52590);function o(){let e=(0,i.x)(e=>e.themeDialogOpen),t=(0,i.x)(e=>e.setThemeDialogOpen),r=(0,i.x)(e=>e.backgroundId),o=(0,i.x)(e=>e.setBackgroundId),d=(0,l.y9)(r);return(0,a.jsx)(n.lG,{open:e,onOpenChange:t,children:(0,a.jsxs)(n.Cf,{overlayClassName:"z-[70]",className:"z-[70] max-w-md gap-5 border-border bg-background sm:max-w-lg",children:[(0,a.jsx)(n.c7,{children:(0,a.jsx)(n.L3,{className:"text-left text-base font-normal text-foreground",children:"Arri\xe8re-plan"})}),(0,a.jsx)("section",{children:(0,a.jsx)("div",{className:"grid grid-cols-3 gap-2 sm:grid-cols-4",children:l.UT.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>o(e.id),className:(0,s.cn)("flex flex-col items-center gap-1 rounded-lg p-1 transition-colors",d===e.id&&"ring-2 ring-[#1a73e8] ring-offset-1 ring-offset-background"),title:e.label,children:[(0,a.jsx)("span",{className:"block h-14 w-full rounded-md border border-border bg-cover bg-center",style:"none"===e.background?{backgroundColor:"var(--app-canvas)"}:{backgroundColor:e.fallbackColor,background:e.background}}),(0,a.jsx)("span",{className:(0,s.cn)("max-w-full truncate text-[10px]",d===e.id?"font-bold text-foreground dark:text-white":"text-muted-foreground dark:text-mail-text"),children:e.label})]},e.id))})})]})})}},69899:(e,t,r)=>{"use strict";r.d(t,{Bc:()=>l,ZI:()=>d,k$:()=>o,m_:()=>i});var a=r(4208);r(91356);var n=r(21729),s=r(58113);function l({delayDuration:e=0,...t}){return(0,a.jsx)(n.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function i({...e}){return(0,a.jsx)(n.bL,{"data-slot":"tooltip",...e})}function o({...e}){return(0,a.jsx)(n.l9,{"data-slot":"tooltip-trigger",...e})}function d({className:e,sideOffset:t=0,children:r,...l}){return(0,a.jsx)(n.ZL,{children:(0,a.jsxs)(n.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,s.cn)("border border-border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...l,children:[r,(0,a.jsx)(n.i3,{className:"fill-popover z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}},71869:(e,t,r)=>{"use strict";r.d(t,{Gf:()=>i,Vv:()=>c,Xw:()=>l,jk:()=>s,pQ:()=>d});var a=r(32292),n=r(59680);let s="z-[100]",l=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,i=a.bP.create({name:"signatureBlock",group:"block",content:"block+",defining:!0,isolating:!0,parseHTML:()=>[{tag:'div[id="ultimail-signature"]'}],renderHTML:({HTMLAttributes:e})=>["div",(0,a.KV)(e,{id:"ultimail-signature"}),0]}),o=/<div id="ultimail-signature">[\s\S]*<\/div>/;function d(e){return e.replace(o,"")}function c(e,t){let r=d(e);if(!t)return r;let a=(0,n.CN)(t)??(t.trimStart().startsWith("<")?t:null);return a?.trim()?`${r}<div id="ultimail-signature"><p>--</p>${a}</div>`:r}},80936:(e,t,r)=>{"use strict";r.d(t,{D:()=>l});var a=r(91356),n=r(29491),s=r(10093);function l(e){let t=(0,n.ZB)(),r=e??t,l=(0,n.yr)(),{data:i,...o}=(0,n.PN)(r),d=(0,a.useMemo)(()=>(0,s.hR)(r??"",i),[r,i]),c=l.isLoading||!!r&&o.isLoading,u=l.isError||o.isError,m=l.error??o.error;return{contacts:d,bookId:r,...o,isLoading:c,isError:u,error:m,refetch:function(){l.refetch(),o.refetch()}}}},81647:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n,i:()=>s});var a=r(81893);function n(e=document.documentElement){delete e.dataset.mailBackground,e.style.removeProperty("--mail-bg-layer"),e.style.removeProperty("--mail-bg-fallback")}function s(e,t=document.documentElement){let r=(0,a.y9)(e),{background:l,fallbackColor:i}=(0,a.Pu)(r);"none"===r||"none"===l?n(t):(t.dataset.mailBackground=r,t.style.setProperty("--mail-bg-layer",l),t.style.setProperty("--mail-bg-fallback",i))}},83833:(e,t,r)=>{"use strict";r.d(t,{C:()=>d});var a=r(91356),n=r(19984),s=r(17996),l=r(81647),i=r(9483),o=r(52590);function d(){let e=(0,n.usePathname)(),t=(0,o.x)(e=>e.themeMode),r=(0,i.p)(e=>e.themeMode),d="/demo"===e||e?.startsWith("/demo/")===!0?r:t,c=(0,o.x)(e=>e.backgroundId),{theme:u,setTheme:m}=(0,s.D)();return(0,a.useEffect)(()=>{u&&u!==d&&m(d)},[d,u,m]),(0,a.useEffect)(()=>"/mail"===e||e.startsWith("/mail/")||"/demo/mail"===e||e.startsWith("/demo/mail/")?((0,l.i)(c),()=>(0,l.Z)()):void(0,l.Z)(),[c,e]),null}},89342:(e,t,r)=>{"use strict";r.d(t,{TR:()=>x,bq:()=>m,eb:()=>p,gC:()=>f,l6:()=>d,mi:()=>h,s3:()=>c,yv:()=>u});var a=r(4208);r(91356);var n=r(29477),s=r(9519),l=r(35019),i=r(30758),o=r(58113);function d({...e}){return(0,a.jsx)(n.bL,{"data-slot":"select",...e})}function c({...e}){return(0,a.jsx)(n.YJ,{"data-slot":"select-group",...e})}function u({...e}){return(0,a.jsx)(n.WT,{"data-slot":"select-value",...e})}function m({className:e,size:t="default",variant:r="default",children:l,...i}){return(0,a.jsxs)(n.l9,{"data-slot":"select-trigger","data-size":t,"data-variant":r,className:(0,o.cn)("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex w-fit cursor-pointer items-center justify-between gap-2 rounded-md bg-transparent text-sm whitespace-nowrap transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","default"===r&&"border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 border px-3 py-2 shadow-xs focus-visible:ring-[3px]","ghost"===r&&"border-0 shadow-none hover:bg-transparent focus-visible:ring-0 dark:bg-transparent dark:hover:bg-transparent dark:data-[state=open]:bg-transparent",e),...i,children:[l,(0,a.jsx)(n.In,{asChild:!0,children:(0,a.jsx)(s.A,{className:"size-4 opacity-50"})})]})}function f({className:e,children:t,position:r="popper",...s}){return(0,a.jsx)(n.ZL,{children:(0,a.jsxs)(n.UC,{"data-slot":"select-content",className:(0,o.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...s,children:[(0,a.jsx)(g,{}),(0,a.jsx)(n.LM,{className:(0,o.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,a.jsx)(b,{})]})})}function x({className:e,...t}){return(0,a.jsx)(n.JU,{"data-slot":"select-label",className:(0,o.cn)("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function p({className:e,children:t,...r}){return(0,a.jsxs)(n.q7,{"data-slot":"select-item",className:(0,o.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,a.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(n.VF,{children:(0,a.jsx)(l.A,{className:"size-4"})})}),(0,a.jsx)(n.p4,{children:t})]})}function h({className:e,...t}){return(0,a.jsx)(n.wv,{"data-slot":"select-separator",className:(0,o.cn)("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function g({className:e,...t}){return(0,a.jsx)(n.PP,{"data-slot":"select-scroll-up-button",className:(0,o.cn)("flex cursor-pointer items-center justify-center py-1",e),...t,children:(0,a.jsx)(i.A,{className:"size-4"})})}function b({className:e,...t}){return(0,a.jsx)(n.wn,{"data-slot":"select-scroll-down-button",className:(0,o.cn)("flex cursor-pointer items-center justify-center py-1",e),...t,children:(0,a.jsx)(s.A,{className:"size-4"})})}},93652:(e,t,r)=>{"use strict";r.d(t,{A1:()=>o,G_:()=>i,U9:()=>s,XE:()=>l});var a=r(71869),n=r(59680);function s(e,t){let r,a=e.default_signature_id??null,s=(r=e.default_signature_id?t?.get(e.default_signature_id)?.html??(0,n.CN)(e.default_signature_id):null,r?.trim()?r:e.signature_html?.trim()||null);return{id:e.id,accountId:e.account_id,name:e.name,email:e.email,defaultSignatureId:a,signatureHtml:s,isDefault:e.is_default}}function l(e,t){let r=t.signatureHtml??null;return r?.trim()?(0,a.Vv)(e,r):e}function i(e){return new Set(e.map(e=>e.email.trim().toLowerCase()).filter(Boolean))}function o(e){let t=new Set,r=[];for(let a of e){let e=`${a.accountId??""}:${a.email.trim().toLowerCase()}`;t.has(e)||(t.add(e),r.push(a))}return r}},94883:(e,t,r)=>{"use strict";r.d(t,{SuiteThemeShell:()=>l});var a=r(4208),n=r(60142),s=r(83833);function l({children:e}){return(0,a.jsxs)(n.N,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:[e,(0,a.jsx)(s.C,{})]})}}},e=>{e.O(0,[2276,6677,1909,2082,3616,798,9032,8306,5855,8023,5179,8992,5260,1729,9673,1820,2551,1969,563,4927,4498,7865,2646,9821,1614,1506,7358],()=>e(e.s=28094)),_N_E=e.O()}]);