dhi-copilot-ai 1.0.1 → 1.0.2

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/index.js CHANGED
@@ -1,5 +1,6 @@
1
- "use strict";var Be=Object.create;var q=Object.defineProperty,Oe=Object.defineProperties,qe=Object.getOwnPropertyDescriptor,Ge=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,Ke=Object.getPrototypeOf,le=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var pe=(e,t,s)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,x=(e,t)=>{for(var s in t||(t={}))le.call(t,s)&&pe(e,s,t[s]);if(V)for(var s of V(t))fe.call(t,s)&&pe(e,s,t[s]);return e},S=(e,t)=>Oe(e,Ge(t));var G=(e,t)=>{var s={};for(var r in e)le.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(e!=null&&V)for(var r of V(e))t.indexOf(r)<0&&fe.call(e,r)&&(s[r]=e[r]);return s};var Ve=(e,t)=>{for(var s in t)q(e,s,{get:t[s],enumerable:!0})},ge=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xe(t))!le.call(e,i)&&i!==s&&q(e,i,{get:()=>t[i],enumerable:!(r=qe(t,i))||r.enumerable});return e};var $=(e,t,s)=>(s=e!=null?Be(Ke(e)):{},ge(t||!e||!e.__esModule?q(s,"default",{value:e,enumerable:!0}):s,e)),Qe=e=>ge(q({},"__esModule",{value:!0}),e);var et={};Ve(et,{ChatWindow:()=>se,CopilotApp:()=>Me,Sidebar:()=>$e,WidgetProvider:()=>Q,useChat:()=>ae,useConnectors:()=>je,useWidgetConfig:()=>B});module.exports=Qe(et);var Le=require("react");var F=require("react");var xe=require("react/jsx-runtime"),he=(0,F.createContext)(void 0);function Q({children:e,config:t}){let s={primaryColor:process.env.NEXT_PUBLIC_PRIMARY_COLOR||"#2563EB",logoUrl:process.env.NEXT_PUBLIC_WIDGET_LOGO||"/logo.png",botName:process.env.NEXT_PUBLIC_WIDGET_TITLE||"Copilot RH",position:"right",apiUrl:process.env.NEXT_PUBLIC_API_URL||"http://localhost:8000",expandedDefault:!1},r=(0,F.useMemo)(()=>x(x({},s),t),[t]);return(0,F.useEffect)(()=>{let i=document.documentElement;i.style.setProperty("--widget-primary",r.primaryColor),i.style.setProperty("--widget-primary-light",`${r.primaryColor}15`)},[r.primaryColor]),(0,xe.jsx)(he.Provider,{value:r,children:e})}var B=()=>{let e=(0,F.useContext)(he);if(!e)throw new Error("useWidgetConfig must be used within WidgetProvider");return e};var ee=require("react"),te=require("lucide-react");var J=require("lucide-react"),Ce=$(require("react-markdown")),Pe=$(require("remark-gfm"));var be=require("clsx"),ve=require("tailwind-merge");function c(...e){return(0,ve.twMerge)((0,be.clsx)(e))}function we(e){return new Intl.DateTimeFormat("fr-FR",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}).format(e)}function ce(){return`thread_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}var Ne=require("lucide-react"),W=require("react/jsx-runtime");function ye(){return(0,W.jsxs)("div",{className:"flex items-start gap-3 message-enter",children:[(0,W.jsx)("div",{className:"w-7 h-7 rounded-lg bg-blue-600 flex items-center justify-center shrink-0 mt-0.5 shadow-sm",children:(0,W.jsx)(Ne.Bot,{className:"w-3.5 h-3.5 text-white",strokeWidth:2.5})}),(0,W.jsxs)("div",{className:"bg-[#F3F4F6] rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-1.5",children:[(0,W.jsx)("span",{className:"text-xs text-slate-400 mr-1 select-none",children:"L'assistant r\xE9fl\xE9chit"}),(0,W.jsx)("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"}),(0,W.jsx)("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"}),(0,W.jsx)("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"})]})]})}var f=require("react/jsx-runtime");function Te({message:e}){let t=e.role==="user";return e.isStreaming?(0,f.jsx)(ye,{}):(0,f.jsxs)("div",{className:c("flex items-start gap-3 w-full message-enter",t?"flex-row-reverse":"flex-row"),children:[(0,f.jsx)("div",{className:c("w-8 h-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5 shadow-sm",t?"bg-slate-100":"bg-blue-600"),children:t?(0,f.jsx)(J.User,{size:16,className:"text-slate-500"}):(0,f.jsx)(J.Bot,{size:16,className:"text-white"})}),(0,f.jsxs)("div",{className:c("flex flex-col gap-2 max-w-[85%]",t?"items-end":"items-start"),children:[(0,f.jsx)("div",{className:c("rounded-2xl px-4 py-3 text-sm leading-relaxed shadow-sm",t?"bg-white border border-slate-200 text-slate-800 rounded-tr-sm":"bg-[#F3F4F6] text-slate-700 rounded-tl-sm"),children:(0,f.jsx)("div",{className:"prose-hr-chat max-w-none",children:(0,f.jsx)(Ce.default,{remarkPlugins:[Pe.default],children:e.content})})}),!t&&e.sources&&e.sources.length>0&&(0,f.jsxs)("div",{className:"mt-3 pt-3 border-t border-slate-100 w-full",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,f.jsx)("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),(0,f.jsx)("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Sources & Citations"})]}),(0,f.jsx)("div",{className:"flex flex-wrap gap-2",children:e.sources.map((s,r)=>(0,f.jsxs)("div",{className:"group relative flex items-center gap-1.5 px-2 py-1 bg-white border border-slate-200 rounded-lg text-[10px] text-slate-600 shadow-sm hover:border-blue-300 hover:text-blue-600 transition-all cursor-default",children:[(0,f.jsx)("span",{className:"w-1 h-1 bg-slate-300 rounded-full group-hover:bg-blue-400"}),s]},r))})]}),(0,f.jsx)("span",{className:"text-[10px] text-slate-300 px-1",children:we(new Date(e.timestamp))})]})]})}var _=require("lucide-react"),ke=$(require("next/image"));var N=require("react/jsx-runtime"),Je=[{icon:_.Coins,label:"Grilles de salaires",prompt:"Montre-moi les grilles de salaires pour les ing\xE9nieurs seniors."},{icon:_.ClipboardList,label:"Proc\xE9dures RH",prompt:"Quelle est la proc\xE9dure pour poser des cong\xE9s pay\xE9s ?"},{icon:_.Users,label:"Onboarding",prompt:"Quelles sont les \xE9tapes d'onboarding pour un nouvel employ\xE9 ?"},{icon:_.FileSearch,label:"R\xE8glement int\xE9rieur",prompt:"R\xE9sume les points cl\xE9s du r\xE8glement int\xE9rieur."}];function Re({onSuggestion:e}){let{botName:t,logoUrl:s}=B();return(0,N.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-8 px-4 select-none",children:[(0,N.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,N.jsx)("div",{className:"relative w-14 h-14 rounded-2xl bg-white border border-slate-100 flex items-center justify-center shadow-sm overflow-hidden p-2",children:(0,N.jsx)(ke.default,{src:s,alt:`${t} Logo`,width:40,height:40,priority:!0,className:"object-contain"})}),(0,N.jsxs)("div",{className:"text-center",children:[(0,N.jsxs)("h1",{className:"text-lg font-semibold text-slate-800",children:["Bonjour, je suis votre Copilot ",t]}),(0,N.jsx)("p",{className:"text-sm text-slate-400 mt-1",children:"Posez vos questions sur vos documents RH internes."})]})]}),(0,N.jsx)("div",{className:"grid grid-cols-2 gap-2 w-full max-w-md",children:Je.map(r=>{let i=r.icon;return(0,N.jsxs)("button",{onClick:()=>e(r.prompt),className:"flex items-start gap-2.5 p-3 rounded-xl bg-white border border-slate-100 hover:border-blue-200 hover:bg-blue-50/50 text-left transition-all duration-200 shadow-sm group",children:[(0,N.jsx)("div",{className:"mt-0.5 w-6 h-6 rounded-lg bg-blue-50 group-hover:bg-blue-100 flex items-center justify-center shrink-0 transition-colors",children:(0,N.jsx)(i,{className:"w-3.5 h-3.5 text-blue-500",strokeWidth:1.8})}),(0,N.jsx)("span",{className:"text-xs font-medium text-slate-600 group-hover:text-slate-800 leading-snug transition-colors",children:r.label})]},r.label)})})]})}var D=require("react"),z=require("lucide-react");var g=require("react/jsx-runtime");function Ee({onSend:e,isLoading:t,disabled:s}){let[r,i]=(0,D.useState)(""),[l,u]=(0,D.useState)([]),P=(0,D.useRef)(null),b=(0,D.useRef)(null),T=n=>{if(n.target.files){let a=Array.from(n.target.files);u(d=>[...d,...a])}},A=n=>{u(a=>a.filter((d,w)=>w!==n))},m=(0,D.useCallback)(()=>{let n=r.trim();!n&&l.length===0||t||s||(e(n,l),i(""),u([]))},[r,l,t,s,e]),h=n=>{n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),m())},R=(0,D.useCallback)(n=>{i(n.target.value);let a=n.target;a.style.height="auto",a.style.height=`${Math.min(a.scrollHeight,160)}px`},[]),v=r.trim().length>0&&!t&&!s;return(0,g.jsxs)("div",{className:"px-4 pb-4 pt-2",children:[(0,g.jsx)("div",{className:"flex flex-wrap gap-2 mb-2",children:l.map((n,a)=>(0,g.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-blue-50 border border-blue-100 rounded-lg text-[10px] text-blue-600",children:[(0,g.jsx)(z.FileText,{className:"w-3 h-3"}),(0,g.jsx)("span",{className:"truncate max-w-[100px]",children:n.name}),(0,g.jsx)("button",{onClick:()=>A(a),className:"hover:text-red-500",children:(0,g.jsx)(z.X,{className:"w-3 h-3"})})]},a))}),(0,g.jsxs)("div",{className:c("flex items-end gap-2 bg-white border rounded-2xl px-3 py-2.5 shadow-sm transition-all duration-200","border-slate-200 focus-within:border-blue-300 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.08)]"),children:[(0,g.jsx)("input",{type:"file",ref:P,onChange:T,className:"hidden",multiple:!0,accept:".pdf,.docx,.txt,.mp3,.wav,.png,.jpg"}),(0,g.jsx)("button",{type:"button",onClick:()=>{var n;return(n=P.current)==null?void 0:n.click()},className:"p-1.5 rounded-lg text-slate-300 hover:text-slate-500 hover:bg-slate-50 transition-colors shrink-0 mb-0.5","aria-label":"Joindre un fichier",tabIndex:-1,children:(0,g.jsx)(z.Paperclip,{className:"w-4 h-4",strokeWidth:1.8})}),(0,g.jsx)("textarea",{ref:b,value:r,onChange:R,onKeyDown:h,placeholder:l.length>0?"Ajouter un message au fichier...":"Posez votre question RH\u2026",rows:1,disabled:s,className:c("flex-1 resize-none bg-transparent text-sm text-slate-800 placeholder:text-slate-300","outline-none leading-relaxed py-0.5 max-h-40 min-h-[22px]","disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Message"}),(0,g.jsx)("button",{type:"button",onClick:m,disabled:!v,"aria-label":"Envoyer",className:c("w-8 h-8 rounded-xl flex items-center justify-center shrink-0 transition-all duration-200 mb-0.5",v?"bg-blue-600 text-white hover:bg-blue-700 shadow-sm hover:shadow":"bg-slate-100 text-slate-300 cursor-not-allowed"),children:(0,g.jsx)(z.ArrowUp,{className:"w-4 h-4",strokeWidth:2.5})})]}),(0,g.jsx)("p",{className:"text-center text-[10px] text-slate-300 mt-2",children:"Entr\xE9e pour envoyer \xB7 Maj+Entr\xE9e pour sauter une ligne"})]})}var We=require("next/navigation");var Y=require("lucide-react"),Z=require("next/navigation"),L=require("react/jsx-runtime");function Se({title:e="Copilot RH"}){let t=(0,Z.useRouter)(),s=(0,Z.usePathname)();return(0,L.jsxs)("header",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100 bg-white",children:[(0,L.jsxs)("div",{className:"flex items-center gap-3",children:[s!=="/chat"&&(0,L.jsx)("button",{onClick:()=>t.back(),className:"p-1 hover:bg-slate-100 rounded-full transition-colors",children:(0,L.jsx)(Y.ChevronLeft,{size:20,className:"text-slate-600"})}),(0,L.jsx)("h2",{className:"text-sm font-bold text-slate-800",children:e})]}),(0,L.jsx)("button",{onClick:()=>window.parent.postMessage("close-dhi-copilot","*"),children:(0,L.jsx)(Y.X,{size:20,className:"text-slate-400 hover:text-red-500"})})]})}var p=require("react/jsx-runtime");function se({session:e,isLoading:t,error:s,onSend:r,onReset:i}){let l=(0,ee.useRef)(null),u=e.messages.length>0,b=(0,We.useSearchParams)().get("embed")==="true";return(0,ee.useEffect)(()=>{l.current&&l.current.scrollTo({top:l.current.scrollHeight,behavior:"smooth"})},[e.messages]),(0,p.jsxs)("div",{className:"flex flex-col h-full bg-[#F9FAFB]",children:[b?(0,p.jsx)(Se,{}):(0,p.jsxs)("header",{className:"flex items-center justify-between px-5 py-3 border-b border-slate-100 bg-white shrink-0",children:[(0,p.jsxs)("div",{className:"flex items-center gap-2",children:[(0,p.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-400"}),(0,p.jsx)("span",{className:"text-sm font-medium text-slate-700",children:u?e.title:"Copilot RH"})]}),u&&(0,p.jsxs)("button",{onClick:i,className:"flex items-center gap-1.5 text-xs text-slate-400 hover:text-slate-600 transition-colors px-2 py-1 rounded-lg hover:bg-slate-50",title:"Nouvelle conversation",children:[(0,p.jsx)(te.RotateCcw,{className:"w-3 h-3",strokeWidth:2}),"Nouvelle conversation"]})]}),(0,p.jsx)("div",{ref:l,className:c("flex-1 overflow-y-auto px-4 py-4",u?"flex flex-col gap-4":""),children:u?(0,p.jsx)(p.Fragment,{children:e.messages.map(T=>(0,p.jsx)(Te,{message:T},T.id))}):(0,p.jsx)(Re,{onSuggestion:r})}),s&&(0,p.jsxs)("div",{className:"mx-4 mb-2 px-3 py-2 bg-red-50 border border-red-100 rounded-xl flex items-start gap-2",children:[(0,p.jsx)(te.AlertCircle,{className:"w-3.5 h-3.5 text-red-400 mt-0.5 shrink-0"}),(0,p.jsx)("p",{className:"text-xs text-red-600 leading-relaxed",children:s})]}),(0,p.jsx)(Ee,{onSend:r,isLoading:t})]})}var M=require("react"),oe=require("next/navigation"),me=require("uuid");var de=$(require("axios"));var Ie=require("zustand"),Ae=(0,Ie.create)(e=>({isNetworkError:!1,setNetworkError:t=>e({isNetworkError:t})}));var Ye=process.env.PUBLIC_API_URL||"http://127.0.0.1:8000",U=de.default.create({baseURL:Ye,timeout:6e5,headers:{"Content-Type":"application/json"}});U.interceptors.response.use(e=>e,e=>!e.response||e.code==="ERR_NETWORK"?(Ae.getState().setNetworkError(!0),new Promise(()=>{})):Promise.reject(e));var j=e=>{var t,s;if(de.default.isAxiosError(e)){let r=((s=(t=e.response)==null?void 0:t.data)==null?void 0:s.detail)||e.message||"Erreur de connexion au serveur";throw new Error(r)}throw new Error("Une erreur inattendue est survenue")},X={sendMessage:async e=>{try{return(await U.post("/chat",e)).data}catch(t){return j(t)}},listThreads:async()=>{try{return(await U.get("/chat/threads")).data}catch(e){return j(e)}},getHistory:async e=>{try{return(await U.get(`/chat/history/${e}`)).data.map((s,r)=>({id:`${e}-${r}-${Date.now()}`,role:s.role,content:s.content,timestamp:new Date}))}catch(t){return j(t)}}},re={save:async e=>{try{return(await U.post("/connectors",e)).data}catch(t){return j(t)}},list:async()=>{try{return(await U.get("/settings/connectors")).data}catch(e){return j(e)}},sync:async e=>{try{return(await U.post(`/documents/sync/${e}`)).data}catch(t){return j(t)}}},De={upload:async(e,t="default")=>{try{let s=new FormData;return e.forEach(i=>{s.append("files",i)}),(await U.post(`/upload?tenant_id=${t}`,s,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(s){return j(s)}}};function ae(){let e=(0,oe.useSearchParams)(),t=(0,oe.useRouter)(),s=e.get("threadId"),[r,i]=(0,M.useState)(()=>({id:s||ce(),title:"Nouvelle conversation",messages:[],createdAt:new Date,updatedAt:new Date})),[l,u]=(0,M.useState)(!1),[P,b]=(0,M.useState)(null);(0,M.useEffect)(()=>{s&&s!==r.id&&(async()=>{u(!0),b(null);try{let h=await X.getHistory(s);i({id:s,title:"Conversation charg\xE9e",messages:h,createdAt:new Date,updatedAt:new Date})}catch(h){b("Impossible de charger l'historique de cette discussion.")}finally{u(!1)}})()},[s]);let T=(0,M.useCallback)(async(m,h=[])=>{if(!m.trim()&&h.length===0||l)return;b(null),u(!0);let R=m.trim();if(h.length>0){let a=h.map(d=>`\u{1F4C4} ${d.name}`).join(`
2
- `);R+=`
1
+ "use strict";var Oe=Object.create;var G=Object.defineProperty,qe=Object.defineProperties,Ge=Object.getOwnPropertyDescriptor,Xe=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertyNames,Y=Object.getOwnPropertySymbols,Ve=Object.getPrototypeOf,le=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable;var me=(e,t,r)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))le.call(t,r)&&me(e,r,t[r]);if(Y)for(var r of Y(t))ue.call(t,r)&&me(e,r,t[r]);return e},S=(e,t)=>qe(e,Xe(t));var X=(e,t)=>{var r={};for(var o in e)le.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&Y)for(var o of Y(e))t.indexOf(o)<0&&ue.call(e,o)&&(r[o]=e[o]);return r};var Ye=(e,t)=>{for(var r in t)G(e,r,{get:t[r],enumerable:!0})},ve=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ke(t))!le.call(e,n)&&n!==r&&G(e,n,{get:()=>t[n],enumerable:!(o=Ge(t,n))||o.enumerable});return e};var H=(e,t,r)=>(r=e!=null?Oe(Ve(e)):{},ve(t||!e||!e.__esModule?G(r,"default",{value:e,enumerable:!0}):r,e)),Qe=e=>ve(G({},"__esModule",{value:!0}),e);var tt={};Ye(tt,{ChatWindow:()=>oe,CopilotApp:()=>Me,Sidebar:()=>He,WidgetProvider:()=>Q,useChat:()=>ne,useConnectors:()=>$e,useWidgetConfig:()=>O});module.exports=Qe(tt);var Ae=require("react");var M=require("react");var we=require("react/jsx-runtime"),be=(0,M.createContext)(void 0);function Q({children:e,config:t}){let r={primaryColor:process.env.NEXT_PUBLIC_PRIMARY_COLOR||"#2563EB",logoUrl:process.env.NEXT_PUBLIC_WIDGET_LOGO||"/logo.png",botName:process.env.NEXT_PUBLIC_WIDGET_TITLE||"Copilot RH",position:"right",apiUrl:process.env.NEXT_PUBLIC_API_URL||"http://localhost:8000",expandedDefault:!1},o=(0,M.useMemo)(()=>w(w({},r),t),[t]);return(0,M.useEffect)(()=>{let n=document.documentElement;n.style.setProperty("--widget-primary",o.primaryColor),n.style.setProperty("--widget-primary-light",`${o.primaryColor}15`)},[o.primaryColor]),(0,we.jsx)(be.Provider,{value:o,children:e})}var O=()=>{let e=(0,M.useContext)(be);if(!e)throw new Error("useWidgetConfig must be used within WidgetProvider");return e};var te=require("react"),re=require("lucide-react");var J=require("lucide-react"),Ce=H(require("react-markdown")),ze=H(require("remark-gfm"));var fe=require("clsx"),xe=require("tailwind-merge");function l(...e){return(0,xe.twMerge)((0,fe.clsx)(e))}function ye(e){return new Intl.DateTimeFormat("fr-FR",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}).format(e)}function ce(){return`thread_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}var ke=require("lucide-react"),R=require("react/jsx-runtime");function Ne(){return(0,R.jsxs)("div",{className:"flex items-start gap-3 message-enter",children:[(0,R.jsx)("div",{className:"w-7 h-7 rounded-lg bg-blue-600 flex items-center justify-center shrink-0 mt-0.5 shadow-sm",children:(0,R.jsx)(ke.Bot,{className:"w-3.5 h-3.5 text-white",strokeWidth:2.5})}),(0,R.jsxs)("div",{className:"bg-[#F3F4F6] rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-1.5",children:[(0,R.jsx)("span",{className:"text-xs text-slate-400 mr-1 select-none",children:"L'assistant r\xE9fl\xE9chit"}),(0,R.jsx)("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"}),(0,R.jsx)("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"}),(0,R.jsx)("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"})]})]})}var u=require("react/jsx-runtime");function Ee({message:e}){let t=e.role==="user";return e.isStreaming?(0,u.jsx)(Ne,{}):(0,u.jsxs)("div",{className:l("flex items-start gap-3 w-full message-enter",t?"flex-row-reverse":"flex-row"),children:[(0,u.jsx)("div",{className:l("w-8 h-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5 shadow-sm",t?"bg-slate-100":"bg-blue-600"),children:t?(0,u.jsx)(J.User,{size:16,className:"text-slate-500"}):(0,u.jsx)(J.Bot,{size:16,className:"text-white"})}),(0,u.jsxs)("div",{className:l("flex flex-col gap-2 max-w-[85%]",t?"items-end":"items-start"),children:[(0,u.jsx)("div",{className:l("rounded-2xl px-4 py-3 text-sm leading-relaxed shadow-sm",t?"bg-white border border-slate-200 text-slate-800 rounded-tr-sm":"bg-[#F3F4F6] text-slate-700 rounded-tl-sm"),children:(0,u.jsx)("div",{className:"prose-hr-chat max-w-none",children:(0,u.jsx)(Ce.default,{remarkPlugins:[ze.default],children:e.content})})}),!t&&e.sources&&e.sources.length>0&&(0,u.jsxs)("div",{className:"mt-3 pt-3 border-t border-slate-100 w-full",children:[(0,u.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,u.jsx)("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),(0,u.jsx)("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Sources & Citations"})]}),(0,u.jsx)("div",{className:"flex flex-wrap gap-2",children:e.sources.map((r,o)=>(0,u.jsxs)("div",{className:"group relative flex items-center gap-1.5 px-2 py-1 bg-white border border-slate-200 rounded-lg text-[10px] text-slate-600 shadow-sm hover:border-blue-300 hover:text-blue-600 transition-all cursor-default",children:[(0,u.jsx)("span",{className:"w-1 h-1 bg-slate-300 rounded-full group-hover:bg-blue-400"}),r]},o))})]}),(0,u.jsx)("span",{className:"text-[10px] text-slate-300 px-1",children:ye(new Date(e.timestamp))})]})]})}var L=require("lucide-react"),Pe=H(require("next/image"));var k=require("react/jsx-runtime"),Je=[{icon:L.Coins,label:"Grilles de salaires",prompt:"Montre-moi les grilles de salaires pour les ing\xE9nieurs seniors."},{icon:L.ClipboardList,label:"Proc\xE9dures RH",prompt:"Quelle est la proc\xE9dure pour poser des cong\xE9s pay\xE9s ?"},{icon:L.Users,label:"Onboarding",prompt:"Quelles sont les \xE9tapes d'onboarding pour un nouvel employ\xE9 ?"},{icon:L.FileSearch,label:"R\xE8glement int\xE9rieur",prompt:"R\xE9sume les points cl\xE9s du r\xE8glement int\xE9rieur."}];function Fe({onSuggestion:e}){let{botName:t,logoUrl:r}=O();return(0,k.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-8 px-4 select-none",children:[(0,k.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,k.jsx)("div",{className:"relative w-14 h-14 rounded-2xl bg-white border border-slate-100 flex items-center justify-center shadow-sm overflow-hidden p-2",children:(0,k.jsx)(Pe.default,{src:r,alt:`${t} Logo`,width:40,height:40,priority:!0,className:"object-contain"})}),(0,k.jsxs)("div",{className:"text-center",children:[(0,k.jsxs)("h1",{className:"text-lg font-semibold text-slate-800",children:["Bonjour, je suis votre Copilot ",t]}),(0,k.jsx)("p",{className:"text-sm text-slate-400 mt-1",children:"Posez vos questions sur vos documents RH internes."})]})]}),(0,k.jsx)("div",{className:"grid grid-cols-2 gap-2 w-full max-w-md",children:Je.map(o=>{let n=o.icon;return(0,k.jsxs)("button",{onClick:()=>e(o.prompt),className:"flex items-start gap-2.5 p-3 rounded-xl bg-white border border-slate-100 hover:border-blue-200 hover:bg-blue-50/50 text-left transition-all duration-200 shadow-sm group",children:[(0,k.jsx)("div",{className:"mt-0.5 w-6 h-6 rounded-lg bg-blue-50 group-hover:bg-blue-100 flex items-center justify-center shrink-0 transition-colors",children:(0,k.jsx)(n,{className:"w-3.5 h-3.5 text-blue-500",strokeWidth:1.8})}),(0,k.jsx)("span",{className:"text-xs font-medium text-slate-600 group-hover:text-slate-800 leading-snug transition-colors",children:o.label})]},o.label)})})]})}var I=require("react"),D=require("lucide-react");var v=require("react/jsx-runtime");function Te({onSend:e,isLoading:t,disabled:r}){let[o,n]=(0,I.useState)(""),[c,g]=(0,I.useState)([]),z=(0,I.useRef)(null),f=(0,I.useRef)(null),E=s=>{if(s.target.files){let i=Array.from(s.target.files);g(d=>[...d,...i])}},_=s=>{g(i=>i.filter((d,y)=>y!==s))},p=(0,I.useCallback)(()=>{let s=o.trim();!s&&c.length===0||t||r||(e(s,c),n(""),g([]))},[o,c,t,r,e]),b=s=>{s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),p())},F=(0,I.useCallback)(s=>{n(s.target.value);let i=s.target;i.style.height="auto",i.style.height=`${Math.min(i.scrollHeight,160)}px`},[]),x=o.trim().length>0&&!t&&!r;return(0,v.jsxs)("div",{className:"px-4 pb-4 pt-2",children:[(0,v.jsx)("div",{className:"flex flex-wrap gap-2 mb-2",children:c.map((s,i)=>(0,v.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-blue-50 border border-blue-100 rounded-lg text-[10px] text-blue-600",children:[(0,v.jsx)(D.FileText,{className:"w-3 h-3"}),(0,v.jsx)("span",{className:"truncate max-w-[100px]",children:s.name}),(0,v.jsx)("button",{onClick:()=>_(i),className:"hover:text-red-500",children:(0,v.jsx)(D.X,{className:"w-3 h-3"})})]},i))}),(0,v.jsxs)("div",{className:l("flex items-end gap-2 bg-white border rounded-2xl px-3 py-2.5 shadow-sm transition-all duration-200","border-slate-200 focus-within:border-blue-300 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.08)]"),children:[(0,v.jsx)("input",{type:"file",ref:z,onChange:E,className:"hidden",multiple:!0,accept:".pdf,.docx,.txt,.mp3,.wav,.png,.jpg"}),(0,v.jsx)("button",{type:"button",onClick:()=>{var s;return(s=z.current)==null?void 0:s.click()},className:"p-1.5 rounded-lg text-slate-300 hover:text-slate-500 hover:bg-slate-50 transition-colors shrink-0 mb-0.5","aria-label":"Joindre un fichier",tabIndex:-1,children:(0,v.jsx)(D.Paperclip,{className:"w-4 h-4",strokeWidth:1.8})}),(0,v.jsx)("textarea",{ref:f,value:o,onChange:F,onKeyDown:b,placeholder:c.length>0?"Ajouter un message au fichier...":"Posez votre question RH\u2026",rows:1,disabled:r,className:l("flex-1 resize-none bg-transparent text-sm text-slate-800 placeholder:text-slate-300","outline-none leading-relaxed py-0.5 max-h-40 min-h-[22px]","disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Message"}),(0,v.jsx)("button",{type:"button",onClick:p,disabled:!x,"aria-label":"Envoyer",className:l("w-8 h-8 rounded-xl flex items-center justify-center shrink-0 transition-all duration-200 mb-0.5",x?"bg-blue-600 text-white hover:bg-blue-700 shadow-sm hover:shadow":"bg-slate-100 text-slate-300 cursor-not-allowed"),children:(0,v.jsx)(D.ArrowUp,{className:"w-4 h-4",strokeWidth:2.5})})]}),(0,v.jsx)("p",{className:"text-center text-[10px] text-slate-300 mt-2",children:"Entr\xE9e pour envoyer \xB7 Maj+Entr\xE9e pour sauter une ligne"})]})}var Re=require("next/navigation");var Z=require("lucide-react"),ee=require("next/navigation"),W=require("react/jsx-runtime");function Se({title:e="Copilot RH"}){let t=(0,ee.useRouter)(),r=(0,ee.usePathname)();return(0,W.jsxs)("header",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100 bg-white",children:[(0,W.jsxs)("div",{className:"flex items-center gap-3",children:[r!=="/chat"&&(0,W.jsx)("button",{onClick:()=>t.back(),className:"p-1 hover:bg-slate-100 rounded-full transition-colors",children:(0,W.jsx)(Z.ChevronLeft,{size:20,className:"text-slate-600"})}),(0,W.jsx)("h2",{className:"text-sm font-bold text-slate-800",children:e})]}),(0,W.jsx)("button",{onClick:()=>window.parent.postMessage("close-dhi-copilot","*"),children:(0,W.jsx)(Z.X,{size:20,className:"text-slate-400 hover:text-red-500"})})]})}var h=require("react/jsx-runtime");function oe({session:e,isLoading:t,error:r,onSend:o,onReset:n}){let c=(0,te.useRef)(null),g=e.messages.length>0,f=(0,Re.useSearchParams)().get("embed")==="true";return(0,te.useEffect)(()=>{c.current&&c.current.scrollTo({top:c.current.scrollHeight,behavior:"smooth"})},[e.messages]),(0,h.jsxs)("div",{className:"flex flex-col h-full bg-[#F9FAFB]",children:[f?(0,h.jsx)(Se,{}):(0,h.jsxs)("header",{className:"flex items-center justify-between px-5 py-3 border-b border-slate-100 bg-white shrink-0",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("div",{className:"w-2 h-2 rounded-full bg-emerald-400"}),(0,h.jsx)("span",{className:"text-sm font-medium text-slate-700",children:g?e.title:"Copilot RH"})]}),g&&(0,h.jsxs)("button",{onClick:n,className:"flex items-center gap-1.5 text-xs text-slate-400 hover:text-slate-600 transition-colors px-2 py-1 rounded-lg hover:bg-slate-50",title:"Nouvelle conversation",children:[(0,h.jsx)(re.RotateCcw,{className:"w-3 h-3",strokeWidth:2}),"Nouvelle conversation"]})]}),(0,h.jsx)("div",{ref:c,className:l("flex-1 overflow-y-auto px-4 py-4",g?"flex flex-col gap-4":""),children:g?(0,h.jsx)(h.Fragment,{children:e.messages.map(E=>(0,h.jsx)(Ee,{message:E},E.id))}):(0,h.jsx)(Fe,{onSuggestion:o})}),r&&(0,h.jsxs)("div",{className:"mx-4 mb-2 px-3 py-2 bg-red-50 border border-red-100 rounded-xl flex items-start gap-2",children:[(0,h.jsx)(re.AlertCircle,{className:"w-3.5 h-3.5 text-red-400 mt-0.5 shrink-0"}),(0,h.jsx)("p",{className:"text-xs text-red-600 leading-relaxed",children:r})]}),(0,h.jsx)(Te,{onSend:o,isLoading:t})]})}var A=require("react"),ie=require("next/navigation"),pe=require("uuid");var de=H(require("axios"));var _e=require("zustand"),Ie=(0,_e.create)(e=>({isNetworkError:!1,setNetworkError:t=>e({isNetworkError:t})}));var Ze=process.env.PUBLIC_API_URL||"http://127.0.0.1:8000",j=de.default.create({baseURL:Ze,timeout:6e5,headers:{"Content-Type":"application/json"}});j.interceptors.response.use(e=>e,e=>!e.response||e.code==="ERR_NETWORK"?(Ie.getState().setNetworkError(!0),new Promise(()=>{})):Promise.reject(e));var $=e=>{var t,r;if(de.default.isAxiosError(e)){let o=((r=(t=e.response)==null?void 0:t.data)==null?void 0:r.detail)||e.message||"Erreur de connexion au serveur";throw new Error(o)}throw new Error("Une erreur inattendue est survenue")},K={sendMessage:async e=>{try{return(await j.post("/chat",e)).data}catch(t){return $(t)}},listThreads:async()=>{try{return(await j.get("/chat/threads")).data}catch(e){return $(e)}},getHistory:async e=>{try{return(await j.get(`/chat/history/${e}`)).data.map((r,o)=>({id:`${e}-${o}-${Date.now()}`,role:r.role,content:r.content,timestamp:new Date}))}catch(t){return $(t)}}},ae={save:async e=>{try{return(await j.post("/connectors",e)).data}catch(t){return $(t)}},list:async()=>{try{return(await j.get("/settings/connectors")).data}catch(e){return $(e)}},sync:async e=>{try{return(await j.post(`/documents/sync/${e}`)).data}catch(t){return $(t)}}},We={upload:async(e,t="default")=>{try{let r=new FormData;return e.forEach(n=>{r.append("files",n)}),(await j.post(`/upload?tenant_id=${t}`,r,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(r){return $(r)}}};function ne(){let e=(0,ie.useSearchParams)(),t=(0,ie.useRouter)(),r=e.get("threadId"),[o,n]=(0,A.useState)(()=>({id:r||ce(),title:"Nouvelle conversation",messages:[],createdAt:new Date,updatedAt:new Date})),[c,g]=(0,A.useState)(!1),[z,f]=(0,A.useState)(null);(0,A.useEffect)(()=>{r&&r!==o.id&&(async()=>{g(!0),f(null);try{let b=await K.getHistory(r);n({id:r,title:"Conversation charg\xE9e",messages:b,createdAt:new Date,updatedAt:new Date})}catch(b){f("Impossible de charger l'historique de cette discussion.")}finally{g(!1)}})()},[r]);let E=(0,A.useCallback)(async(p,b=[])=>{if(!p.trim()&&b.length===0||c)return;f(null),g(!0);let F=p.trim();if(b.length>0){let i=b.map(d=>`\u{1F4C4} ${d.name}`).join(`
2
+ `);F+=`
3
3
 
4
4
  *Fichiers joints :*
5
- ${a}`}let v={id:(0,me.v4)(),role:"user",content:R,timestamp:new Date},n="loading-ai-message";i(a=>S(x({},a),{messages:[...a.messages,v,{id:n,role:"assistant",content:"",timestamp:new Date,isStreaming:!0}]}));try{h.length>0&&await De.upload(h);let a=m.trim()||`Analyse les ${h.length} fichiers que je viens d'envoyer.`,d=await X.sendMessage({message:a,thread_id:r.id});i(w=>S(x({},w),{messages:w.messages.map(E=>E.id===n?{id:(0,me.v4)(),role:"assistant",content:d.response,sources:d.sources,timestamp:new Date,isStreaming:!1}:E)})),r.messages.length===0&&t.replace(`/chat?threadId=${r.id}`)}catch(a){b(a instanceof Error?a.message:"Erreur."),i(d=>S(x({},d),{messages:d.messages.filter(w=>w.id!==n)}))}finally{u(!1)}},[l,r.id,r.messages.length,t]),A=(0,M.useCallback)(()=>{let m=ce();i({id:m,title:"Nouvelle conversation",messages:[],createdAt:new Date,updatedAt:new Date}),t.push("/chat"),b(null)},[t]);return{session:r,isLoading:l,error:P,send:T,reset:A}}var ie=require("lucide-react");var I=require("react/jsx-runtime");function Me({config:e,children:t}){let[s,r]=(0,Le.useState)(!1),{session:i,isLoading:l,error:u,send:P,reset:b}=ae();return(0,I.jsxs)(Q,{config:e,children:[t,(0,I.jsx)("div",{className:"fixed bottom-6 right-6 z-[9999]",children:(0,I.jsx)("button",{onClick:()=>r(!s),className:"w-14 h-14 rounded-2xl bg-blue-600 text-white shadow-2xl flex items-center justify-center hover:scale-110 transition-transform active:scale-95 cursor-pointer",children:s?(0,I.jsx)(ie.X,{size:28}):(0,I.jsx)(ie.MessageCircle,{size:28})})}),(0,I.jsx)("div",{className:c("fixed top-0 right-0 h-full bg-white shadow-2xl transition-all duration-300 ease-in-out z-[9998] overflow-hidden border-l border-slate-100",s?"w-[400px] opacity-100":"w-0 opacity-0 pointer-events-none"),children:(0,I.jsx)("div",{className:"w-[400px] h-full flex flex-col",children:(0,I.jsx)(se,{session:i,isLoading:l,error:u,onSend:P,onReset:b})})})]})}var O=require("react"),K=$(require("next/link")),He=$(require("next/image")),ne=require("next/navigation"),y=require("lucide-react");var k=$(require("@radix-ui/react-tooltip"));var H=require("react/jsx-runtime");function Fe(s){var r=s,{delayDuration:e=0}=r,t=G(r,["delayDuration"]);return(0,H.jsx)(k.Provider,x({"data-slot":"tooltip-provider",delayDuration:e},t))}function _e(t){var e=G(t,[]);return(0,H.jsx)(k.Root,x({"data-slot":"tooltip"},e))}function ze(t){var e=G(t,[]);return(0,H.jsx)(k.Trigger,x({"data-slot":"tooltip-trigger"},e))}function Ue(i){var l=i,{className:e,sideOffset:t=0,children:s}=l,r=G(l,["className","sideOffset","children"]);return(0,H.jsx)(k.Portal,{children:(0,H.jsxs)(k.Content,S(x({"data-slot":"tooltip-content",sideOffset:t,className:c("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e)},r),{children:[s,(0,H.jsx)(k.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]}))})}var o=require("react/jsx-runtime");function Ze(){return(0,O.useSyncExternalStore)(e=>(window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)),()=>window.innerWidth<768,()=>!1)}function $e({expanded:e,setExpanded:t,isEmbed:s}){let r=(0,ne.usePathname)(),l=(0,ne.useSearchParams)().get("threadId"),[u,P]=(0,O.useState)([]),{botName:b,logoUrl:T}=B(),A=Ze();(0,O.useEffect)(()=>{(async()=>{try{let n=await X.listThreads();P(n)}catch(n){P([])}})()},[r]);let m=()=>{(s||A)&&t(!1)};return(0,o.jsxs)(Fe,{delayDuration:500,children:[e&&(s||A)&&(0,o.jsx)("div",{className:"fixed inset-0 bg-slate-900/20 backdrop-blur-sm z-40 transition-opacity duration-300",onClick:()=>t(!1)}),(0,o.jsxs)("aside",{className:c("relative h-screen bg-white border-r border-slate-100 flex flex-col shrink-0 transition-all duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] z-50",e?s?"w-full":"w-64":"w-16",(s||A)&&e?"fixed inset-y-0 left-0 shadow-2xl":"relative"),children:[(0,o.jsxs)("div",{className:"flex items-center h-16 px-4 border-b border-slate-50",children:[(0,o.jsxs)("div",{className:"flex items-center gap-3 overflow-hidden",children:[(0,o.jsx)("div",{className:"w-9 h-9 rounded-xl bg-blue-600 flex items-center justify-center text-white shrink-0 shadow-lg shadow-blue-200",children:(0,o.jsx)(y.Bot,{size:20,strokeWidth:2.5,className:c("transition-transform duration-500",e&&"rotate-[360deg]")})}),e&&(0,o.jsxs)("div",{className:"flex flex-col animate-in fade-in slide-in-from-left-2 duration-300",children:[(0,o.jsx)("span",{className:"font-bold text-slate-900 leading-tight",children:b}),(0,o.jsxs)("span",{className:"text-[10px] text-emerald-500 font-medium flex items-center gap-1",children:[(0,o.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"})," IA Active"]})]})]}),(0,o.jsx)("button",{onClick:()=>t(!e),className:"ml-auto p-2 hover:bg-slate-100 rounded-lg text-slate-400 transition-colors",children:e?(0,o.jsx)(y.PanelLeftClose,{size:18}):(0,o.jsx)(y.PanelLeftOpen,{size:18})})]}),(0,o.jsx)("div",{className:"p-3",children:(0,o.jsx)(ue,{label:"Nouveau chat",show:!e,children:(0,o.jsxs)(K.default,{href:"/chat",onClick:m,className:c("flex items-center gap-3 bg-blue-600 text-white rounded-xl font-semibold transition-all shadow-md shadow-blue-100 hover:bg-blue-700 hover:shadow-lg active:scale-95",e?"px-4 py-3 w-full":"w-10 h-10 justify-center mx-auto"),children:[(0,o.jsx)(y.Plus,{size:20,strokeWidth:3}),e&&(0,o.jsx)("span",{className:"text-sm",children:"Nouvelle discussion"})]})})}),(0,o.jsxs)("nav",{className:"flex flex-col gap-1 px-3 mt-2",children:[(0,o.jsx)(ue,{label:"Discussions",show:!e,children:(0,o.jsxs)(K.default,{href:"/chat",onClick:m,className:c("flex items-center gap-3 p-2.5 rounded-xl text-sm transition-all group",r.startsWith("/chat")?"bg-slate-100 text-blue-600 font-bold":"text-slate-500 hover:bg-slate-50 hover:text-slate-900"),children:[(0,o.jsx)(y.MessageSquare,{size:18,className:c(r.startsWith("/chat")?"text-blue-600":"text-slate-400 group-hover:text-slate-600")}),e&&(0,o.jsx)("span",{children:"Chat"})]})}),(0,o.jsx)(ue,{label:"Param\xE8tres",show:!e,children:(0,o.jsxs)(K.default,{href:"/settings",onClick:m,className:c("flex items-center gap-3 p-2.5 rounded-xl text-sm transition-all group",r==="/settings"?"bg-slate-100 text-blue-600 font-bold":"text-slate-500 hover:bg-slate-50 hover:text-slate-900"),children:[(0,o.jsx)(y.Settings,{size:18,className:c(r==="/settings"?"text-blue-600":"text-slate-400 group-hover:text-slate-600")}),e&&(0,o.jsx)("span",{children:"Param\xE8tres"})]})})]}),e&&(0,o.jsxs)("div",{className:"flex-1 overflow-y-auto mt-6 px-3 custom-scrollbar animate-in fade-in duration-500",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between mb-3 px-2",children:[(0,o.jsx)("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Historique"}),(0,o.jsx)(y.Clock,{size:10,className:"text-slate-300"})]}),(0,o.jsx)("div",{className:"flex flex-col gap-1 pb-4",children:u.length===0?(0,o.jsx)("div",{className:"px-3 py-4 border border-dashed border-slate-100 rounded-xl text-center",children:(0,o.jsx)("p",{className:"text-[10px] text-slate-400 italic",children:"Aucune discussion"})}):u.map(v=>(0,o.jsxs)(K.default,{href:`/chat?threadId=${v.id}`,onClick:m,className:c("group relative flex flex-col gap-0.5 p-2.5 rounded-xl transition-all border border-transparent",l===v.id?"bg-blue-50/50 border-blue-100 text-blue-700 font-semibold":"text-slate-600 hover:bg-slate-50 hover:border-slate-100"),children:[l===v.id&&(0,o.jsx)("div",{className:"absolute left-0 top-2 bottom-2 w-1 bg-blue-600 rounded-r-full"}),(0,o.jsx)("span",{className:"text-[11px] truncate leading-tight",children:v.title}),(0,o.jsxs)("span",{className:"text-[8px] text-slate-400 group-hover:text-blue-400 transition-colors uppercase font-medium",children:["Discussion ID: ",v.id.slice(-4)]})]},v.id))})]}),(0,o.jsx)("div",{className:"mt-auto p-4 border-t border-slate-50 bg-slate-50/30",children:(0,o.jsxs)("div",{className:c("flex items-center gap-3",!e&&"justify-center"),children:[(0,o.jsxs)("div",{className:"relative shrink-0",children:[(0,o.jsx)("div",{className:"w-9 h-9 rounded-full overflow-hidden border-2 border-white shadow-sm bg-slate-100 flex items-center justify-center",children:(0,o.jsx)(He.default,{src:T,alt:"User Profile",width:36,height:36,className:"object-contain"})}),(0,o.jsx)("div",{className:"absolute -bottom-0.5 -right-0.5 w-3 h-3 bg-emerald-500 border-2 border-white rounded-full"})]}),e&&(0,o.jsxs)("div",{className:"min-w-0 flex flex-col animate-in slide-in-from-bottom-1 duration-300",children:[(0,o.jsx)("p",{className:"text-xs font-bold text-slate-800 truncate",children:"Administrateur DHI"}),(0,o.jsx)("p",{className:"text-[10px] text-slate-400 font-medium truncate",children:"Console de Gestion"})]})]})})]})]})}function ue({children:e,label:t,show:s}){return s?(0,o.jsxs)(_e,{children:[(0,o.jsx)(ze,{asChild:!0,children:e}),(0,o.jsx)(Ue,{side:"right",sideOffset:10,className:"bg-slate-900 text-white border-none text-[10px] px-2 py-1 shadow-xl",children:t})]}):(0,o.jsx)(o.Fragment,{children:e})}var C=require("react");function je(){let[e,t]=(0,C.useState)([]),[s,r]=(0,C.useState)(!0),[i,l]=(0,C.useState)(!1),[u,P]=(0,C.useState)(null),[b,T]=(0,C.useState)(null),[A,m]=(0,C.useState)(null),h=(0,C.useRef)(!1),R=(0,C.useCallback)(async(a=!1)=>{if(!(!a&&h.current)){a||(h.current=!0),r(!0);try{let d=await re.list();t(d)}catch(d){console.error("Erreur fetchConnectors:",d),t([])}finally{r(!1),a||setTimeout(()=>{h.current=!1},1e3)}}},[]);(0,C.useEffect)(()=>{R()},[R]);let v=async a=>{l(!0),T(null),m(null);try{return await re.save(a),await R(!0),m("Connecteur enregistr\xE9 avec succ\xE8s."),setTimeout(()=>m(null),3e3),!0}catch(d){return T(d.message||"Erreur lors de l'enregistrement du connecteur."),!1}finally{l(!1)}},n=(0,C.useCallback)(async a=>{T(null),m(null),P(a),t(d=>d.map(w=>w.source_id===a?S(x({},w),{status:"indexing"}):w));try{let d=await re.sync(a);t(w=>w.map(E=>E.source_id===a?S(x({},E),{status:"active"}):E)),m(d.details||`Indexation lanc\xE9e pour ${a}`),setTimeout(()=>m(null),4e3)}catch(d){t(w=>w.map(E=>E.source_id===a?S(x({},E),{status:"error"}):E)),T(d.message||`L'indexation de ${a} a \xE9chou\xE9.`)}finally{P(null)}},[]);return{connectors:e,isFetching:s,isSaving:i,isIndexing:u,error:b,successMsg:A,save:v,triggerIndexing:n,refresh:()=>R(!0)}}0&&(module.exports={ChatWindow,CopilotApp,Sidebar,WidgetProvider,useChat,useConnectors,useWidgetConfig});
5
+ ${i}`}let x={id:(0,pe.v4)(),role:"user",content:F,timestamp:new Date},s="loading-ai-message";n(i=>S(w({},i),{messages:[...i.messages,x,{id:s,role:"assistant",content:"",timestamp:new Date,isStreaming:!0}]}));try{b.length>0&&await We.upload(b);let i=p.trim()||`Analyse les ${b.length} fichiers que je viens d'envoyer.`,d=await K.sendMessage({message:i,thread_id:o.id});n(y=>S(w({},y),{messages:y.messages.map(T=>T.id===s?{id:(0,pe.v4)(),role:"assistant",content:d.response,sources:d.sources,timestamp:new Date,isStreaming:!1}:T)})),o.messages.length===0&&t.replace(`/chat?threadId=${o.id}`)}catch(i){f(i instanceof Error?i.message:"Erreur."),n(d=>S(w({},d),{messages:d.messages.filter(y=>y.id!==s)}))}finally{g(!1)}},[c,o.id,o.messages.length,t]),_=(0,A.useCallback)(()=>{let p=ce();n({id:p,title:"Nouvelle conversation",messages:[],createdAt:new Date,updatedAt:new Date}),t.push("/chat"),f(null)},[t]);return{session:o,isLoading:c,error:z,send:E,reset:_}}var B=require("lucide-react");var m=require("react/jsx-runtime");function Me({config:e,children:t}){let[r,o]=(0,Ae.useState)(!1),{session:n,isLoading:c,error:g,send:z,reset:f}=ne();return(0,m.jsxs)(Q,{config:e,children:[(0,m.jsx)("div",{className:"relative z-0",children:t}),(0,m.jsxs)("div",{id:"dhi-copilot-root",className:"dhi-copilot-container",children:[(0,m.jsx)("button",{onClick:()=>o(!r),className:l("fixed bottom-6 right-6 w-16 h-16 rounded-2xl shadow-2xl flex items-center justify-center transition-all duration-300 z-[9999] hover:scale-110 active:scale-95 border-2 border-white",r?"bg-red-500 rotate-90":"bg-blue-600 hover:bg-blue-700"),style:{backgroundColor:r?"#ef4444":(e==null?void 0:e.primaryColor)||"#2563eb"},children:r?(0,m.jsx)(B.X,{className:"text-white w-8 h-8"}):(0,m.jsxs)("div",{className:"relative",children:[(0,m.jsx)(B.MessageCircle,{className:"text-white w-8 h-8"}),(0,m.jsx)("div",{className:"absolute -top-2 -right-2 bg-white rounded-md p-0.5 border border-blue-100",children:(0,m.jsx)(B.Bot,{size:12,className:"text-blue-600"})})]})}),(0,m.jsxs)("div",{className:l("fixed top-0 right-0 h-full bg-white shadow-[-10px_0_40px_rgba(0,0,0,0.1)] transition-all duration-500 ease-[cubic-bezier(0.05,0.7,0.1,1)] z-[9998] flex flex-col",r?"w-full md:w-[450px] translate-x-0 opacity-100":"w-0 translate-x-full opacity-0 pointer-events-none"),children:[(0,m.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-slate-100 bg-slate-50/50",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)(B.Bot,{className:"text-blue-600",size:20}),(0,m.jsx)("span",{className:"font-bold text-slate-800",children:(e==null?void 0:e.botName)||"Assistant IA"})]}),(0,m.jsx)("button",{onClick:()=>o(!1),className:"p-2 hover:bg-slate-200 rounded-full transition-colors",children:(0,m.jsx)(B.X,{size:20,className:"text-slate-500"})})]}),(0,m.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,m.jsx)(oe,{session:n,isLoading:c,error:g,onSend:z,onReset:f})})]})]})]})}function ge(e,{insertAt:t}={}){if(!e||typeof document=="undefined")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}ge(`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: var(--font-geist-sans), system-ui, sans-serif;--font-mono: var(--font-geist-mono), monospace;--color-red-50: oklch(97.1% .013 17.38);--color-red-100: oklch(93.6% .032 17.717);--color-red-300: oklch(80.8% .114 19.571);--color-red-400: oklch(70.4% .191 22.216);--color-red-500: oklch(63.7% .237 25.331);--color-red-600: oklch(57.7% .245 27.325);--color-amber-50: oklch(98.7% .022 95.277);--color-amber-500: oklch(76.9% .188 70.08);--color-amber-600: oklch(66.6% .179 58.318);--color-emerald-50: oklch(97.9% .021 166.113);--color-emerald-100: oklch(95% .052 163.051);--color-emerald-400: oklch(76.5% .177 163.223);--color-emerald-500: oklch(69.6% .17 162.48);--color-emerald-600: oklch(59.6% .145 163.225);--color-blue-50: var(--widget-primary-light, #eff6ff);--color-blue-100: oklch(93.2% .032 255.585);--color-blue-200: oklch(88.2% .059 254.128);--color-blue-300: oklch(80.9% .105 251.813);--color-blue-400: oklch(70.7% .165 254.624);--color-blue-500: oklch(62.3% .214 259.815);--color-blue-600: var(--widget-primary, #2563eb);--color-blue-700: oklch(48.8% .243 264.376);--color-indigo-50: oklch(96.2% .018 272.314);--color-indigo-100: oklch(93% .034 272.788);--color-indigo-200: oklch(87% .065 274.039);--color-indigo-400: oklch(67.3% .182 276.935);--color-indigo-500: oklch(58.5% .233 277.117);--color-indigo-600: oklch(51.1% .262 276.966);--color-indigo-900: oklch(35.9% .144 278.697);--color-violet-50: oklch(96.9% .016 293.756);--color-violet-500: oklch(60.6% .25 292.717);--color-violet-600: oklch(54.1% .281 293.009);--color-slate-50: oklch(98.4% .003 247.858);--color-slate-100: oklch(96.8% .007 247.896);--color-slate-200: oklch(92.9% .013 255.508);--color-slate-300: oklch(86.9% .022 252.894);--color-slate-400: oklch(70.4% .04 256.788);--color-slate-500: oklch(55.4% .046 257.417);--color-slate-600: oklch(44.6% .043 257.281);--color-slate-700: oklch(37.2% .044 257.287);--color-slate-800: oklch(27.9% .041 260.031);--color-slate-900: oklch(20.8% .042 265.755);--color-white: #fff;--spacing: .25rem;--container-sm: 24rem;--container-md: 28rem;--container-4xl: 56rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--text-lg: 1.125rem;--text-lg--line-height: calc(1.75 / 1.125);--text-2xl: 1.5rem;--text-2xl--line-height: calc(2 / 1.5);--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--tracking-tight: -.025em;--tracking-wider: .05em;--tracking-widest: .1em;--leading-tight: 1.25;--leading-snug: 1.375;--leading-relaxed: 1.625;--radius-sm: .25rem;--radius-md: .375rem;--radius-lg: .5rem;--radius-xl: .75rem;--radius-2xl: 1rem;--radius-3xl: 1.5rem;--animate-spin: spin 1s linear infinite;--animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm: 8px;--blur-md: 12px;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono);--color-background: #F9FAFB;--color-foreground: #111827;--color-border: #E5E7EB;--color-input: #E5E7EB;--color-ring: #3B82F6;--color-primary: #2563EB;--color-primary-foreground: #FFFFFF;--color-secondary: #F1F5F9;--color-muted-foreground: #6B7280;--color-accent: #EFF6FF;--color-destructive: #EF4444}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.\\@container\\/card-header{container-type:inline-size;container-name:card-header}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:calc(var(--spacing) * 0)}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.-bottom-0\\.5{bottom:calc(var(--spacing) * -.5)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-6{bottom:calc(var(--spacing) * 6)}.left-0{left:calc(var(--spacing) * 0)}.z-0{z-index:0}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2 / span 2}.row-start-1{grid-row-start:1}.container{width:100%;@media(width>=40rem){max-width:40rem}@media(width>=48rem){max-width:48rem}@media(width>=64rem){max-width:64rem}@media(width>=80rem){max-width:80rem}@media(width>=96rem){max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-auto{margin-left:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.field-sizing-content{field-sizing:content}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-full{width:100%;height:100%}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-40{max-height:calc(var(--spacing) * 40)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-\\[22px\\]{min-height:22px}.w-0{width:calc(var(--spacing) * 0)}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-1\\/3{width:calc(1 / 3 * 100%)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-32{width:calc(var(--spacing) * 32)}.w-64{width:calc(var(--spacing) * 64)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[120px\\]{max-width:120px}.max-w-\\[250px\\]{max-width:250px}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\\(--radix-tooltip-content-transform-origin\\){transform-origin:var(--radix-tooltip-content-transform-origin)}.translate-x-0{--tw-translate-x: calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x: calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-5{--tw-translate-x: calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x: 100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-110{--tw-scale-x: 110%;--tw-scale-y: 110%;--tw-scale-z: 110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.rotate-\\[360deg\\]{rotate:360deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[progress_2s_infinite_linear\\]{animation:progress 2s infinite linear}.animate-\\[web-progress_2s_infinite_linear\\]{animation:web-progress 2s infinite linear}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-rows-\\[auto_auto\\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:calc(infinity * 1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-tl-sm{border-top-left-radius:var(--radius-sm)}.rounded-r-full{border-top-right-radius:calc(infinity * 1px);border-bottom-right-radius:calc(infinity * 1px)}.rounded-tr-sm{border-top-right-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style: dashed;border-style:dashed}.border-none{--tw-border-style: none;border-style:none}.border-blue-100{border-color:var(--color-blue-100)}.border-border{border-color:var(--color-border)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-indigo-100{border-color:var(--color-indigo-100)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-input{border-color:var(--color-input)}.border-red-100{border-color:var(--color-red-100)}.border-red-300{border-color:var(--color-red-300)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-transparent{border-color:transparent}.border-white{border-color:var(--color-white)}.border-t-transparent{border-top-color:transparent}.border-l-transparent{border-left-color:transparent}.bg-\\[\\#F3F4F6\\]{background-color:#f3f4f6}.bg-\\[\\#F9FAFB\\]{background-color:#f9fafb}.bg-amber-50{background-color:var(--color-amber-50)}.bg-background{background-color:var(--color-background)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/50{background-color:var(--color-blue-50);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-border{background-color:var(--color-border)}.bg-destructive{background-color:var(--color-destructive)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-foreground{background-color:var(--color-foreground)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-50\\/30{background-color:color-mix(in srgb,oklch(96.2% .018 272.314) 30%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-indigo-50) 30%,transparent)}}.bg-indigo-50\\/40{background-color:color-mix(in srgb,oklch(96.2% .018 272.314) 40%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-indigo-50) 40%,transparent)}}.bg-indigo-50\\/50{background-color:color-mix(in srgb,oklch(96.2% .018 272.314) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-indigo-50) 50%,transparent)}}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-400{background-color:var(--color-indigo-400)}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-primary{background-color:var(--color-primary)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\\/30{background-color:color-mix(in srgb,oklch(97.1% .013 17.38) 30%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-red-50) 30%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:var(--color-secondary)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/30{background-color:color-mix(in srgb,oklch(98.4% .003 247.858) 30%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-50) 30%,transparent)}}.bg-slate-50\\/50{background-color:color-mix(in srgb,oklch(98.4% .003 247.858) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\\/20{background-color:color-mix(in srgb,oklch(20.8% .042 265.755) 20%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-900) 20%,transparent)}}.bg-slate-900\\/60{background-color:color-mix(in srgb,oklch(20.8% .042 265.755) 60%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-900) 60%,transparent)}}.bg-transparent{background-color:transparent}.bg-violet-50{background-color:var(--color-violet-50)}.bg-white{background-color:var(--color-white)}.fill-foreground{fill:var(--color-foreground)}.object-contain{object-fit:contain}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-8{padding:calc(var(--spacing) * 8)}.p-px{padding:1px}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading, var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading, var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading, var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading, var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading: 1;line-height:1}.leading-relaxed{--tw-leading: var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading: var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading: var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight: var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight: var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking: var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking: var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking: var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-background{color:var(--color-background)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-foreground{color:var(--color-foreground)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-900{color:var(--color-indigo-900)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0%}.opacity-30{opacity:30%}.opacity-40{opacity:40%}.opacity-50{opacity:50%}.opacity-60{opacity:60%}.opacity-75{opacity:75%}.opacity-100{opacity:100%}.shadow-2xl{--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / .25));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[-10px_0_40px_rgba\\(0\\,0\\,0\\,0\\.1\\)\\]{--tw-shadow: -10px 0 40px var(--tw-shadow-color, rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-4{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-blue-100{--tw-shadow-color: oklch(93.2% .032 255.585);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-blue-100) var(--tw-shadow-alpha), transparent)}}.shadow-blue-200{--tw-shadow-color: oklch(88.2% .059 254.128);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-blue-200) var(--tw-shadow-alpha), transparent)}}.ring-indigo-50{--tw-ring-color: var(--color-indigo-50)}.outline-hidden{--tw-outline-style: none;outline-style:none;@media(forced-colors:active){outline:2px solid transparent;outline-offset:2px}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-blur-md{--tw-backdrop-blur: blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur: blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.duration-150{--tw-duration: .15s;transition-duration:.15s}.duration-200{--tw-duration: .2s;transition-duration:.2s}.duration-300{--tw-duration: .3s;transition-duration:.3s}.duration-500{--tw-duration: .5s;transition-duration:.5s}.ease-\\[cubic-bezier\\(0\\.4\\,0\\,0\\.2\\,1\\)\\]{--tw-ease: cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-\\[cubic-bezier\\(0\\.05\\,0\\.7\\,0\\.1\\,1\\)\\]{--tw-ease: cubic-bezier(.05,.7,.1,1);transition-timing-function:cubic-bezier(.05,.7,.1,1)}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.outline-none{--tw-outline-style: none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.ease-\\[cubic-bezier\\(0\\.4\\,0\\,0\\.2\\,1\\)\\]{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-\\[cubic-bezier\\(0\\.05\\,0\\.7\\,0\\.1\\,1\\)\\]{animation-timing-function:cubic-bezier(.05,.7,.1,1)}.fade-in,.fade-in-0{--tw-enter-opacity: 0}.slide-in-from-bottom-1{--tw-enter-translate-y: .25rem}.slide-in-from-left-2{--tw-enter-translate-x: -.5rem}.slide-in-from-top-1{--tw-enter-translate-y: -.25rem}.zoom-in{--tw-enter-scale: 0}.zoom-in-95{--tw-enter-scale: .95}.group-hover\\:bg-blue-100{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-100)}}}.group-hover\\:bg-blue-400{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-400)}}}.group-hover\\:text-blue-400{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-blue-400)}}}.group-hover\\:text-slate-600{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-slate-600)}}}.group-hover\\:text-slate-800{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-slate-800)}}}.group-hover\\:opacity-100{&:is(:where(.group):hover *){@media(hover:hover){opacity:100%}}}.group-data-\\[disabled\\=true\\]\\:pointer-events-none{&:is(:where(.group)[data-disabled=true] *){pointer-events:none}}.group-data-\\[disabled\\=true\\]\\:opacity-50{&:is(:where(.group)[data-disabled=true] *){opacity:50%}}.peer-disabled\\:cursor-not-allowed{&:is(:where(.peer):disabled~*){cursor:not-allowed}}.peer-disabled\\:opacity-50{&:is(:where(.peer):disabled~*){opacity:50%}}.selection\\:bg-primary{& *::selection{background-color:var(--color-primary)}&::selection{background-color:var(--color-primary)}}.selection\\:text-primary-foreground{& *::selection{color:var(--color-primary-foreground)}&::selection{color:var(--color-primary-foreground)}}.file\\:inline-flex{&::file-selector-button{display:inline-flex}}.file\\:h-7{&::file-selector-button{height:calc(var(--spacing) * 7)}}.file\\:border-0{&::file-selector-button{border-style:var(--tw-border-style);border-width:0px}}.file\\:bg-transparent{&::file-selector-button{background-color:transparent}}.file\\:text-sm{&::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}}.file\\:font-medium{&::file-selector-button{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}}.file\\:text-foreground{&::file-selector-button{color:var(--color-foreground)}}.placeholder\\:text-muted-foreground{&::placeholder{color:var(--color-muted-foreground)}}.placeholder\\:text-slate-300{&::placeholder{color:var(--color-slate-300)}}.focus-within\\:border-blue-300{&:focus-within{border-color:var(--color-blue-300)}}.focus-within\\:shadow-\\[0_0_0_3px_rgba\\(59\\,130\\,246\\,0\\.08\\)\\]{&:focus-within{--tw-shadow: 0 0 0 3px var(--tw-shadow-color, rgba(59,130,246,.08));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.hover\\:scale-110{&:hover{@media(hover:hover){--tw-scale-x: 110%;--tw-scale-y: 110%;--tw-scale-z: 110%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.hover\\:border-blue-100{&:hover{@media(hover:hover){border-color:var(--color-blue-100)}}}.hover\\:border-blue-200{&:hover{@media(hover:hover){border-color:var(--color-blue-200)}}}.hover\\:border-blue-300{&:hover{@media(hover:hover){border-color:var(--color-blue-300)}}}.hover\\:border-slate-100{&:hover{@media(hover:hover){border-color:var(--color-slate-100)}}}.hover\\:border-slate-200{&:hover{@media(hover:hover){border-color:var(--color-slate-200)}}}.hover\\:bg-accent{&:hover{@media(hover:hover){background-color:var(--color-accent)}}}.hover\\:bg-blue-50{&:hover{@media(hover:hover){background-color:var(--color-blue-50)}}}.hover\\:bg-blue-50\\/50{&:hover{@media(hover:hover){background-color:var(--color-blue-50);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}}}.hover\\:bg-blue-700{&:hover{@media(hover:hover){background-color:var(--color-blue-700)}}}.hover\\:bg-destructive\\/90{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#EF4444 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}}}.hover\\:bg-primary\\/90{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#2563EB 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}}}.hover\\:bg-secondary\\/80{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#F1F5F9 80%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-secondary) 80%,transparent)}}}}.hover\\:bg-slate-50{&:hover{@media(hover:hover){background-color:var(--color-slate-50)}}}.hover\\:bg-slate-100{&:hover{@media(hover:hover){background-color:var(--color-slate-100)}}}.hover\\:bg-slate-200{&:hover{@media(hover:hover){background-color:var(--color-slate-200)}}}.hover\\:text-blue-600{&:hover{@media(hover:hover){color:var(--color-blue-600)}}}.hover\\:text-red-500{&:hover{@media(hover:hover){color:var(--color-red-500)}}}.hover\\:text-slate-500{&:hover{@media(hover:hover){color:var(--color-slate-500)}}}.hover\\:text-slate-600{&:hover{@media(hover:hover){color:var(--color-slate-600)}}}.hover\\:text-slate-900{&:hover{@media(hover:hover){color:var(--color-slate-900)}}}.hover\\:underline{&:hover{@media(hover:hover){text-decoration-line:underline}}}.hover\\:shadow{&:hover{@media(hover:hover){--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.hover\\:shadow-lg{&:hover{@media(hover:hover){--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.focus\\:border-blue-300{&:focus{border-color:var(--color-blue-300)}}.focus\\:bg-accent{&:focus{background-color:var(--color-accent)}}.focus\\:ring-2{&:focus{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-blue-50{&:focus{--tw-ring-color: var(--color-blue-50)}}.focus-visible\\:border-ring{&:focus-visible{border-color:var(--color-ring)}}.focus-visible\\:ring-\\[3px\\]{&:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus-visible\\:ring-destructive\\/20{&:focus-visible{--tw-ring-color: color-mix(in srgb, #EF4444 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-destructive) 20%, transparent)}}}.focus-visible\\:ring-ring\\/50{&:focus-visible{--tw-ring-color: color-mix(in srgb, #3B82F6 50%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-ring) 50%, transparent)}}}.focus-visible\\:outline-1{&:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}}.active\\:scale-95{&:active{--tw-scale-x: 95%;--tw-scale-y: 95%;--tw-scale-z: 95%;scale:var(--tw-scale-x) var(--tw-scale-y)}}.disabled\\:pointer-events-none{&:disabled{pointer-events:none}}.disabled\\:cursor-not-allowed{&:disabled{cursor:not-allowed}}.disabled\\:opacity-50{&:disabled{opacity:50%}}.has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\]{&:has(*[data-slot=card-action]){grid-template-columns:1fr auto}}.has-\\[\\>svg\\]\\:px-1\\.5{&:has(>svg){padding-inline:calc(var(--spacing) * 1.5)}}.has-\\[\\>svg\\]\\:px-2\\.5{&:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}}.has-\\[\\>svg\\]\\:px-3{&:has(>svg){padding-inline:calc(var(--spacing) * 3)}}.has-\\[\\>svg\\]\\:px-4{&:has(>svg){padding-inline:calc(var(--spacing) * 4)}}.aria-invalid\\:border-destructive{&[aria-invalid=true]{border-color:var(--color-destructive)}}.aria-invalid\\:ring-destructive\\/20{&[aria-invalid=true]{--tw-ring-color: color-mix(in srgb, #EF4444 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-destructive) 20%, transparent)}}}.data-\\[disabled\\]\\:pointer-events-none{&[data-disabled]{pointer-events:none}}.data-\\[disabled\\]\\:opacity-50{&[data-disabled]{opacity:50%}}.data-\\[orientation\\=horizontal\\]\\:h-px{&[data-orientation=horizontal]{height:1px}}.data-\\[orientation\\=horizontal\\]\\:w-full{&[data-orientation=horizontal]{width:100%}}.data-\\[orientation\\=vertical\\]\\:h-full{&[data-orientation=vertical]{height:100%}}.data-\\[orientation\\=vertical\\]\\:w-px{&[data-orientation=vertical]{width:1px}}.data-\\[placeholder\\]\\:text-muted-foreground{&[data-placeholder]{color:var(--color-muted-foreground)}}.data-\\[side\\=bottom\\]\\:translate-y-1{&[data-side=bottom]{--tw-translate-y: calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2{&[data-side=bottom]{--tw-enter-translate-y: -.5rem}}.data-\\[side\\=left\\]\\:-translate-x-1{&[data-side=left]{--tw-translate-x: calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.data-\\[side\\=left\\]\\:slide-in-from-right-2{&[data-side=left]{--tw-enter-translate-x: .5rem}}.data-\\[side\\=right\\]\\:translate-x-1{&[data-side=right]{--tw-translate-x: calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.data-\\[side\\=right\\]\\:slide-in-from-left-2{&[data-side=right]{--tw-enter-translate-x: -.5rem}}.data-\\[side\\=top\\]\\:-translate-y-1{&[data-side=top]{--tw-translate-y: calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2{&[data-side=top]{--tw-enter-translate-y: .5rem}}.data-\\[size\\=default\\]\\:h-9{&[data-size=default]{height:calc(var(--spacing) * 9)}}.data-\\[size\\=sm\\]\\:h-8{&[data-size=sm]{height:calc(var(--spacing) * 8)}}.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1{:is(&>*){&[data-slot=select-value]{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}}}.\\*\\:data-\\[slot\\=select-value\\]\\:flex{:is(&>*){&[data-slot=select-value]{display:flex}}}.\\*\\:data-\\[slot\\=select-value\\]\\:items-center{:is(&>*){&[data-slot=select-value]{align-items:center}}}.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2{:is(&>*){&[data-slot=select-value]{gap:calc(var(--spacing) * 2)}}}.data-\\[state\\=closed\\]\\:animate-out{&[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}}.data-\\[state\\=closed\\]\\:fade-out-0{&[data-state=closed]{--tw-exit-opacity: 0}}.data-\\[state\\=closed\\]\\:zoom-out-95{&[data-state=closed]{--tw-exit-scale: .95}}.data-\\[state\\=open\\]\\:animate-in{&[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}}.data-\\[state\\=open\\]\\:fade-in-0{&[data-state=open]{--tw-enter-opacity: 0}}.data-\\[state\\=open\\]\\:zoom-in-95{&[data-state=open]{--tw-enter-scale: .95}}.md\\:w-\\[450px\\]{@media(width>=48rem){width:450px}}.md\\:grid-cols-\\[1fr_340px\\]{@media(width>=48rem){grid-template-columns:1fr 340px}}.md\\:text-sm{@media(width>=48rem){font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}}.dark\\:border-input{@media(prefers-color-scheme:dark){border-color:var(--color-input)}}.dark\\:bg-destructive\\/60{@media(prefers-color-scheme:dark){background-color:color-mix(in srgb,#EF4444 60%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-destructive) 60%,transparent)}}}.dark\\:bg-input\\/30{@media(prefers-color-scheme:dark){background-color:color-mix(in srgb,#E5E7EB 30%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-input) 30%,transparent)}}}.dark\\:hover\\:bg-accent\\/50{@media(prefers-color-scheme:dark){&:hover{@media(hover:hover){background-color:color-mix(in srgb,#EFF6FF 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-accent) 50%,transparent)}}}}}.dark\\:hover\\:bg-input\\/50{@media(prefers-color-scheme:dark){&:hover{@media(hover:hover){background-color:color-mix(in srgb,#E5E7EB 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-input) 50%,transparent)}}}}}.dark\\:focus-visible\\:ring-destructive\\/40{@media(prefers-color-scheme:dark){&:focus-visible{--tw-ring-color: color-mix(in srgb, #EF4444 40%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-destructive) 40%, transparent)}}}}.dark\\:aria-invalid\\:ring-destructive\\/40{@media(prefers-color-scheme:dark){&[aria-invalid=true]{--tw-ring-color: color-mix(in srgb, #EF4444 40%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-destructive) 40%, transparent)}}}}.\\[\\&_svg\\]\\:pointer-events-none{& svg{pointer-events:none}}.\\[\\&_svg\\]\\:shrink-0{& svg{flex-shrink:0}}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-3{& svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4{& svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground{& svg:not([class*=text-]){color:var(--color-muted-foreground)}}.\\[\\.border-b\\]\\:pb-6{&:is(.border-b){padding-bottom:calc(var(--spacing) * 6)}}.\\[\\.border-t\\]\\:pt-6{&:is(.border-t){padding-top:calc(var(--spacing) * 6)}}.\\*\\:\\[span\\]\\:last\\:flex{:is(&>*){&:is(span){&:last-child{display:flex}}}}.\\*\\:\\[span\\]\\:last\\:items-center{:is(&>*){&:is(span){&:last-child{align-items:center}}}}.\\*\\:\\[span\\]\\:last\\:gap-2{:is(&>*){&:is(span){&:last-child{gap:calc(var(--spacing) * 2)}}}}.\\[\\&\\>svg\\]\\:pointer-events-none{>svg{pointer-events:none}}.\\[\\&\\>svg\\]\\:size-3{>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}}.\\[a\\&\\]\\:hover\\:bg-accent{a&{&:hover{@media(hover:hover){background-color:var(--color-accent)}}}}.\\[a\\&\\]\\:hover\\:bg-destructive\\/90{a&{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#EF4444 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}}}}.\\[a\\&\\]\\:hover\\:bg-primary\\/90{a&{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#2563EB 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}}}}.\\[a\\&\\]\\:hover\\:bg-secondary\\/90{a&{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#F1F5F9 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-secondary) 90%,transparent)}}}}}.\\[a\\&\\]\\:hover\\:underline{a&{&:hover{@media(hover:hover){text-decoration-line:underline}}}}}@layer base{:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 221.2 83.2% 53.3%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 221.2 83.2% 53.3%;--radius: .5rem}}@layer base{*{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}body{background-color:#f9fafb;color:#111827;font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:2px}::-webkit-scrollbar-thumb:hover{background:#9ca3af}@keyframes blink{0%,80%,to{opacity:0;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.thinking-dot{animation:blink 1.4s infinite ease-in-out both}.thinking-dot:nth-child(1){animation-delay:0s}.thinking-dot:nth-child(2){animation-delay:.2s}.thinking-dot:nth-child(3){animation-delay:.4s}.message-enter{animation:fadeInUp .25s ease-out}.prose-hr-chat{color:#374151;font-size:.875rem;line-height:1.625}.prose-hr-chat h1,.prose-hr-chat h2,.prose-hr-chat h3{color:#1f2937;font-weight:600;margin-top:.75rem;margin-bottom:.25rem}.prose-hr-chat p{margin-bottom:.5rem}.prose-hr-chat ul,.prose-hr-chat ol{padding-left:1rem;margin-bottom:.5rem}.prose-hr-chat li{margin-bottom:.125rem}.prose-hr-chat table{font-size:.75rem;border-collapse:collapse;width:100%;margin-bottom:.75rem}.prose-hr-chat th{background:#f1f5f9;padding:.25rem .5rem;border:1px solid #E2E8F0;font-weight:500;text-align:left}.prose-hr-chat td{padding:.25rem .5rem;border:1px solid #E2E8F0}.prose-hr-chat code{background:#f1f5f9;padding:.125rem .25rem;border-radius:.25rem;font-size:.75rem;font-family:ui-monospace,monospace}.prose-hr-chat pre{background:#f1f5f9;padding:.75rem;border-radius:.5rem;overflow-x:auto;margin-bottom:.5rem}.prose-hr-chat pre code{background:transparent;padding:0}.prose-hr-chat strong{font-weight:600;color:#1f2937}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-scale-x{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-y{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-z{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: "*"; inherits: false;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-tracking{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-outline-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-backdrop-blur{syntax: "*"; inherits: false;}@property --tw-backdrop-brightness{syntax: "*"; inherits: false;}@property --tw-backdrop-contrast{syntax: "*"; inherits: false;}@property --tw-backdrop-grayscale{syntax: "*"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: "*"; inherits: false;}@property --tw-backdrop-invert{syntax: "*"; inherits: false;}@property --tw-backdrop-opacity{syntax: "*"; inherits: false;}@property --tw-backdrop-saturate{syntax: "*"; inherits: false;}@property --tw-backdrop-sepia{syntax: "*"; inherits: false;}@property --tw-duration{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes pulse{50%{opacity:.5}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-scale-z: 1;--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-outline-style: solid;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial;--tw-duration: initial;--tw-ease: initial}}}
6
+ `);var q=require("react"),V=H(require("next/link")),Ue=H(require("next/image")),se=require("next/navigation"),N=require("lucide-react");var P=H(require("@radix-ui/react-tooltip"));var U=require("react/jsx-runtime");function Le(r){var o=r,{delayDuration:e=0}=o,t=X(o,["delayDuration"]);return(0,U.jsx)(P.Provider,w({"data-slot":"tooltip-provider",delayDuration:e},t))}function De(t){var e=X(t,[]);return(0,U.jsx)(P.Root,w({"data-slot":"tooltip"},e))}function je(t){var e=X(t,[]);return(0,U.jsx)(P.Trigger,w({"data-slot":"tooltip-trigger"},e))}function Be(n){var c=n,{className:e,sideOffset:t=0,children:r}=c,o=X(c,["className","sideOffset","children"]);return(0,U.jsx)(P.Portal,{children:(0,U.jsxs)(P.Content,S(w({"data-slot":"tooltip-content",sideOffset:t,className:l("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e)},o),{children:[r,(0,U.jsx)(P.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]}))})}var a=require("react/jsx-runtime");function et(){return(0,q.useSyncExternalStore)(e=>(window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)),()=>window.innerWidth<768,()=>!1)}function He({expanded:e,setExpanded:t,isEmbed:r}){let o=(0,se.usePathname)(),c=(0,se.useSearchParams)().get("threadId"),[g,z]=(0,q.useState)([]),{botName:f,logoUrl:E}=O(),_=et();(0,q.useEffect)(()=>{(async()=>{try{let s=await K.listThreads();z(s)}catch(s){z([])}})()},[o]);let p=()=>{(r||_)&&t(!1)};return(0,a.jsxs)(Le,{delayDuration:500,children:[e&&(r||_)&&(0,a.jsx)("div",{className:"fixed inset-0 bg-slate-900/20 backdrop-blur-sm z-40 transition-opacity duration-300",onClick:()=>t(!1)}),(0,a.jsxs)("aside",{className:l("relative h-screen bg-white border-r border-slate-100 flex flex-col shrink-0 transition-all duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] z-50",e?r?"w-full":"w-64":"w-16",(r||_)&&e?"fixed inset-y-0 left-0 shadow-2xl":"relative"),children:[(0,a.jsxs)("div",{className:"flex items-center h-16 px-4 border-b border-slate-50",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 overflow-hidden",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-xl bg-blue-600 flex items-center justify-center text-white shrink-0 shadow-lg shadow-blue-200",children:(0,a.jsx)(N.Bot,{size:20,strokeWidth:2.5,className:l("transition-transform duration-500",e&&"rotate-[360deg]")})}),e&&(0,a.jsxs)("div",{className:"flex flex-col animate-in fade-in slide-in-from-left-2 duration-300",children:[(0,a.jsx)("span",{className:"font-bold text-slate-900 leading-tight",children:f}),(0,a.jsxs)("span",{className:"text-[10px] text-emerald-500 font-medium flex items-center gap-1",children:[(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"})," IA Active"]})]})]}),(0,a.jsx)("button",{onClick:()=>t(!e),className:"ml-auto p-2 hover:bg-slate-100 rounded-lg text-slate-400 transition-colors",children:e?(0,a.jsx)(N.PanelLeftClose,{size:18}):(0,a.jsx)(N.PanelLeftOpen,{size:18})})]}),(0,a.jsx)("div",{className:"p-3",children:(0,a.jsx)(he,{label:"Nouveau chat",show:!e,children:(0,a.jsxs)(V.default,{href:"/chat",onClick:p,className:l("flex items-center gap-3 bg-blue-600 text-white rounded-xl font-semibold transition-all shadow-md shadow-blue-100 hover:bg-blue-700 hover:shadow-lg active:scale-95",e?"px-4 py-3 w-full":"w-10 h-10 justify-center mx-auto"),children:[(0,a.jsx)(N.Plus,{size:20,strokeWidth:3}),e&&(0,a.jsx)("span",{className:"text-sm",children:"Nouvelle discussion"})]})})}),(0,a.jsxs)("nav",{className:"flex flex-col gap-1 px-3 mt-2",children:[(0,a.jsx)(he,{label:"Discussions",show:!e,children:(0,a.jsxs)(V.default,{href:"/chat",onClick:p,className:l("flex items-center gap-3 p-2.5 rounded-xl text-sm transition-all group",o.startsWith("/chat")?"bg-slate-100 text-blue-600 font-bold":"text-slate-500 hover:bg-slate-50 hover:text-slate-900"),children:[(0,a.jsx)(N.MessageSquare,{size:18,className:l(o.startsWith("/chat")?"text-blue-600":"text-slate-400 group-hover:text-slate-600")}),e&&(0,a.jsx)("span",{children:"Chat"})]})}),(0,a.jsx)(he,{label:"Param\xE8tres",show:!e,children:(0,a.jsxs)(V.default,{href:"/settings",onClick:p,className:l("flex items-center gap-3 p-2.5 rounded-xl text-sm transition-all group",o==="/settings"?"bg-slate-100 text-blue-600 font-bold":"text-slate-500 hover:bg-slate-50 hover:text-slate-900"),children:[(0,a.jsx)(N.Settings,{size:18,className:l(o==="/settings"?"text-blue-600":"text-slate-400 group-hover:text-slate-600")}),e&&(0,a.jsx)("span",{children:"Param\xE8tres"})]})})]}),e&&(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto mt-6 px-3 custom-scrollbar animate-in fade-in duration-500",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3 px-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Historique"}),(0,a.jsx)(N.Clock,{size:10,className:"text-slate-300"})]}),(0,a.jsx)("div",{className:"flex flex-col gap-1 pb-4",children:g.length===0?(0,a.jsx)("div",{className:"px-3 py-4 border border-dashed border-slate-100 rounded-xl text-center",children:(0,a.jsx)("p",{className:"text-[10px] text-slate-400 italic",children:"Aucune discussion"})}):g.map(x=>(0,a.jsxs)(V.default,{href:`/chat?threadId=${x.id}`,onClick:p,className:l("group relative flex flex-col gap-0.5 p-2.5 rounded-xl transition-all border border-transparent",c===x.id?"bg-blue-50/50 border-blue-100 text-blue-700 font-semibold":"text-slate-600 hover:bg-slate-50 hover:border-slate-100"),children:[c===x.id&&(0,a.jsx)("div",{className:"absolute left-0 top-2 bottom-2 w-1 bg-blue-600 rounded-r-full"}),(0,a.jsx)("span",{className:"text-[11px] truncate leading-tight",children:x.title}),(0,a.jsxs)("span",{className:"text-[8px] text-slate-400 group-hover:text-blue-400 transition-colors uppercase font-medium",children:["Discussion ID: ",x.id.slice(-4)]})]},x.id))})]}),(0,a.jsx)("div",{className:"mt-auto p-4 border-t border-slate-50 bg-slate-50/30",children:(0,a.jsxs)("div",{className:l("flex items-center gap-3",!e&&"justify-center"),children:[(0,a.jsxs)("div",{className:"relative shrink-0",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-full overflow-hidden border-2 border-white shadow-sm bg-slate-100 flex items-center justify-center",children:(0,a.jsx)(Ue.default,{src:E,alt:"User Profile",width:36,height:36,className:"object-contain"})}),(0,a.jsx)("div",{className:"absolute -bottom-0.5 -right-0.5 w-3 h-3 bg-emerald-500 border-2 border-white rounded-full"})]}),e&&(0,a.jsxs)("div",{className:"min-w-0 flex flex-col animate-in slide-in-from-bottom-1 duration-300",children:[(0,a.jsx)("p",{className:"text-xs font-bold text-slate-800 truncate",children:"Administrateur DHI"}),(0,a.jsx)("p",{className:"text-[10px] text-slate-400 font-medium truncate",children:"Console de Gestion"})]})]})})]})]})}function he({children:e,label:t,show:r}){return r?(0,a.jsxs)(De,{children:[(0,a.jsx)(je,{asChild:!0,children:e}),(0,a.jsx)(Be,{side:"right",sideOffset:10,className:"bg-slate-900 text-white border-none text-[10px] px-2 py-1 shadow-xl",children:t})]}):(0,a.jsx)(a.Fragment,{children:e})}var C=require("react");function $e(){let[e,t]=(0,C.useState)([]),[r,o]=(0,C.useState)(!0),[n,c]=(0,C.useState)(!1),[g,z]=(0,C.useState)(null),[f,E]=(0,C.useState)(null),[_,p]=(0,C.useState)(null),b=(0,C.useRef)(!1),F=(0,C.useCallback)(async(i=!1)=>{if(!(!i&&b.current)){i||(b.current=!0),o(!0);try{let d=await ae.list();t(d)}catch(d){console.error("Erreur fetchConnectors:",d),t([])}finally{o(!1),i||setTimeout(()=>{b.current=!1},1e3)}}},[]);(0,C.useEffect)(()=>{F()},[F]);let x=async i=>{c(!0),E(null),p(null);try{return await ae.save(i),await F(!0),p("Connecteur enregistr\xE9 avec succ\xE8s."),setTimeout(()=>p(null),3e3),!0}catch(d){return E(d.message||"Erreur lors de l'enregistrement du connecteur."),!1}finally{c(!1)}},s=(0,C.useCallback)(async i=>{E(null),p(null),z(i),t(d=>d.map(y=>y.source_id===i?S(w({},y),{status:"indexing"}):y));try{let d=await ae.sync(i);t(y=>y.map(T=>T.source_id===i?S(w({},T),{status:"active"}):T)),p(d.details||`Indexation lanc\xE9e pour ${i}`),setTimeout(()=>p(null),4e3)}catch(d){t(y=>y.map(T=>T.source_id===i?S(w({},T),{status:"error"}):T)),E(d.message||`L'indexation de ${i} a \xE9chou\xE9.`)}finally{z(null)}},[]);return{connectors:e,isFetching:r,isSaving:n,isIndexing:g,error:f,successMsg:_,save:x,triggerIndexing:s,refresh:()=>F(!0)}}0&&(module.exports={ChatWindow,CopilotApp,Sidebar,WidgetProvider,useChat,useConnectors,useWidgetConfig});
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
- var Pe=Object.defineProperty,Te=Object.defineProperties;var ke=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var Z=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,g=(e,t)=>{for(var s in t||(t={}))ee.call(t,s)&&Z(e,s,t[s]);if(B)for(var s of B(t))te.call(t,s)&&Z(e,s,t[s]);return e},R=(e,t)=>Te(e,ke(t));var M=(e,t)=>{var s={};for(var r in e)ee.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(e!=null&&B)for(var r of B(e))t.indexOf(r)<0&&te.call(e,r)&&(s[r]=e[r]);return s};import{useState as dt}from"react";import{createContext as Re,useContext as Ee,useEffect as Se,useMemo as We}from"react";import{jsx as Ie}from"react/jsx-runtime";var se=Re(void 0);function G({children:e,config:t}){let s={primaryColor:process.env.NEXT_PUBLIC_PRIMARY_COLOR||"#2563EB",logoUrl:process.env.NEXT_PUBLIC_WIDGET_LOGO||"/logo.png",botName:process.env.NEXT_PUBLIC_WIDGET_TITLE||"Copilot RH",position:"right",apiUrl:process.env.NEXT_PUBLIC_API_URL||"http://localhost:8000",expandedDefault:!1},r=We(()=>g(g({},s),t),[t]);return Se(()=>{let c=document.documentElement;c.style.setProperty("--widget-primary",r.primaryColor),c.style.setProperty("--widget-primary-light",`${r.primaryColor}15`)},[r.primaryColor]),Ie(se.Provider,{value:r,children:e})}var F=()=>{let e=Ee(se);if(!e)throw new Error("useWidgetConfig must be used within WidgetProvider");return e};import{useEffect as Ze,useRef as et}from"react";import{AlertCircle as tt,RotateCcw as st}from"lucide-react";import{Bot as Me,User as Fe}from"lucide-react";import _e from"react-markdown";import ze from"remark-gfm";import{clsx as Ae}from"clsx";import{twMerge as De}from"tailwind-merge";function l(...e){return De(Ae(e))}function re(e){return new Intl.DateTimeFormat("fr-FR",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}).format(e)}function X(){return`thread_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}import{Bot as Le}from"lucide-react";import{jsx as D,jsxs as oe}from"react/jsx-runtime";function ae(){return oe("div",{className:"flex items-start gap-3 message-enter",children:[D("div",{className:"w-7 h-7 rounded-lg bg-blue-600 flex items-center justify-center shrink-0 mt-0.5 shadow-sm",children:D(Le,{className:"w-3.5 h-3.5 text-white",strokeWidth:2.5})}),oe("div",{className:"bg-[#F3F4F6] rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-1.5",children:[D("span",{className:"text-xs text-slate-400 mr-1 select-none",children:"L'assistant r\xE9fl\xE9chit"}),D("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"}),D("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"}),D("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"})]})]})}import{jsx as N,jsxs as _}from"react/jsx-runtime";function ie({message:e}){let t=e.role==="user";return e.isStreaming?N(ae,{}):_("div",{className:l("flex items-start gap-3 w-full message-enter",t?"flex-row-reverse":"flex-row"),children:[N("div",{className:l("w-8 h-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5 shadow-sm",t?"bg-slate-100":"bg-blue-600"),children:t?N(Fe,{size:16,className:"text-slate-500"}):N(Me,{size:16,className:"text-white"})}),_("div",{className:l("flex flex-col gap-2 max-w-[85%]",t?"items-end":"items-start"),children:[N("div",{className:l("rounded-2xl px-4 py-3 text-sm leading-relaxed shadow-sm",t?"bg-white border border-slate-200 text-slate-800 rounded-tr-sm":"bg-[#F3F4F6] text-slate-700 rounded-tl-sm"),children:N("div",{className:"prose-hr-chat max-w-none",children:N(_e,{remarkPlugins:[ze],children:e.content})})}),!t&&e.sources&&e.sources.length>0&&_("div",{className:"mt-3 pt-3 border-t border-slate-100 w-full",children:[_("div",{className:"flex items-center gap-2 mb-2",children:[N("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),N("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Sources & Citations"})]}),N("div",{className:"flex flex-wrap gap-2",children:e.sources.map((s,r)=>_("div",{className:"group relative flex items-center gap-1.5 px-2 py-1 bg-white border border-slate-200 rounded-lg text-[10px] text-slate-600 shadow-sm hover:border-blue-300 hover:text-blue-600 transition-all cursor-default",children:[N("span",{className:"w-1 h-1 bg-slate-300 rounded-full group-hover:bg-blue-400"}),s]},r))})]}),N("span",{className:"text-[10px] text-slate-300 px-1",children:re(new Date(e.timestamp))})]})]})}import{FileSearch as Ue,ClipboardList as He,Users as $e,Coins as je}from"lucide-react";import Be from"next/image";import{jsx as W,jsxs as z}from"react/jsx-runtime";var Oe=[{icon:je,label:"Grilles de salaires",prompt:"Montre-moi les grilles de salaires pour les ing\xE9nieurs seniors."},{icon:He,label:"Proc\xE9dures RH",prompt:"Quelle est la proc\xE9dure pour poser des cong\xE9s pay\xE9s ?"},{icon:$e,label:"Onboarding",prompt:"Quelles sont les \xE9tapes d'onboarding pour un nouvel employ\xE9 ?"},{icon:Ue,label:"R\xE8glement int\xE9rieur",prompt:"R\xE9sume les points cl\xE9s du r\xE8glement int\xE9rieur."}];function ne({onSuggestion:e}){let{botName:t,logoUrl:s}=F();return z("div",{className:"flex flex-col items-center justify-center h-full gap-8 px-4 select-none",children:[z("div",{className:"flex flex-col items-center gap-3",children:[W("div",{className:"relative w-14 h-14 rounded-2xl bg-white border border-slate-100 flex items-center justify-center shadow-sm overflow-hidden p-2",children:W(Be,{src:s,alt:`${t} Logo`,width:40,height:40,priority:!0,className:"object-contain"})}),z("div",{className:"text-center",children:[z("h1",{className:"text-lg font-semibold text-slate-800",children:["Bonjour, je suis votre Copilot ",t]}),W("p",{className:"text-sm text-slate-400 mt-1",children:"Posez vos questions sur vos documents RH internes."})]})]}),W("div",{className:"grid grid-cols-2 gap-2 w-full max-w-md",children:Oe.map(r=>{let c=r.icon;return z("button",{onClick:()=>e(r.prompt),className:"flex items-start gap-2.5 p-3 rounded-xl bg-white border border-slate-100 hover:border-blue-200 hover:bg-blue-50/50 text-left transition-all duration-200 shadow-sm group",children:[W("div",{className:"mt-0.5 w-6 h-6 rounded-lg bg-blue-50 group-hover:bg-blue-100 flex items-center justify-center shrink-0 transition-colors",children:W(c,{className:"w-3.5 h-3.5 text-blue-500",strokeWidth:1.8})}),W("span",{className:"text-xs font-medium text-slate-600 group-hover:text-slate-800 leading-snug transition-colors",children:r.label})]},r.label)})})]})}import{useState as le,useRef as ce,useCallback as de}from"react";import{ArrowUp as qe,Paperclip as Ge,X as Xe,FileText as Ke}from"lucide-react";import{jsx as y,jsxs as K}from"react/jsx-runtime";function me({onSend:e,isLoading:t,disabled:s}){let[r,c]=le(""),[n,u]=le([]),v=ce(null),h=ce(null),w=i=>{if(i.target.files){let o=Array.from(i.target.files);u(d=>[...d,...o])}},E=i=>{u(o=>o.filter((d,b)=>b!==i))},m=de(()=>{let i=r.trim();!i&&n.length===0||t||s||(e(i,n),c(""),u([]))},[r,n,t,s,e]),f=i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),m())},T=de(i=>{c(i.target.value);let o=i.target;o.style.height="auto",o.style.height=`${Math.min(o.scrollHeight,160)}px`},[]),x=r.trim().length>0&&!t&&!s;return K("div",{className:"px-4 pb-4 pt-2",children:[y("div",{className:"flex flex-wrap gap-2 mb-2",children:n.map((i,o)=>K("div",{className:"flex items-center gap-2 px-2 py-1 bg-blue-50 border border-blue-100 rounded-lg text-[10px] text-blue-600",children:[y(Ke,{className:"w-3 h-3"}),y("span",{className:"truncate max-w-[100px]",children:i.name}),y("button",{onClick:()=>E(o),className:"hover:text-red-500",children:y(Xe,{className:"w-3 h-3"})})]},o))}),K("div",{className:l("flex items-end gap-2 bg-white border rounded-2xl px-3 py-2.5 shadow-sm transition-all duration-200","border-slate-200 focus-within:border-blue-300 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.08)]"),children:[y("input",{type:"file",ref:v,onChange:w,className:"hidden",multiple:!0,accept:".pdf,.docx,.txt,.mp3,.wav,.png,.jpg"}),y("button",{type:"button",onClick:()=>{var i;return(i=v.current)==null?void 0:i.click()},className:"p-1.5 rounded-lg text-slate-300 hover:text-slate-500 hover:bg-slate-50 transition-colors shrink-0 mb-0.5","aria-label":"Joindre un fichier",tabIndex:-1,children:y(Ge,{className:"w-4 h-4",strokeWidth:1.8})}),y("textarea",{ref:h,value:r,onChange:T,onKeyDown:f,placeholder:n.length>0?"Ajouter un message au fichier...":"Posez votre question RH\u2026",rows:1,disabled:s,className:l("flex-1 resize-none bg-transparent text-sm text-slate-800 placeholder:text-slate-300","outline-none leading-relaxed py-0.5 max-h-40 min-h-[22px]","disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Message"}),y("button",{type:"button",onClick:m,disabled:!x,"aria-label":"Envoyer",className:l("w-8 h-8 rounded-xl flex items-center justify-center shrink-0 transition-all duration-200 mb-0.5",x?"bg-blue-600 text-white hover:bg-blue-700 shadow-sm hover:shadow":"bg-slate-100 text-slate-300 cursor-not-allowed"),children:y(qe,{className:"w-4 h-4",strokeWidth:2.5})})]}),y("p",{className:"text-center text-[10px] text-slate-300 mt-2",children:"Entr\xE9e pour envoyer \xB7 Maj+Entr\xE9e pour sauter une ligne"})]})}import{useSearchParams as rt}from"next/navigation";import{X as Ve,ChevronLeft as Qe}from"lucide-react";import{usePathname as Je,useRouter as Ye}from"next/navigation";import{jsx as U,jsxs as ue}from"react/jsx-runtime";function pe({title:e="Copilot RH"}){let t=Ye(),s=Je();return ue("header",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100 bg-white",children:[ue("div",{className:"flex items-center gap-3",children:[s!=="/chat"&&U("button",{onClick:()=>t.back(),className:"p-1 hover:bg-slate-100 rounded-full transition-colors",children:U(Qe,{size:20,className:"text-slate-600"})}),U("h2",{className:"text-sm font-bold text-slate-800",children:e})]}),U("button",{onClick:()=>window.parent.postMessage("close-dhi-copilot","*"),children:U(Ve,{size:20,className:"text-slate-400 hover:text-red-500"})})]})}import{Fragment as ot,jsx as P,jsxs as H}from"react/jsx-runtime";function V({session:e,isLoading:t,error:s,onSend:r,onReset:c}){let n=et(null),u=e.messages.length>0,h=rt().get("embed")==="true";return Ze(()=>{n.current&&n.current.scrollTo({top:n.current.scrollHeight,behavior:"smooth"})},[e.messages]),H("div",{className:"flex flex-col h-full bg-[#F9FAFB]",children:[h?P(pe,{}):H("header",{className:"flex items-center justify-between px-5 py-3 border-b border-slate-100 bg-white shrink-0",children:[H("div",{className:"flex items-center gap-2",children:[P("div",{className:"w-2 h-2 rounded-full bg-emerald-400"}),P("span",{className:"text-sm font-medium text-slate-700",children:u?e.title:"Copilot RH"})]}),u&&H("button",{onClick:c,className:"flex items-center gap-1.5 text-xs text-slate-400 hover:text-slate-600 transition-colors px-2 py-1 rounded-lg hover:bg-slate-50",title:"Nouvelle conversation",children:[P(st,{className:"w-3 h-3",strokeWidth:2}),"Nouvelle conversation"]})]}),P("div",{ref:n,className:l("flex-1 overflow-y-auto px-4 py-4",u?"flex flex-col gap-4":""),children:u?P(ot,{children:e.messages.map(w=>P(ie,{message:w},w.id))}):P(ne,{onSuggestion:r})}),s&&H("div",{className:"mx-4 mb-2 px-3 py-2 bg-red-50 border border-red-100 rounded-xl flex items-start gap-2",children:[P(tt,{className:"w-3.5 h-3.5 text-red-400 mt-0.5 shrink-0"}),P("p",{className:"text-xs text-red-600 leading-relaxed",children:s})]}),P(me,{onSend:r,isLoading:t})]})}import{useState as Q,useCallback as xe,useEffect as nt}from"react";import{useSearchParams as lt,useRouter as ct}from"next/navigation";import{v4 as be}from"uuid";import ge from"axios";import{create as at}from"zustand";var fe=at(e=>({isNetworkError:!1,setNetworkError:t=>e({isNetworkError:t})}));var it=process.env.PUBLIC_API_URL||"http://127.0.0.1:8000",S=ge.create({baseURL:it,timeout:6e5,headers:{"Content-Type":"application/json"}});S.interceptors.response.use(e=>e,e=>!e.response||e.code==="ERR_NETWORK"?(fe.getState().setNetworkError(!0),new Promise(()=>{})):Promise.reject(e));var I=e=>{var t,s;if(ge.isAxiosError(e)){let r=((s=(t=e.response)==null?void 0:t.data)==null?void 0:s.detail)||e.message||"Erreur de connexion au serveur";throw new Error(r)}throw new Error("Une erreur inattendue est survenue")},$={sendMessage:async e=>{try{return(await S.post("/chat",e)).data}catch(t){return I(t)}},listThreads:async()=>{try{return(await S.get("/chat/threads")).data}catch(e){return I(e)}},getHistory:async e=>{try{return(await S.get(`/chat/history/${e}`)).data.map((s,r)=>({id:`${e}-${r}-${Date.now()}`,role:s.role,content:s.content,timestamp:new Date}))}catch(t){return I(t)}}},O={save:async e=>{try{return(await S.post("/connectors",e)).data}catch(t){return I(t)}},list:async()=>{try{return(await S.get("/settings/connectors")).data}catch(e){return I(e)}},sync:async e=>{try{return(await S.post(`/documents/sync/${e}`)).data}catch(t){return I(t)}}},he={upload:async(e,t="default")=>{try{let s=new FormData;return e.forEach(c=>{s.append("files",c)}),(await S.post(`/upload?tenant_id=${t}`,s,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(s){return I(s)}}};function J(){let e=lt(),t=ct(),s=e.get("threadId"),[r,c]=Q(()=>({id:s||X(),title:"Nouvelle conversation",messages:[],createdAt:new Date,updatedAt:new Date})),[n,u]=Q(!1),[v,h]=Q(null);nt(()=>{s&&s!==r.id&&(async()=>{u(!0),h(null);try{let f=await $.getHistory(s);c({id:s,title:"Conversation charg\xE9e",messages:f,createdAt:new Date,updatedAt:new Date})}catch(f){h("Impossible de charger l'historique de cette discussion.")}finally{u(!1)}})()},[s]);let w=xe(async(m,f=[])=>{if(!m.trim()&&f.length===0||n)return;h(null),u(!0);let T=m.trim();if(f.length>0){let o=f.map(d=>`\u{1F4C4} ${d.name}`).join(`
2
- `);T+=`
1
+ var Fe=Object.defineProperty,Te=Object.defineProperties;var Se=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var te=(e,t,r)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))re.call(t,r)&&te(e,r,t[r]);if(O)for(var r of O(t))oe.call(t,r)&&te(e,r,t[r]);return e},F=(e,t)=>Te(e,Se(t));var M=(e,t)=>{var r={};for(var o in e)re.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&O)for(var o of O(e))t.indexOf(o)<0&&oe.call(e,o)&&(r[o]=e[o]);return r};import{useState as mt}from"react";import{createContext as Re,useContext as _e,useEffect as Ie,useMemo as We}from"react";import{jsx as Ae}from"react/jsx-runtime";var ae=Re(void 0);function X({children:e,config:t}){let r={primaryColor:process.env.NEXT_PUBLIC_PRIMARY_COLOR||"#2563EB",logoUrl:process.env.NEXT_PUBLIC_WIDGET_LOGO||"/logo.png",botName:process.env.NEXT_PUBLIC_WIDGET_TITLE||"Copilot RH",position:"right",apiUrl:process.env.NEXT_PUBLIC_API_URL||"http://localhost:8000",expandedDefault:!1},o=We(()=>u(u({},r),t),[t]);return Ie(()=>{let c=document.documentElement;c.style.setProperty("--widget-primary",o.primaryColor),c.style.setProperty("--widget-primary-light",`${o.primaryColor}15`)},[o.primaryColor]),Ae(ae.Provider,{value:o,children:e})}var L=()=>{let e=_e(ae);if(!e)throw new Error("useWidgetConfig must be used within WidgetProvider");return e};import{useEffect as ot,useRef as at}from"react";import{AlertCircle as it,RotateCcw as nt}from"lucide-react";import{Bot as je,User as Be}from"lucide-react";import Ue from"react-markdown";import He from"remark-gfm";import{clsx as Me}from"clsx";import{twMerge as Le}from"tailwind-merge";function s(...e){return Le(Me(e))}function ie(e){return new Intl.DateTimeFormat("fr-FR",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}).format(e)}function K(){return`thread_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}import{Bot as De}from"lucide-react";import{jsx as I,jsxs as ne}from"react/jsx-runtime";function se(){return ne("div",{className:"flex items-start gap-3 message-enter",children:[I("div",{className:"w-7 h-7 rounded-lg bg-blue-600 flex items-center justify-center shrink-0 mt-0.5 shadow-sm",children:I(De,{className:"w-3.5 h-3.5 text-white",strokeWidth:2.5})}),ne("div",{className:"bg-[#F3F4F6] rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-1.5",children:[I("span",{className:"text-xs text-slate-400 mr-1 select-none",children:"L'assistant r\xE9fl\xE9chit"}),I("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"}),I("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"}),I("span",{className:"thinking-dot w-1.5 h-1.5 bg-slate-400 rounded-full inline-block"})]})]})}import{jsx as y,jsxs as D}from"react/jsx-runtime";function le({message:e}){let t=e.role==="user";return e.isStreaming?y(se,{}):D("div",{className:s("flex items-start gap-3 w-full message-enter",t?"flex-row-reverse":"flex-row"),children:[y("div",{className:s("w-8 h-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5 shadow-sm",t?"bg-slate-100":"bg-blue-600"),children:t?y(Be,{size:16,className:"text-slate-500"}):y(je,{size:16,className:"text-white"})}),D("div",{className:s("flex flex-col gap-2 max-w-[85%]",t?"items-end":"items-start"),children:[y("div",{className:s("rounded-2xl px-4 py-3 text-sm leading-relaxed shadow-sm",t?"bg-white border border-slate-200 text-slate-800 rounded-tr-sm":"bg-[#F3F4F6] text-slate-700 rounded-tl-sm"),children:y("div",{className:"prose-hr-chat max-w-none",children:y(Ue,{remarkPlugins:[He],children:e.content})})}),!t&&e.sources&&e.sources.length>0&&D("div",{className:"mt-3 pt-3 border-t border-slate-100 w-full",children:[D("div",{className:"flex items-center gap-2 mb-2",children:[y("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),y("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Sources & Citations"})]}),y("div",{className:"flex flex-wrap gap-2",children:e.sources.map((r,o)=>D("div",{className:"group relative flex items-center gap-1.5 px-2 py-1 bg-white border border-slate-200 rounded-lg text-[10px] text-slate-600 shadow-sm hover:border-blue-300 hover:text-blue-600 transition-all cursor-default",children:[y("span",{className:"w-1 h-1 bg-slate-300 rounded-full group-hover:bg-blue-400"}),r]},o))})]}),y("span",{className:"text-[10px] text-slate-300 px-1",children:ie(new Date(e.timestamp))})]})]})}import{FileSearch as $e,ClipboardList as Oe,Users as qe,Coins as Ge}from"lucide-react";import Xe from"next/image";import{jsx as R,jsxs as j}from"react/jsx-runtime";var Ke=[{icon:Ge,label:"Grilles de salaires",prompt:"Montre-moi les grilles de salaires pour les ing\xE9nieurs seniors."},{icon:Oe,label:"Proc\xE9dures RH",prompt:"Quelle est la proc\xE9dure pour poser des cong\xE9s pay\xE9s ?"},{icon:qe,label:"Onboarding",prompt:"Quelles sont les \xE9tapes d'onboarding pour un nouvel employ\xE9 ?"},{icon:$e,label:"R\xE8glement int\xE9rieur",prompt:"R\xE9sume les points cl\xE9s du r\xE8glement int\xE9rieur."}];function ce({onSuggestion:e}){let{botName:t,logoUrl:r}=L();return j("div",{className:"flex flex-col items-center justify-center h-full gap-8 px-4 select-none",children:[j("div",{className:"flex flex-col items-center gap-3",children:[R("div",{className:"relative w-14 h-14 rounded-2xl bg-white border border-slate-100 flex items-center justify-center shadow-sm overflow-hidden p-2",children:R(Xe,{src:r,alt:`${t} Logo`,width:40,height:40,priority:!0,className:"object-contain"})}),j("div",{className:"text-center",children:[j("h1",{className:"text-lg font-semibold text-slate-800",children:["Bonjour, je suis votre Copilot ",t]}),R("p",{className:"text-sm text-slate-400 mt-1",children:"Posez vos questions sur vos documents RH internes."})]})]}),R("div",{className:"grid grid-cols-2 gap-2 w-full max-w-md",children:Ke.map(o=>{let c=o.icon;return j("button",{onClick:()=>e(o.prompt),className:"flex items-start gap-2.5 p-3 rounded-xl bg-white border border-slate-100 hover:border-blue-200 hover:bg-blue-50/50 text-left transition-all duration-200 shadow-sm group",children:[R("div",{className:"mt-0.5 w-6 h-6 rounded-lg bg-blue-50 group-hover:bg-blue-100 flex items-center justify-center shrink-0 transition-colors",children:R(c,{className:"w-3.5 h-3.5 text-blue-500",strokeWidth:1.8})}),R("span",{className:"text-xs font-medium text-slate-600 group-hover:text-slate-800 leading-snug transition-colors",children:o.label})]},o.label)})})]})}import{useState as de,useRef as pe,useCallback as ge}from"react";import{ArrowUp as Ve,Paperclip as Ye,X as Qe,FileText as Je}from"lucide-react";import{jsx as k,jsxs as V}from"react/jsx-runtime";function he({onSend:e,isLoading:t,disabled:r}){let[o,c]=de(""),[l,g]=de([]),f=pe(null),v=pe(null),x=n=>{if(n.target.files){let a=Array.from(n.target.files);g(d=>[...d,...a])}},T=n=>{g(a=>a.filter((d,w)=>w!==n))},p=ge(()=>{let n=o.trim();!n&&l.length===0||t||r||(e(n,l),c(""),g([]))},[o,l,t,r,e]),m=n=>{n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),p())},E=ge(n=>{c(n.target.value);let a=n.target;a.style.height="auto",a.style.height=`${Math.min(a.scrollHeight,160)}px`},[]),b=o.trim().length>0&&!t&&!r;return V("div",{className:"px-4 pb-4 pt-2",children:[k("div",{className:"flex flex-wrap gap-2 mb-2",children:l.map((n,a)=>V("div",{className:"flex items-center gap-2 px-2 py-1 bg-blue-50 border border-blue-100 rounded-lg text-[10px] text-blue-600",children:[k(Je,{className:"w-3 h-3"}),k("span",{className:"truncate max-w-[100px]",children:n.name}),k("button",{onClick:()=>T(a),className:"hover:text-red-500",children:k(Qe,{className:"w-3 h-3"})})]},a))}),V("div",{className:s("flex items-end gap-2 bg-white border rounded-2xl px-3 py-2.5 shadow-sm transition-all duration-200","border-slate-200 focus-within:border-blue-300 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.08)]"),children:[k("input",{type:"file",ref:f,onChange:x,className:"hidden",multiple:!0,accept:".pdf,.docx,.txt,.mp3,.wav,.png,.jpg"}),k("button",{type:"button",onClick:()=>{var n;return(n=f.current)==null?void 0:n.click()},className:"p-1.5 rounded-lg text-slate-300 hover:text-slate-500 hover:bg-slate-50 transition-colors shrink-0 mb-0.5","aria-label":"Joindre un fichier",tabIndex:-1,children:k(Ye,{className:"w-4 h-4",strokeWidth:1.8})}),k("textarea",{ref:v,value:o,onChange:E,onKeyDown:m,placeholder:l.length>0?"Ajouter un message au fichier...":"Posez votre question RH\u2026",rows:1,disabled:r,className:s("flex-1 resize-none bg-transparent text-sm text-slate-800 placeholder:text-slate-300","outline-none leading-relaxed py-0.5 max-h-40 min-h-[22px]","disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Message"}),k("button",{type:"button",onClick:p,disabled:!b,"aria-label":"Envoyer",className:s("w-8 h-8 rounded-xl flex items-center justify-center shrink-0 transition-all duration-200 mb-0.5",b?"bg-blue-600 text-white hover:bg-blue-700 shadow-sm hover:shadow":"bg-slate-100 text-slate-300 cursor-not-allowed"),children:k(Ve,{className:"w-4 h-4",strokeWidth:2.5})})]}),k("p",{className:"text-center text-[10px] text-slate-300 mt-2",children:"Entr\xE9e pour envoyer \xB7 Maj+Entr\xE9e pour sauter une ligne"})]})}import{useSearchParams as st}from"next/navigation";import{X as Ze,ChevronLeft as et}from"lucide-react";import{usePathname as tt,useRouter as rt}from"next/navigation";import{jsx as B,jsxs as me}from"react/jsx-runtime";function ue({title:e="Copilot RH"}){let t=rt(),r=tt();return me("header",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100 bg-white",children:[me("div",{className:"flex items-center gap-3",children:[r!=="/chat"&&B("button",{onClick:()=>t.back(),className:"p-1 hover:bg-slate-100 rounded-full transition-colors",children:B(et,{size:20,className:"text-slate-600"})}),B("h2",{className:"text-sm font-bold text-slate-800",children:e})]}),B("button",{onClick:()=>window.parent.postMessage("close-dhi-copilot","*"),children:B(Ze,{size:20,className:"text-slate-400 hover:text-red-500"})})]})}import{Fragment as lt,jsx as z,jsxs as U}from"react/jsx-runtime";function Y({session:e,isLoading:t,error:r,onSend:o,onReset:c}){let l=at(null),g=e.messages.length>0,v=st().get("embed")==="true";return ot(()=>{l.current&&l.current.scrollTo({top:l.current.scrollHeight,behavior:"smooth"})},[e.messages]),U("div",{className:"flex flex-col h-full bg-[#F9FAFB]",children:[v?z(ue,{}):U("header",{className:"flex items-center justify-between px-5 py-3 border-b border-slate-100 bg-white shrink-0",children:[U("div",{className:"flex items-center gap-2",children:[z("div",{className:"w-2 h-2 rounded-full bg-emerald-400"}),z("span",{className:"text-sm font-medium text-slate-700",children:g?e.title:"Copilot RH"})]}),g&&U("button",{onClick:c,className:"flex items-center gap-1.5 text-xs text-slate-400 hover:text-slate-600 transition-colors px-2 py-1 rounded-lg hover:bg-slate-50",title:"Nouvelle conversation",children:[z(nt,{className:"w-3 h-3",strokeWidth:2}),"Nouvelle conversation"]})]}),z("div",{ref:l,className:s("flex-1 overflow-y-auto px-4 py-4",g?"flex flex-col gap-4":""),children:g?z(lt,{children:e.messages.map(x=>z(le,{message:x},x.id))}):z(ce,{onSuggestion:o})}),r&&U("div",{className:"mx-4 mb-2 px-3 py-2 bg-red-50 border border-red-100 rounded-xl flex items-start gap-2",children:[z(it,{className:"w-3.5 h-3.5 text-red-400 mt-0.5 shrink-0"}),z("p",{className:"text-xs text-red-600 leading-relaxed",children:r})]}),z(he,{onSend:o,isLoading:t})]})}import{useState as Q,useCallback as fe,useEffect as pt}from"react";import{useSearchParams as gt,useRouter as ht}from"next/navigation";import{v4 as xe}from"uuid";import be from"axios";import{create as ct}from"zustand";var ve=ct(e=>({isNetworkError:!1,setNetworkError:t=>e({isNetworkError:t})}));var dt=process.env.PUBLIC_API_URL||"http://127.0.0.1:8000",S=be.create({baseURL:dt,timeout:6e5,headers:{"Content-Type":"application/json"}});S.interceptors.response.use(e=>e,e=>!e.response||e.code==="ERR_NETWORK"?(ve.getState().setNetworkError(!0),new Promise(()=>{})):Promise.reject(e));var _=e=>{var t,r;if(be.isAxiosError(e)){let o=((r=(t=e.response)==null?void 0:t.data)==null?void 0:r.detail)||e.message||"Erreur de connexion au serveur";throw new Error(o)}throw new Error("Une erreur inattendue est survenue")},H={sendMessage:async e=>{try{return(await S.post("/chat",e)).data}catch(t){return _(t)}},listThreads:async()=>{try{return(await S.get("/chat/threads")).data}catch(e){return _(e)}},getHistory:async e=>{try{return(await S.get(`/chat/history/${e}`)).data.map((r,o)=>({id:`${e}-${o}-${Date.now()}`,role:r.role,content:r.content,timestamp:new Date}))}catch(t){return _(t)}}},q={save:async e=>{try{return(await S.post("/connectors",e)).data}catch(t){return _(t)}},list:async()=>{try{return(await S.get("/settings/connectors")).data}catch(e){return _(e)}},sync:async e=>{try{return(await S.post(`/documents/sync/${e}`)).data}catch(t){return _(t)}}},we={upload:async(e,t="default")=>{try{let r=new FormData;return e.forEach(c=>{r.append("files",c)}),(await S.post(`/upload?tenant_id=${t}`,r,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(r){return _(r)}}};function J(){let e=gt(),t=ht(),r=e.get("threadId"),[o,c]=Q(()=>({id:r||K(),title:"Nouvelle conversation",messages:[],createdAt:new Date,updatedAt:new Date})),[l,g]=Q(!1),[f,v]=Q(null);pt(()=>{r&&r!==o.id&&(async()=>{g(!0),v(null);try{let m=await H.getHistory(r);c({id:r,title:"Conversation charg\xE9e",messages:m,createdAt:new Date,updatedAt:new Date})}catch(m){v("Impossible de charger l'historique de cette discussion.")}finally{g(!1)}})()},[r]);let x=fe(async(p,m=[])=>{if(!p.trim()&&m.length===0||l)return;v(null),g(!0);let E=p.trim();if(m.length>0){let a=m.map(d=>`\u{1F4C4} ${d.name}`).join(`
2
+ `);E+=`
3
3
 
4
4
  *Fichiers joints :*
5
- ${o}`}let x={id:be(),role:"user",content:T,timestamp:new Date},i="loading-ai-message";c(o=>R(g({},o),{messages:[...o.messages,x,{id:i,role:"assistant",content:"",timestamp:new Date,isStreaming:!0}]}));try{f.length>0&&await he.upload(f);let o=m.trim()||`Analyse les ${f.length} fichiers que je viens d'envoyer.`,d=await $.sendMessage({message:o,thread_id:r.id});c(b=>R(g({},b),{messages:b.messages.map(k=>k.id===i?{id:be(),role:"assistant",content:d.response,sources:d.sources,timestamp:new Date,isStreaming:!1}:k)})),r.messages.length===0&&t.replace(`/chat?threadId=${r.id}`)}catch(o){h(o instanceof Error?o.message:"Erreur."),c(d=>R(g({},d),{messages:d.messages.filter(b=>b.id!==i)}))}finally{u(!1)}},[n,r.id,r.messages.length,t]),E=xe(()=>{let m=X();c({id:m,title:"Nouvelle conversation",messages:[],createdAt:new Date,updatedAt:new Date}),t.push("/chat"),h(null)},[t]);return{session:r,isLoading:n,error:v,send:w,reset:E}}import{MessageCircle as mt,X as ut}from"lucide-react";import{jsx as A,jsxs as ft}from"react/jsx-runtime";function pt({config:e,children:t}){let[s,r]=dt(!1),{session:c,isLoading:n,error:u,send:v,reset:h}=J();return ft(G,{config:e,children:[t,A("div",{className:"fixed bottom-6 right-6 z-[9999]",children:A("button",{onClick:()=>r(!s),className:"w-14 h-14 rounded-2xl bg-blue-600 text-white shadow-2xl flex items-center justify-center hover:scale-110 transition-transform active:scale-95 cursor-pointer",children:s?A(ut,{size:28}):A(mt,{size:28})})}),A("div",{className:l("fixed top-0 right-0 h-full bg-white shadow-2xl transition-all duration-300 ease-in-out z-[9998] overflow-hidden border-l border-slate-100",s?"w-[400px] opacity-100":"w-0 opacity-0 pointer-events-none"),children:A("div",{className:"w-[400px] h-full flex flex-col",children:A(V,{session:c,isLoading:n,error:u,onSend:v,onReset:h})})})]})}import{useState as ht,useEffect as xt,useSyncExternalStore as bt}from"react";import q from"next/link";import vt from"next/image";import{usePathname as wt,useSearchParams as Nt}from"next/navigation";import{MessageSquare as yt,Settings as Ct,Bot as Pt,Plus as Tt,PanelLeftClose as kt,PanelLeftOpen as Rt,Clock as Et}from"lucide-react";import*as C from"@radix-ui/react-tooltip";import{jsx as j,jsxs as gt}from"react/jsx-runtime";function ve(s){var r=s,{delayDuration:e=0}=r,t=M(r,["delayDuration"]);return j(C.Provider,g({"data-slot":"tooltip-provider",delayDuration:e},t))}function we(t){var e=M(t,[]);return j(C.Root,g({"data-slot":"tooltip"},e))}function Ne(t){var e=M(t,[]);return j(C.Trigger,g({"data-slot":"tooltip-trigger"},e))}function ye(c){var n=c,{className:e,sideOffset:t=0,children:s}=n,r=M(n,["className","sideOffset","children"]);return j(C.Portal,{children:gt(C.Content,R(g({"data-slot":"tooltip-content",sideOffset:t,className:l("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e)},r),{children:[s,j(C.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]}))})}import{Fragment as It,jsx as a,jsxs as p}from"react/jsx-runtime";function St(){return bt(e=>(window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)),()=>window.innerWidth<768,()=>!1)}function Wt({expanded:e,setExpanded:t,isEmbed:s}){let r=wt(),n=Nt().get("threadId"),[u,v]=ht([]),{botName:h,logoUrl:w}=F(),E=St();xt(()=>{(async()=>{try{let i=await $.listThreads();v(i)}catch(i){v([])}})()},[r]);let m=()=>{(s||E)&&t(!1)};return p(ve,{delayDuration:500,children:[e&&(s||E)&&a("div",{className:"fixed inset-0 bg-slate-900/20 backdrop-blur-sm z-40 transition-opacity duration-300",onClick:()=>t(!1)}),p("aside",{className:l("relative h-screen bg-white border-r border-slate-100 flex flex-col shrink-0 transition-all duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] z-50",e?s?"w-full":"w-64":"w-16",(s||E)&&e?"fixed inset-y-0 left-0 shadow-2xl":"relative"),children:[p("div",{className:"flex items-center h-16 px-4 border-b border-slate-50",children:[p("div",{className:"flex items-center gap-3 overflow-hidden",children:[a("div",{className:"w-9 h-9 rounded-xl bg-blue-600 flex items-center justify-center text-white shrink-0 shadow-lg shadow-blue-200",children:a(Pt,{size:20,strokeWidth:2.5,className:l("transition-transform duration-500",e&&"rotate-[360deg]")})}),e&&p("div",{className:"flex flex-col animate-in fade-in slide-in-from-left-2 duration-300",children:[a("span",{className:"font-bold text-slate-900 leading-tight",children:h}),p("span",{className:"text-[10px] text-emerald-500 font-medium flex items-center gap-1",children:[a("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"})," IA Active"]})]})]}),a("button",{onClick:()=>t(!e),className:"ml-auto p-2 hover:bg-slate-100 rounded-lg text-slate-400 transition-colors",children:e?a(kt,{size:18}):a(Rt,{size:18})})]}),a("div",{className:"p-3",children:a(Y,{label:"Nouveau chat",show:!e,children:p(q,{href:"/chat",onClick:m,className:l("flex items-center gap-3 bg-blue-600 text-white rounded-xl font-semibold transition-all shadow-md shadow-blue-100 hover:bg-blue-700 hover:shadow-lg active:scale-95",e?"px-4 py-3 w-full":"w-10 h-10 justify-center mx-auto"),children:[a(Tt,{size:20,strokeWidth:3}),e&&a("span",{className:"text-sm",children:"Nouvelle discussion"})]})})}),p("nav",{className:"flex flex-col gap-1 px-3 mt-2",children:[a(Y,{label:"Discussions",show:!e,children:p(q,{href:"/chat",onClick:m,className:l("flex items-center gap-3 p-2.5 rounded-xl text-sm transition-all group",r.startsWith("/chat")?"bg-slate-100 text-blue-600 font-bold":"text-slate-500 hover:bg-slate-50 hover:text-slate-900"),children:[a(yt,{size:18,className:l(r.startsWith("/chat")?"text-blue-600":"text-slate-400 group-hover:text-slate-600")}),e&&a("span",{children:"Chat"})]})}),a(Y,{label:"Param\xE8tres",show:!e,children:p(q,{href:"/settings",onClick:m,className:l("flex items-center gap-3 p-2.5 rounded-xl text-sm transition-all group",r==="/settings"?"bg-slate-100 text-blue-600 font-bold":"text-slate-500 hover:bg-slate-50 hover:text-slate-900"),children:[a(Ct,{size:18,className:l(r==="/settings"?"text-blue-600":"text-slate-400 group-hover:text-slate-600")}),e&&a("span",{children:"Param\xE8tres"})]})})]}),e&&p("div",{className:"flex-1 overflow-y-auto mt-6 px-3 custom-scrollbar animate-in fade-in duration-500",children:[p("div",{className:"flex items-center justify-between mb-3 px-2",children:[a("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Historique"}),a(Et,{size:10,className:"text-slate-300"})]}),a("div",{className:"flex flex-col gap-1 pb-4",children:u.length===0?a("div",{className:"px-3 py-4 border border-dashed border-slate-100 rounded-xl text-center",children:a("p",{className:"text-[10px] text-slate-400 italic",children:"Aucune discussion"})}):u.map(x=>p(q,{href:`/chat?threadId=${x.id}`,onClick:m,className:l("group relative flex flex-col gap-0.5 p-2.5 rounded-xl transition-all border border-transparent",n===x.id?"bg-blue-50/50 border-blue-100 text-blue-700 font-semibold":"text-slate-600 hover:bg-slate-50 hover:border-slate-100"),children:[n===x.id&&a("div",{className:"absolute left-0 top-2 bottom-2 w-1 bg-blue-600 rounded-r-full"}),a("span",{className:"text-[11px] truncate leading-tight",children:x.title}),p("span",{className:"text-[8px] text-slate-400 group-hover:text-blue-400 transition-colors uppercase font-medium",children:["Discussion ID: ",x.id.slice(-4)]})]},x.id))})]}),a("div",{className:"mt-auto p-4 border-t border-slate-50 bg-slate-50/30",children:p("div",{className:l("flex items-center gap-3",!e&&"justify-center"),children:[p("div",{className:"relative shrink-0",children:[a("div",{className:"w-9 h-9 rounded-full overflow-hidden border-2 border-white shadow-sm bg-slate-100 flex items-center justify-center",children:a(vt,{src:w,alt:"User Profile",width:36,height:36,className:"object-contain"})}),a("div",{className:"absolute -bottom-0.5 -right-0.5 w-3 h-3 bg-emerald-500 border-2 border-white rounded-full"})]}),e&&p("div",{className:"min-w-0 flex flex-col animate-in slide-in-from-bottom-1 duration-300",children:[a("p",{className:"text-xs font-bold text-slate-800 truncate",children:"Administrateur DHI"}),a("p",{className:"text-[10px] text-slate-400 font-medium truncate",children:"Console de Gestion"})]})]})})]})]})}function Y({children:e,label:t,show:s}){return s?p(we,{children:[a(Ne,{asChild:!0,children:e}),a(ye,{side:"right",sideOffset:10,className:"bg-slate-900 text-white border-none text-[10px] px-2 py-1 shadow-xl",children:t})]}):a(It,{children:e})}import{useState as L,useCallback as Ce,useEffect as At,useRef as Dt}from"react";function Lt(){let[e,t]=L([]),[s,r]=L(!0),[c,n]=L(!1),[u,v]=L(null),[h,w]=L(null),[E,m]=L(null),f=Dt(!1),T=Ce(async(o=!1)=>{if(!(!o&&f.current)){o||(f.current=!0),r(!0);try{let d=await O.list();t(d)}catch(d){console.error("Erreur fetchConnectors:",d),t([])}finally{r(!1),o||setTimeout(()=>{f.current=!1},1e3)}}},[]);At(()=>{T()},[T]);let x=async o=>{n(!0),w(null),m(null);try{return await O.save(o),await T(!0),m("Connecteur enregistr\xE9 avec succ\xE8s."),setTimeout(()=>m(null),3e3),!0}catch(d){return w(d.message||"Erreur lors de l'enregistrement du connecteur."),!1}finally{n(!1)}},i=Ce(async o=>{w(null),m(null),v(o),t(d=>d.map(b=>b.source_id===o?R(g({},b),{status:"indexing"}):b));try{let d=await O.sync(o);t(b=>b.map(k=>k.source_id===o?R(g({},k),{status:"active"}):k)),m(d.details||`Indexation lanc\xE9e pour ${o}`),setTimeout(()=>m(null),4e3)}catch(d){t(b=>b.map(k=>k.source_id===o?R(g({},k),{status:"error"}):k)),w(d.message||`L'indexation de ${o} a \xE9chou\xE9.`)}finally{v(null)}},[]);return{connectors:e,isFetching:s,isSaving:c,isIndexing:u,error:h,successMsg:E,save:x,triggerIndexing:i,refresh:()=>T(!0)}}export{V as ChatWindow,pt as CopilotApp,Wt as Sidebar,G as WidgetProvider,J as useChat,Lt as useConnectors,F as useWidgetConfig};
5
+ ${a}`}let b={id:xe(),role:"user",content:E,timestamp:new Date},n="loading-ai-message";c(a=>F(u({},a),{messages:[...a.messages,b,{id:n,role:"assistant",content:"",timestamp:new Date,isStreaming:!0}]}));try{m.length>0&&await we.upload(m);let a=p.trim()||`Analyse les ${m.length} fichiers que je viens d'envoyer.`,d=await H.sendMessage({message:a,thread_id:o.id});c(w=>F(u({},w),{messages:w.messages.map(P=>P.id===n?{id:xe(),role:"assistant",content:d.response,sources:d.sources,timestamp:new Date,isStreaming:!1}:P)})),o.messages.length===0&&t.replace(`/chat?threadId=${o.id}`)}catch(a){v(a instanceof Error?a.message:"Erreur."),c(d=>F(u({},d),{messages:d.messages.filter(w=>w.id!==n)}))}finally{g(!1)}},[l,o.id,o.messages.length,t]),T=fe(()=>{let p=K();c({id:p,title:"Nouvelle conversation",messages:[],createdAt:new Date,updatedAt:new Date}),t.push("/chat"),v(null)},[t]);return{session:o,isLoading:l,error:f,send:x,reset:T}}import{MessageCircle as ut,X as ye,Bot as ke}from"lucide-react";import{jsx as N,jsxs as W}from"react/jsx-runtime";function vt({config:e,children:t}){let[r,o]=mt(!1),{session:c,isLoading:l,error:g,send:f,reset:v}=J();return W(X,{config:e,children:[N("div",{className:"relative z-0",children:t}),W("div",{id:"dhi-copilot-root",className:"dhi-copilot-container",children:[N("button",{onClick:()=>o(!r),className:s("fixed bottom-6 right-6 w-16 h-16 rounded-2xl shadow-2xl flex items-center justify-center transition-all duration-300 z-[9999] hover:scale-110 active:scale-95 border-2 border-white",r?"bg-red-500 rotate-90":"bg-blue-600 hover:bg-blue-700"),style:{backgroundColor:r?"#ef4444":(e==null?void 0:e.primaryColor)||"#2563eb"},children:r?N(ye,{className:"text-white w-8 h-8"}):W("div",{className:"relative",children:[N(ut,{className:"text-white w-8 h-8"}),N("div",{className:"absolute -top-2 -right-2 bg-white rounded-md p-0.5 border border-blue-100",children:N(ke,{size:12,className:"text-blue-600"})})]})}),W("div",{className:s("fixed top-0 right-0 h-full bg-white shadow-[-10px_0_40px_rgba(0,0,0,0.1)] transition-all duration-500 ease-[cubic-bezier(0.05,0.7,0.1,1)] z-[9998] flex flex-col",r?"w-full md:w-[450px] translate-x-0 opacity-100":"w-0 translate-x-full opacity-0 pointer-events-none"),children:[W("div",{className:"flex items-center justify-between p-4 border-b border-slate-100 bg-slate-50/50",children:[W("div",{className:"flex items-center gap-2",children:[N(ke,{className:"text-blue-600",size:20}),N("span",{className:"font-bold text-slate-800",children:(e==null?void 0:e.botName)||"Assistant IA"})]}),N("button",{onClick:()=>o(!1),className:"p-2 hover:bg-slate-200 rounded-full transition-colors",children:N(ye,{size:20,className:"text-slate-500"})})]}),N("div",{className:"flex-1 overflow-hidden",children:N(Y,{session:c,isLoading:l,error:g,onSend:f,onReset:v})})]})]})]})}function Z(e,{insertAt:t}={}){if(!e||typeof document=="undefined")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}Z(`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: var(--font-geist-sans), system-ui, sans-serif;--font-mono: var(--font-geist-mono), monospace;--color-red-50: oklch(97.1% .013 17.38);--color-red-100: oklch(93.6% .032 17.717);--color-red-300: oklch(80.8% .114 19.571);--color-red-400: oklch(70.4% .191 22.216);--color-red-500: oklch(63.7% .237 25.331);--color-red-600: oklch(57.7% .245 27.325);--color-amber-50: oklch(98.7% .022 95.277);--color-amber-500: oklch(76.9% .188 70.08);--color-amber-600: oklch(66.6% .179 58.318);--color-emerald-50: oklch(97.9% .021 166.113);--color-emerald-100: oklch(95% .052 163.051);--color-emerald-400: oklch(76.5% .177 163.223);--color-emerald-500: oklch(69.6% .17 162.48);--color-emerald-600: oklch(59.6% .145 163.225);--color-blue-50: var(--widget-primary-light, #eff6ff);--color-blue-100: oklch(93.2% .032 255.585);--color-blue-200: oklch(88.2% .059 254.128);--color-blue-300: oklch(80.9% .105 251.813);--color-blue-400: oklch(70.7% .165 254.624);--color-blue-500: oklch(62.3% .214 259.815);--color-blue-600: var(--widget-primary, #2563eb);--color-blue-700: oklch(48.8% .243 264.376);--color-indigo-50: oklch(96.2% .018 272.314);--color-indigo-100: oklch(93% .034 272.788);--color-indigo-200: oklch(87% .065 274.039);--color-indigo-400: oklch(67.3% .182 276.935);--color-indigo-500: oklch(58.5% .233 277.117);--color-indigo-600: oklch(51.1% .262 276.966);--color-indigo-900: oklch(35.9% .144 278.697);--color-violet-50: oklch(96.9% .016 293.756);--color-violet-500: oklch(60.6% .25 292.717);--color-violet-600: oklch(54.1% .281 293.009);--color-slate-50: oklch(98.4% .003 247.858);--color-slate-100: oklch(96.8% .007 247.896);--color-slate-200: oklch(92.9% .013 255.508);--color-slate-300: oklch(86.9% .022 252.894);--color-slate-400: oklch(70.4% .04 256.788);--color-slate-500: oklch(55.4% .046 257.417);--color-slate-600: oklch(44.6% .043 257.281);--color-slate-700: oklch(37.2% .044 257.287);--color-slate-800: oklch(27.9% .041 260.031);--color-slate-900: oklch(20.8% .042 265.755);--color-white: #fff;--spacing: .25rem;--container-sm: 24rem;--container-md: 28rem;--container-4xl: 56rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--text-lg: 1.125rem;--text-lg--line-height: calc(1.75 / 1.125);--text-2xl: 1.5rem;--text-2xl--line-height: calc(2 / 1.5);--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--tracking-tight: -.025em;--tracking-wider: .05em;--tracking-widest: .1em;--leading-tight: 1.25;--leading-snug: 1.375;--leading-relaxed: 1.625;--radius-sm: .25rem;--radius-md: .375rem;--radius-lg: .5rem;--radius-xl: .75rem;--radius-2xl: 1rem;--radius-3xl: 1.5rem;--animate-spin: spin 1s linear infinite;--animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm: 8px;--blur-md: 12px;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono);--color-background: #F9FAFB;--color-foreground: #111827;--color-border: #E5E7EB;--color-input: #E5E7EB;--color-ring: #3B82F6;--color-primary: #2563EB;--color-primary-foreground: #FFFFFF;--color-secondary: #F1F5F9;--color-muted-foreground: #6B7280;--color-accent: #EFF6FF;--color-destructive: #EF4444}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.\\@container\\/card-header{container-type:inline-size;container-name:card-header}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:calc(var(--spacing) * 0)}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.-bottom-0\\.5{bottom:calc(var(--spacing) * -.5)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-6{bottom:calc(var(--spacing) * 6)}.left-0{left:calc(var(--spacing) * 0)}.z-0{z-index:0}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2 / span 2}.row-start-1{grid-row-start:1}.container{width:100%;@media(width>=40rem){max-width:40rem}@media(width>=48rem){max-width:48rem}@media(width>=64rem){max-width:64rem}@media(width>=80rem){max-width:80rem}@media(width>=96rem){max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-auto{margin-left:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.field-sizing-content{field-sizing:content}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-full{width:100%;height:100%}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-40{max-height:calc(var(--spacing) * 40)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-\\[22px\\]{min-height:22px}.w-0{width:calc(var(--spacing) * 0)}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-1\\/3{width:calc(1 / 3 * 100%)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-32{width:calc(var(--spacing) * 32)}.w-64{width:calc(var(--spacing) * 64)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[120px\\]{max-width:120px}.max-w-\\[250px\\]{max-width:250px}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\\(--radix-tooltip-content-transform-origin\\){transform-origin:var(--radix-tooltip-content-transform-origin)}.translate-x-0{--tw-translate-x: calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x: calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-5{--tw-translate-x: calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x: 100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-110{--tw-scale-x: 110%;--tw-scale-y: 110%;--tw-scale-z: 110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.rotate-\\[360deg\\]{rotate:360deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[progress_2s_infinite_linear\\]{animation:progress 2s infinite linear}.animate-\\[web-progress_2s_infinite_linear\\]{animation:web-progress 2s infinite linear}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-rows-\\[auto_auto\\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:calc(infinity * 1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-tl-sm{border-top-left-radius:var(--radius-sm)}.rounded-r-full{border-top-right-radius:calc(infinity * 1px);border-bottom-right-radius:calc(infinity * 1px)}.rounded-tr-sm{border-top-right-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style: dashed;border-style:dashed}.border-none{--tw-border-style: none;border-style:none}.border-blue-100{border-color:var(--color-blue-100)}.border-border{border-color:var(--color-border)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-indigo-100{border-color:var(--color-indigo-100)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-input{border-color:var(--color-input)}.border-red-100{border-color:var(--color-red-100)}.border-red-300{border-color:var(--color-red-300)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-transparent{border-color:transparent}.border-white{border-color:var(--color-white)}.border-t-transparent{border-top-color:transparent}.border-l-transparent{border-left-color:transparent}.bg-\\[\\#F3F4F6\\]{background-color:#f3f4f6}.bg-\\[\\#F9FAFB\\]{background-color:#f9fafb}.bg-amber-50{background-color:var(--color-amber-50)}.bg-background{background-color:var(--color-background)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/50{background-color:var(--color-blue-50);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-border{background-color:var(--color-border)}.bg-destructive{background-color:var(--color-destructive)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-foreground{background-color:var(--color-foreground)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-50\\/30{background-color:color-mix(in srgb,oklch(96.2% .018 272.314) 30%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-indigo-50) 30%,transparent)}}.bg-indigo-50\\/40{background-color:color-mix(in srgb,oklch(96.2% .018 272.314) 40%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-indigo-50) 40%,transparent)}}.bg-indigo-50\\/50{background-color:color-mix(in srgb,oklch(96.2% .018 272.314) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-indigo-50) 50%,transparent)}}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-400{background-color:var(--color-indigo-400)}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-primary{background-color:var(--color-primary)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\\/30{background-color:color-mix(in srgb,oklch(97.1% .013 17.38) 30%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-red-50) 30%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:var(--color-secondary)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/30{background-color:color-mix(in srgb,oklch(98.4% .003 247.858) 30%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-50) 30%,transparent)}}.bg-slate-50\\/50{background-color:color-mix(in srgb,oklch(98.4% .003 247.858) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\\/20{background-color:color-mix(in srgb,oklch(20.8% .042 265.755) 20%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-900) 20%,transparent)}}.bg-slate-900\\/60{background-color:color-mix(in srgb,oklch(20.8% .042 265.755) 60%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-900) 60%,transparent)}}.bg-transparent{background-color:transparent}.bg-violet-50{background-color:var(--color-violet-50)}.bg-white{background-color:var(--color-white)}.fill-foreground{fill:var(--color-foreground)}.object-contain{object-fit:contain}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-8{padding:calc(var(--spacing) * 8)}.p-px{padding:1px}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading, var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading, var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading, var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading, var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading: 1;line-height:1}.leading-relaxed{--tw-leading: var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading: var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading: var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight: var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight: var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking: var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking: var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking: var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-background{color:var(--color-background)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-foreground{color:var(--color-foreground)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-900{color:var(--color-indigo-900)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0%}.opacity-30{opacity:30%}.opacity-40{opacity:40%}.opacity-50{opacity:50%}.opacity-60{opacity:60%}.opacity-75{opacity:75%}.opacity-100{opacity:100%}.shadow-2xl{--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / .25));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[-10px_0_40px_rgba\\(0\\,0\\,0\\,0\\.1\\)\\]{--tw-shadow: -10px 0 40px var(--tw-shadow-color, rgba(0,0,0,.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-4{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-blue-100{--tw-shadow-color: oklch(93.2% .032 255.585);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-blue-100) var(--tw-shadow-alpha), transparent)}}.shadow-blue-200{--tw-shadow-color: oklch(88.2% .059 254.128);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-blue-200) var(--tw-shadow-alpha), transparent)}}.ring-indigo-50{--tw-ring-color: var(--color-indigo-50)}.outline-hidden{--tw-outline-style: none;outline-style:none;@media(forced-colors:active){outline:2px solid transparent;outline-offset:2px}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-blur-md{--tw-backdrop-blur: blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur: blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.duration-150{--tw-duration: .15s;transition-duration:.15s}.duration-200{--tw-duration: .2s;transition-duration:.2s}.duration-300{--tw-duration: .3s;transition-duration:.3s}.duration-500{--tw-duration: .5s;transition-duration:.5s}.ease-\\[cubic-bezier\\(0\\.4\\,0\\,0\\.2\\,1\\)\\]{--tw-ease: cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-\\[cubic-bezier\\(0\\.05\\,0\\.7\\,0\\.1\\,1\\)\\]{--tw-ease: cubic-bezier(.05,.7,.1,1);transition-timing-function:cubic-bezier(.05,.7,.1,1)}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.outline-none{--tw-outline-style: none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.ease-\\[cubic-bezier\\(0\\.4\\,0\\,0\\.2\\,1\\)\\]{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-\\[cubic-bezier\\(0\\.05\\,0\\.7\\,0\\.1\\,1\\)\\]{animation-timing-function:cubic-bezier(.05,.7,.1,1)}.fade-in,.fade-in-0{--tw-enter-opacity: 0}.slide-in-from-bottom-1{--tw-enter-translate-y: .25rem}.slide-in-from-left-2{--tw-enter-translate-x: -.5rem}.slide-in-from-top-1{--tw-enter-translate-y: -.25rem}.zoom-in{--tw-enter-scale: 0}.zoom-in-95{--tw-enter-scale: .95}.group-hover\\:bg-blue-100{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-100)}}}.group-hover\\:bg-blue-400{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-400)}}}.group-hover\\:text-blue-400{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-blue-400)}}}.group-hover\\:text-slate-600{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-slate-600)}}}.group-hover\\:text-slate-800{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-slate-800)}}}.group-hover\\:opacity-100{&:is(:where(.group):hover *){@media(hover:hover){opacity:100%}}}.group-data-\\[disabled\\=true\\]\\:pointer-events-none{&:is(:where(.group)[data-disabled=true] *){pointer-events:none}}.group-data-\\[disabled\\=true\\]\\:opacity-50{&:is(:where(.group)[data-disabled=true] *){opacity:50%}}.peer-disabled\\:cursor-not-allowed{&:is(:where(.peer):disabled~*){cursor:not-allowed}}.peer-disabled\\:opacity-50{&:is(:where(.peer):disabled~*){opacity:50%}}.selection\\:bg-primary{& *::selection{background-color:var(--color-primary)}&::selection{background-color:var(--color-primary)}}.selection\\:text-primary-foreground{& *::selection{color:var(--color-primary-foreground)}&::selection{color:var(--color-primary-foreground)}}.file\\:inline-flex{&::file-selector-button{display:inline-flex}}.file\\:h-7{&::file-selector-button{height:calc(var(--spacing) * 7)}}.file\\:border-0{&::file-selector-button{border-style:var(--tw-border-style);border-width:0px}}.file\\:bg-transparent{&::file-selector-button{background-color:transparent}}.file\\:text-sm{&::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}}.file\\:font-medium{&::file-selector-button{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}}.file\\:text-foreground{&::file-selector-button{color:var(--color-foreground)}}.placeholder\\:text-muted-foreground{&::placeholder{color:var(--color-muted-foreground)}}.placeholder\\:text-slate-300{&::placeholder{color:var(--color-slate-300)}}.focus-within\\:border-blue-300{&:focus-within{border-color:var(--color-blue-300)}}.focus-within\\:shadow-\\[0_0_0_3px_rgba\\(59\\,130\\,246\\,0\\.08\\)\\]{&:focus-within{--tw-shadow: 0 0 0 3px var(--tw-shadow-color, rgba(59,130,246,.08));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.hover\\:scale-110{&:hover{@media(hover:hover){--tw-scale-x: 110%;--tw-scale-y: 110%;--tw-scale-z: 110%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.hover\\:border-blue-100{&:hover{@media(hover:hover){border-color:var(--color-blue-100)}}}.hover\\:border-blue-200{&:hover{@media(hover:hover){border-color:var(--color-blue-200)}}}.hover\\:border-blue-300{&:hover{@media(hover:hover){border-color:var(--color-blue-300)}}}.hover\\:border-slate-100{&:hover{@media(hover:hover){border-color:var(--color-slate-100)}}}.hover\\:border-slate-200{&:hover{@media(hover:hover){border-color:var(--color-slate-200)}}}.hover\\:bg-accent{&:hover{@media(hover:hover){background-color:var(--color-accent)}}}.hover\\:bg-blue-50{&:hover{@media(hover:hover){background-color:var(--color-blue-50)}}}.hover\\:bg-blue-50\\/50{&:hover{@media(hover:hover){background-color:var(--color-blue-50);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}}}.hover\\:bg-blue-700{&:hover{@media(hover:hover){background-color:var(--color-blue-700)}}}.hover\\:bg-destructive\\/90{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#EF4444 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}}}.hover\\:bg-primary\\/90{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#2563EB 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}}}.hover\\:bg-secondary\\/80{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#F1F5F9 80%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-secondary) 80%,transparent)}}}}.hover\\:bg-slate-50{&:hover{@media(hover:hover){background-color:var(--color-slate-50)}}}.hover\\:bg-slate-100{&:hover{@media(hover:hover){background-color:var(--color-slate-100)}}}.hover\\:bg-slate-200{&:hover{@media(hover:hover){background-color:var(--color-slate-200)}}}.hover\\:text-blue-600{&:hover{@media(hover:hover){color:var(--color-blue-600)}}}.hover\\:text-red-500{&:hover{@media(hover:hover){color:var(--color-red-500)}}}.hover\\:text-slate-500{&:hover{@media(hover:hover){color:var(--color-slate-500)}}}.hover\\:text-slate-600{&:hover{@media(hover:hover){color:var(--color-slate-600)}}}.hover\\:text-slate-900{&:hover{@media(hover:hover){color:var(--color-slate-900)}}}.hover\\:underline{&:hover{@media(hover:hover){text-decoration-line:underline}}}.hover\\:shadow{&:hover{@media(hover:hover){--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.hover\\:shadow-lg{&:hover{@media(hover:hover){--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.focus\\:border-blue-300{&:focus{border-color:var(--color-blue-300)}}.focus\\:bg-accent{&:focus{background-color:var(--color-accent)}}.focus\\:ring-2{&:focus{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-blue-50{&:focus{--tw-ring-color: var(--color-blue-50)}}.focus-visible\\:border-ring{&:focus-visible{border-color:var(--color-ring)}}.focus-visible\\:ring-\\[3px\\]{&:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus-visible\\:ring-destructive\\/20{&:focus-visible{--tw-ring-color: color-mix(in srgb, #EF4444 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-destructive) 20%, transparent)}}}.focus-visible\\:ring-ring\\/50{&:focus-visible{--tw-ring-color: color-mix(in srgb, #3B82F6 50%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-ring) 50%, transparent)}}}.focus-visible\\:outline-1{&:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}}.active\\:scale-95{&:active{--tw-scale-x: 95%;--tw-scale-y: 95%;--tw-scale-z: 95%;scale:var(--tw-scale-x) var(--tw-scale-y)}}.disabled\\:pointer-events-none{&:disabled{pointer-events:none}}.disabled\\:cursor-not-allowed{&:disabled{cursor:not-allowed}}.disabled\\:opacity-50{&:disabled{opacity:50%}}.has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\]{&:has(*[data-slot=card-action]){grid-template-columns:1fr auto}}.has-\\[\\>svg\\]\\:px-1\\.5{&:has(>svg){padding-inline:calc(var(--spacing) * 1.5)}}.has-\\[\\>svg\\]\\:px-2\\.5{&:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}}.has-\\[\\>svg\\]\\:px-3{&:has(>svg){padding-inline:calc(var(--spacing) * 3)}}.has-\\[\\>svg\\]\\:px-4{&:has(>svg){padding-inline:calc(var(--spacing) * 4)}}.aria-invalid\\:border-destructive{&[aria-invalid=true]{border-color:var(--color-destructive)}}.aria-invalid\\:ring-destructive\\/20{&[aria-invalid=true]{--tw-ring-color: color-mix(in srgb, #EF4444 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-destructive) 20%, transparent)}}}.data-\\[disabled\\]\\:pointer-events-none{&[data-disabled]{pointer-events:none}}.data-\\[disabled\\]\\:opacity-50{&[data-disabled]{opacity:50%}}.data-\\[orientation\\=horizontal\\]\\:h-px{&[data-orientation=horizontal]{height:1px}}.data-\\[orientation\\=horizontal\\]\\:w-full{&[data-orientation=horizontal]{width:100%}}.data-\\[orientation\\=vertical\\]\\:h-full{&[data-orientation=vertical]{height:100%}}.data-\\[orientation\\=vertical\\]\\:w-px{&[data-orientation=vertical]{width:1px}}.data-\\[placeholder\\]\\:text-muted-foreground{&[data-placeholder]{color:var(--color-muted-foreground)}}.data-\\[side\\=bottom\\]\\:translate-y-1{&[data-side=bottom]{--tw-translate-y: calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2{&[data-side=bottom]{--tw-enter-translate-y: -.5rem}}.data-\\[side\\=left\\]\\:-translate-x-1{&[data-side=left]{--tw-translate-x: calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.data-\\[side\\=left\\]\\:slide-in-from-right-2{&[data-side=left]{--tw-enter-translate-x: .5rem}}.data-\\[side\\=right\\]\\:translate-x-1{&[data-side=right]{--tw-translate-x: calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.data-\\[side\\=right\\]\\:slide-in-from-left-2{&[data-side=right]{--tw-enter-translate-x: -.5rem}}.data-\\[side\\=top\\]\\:-translate-y-1{&[data-side=top]{--tw-translate-y: calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2{&[data-side=top]{--tw-enter-translate-y: .5rem}}.data-\\[size\\=default\\]\\:h-9{&[data-size=default]{height:calc(var(--spacing) * 9)}}.data-\\[size\\=sm\\]\\:h-8{&[data-size=sm]{height:calc(var(--spacing) * 8)}}.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1{:is(&>*){&[data-slot=select-value]{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}}}.\\*\\:data-\\[slot\\=select-value\\]\\:flex{:is(&>*){&[data-slot=select-value]{display:flex}}}.\\*\\:data-\\[slot\\=select-value\\]\\:items-center{:is(&>*){&[data-slot=select-value]{align-items:center}}}.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2{:is(&>*){&[data-slot=select-value]{gap:calc(var(--spacing) * 2)}}}.data-\\[state\\=closed\\]\\:animate-out{&[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}}.data-\\[state\\=closed\\]\\:fade-out-0{&[data-state=closed]{--tw-exit-opacity: 0}}.data-\\[state\\=closed\\]\\:zoom-out-95{&[data-state=closed]{--tw-exit-scale: .95}}.data-\\[state\\=open\\]\\:animate-in{&[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}}.data-\\[state\\=open\\]\\:fade-in-0{&[data-state=open]{--tw-enter-opacity: 0}}.data-\\[state\\=open\\]\\:zoom-in-95{&[data-state=open]{--tw-enter-scale: .95}}.md\\:w-\\[450px\\]{@media(width>=48rem){width:450px}}.md\\:grid-cols-\\[1fr_340px\\]{@media(width>=48rem){grid-template-columns:1fr 340px}}.md\\:text-sm{@media(width>=48rem){font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}}.dark\\:border-input{@media(prefers-color-scheme:dark){border-color:var(--color-input)}}.dark\\:bg-destructive\\/60{@media(prefers-color-scheme:dark){background-color:color-mix(in srgb,#EF4444 60%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-destructive) 60%,transparent)}}}.dark\\:bg-input\\/30{@media(prefers-color-scheme:dark){background-color:color-mix(in srgb,#E5E7EB 30%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-input) 30%,transparent)}}}.dark\\:hover\\:bg-accent\\/50{@media(prefers-color-scheme:dark){&:hover{@media(hover:hover){background-color:color-mix(in srgb,#EFF6FF 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-accent) 50%,transparent)}}}}}.dark\\:hover\\:bg-input\\/50{@media(prefers-color-scheme:dark){&:hover{@media(hover:hover){background-color:color-mix(in srgb,#E5E7EB 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-input) 50%,transparent)}}}}}.dark\\:focus-visible\\:ring-destructive\\/40{@media(prefers-color-scheme:dark){&:focus-visible{--tw-ring-color: color-mix(in srgb, #EF4444 40%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-destructive) 40%, transparent)}}}}.dark\\:aria-invalid\\:ring-destructive\\/40{@media(prefers-color-scheme:dark){&[aria-invalid=true]{--tw-ring-color: color-mix(in srgb, #EF4444 40%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-destructive) 40%, transparent)}}}}.\\[\\&_svg\\]\\:pointer-events-none{& svg{pointer-events:none}}.\\[\\&_svg\\]\\:shrink-0{& svg{flex-shrink:0}}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-3{& svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4{& svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground{& svg:not([class*=text-]){color:var(--color-muted-foreground)}}.\\[\\.border-b\\]\\:pb-6{&:is(.border-b){padding-bottom:calc(var(--spacing) * 6)}}.\\[\\.border-t\\]\\:pt-6{&:is(.border-t){padding-top:calc(var(--spacing) * 6)}}.\\*\\:\\[span\\]\\:last\\:flex{:is(&>*){&:is(span){&:last-child{display:flex}}}}.\\*\\:\\[span\\]\\:last\\:items-center{:is(&>*){&:is(span){&:last-child{align-items:center}}}}.\\*\\:\\[span\\]\\:last\\:gap-2{:is(&>*){&:is(span){&:last-child{gap:calc(var(--spacing) * 2)}}}}.\\[\\&\\>svg\\]\\:pointer-events-none{>svg{pointer-events:none}}.\\[\\&\\>svg\\]\\:size-3{>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}}.\\[a\\&\\]\\:hover\\:bg-accent{a&{&:hover{@media(hover:hover){background-color:var(--color-accent)}}}}.\\[a\\&\\]\\:hover\\:bg-destructive\\/90{a&{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#EF4444 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}}}}.\\[a\\&\\]\\:hover\\:bg-primary\\/90{a&{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#2563EB 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}}}}.\\[a\\&\\]\\:hover\\:bg-secondary\\/90{a&{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#F1F5F9 90%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-secondary) 90%,transparent)}}}}}.\\[a\\&\\]\\:hover\\:underline{a&{&:hover{@media(hover:hover){text-decoration-line:underline}}}}}@layer base{:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 221.2 83.2% 53.3%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 221.2 83.2% 53.3%;--radius: .5rem}}@layer base{*{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}body{background-color:#f9fafb;color:#111827;font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:2px}::-webkit-scrollbar-thumb:hover{background:#9ca3af}@keyframes blink{0%,80%,to{opacity:0;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.thinking-dot{animation:blink 1.4s infinite ease-in-out both}.thinking-dot:nth-child(1){animation-delay:0s}.thinking-dot:nth-child(2){animation-delay:.2s}.thinking-dot:nth-child(3){animation-delay:.4s}.message-enter{animation:fadeInUp .25s ease-out}.prose-hr-chat{color:#374151;font-size:.875rem;line-height:1.625}.prose-hr-chat h1,.prose-hr-chat h2,.prose-hr-chat h3{color:#1f2937;font-weight:600;margin-top:.75rem;margin-bottom:.25rem}.prose-hr-chat p{margin-bottom:.5rem}.prose-hr-chat ul,.prose-hr-chat ol{padding-left:1rem;margin-bottom:.5rem}.prose-hr-chat li{margin-bottom:.125rem}.prose-hr-chat table{font-size:.75rem;border-collapse:collapse;width:100%;margin-bottom:.75rem}.prose-hr-chat th{background:#f1f5f9;padding:.25rem .5rem;border:1px solid #E2E8F0;font-weight:500;text-align:left}.prose-hr-chat td{padding:.25rem .5rem;border:1px solid #E2E8F0}.prose-hr-chat code{background:#f1f5f9;padding:.125rem .25rem;border-radius:.25rem;font-size:.75rem;font-family:ui-monospace,monospace}.prose-hr-chat pre{background:#f1f5f9;padding:.75rem;border-radius:.5rem;overflow-x:auto;margin-bottom:.5rem}.prose-hr-chat pre code{background:transparent;padding:0}.prose-hr-chat strong{font-weight:600;color:#1f2937}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-scale-x{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-y{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-z{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: "*"; inherits: false;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-tracking{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-outline-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-backdrop-blur{syntax: "*"; inherits: false;}@property --tw-backdrop-brightness{syntax: "*"; inherits: false;}@property --tw-backdrop-contrast{syntax: "*"; inherits: false;}@property --tw-backdrop-grayscale{syntax: "*"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: "*"; inherits: false;}@property --tw-backdrop-invert{syntax: "*"; inherits: false;}@property --tw-backdrop-opacity{syntax: "*"; inherits: false;}@property --tw-backdrop-saturate{syntax: "*"; inherits: false;}@property --tw-backdrop-sepia{syntax: "*"; inherits: false;}@property --tw-duration{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes pulse{50%{opacity:.5}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-scale-z: 1;--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-outline-style: solid;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial;--tw-duration: initial;--tw-ease: initial}}}
6
+ `);import{useState as wt,useEffect as ft,useSyncExternalStore as xt}from"react";import G from"next/link";import yt from"next/image";import{usePathname as kt,useSearchParams as Nt}from"next/navigation";import{MessageSquare as Ct,Settings as zt,Bot as Et,Plus as Pt,PanelLeftClose as Ft,PanelLeftOpen as Tt,Clock as St}from"lucide-react";import*as C from"@radix-ui/react-tooltip";import{jsx as $,jsxs as bt}from"react/jsx-runtime";function Ne(r){var o=r,{delayDuration:e=0}=o,t=M(o,["delayDuration"]);return $(C.Provider,u({"data-slot":"tooltip-provider",delayDuration:e},t))}function Ce(t){var e=M(t,[]);return $(C.Root,u({"data-slot":"tooltip"},e))}function ze(t){var e=M(t,[]);return $(C.Trigger,u({"data-slot":"tooltip-trigger"},e))}function Ee(c){var l=c,{className:e,sideOffset:t=0,children:r}=l,o=M(l,["className","sideOffset","children"]);return $(C.Portal,{children:bt(C.Content,F(u({"data-slot":"tooltip-content",sideOffset:t,className:s("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e)},o),{children:[r,$(C.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]}))})}import{Fragment as It,jsx as i,jsxs as h}from"react/jsx-runtime";function Rt(){return xt(e=>(window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)),()=>window.innerWidth<768,()=>!1)}function _t({expanded:e,setExpanded:t,isEmbed:r}){let o=kt(),l=Nt().get("threadId"),[g,f]=wt([]),{botName:v,logoUrl:x}=L(),T=Rt();ft(()=>{(async()=>{try{let n=await H.listThreads();f(n)}catch(n){f([])}})()},[o]);let p=()=>{(r||T)&&t(!1)};return h(Ne,{delayDuration:500,children:[e&&(r||T)&&i("div",{className:"fixed inset-0 bg-slate-900/20 backdrop-blur-sm z-40 transition-opacity duration-300",onClick:()=>t(!1)}),h("aside",{className:s("relative h-screen bg-white border-r border-slate-100 flex flex-col shrink-0 transition-all duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] z-50",e?r?"w-full":"w-64":"w-16",(r||T)&&e?"fixed inset-y-0 left-0 shadow-2xl":"relative"),children:[h("div",{className:"flex items-center h-16 px-4 border-b border-slate-50",children:[h("div",{className:"flex items-center gap-3 overflow-hidden",children:[i("div",{className:"w-9 h-9 rounded-xl bg-blue-600 flex items-center justify-center text-white shrink-0 shadow-lg shadow-blue-200",children:i(Et,{size:20,strokeWidth:2.5,className:s("transition-transform duration-500",e&&"rotate-[360deg]")})}),e&&h("div",{className:"flex flex-col animate-in fade-in slide-in-from-left-2 duration-300",children:[i("span",{className:"font-bold text-slate-900 leading-tight",children:v}),h("span",{className:"text-[10px] text-emerald-500 font-medium flex items-center gap-1",children:[i("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"})," IA Active"]})]})]}),i("button",{onClick:()=>t(!e),className:"ml-auto p-2 hover:bg-slate-100 rounded-lg text-slate-400 transition-colors",children:e?i(Ft,{size:18}):i(Tt,{size:18})})]}),i("div",{className:"p-3",children:i(ee,{label:"Nouveau chat",show:!e,children:h(G,{href:"/chat",onClick:p,className:s("flex items-center gap-3 bg-blue-600 text-white rounded-xl font-semibold transition-all shadow-md shadow-blue-100 hover:bg-blue-700 hover:shadow-lg active:scale-95",e?"px-4 py-3 w-full":"w-10 h-10 justify-center mx-auto"),children:[i(Pt,{size:20,strokeWidth:3}),e&&i("span",{className:"text-sm",children:"Nouvelle discussion"})]})})}),h("nav",{className:"flex flex-col gap-1 px-3 mt-2",children:[i(ee,{label:"Discussions",show:!e,children:h(G,{href:"/chat",onClick:p,className:s("flex items-center gap-3 p-2.5 rounded-xl text-sm transition-all group",o.startsWith("/chat")?"bg-slate-100 text-blue-600 font-bold":"text-slate-500 hover:bg-slate-50 hover:text-slate-900"),children:[i(Ct,{size:18,className:s(o.startsWith("/chat")?"text-blue-600":"text-slate-400 group-hover:text-slate-600")}),e&&i("span",{children:"Chat"})]})}),i(ee,{label:"Param\xE8tres",show:!e,children:h(G,{href:"/settings",onClick:p,className:s("flex items-center gap-3 p-2.5 rounded-xl text-sm transition-all group",o==="/settings"?"bg-slate-100 text-blue-600 font-bold":"text-slate-500 hover:bg-slate-50 hover:text-slate-900"),children:[i(zt,{size:18,className:s(o==="/settings"?"text-blue-600":"text-slate-400 group-hover:text-slate-600")}),e&&i("span",{children:"Param\xE8tres"})]})})]}),e&&h("div",{className:"flex-1 overflow-y-auto mt-6 px-3 custom-scrollbar animate-in fade-in duration-500",children:[h("div",{className:"flex items-center justify-between mb-3 px-2",children:[i("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Historique"}),i(St,{size:10,className:"text-slate-300"})]}),i("div",{className:"flex flex-col gap-1 pb-4",children:g.length===0?i("div",{className:"px-3 py-4 border border-dashed border-slate-100 rounded-xl text-center",children:i("p",{className:"text-[10px] text-slate-400 italic",children:"Aucune discussion"})}):g.map(b=>h(G,{href:`/chat?threadId=${b.id}`,onClick:p,className:s("group relative flex flex-col gap-0.5 p-2.5 rounded-xl transition-all border border-transparent",l===b.id?"bg-blue-50/50 border-blue-100 text-blue-700 font-semibold":"text-slate-600 hover:bg-slate-50 hover:border-slate-100"),children:[l===b.id&&i("div",{className:"absolute left-0 top-2 bottom-2 w-1 bg-blue-600 rounded-r-full"}),i("span",{className:"text-[11px] truncate leading-tight",children:b.title}),h("span",{className:"text-[8px] text-slate-400 group-hover:text-blue-400 transition-colors uppercase font-medium",children:["Discussion ID: ",b.id.slice(-4)]})]},b.id))})]}),i("div",{className:"mt-auto p-4 border-t border-slate-50 bg-slate-50/30",children:h("div",{className:s("flex items-center gap-3",!e&&"justify-center"),children:[h("div",{className:"relative shrink-0",children:[i("div",{className:"w-9 h-9 rounded-full overflow-hidden border-2 border-white shadow-sm bg-slate-100 flex items-center justify-center",children:i(yt,{src:x,alt:"User Profile",width:36,height:36,className:"object-contain"})}),i("div",{className:"absolute -bottom-0.5 -right-0.5 w-3 h-3 bg-emerald-500 border-2 border-white rounded-full"})]}),e&&h("div",{className:"min-w-0 flex flex-col animate-in slide-in-from-bottom-1 duration-300",children:[i("p",{className:"text-xs font-bold text-slate-800 truncate",children:"Administrateur DHI"}),i("p",{className:"text-[10px] text-slate-400 font-medium truncate",children:"Console de Gestion"})]})]})})]})]})}function ee({children:e,label:t,show:r}){return r?h(Ce,{children:[i(ze,{asChild:!0,children:e}),i(Ee,{side:"right",sideOffset:10,className:"bg-slate-900 text-white border-none text-[10px] px-2 py-1 shadow-xl",children:t})]}):i(It,{children:e})}import{useState as A,useCallback as Pe,useEffect as Wt,useRef as At}from"react";function Mt(){let[e,t]=A([]),[r,o]=A(!0),[c,l]=A(!1),[g,f]=A(null),[v,x]=A(null),[T,p]=A(null),m=At(!1),E=Pe(async(a=!1)=>{if(!(!a&&m.current)){a||(m.current=!0),o(!0);try{let d=await q.list();t(d)}catch(d){console.error("Erreur fetchConnectors:",d),t([])}finally{o(!1),a||setTimeout(()=>{m.current=!1},1e3)}}},[]);Wt(()=>{E()},[E]);let b=async a=>{l(!0),x(null),p(null);try{return await q.save(a),await E(!0),p("Connecteur enregistr\xE9 avec succ\xE8s."),setTimeout(()=>p(null),3e3),!0}catch(d){return x(d.message||"Erreur lors de l'enregistrement du connecteur."),!1}finally{l(!1)}},n=Pe(async a=>{x(null),p(null),f(a),t(d=>d.map(w=>w.source_id===a?F(u({},w),{status:"indexing"}):w));try{let d=await q.sync(a);t(w=>w.map(P=>P.source_id===a?F(u({},P),{status:"active"}):P)),p(d.details||`Indexation lanc\xE9e pour ${a}`),setTimeout(()=>p(null),4e3)}catch(d){t(w=>w.map(P=>P.source_id===a?F(u({},P),{status:"error"}):P)),x(d.message||`L'indexation de ${a} a \xE9chou\xE9.`)}finally{f(null)}},[]);return{connectors:e,isFetching:r,isSaving:c,isIndexing:g,error:v,successMsg:T,save:b,triggerIndexing:n,refresh:()=>E(!0)}}export{Y as ChatWindow,vt as CopilotApp,_t as Sidebar,X as WidgetProvider,J as useChat,Mt as useConnectors,L as useWidgetConfig};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dhi-copilot-ai",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Assistant RH intelligent & RAG universel",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "dev": "next dev",
22
22
  "build": "next build",
23
- "build:lib": "tsup src/index.ts --format cjs,esm --dts --minify --clean --tsconfig tsconfig.lib.json",
23
+ "build:lib": "tsup src/index.ts --format cjs,esm --dts --minify --clean --tsconfig tsconfig.lib.json --inject-style",
24
24
  "start": "next start",
25
25
  "lint": "eslint"
26
26
  },