PageSourceSearch

https://textiaa.com/chunk-MNH5G5Y7.js

js textiaa.com collected 2026-09-24 13:41:02 UTC 187,066 bytes, 5 lines download raw bytes

1import{a as Ce,b as rn}from"./chunk-4Z2FIWXU.js";import{a as ke,b as cn}from"./chunk-RWULMYT5.js";import{c as pe,d as an}from"./chunk-WMWTXPHF.js";import"./chunk-P27FRGFY.js";import"./chunk-ZIVP25TJ.js";import{a as ue,b as sn}from"./chunk-LZ4XC2TM.js";import{A as Ot,C as ft,c as ut,i as Vt,k as bt,l as be,n as Me,p as Mt,q as Oe,v as fe,w as Pe,x as ve}from"./chunk-TT2QA5N2.js";import{a as ge,b as on}from"./chunk-6MOVM5NX.js";import{f as kt,g as me,h as xt,n as Dt}from"./chunk-REXD3XXG.js";import{i as he,j as nn}from"./chunk-XZTRQ27X.js";import{b as st,c as F,e as R,f as D}from"./chunk-OVGYRFXU.js";import{B as le,G as _e,M as en,i as se,o as ce,s as de,v as Yt,z as Kt}from"./chunk-MZWCCPRN.js";import{$a as It,Cc as gt,Da as Tt,Dc as pt,Ec as Ct,Ia as ne,Jc as Nt,Lb as b,Nb as P,Ob as v,Oc as d,P as tn,Pb as ae,Pc as l,Qc as Rt,Rb as et,Sb as nt,Tb as S,U as wt,Ub as r,Vb as c,Wb as u,Xa as oe,Xb as I,Yb as H,Yc as vt,Z as O,Zb as mt,ab as tt,bc as V,cc as Gt,da as x,ea as y,fc as p,gb as i,gc as At,hc as m,kb as _t,la as J,lb as ht,lc as rt,ma as te,mc as j,n as it,nc as Q,pa as L,rc as ie,sa as ee,sc as re,tc as B,td as T,ub as A,vc as Ft,wc as h,xc as k,yc as M,zc as Bt}from"./chunk-JXIB5BED.js";import{a as z,b as U,e as $,k as f}from"./chunk-J6LPXIX4.js";var qt,Xt=$(()=>{"use strict";en();T();on();T();qt=(()=>{class o{http=O(_e);baseUrl=`${ge.apiUrl}/api/v1/chat`;getFolders(){return this.http.get(`${this.baseUrl}/folders`)}createFolder(t){return this.http.post(`${this.baseUrl}/folders`,t)}updateFolder(t,n){return this.http.patch(`${this.baseUrl}/folders/${t}`,n)}deleteFolder(t){return this.http.delete(`${this.baseUrl}/folders/${t}`)}getConversations(t){let n=new le;return t!=null&&(n=n.set("folder_id",t)),this.http.get(`${this.baseUrl}/conversations`,{params:n})}getConversation(t){return this.http.get(`${this.baseUrl}/conversations/${t}`)}createConversation(t){return this.http.post(`${this.baseUrl}/conversations`,t)}updateConversation(t,n){return this.http.patch(`${this.baseUrl}/conversations/${t}`,n)}deleteConversation(t){return this.http.delete(`${this.baseUrl}/conversations/${t}`)}getMessages(t){return this.http.get(`${this.baseUrl}/conversations/${t}/messages`)}sendMessage(t,n){let e=new FormData;e.append("content",n.content??""),n.tool&&e.append("tool",n.tool),n.tool_option&&e.append("tool_option",n.tool_option);for(let a of n.files??[])e.append("files",a);return this.http.post(`${this.baseUrl}/conversations/${t}/send`,e)}getMessageQuota(){return this.http.get(`${this.baseUrl}/message-quota`)}transcribeAudio(t,n){return f(this,null,function*(){let e=localStorage.getItem("access_token")||sessionStorage.getItem("access_token"),a=new FormData;a.append("file",t,t.name),n&&a.append("language",n);let _=yield fetch(`${this.baseUrl}/transcribe`,{method:"POST",headers:e?{Authorization:`Bearer ${e}`}:{},body:a});if(!_.ok)throw new Error(`Transcription failed: ${_.status}`);return _.json()})}sendMessageStream(t,n,e){let a=new FormData;a.append("content",n.content??""),n.tool&&a.append("tool",n.tool),n.tool_option&&a.append("tool_option",n.tool_option);for(let s of n.files??[])a.append("files",s);let _=localStorage.getItem("access_token")||sessionStorage.getItem("access_token");return fetch(`${this.baseUrl}/conversations/${t}/send-stream`,{method:"POST",headers:_?{Authorization:`Bearer ${_}`}:{},body:a}).then(s=>f(this,null,function*(){if(!s.ok||!s.body){try{let K=yield s.json();e.onError?.({status:s.status,detail:K?.detail,message:K?.detail?.message??`HTTP ${s.status}`})}catch(K){e.onError?.({status:s.status,message:`HTTP ${s.status}`})}return}let C=s.body.getReader(),E=new TextDecoder,w="",q=({done:K,value:ot})=>{if(K)return Promise.resolve();w+=E.decode(ot,{stream:!0});let X=w.split(`
2
3`);w=X.pop()??"";for(let lt of X){let at=lt.trim();if(at.startsWith("data: "))try{let W=JSON.parse(at.slice(6));W.type==="user_message"?e.onUserMessage?.(W.message):W.type==="chunk"?e.onChunk?.(W.text):W.type==="done"?e.onDone?.(W):W.type==="error"&&e.onError?.({message:W.message})}catch(W){}}return C.read().then(q)};return C.read().then(q)})).catch(s=>{e.onError?.({message:s?.message??"Network error"})})}static \u0275fac=function(n){return new(n||o)};static \u0275prov=wt({token:o,factory:o.\u0275fac,providedIn:"root"})}return o}
3)()});var ct,yt=$(()=>{"use strict";T();tn();Xt();T();ct=(()=>{class o{api=O(qt);quota=L(null);loadingQuota=L(!1);folders=L([{id:"all",name:"Tous",color:null,createdAt:new Date().toISOString()}]);conversations=L([]);messages=L({});selectedFolderId=L("all");selectedConversationId=L(null);searchTerm=L("");sending=L(!1);streaming=L(!1);loadingFolders=L(!1);loadingConversations=L(!1);loadingMessages=L(!1);canSendMessages=vt(()=>{let t=this.quota();return!t||t.remaining>0});quotaExceeded=vt(()=>{let t=this.quota();return!!t&&t.remaining<=0});filteredConversations=vt(()=>{let t=this.selectedFolderId(),n=this.searchTerm().trim().toLowerCase();return this.conversations().filter(e=>{let a=t==="all"||e.folderId===t,_=!n||e.title.toLowerCase().includes(n)||(e.preview??"").toLowerCase().includes(n);return a&&_})});selectedConversation=vt(()=>{let t=this.selectedConversationId();return t===null?null:this.conversations().find(n=>n.id===t)??null});selectedMessages=vt(()=>{let t=this.selectedConversationId();return t===null?[]:this.messages()[t]??[]});mapQuota(t){return{plan:t.plan,limit:t.limit,used:t.used,remaining:t.remaining,resetsAt:t.resets_at}}toBackendFolderId(t){return t==null||t==="all"?null:t}patchConversation(t){this.conversations.update(n=>n.map(e=>e.id===t.id?t:e))}mapConversation(t){let n=this.conversations().find(e=>e.id===t.id);return{id:t.id,publicId:t.public_id,folderId:t.folder_id,title:t.title,preview:n?.preview??null,createdAt:t.created_at,updatedAt:t.updated_at}}getConversationById(t){return this.conversations().find(n=>n.id===t)??null}selectConversationByPublicId(t){return f(this,null,function*(){let n=this.conversations().find(e=>e.publicId===t)??null;return n?this.selectConversation(n.id):(this.selectedConversationId.set(null),!1)})}loadQuota(){return f(this,null,function*(){this.loadingQuota.set(!0);try{let t=yield it(this.api.getMessageQuota());this.quota.set(this.mapQuota(t))}catch(t){console.error("Erreur loadQuota",t),this.quota.set(null)}finally{this.loadingQuota.set(!1)}})}init(){return f(this,null,function*(){yield Promise.all([this.loadFolders(),this.loadConversations(),this.loadQuota()])})}loadFolders(){return f(this,null,function*(){this.loadingFolders.set(!0);try{let t=yield it(this.api.getFolders()),n=[{id:"all",name:"Tous",color:null,createdAt:new Date().toISOString()},...t.map(e=>({id:e.id,name:e.name,color:null,createdAt:e.created_at,updatedAt:e.updated_at}))];this.folders.set(n)}catch(t){console.error("Erreur loadFolders",t)}finally{this.loadingFolders.set(!1)}})}loadConversations(t){return f(this,null,function*(){this.loadingConversations.set(!0);try{let n=t!==void 0?t:this.toBackendFolderId(this.selectedFolderId()),a=(yield it(this.api.getConversations(n))).map(s=>({id:s.id,publicId:s.public_id,folderId:s.folder_id,title:s.title,preview:null,createdAt:s.created_at,updatedAt:s.updated_at}));this.conversations.set(a);let _=this.selectedConversationId();_!==null&&!a.some(s=>s.id===_)&&this.selectedConversationId.set(null)}catch(n){console.error("Erreur loadConversations",n)}finally{this.loadingConversations.set(!1)}})}loadMessages(t){return f(this,null,function*(){this.loadingMessages.set(!0);try{let n=this.getConversationById(t);if(!n)return!1;let a=(yield it(this.api.getMessages(n.publicId))).map(s=>({id:s.id,conversationId:s.conversation_id,role:s.role,content:s.content,createdAt:s.created_at}));this.messages.update(s=>U(z({},s),{[t]:a}));let _=a[a.length-1];return _&&this.conversations.update(s=>s.map(C=>C.id===t?U(z({},C),{preview:_.content,updatedAt:_.createdAt}):C)),!0}catch(n){return console.error("Erreur loadMessages",n),this.messages.update(e=>{let a=z({},e);return delete a[t],a}),!1}finally{this.loadingMessages.set(!1)}})}selectFolder(t){return f(this,null,function*(){this.selectedFolderId.set(t),yield this.loadConversations()})}setSearchTerm(t){this.searchTerm.set(t)}selectConversation(t){return f(this,null,function*(){return this.conversations().some(e=>e.id===t)?(this.selectedConversationId.set(t),!this.messages()[t]&&!(yield this.loadMessages(t))?(this.selectedConversationId.set(null),!1):!0):(this.selectedConversationId.set(null),!1)})}getActiveFolderIdForCreation(t){return t!==void 0?t:this.toBacken
3dFolderId(this.selectedFolderId())}createConversation(t,n,e,a){return f(this,null,function*(){let _=this.getActiveFolderIdForCreation(t);try{let s=yield it(this.api.createConversation({folder_id:_,first_message:n?.trim()||null,tool:e??null,tool_option:a??null})),C={id:s.id,publicId:s.public_id,folderId:s.folder_id,title:s.title,preview:n?.trim()||null,createdAt:s.created_at,updatedAt:s.updated_at},E=this.selectedFolderId();return this.conversations.update(w=>E==="all"||C.folderId===E?[C,...w]:w),n?.trim()?yield Promise.all([this.loadMessages(s.id),this.loadQuota()]):this.messages.update(w=>U(z({},w),{[s.id]:[]})),this.selectedConversationId.set(s.id),C}catch(s){if(console.error("Erreur createConversation",s),s?.status===402&&s?.error?.detail?.code==="CHAT_QUOTA_EXCEEDED"){let C=s.error.detail;this.quota.set({plan:C.plan,limit:C.chat_limit,used:C.chat_used,remaining:C.chat_remaining,resetsAt:C.resets_at})}return null}})}changeConversationFolder(t,n){return f(this,null,function*(){try{let e=this.getConversationById(t);if(!e)return!1;let a=yield it(this.api.updateConversation(e.publicId,{folder_id:n})),_=this.selectedFolderId();return this.conversations.update(s=>{let C=s.map(E=>E.id===t?U(z({},E),{folderId:a.folder_id,updatedAt:a.updated_at}):E);return _==="all"?C:C.filter(E=>E.folderId===_)}),!0}catch(e){return console.error("Erreur changeConversationFolder",e),!1}})}clearQuota(){this.quota.set(null)}sendMessage(t){return f(this,null,function*(){let n=t.message.trim(),e=t.files??[];if(!(!n&&!e.length)&&this.canSendMessages()&&!(this.sending()||this.streaming())){this.sending.set(!0);try{let a=this.selectedConversationId();if(!a){let s=yield this.createConversation(void 0,null,null,null);if(!s)return;a=s.id,this.selectedConversationId.set(a),this.messages.update(C=>U(z({},C),{[a]:C[a]??[]}))}let _=this.getConversationById(a);if(!_)return;if(_.title?.trim()==="Nouvelle conversation"&&n){let s=this.buildConversationTitle(n);this.patchConversationTitle(_.id,s)}yield this.api.sendMessageStream(_.publicId,{content:n,tool:t.tool,tool_option:t.toolOption,files:e},{onUserMessage:s=>{let C={id:s.id,conversationId:s.conversation_id,role:s.role,content:s.content,createdAt:s.created_at},E={id:-1,conversationId:a,role:"assistant",content:"",createdAt:new Date().toISOString()};this.messages.update(w=>U(z({},w),{[a]:[...w[a]??[],C,E]})),this.sending.set(!1),this.streaming.set(!0)},onChunk:s=>{this.messages.update(C=>{let E=C[a]??[];return U(z({},C),{[a]:E.map(w=>w.id===-1?U(z({},w),{content:w.content+s}):w)})})},onDone:s=>{let C={id:s.assistant_message.id,conversationId:s.assistant_message.conversation_id,role:s.assistant_message.role,content:s.assistant_message.content,createdAt:s.assistant_message.created_at};if(this.messages.update(E=>{let w=E[a]??[];return U(z({},E),{[a]:w.map(q=>q.id===-1?C:q)})}),this.quota.set(this.mapQuota(s.quota)),s.conversation){let E=this.mapConversation(s.conversation);this.patchConversation(E),this.conversations.update(w=>w.map(q=>q.id===a?U(z({},q),{preview:C.content||n,updatedAt:s.conversation.updated_at,title:s.conversation.title??q.title}):q))}},onError:s=>{console.error("Stream error:",s),s.status===402&&s.detail?.code==="CHAT_QUOTA_EXCEEDED"&&this.quota.set({plan:s.detail.plan,limit:s.detail.chat_limit,used:s.detail.chat_used,remaining:s.detail.chat_remaining,resetsAt:s.detail.resets_at}),this.messages.update(C=>U(z({},C),{[a]:(C[a]??[]).filter(E=>E.id!==-1)}))}})}catch(a){console.error("Erreur sendMessage",a),this.messages.update(_=>U(z({},_),{[this.selectedConversationId()]:(_[this.selectedConversationId()]??[]).filter(s=>s.id!==-1)}))}finally{this.streaming.set(!1),this.sending.set(!1)}}})}createFolder(t){return f(this,null,function*(){let n=t.trim();if(!n||this.folders().some(a=>a.id!=="all"&&a.name.trim().toLowerCase()===n.toLowerCase()))return null;try{let a=yield it(this.api.createFolder({name:n})),_={id:a.id,name:a.name,color:null,createdAt:a.created_at,updatedAt:a.updated_at};return this.folders.update(s=>[...s,_]),a.id}catch(a){return console.error("Erreur createFolder",a),null}})}renameFolder(t,n){return f(this,null,function*(){let e=n.trim();if(!e||this.folders().some(_=>_.id!=="all"&&_.id!==t&&_.name.trim().toLowerCase()===e.toLowerCase()))return!1;try{let _=yield it(this.api.updateFolder(t,{name:e}));return this.folders.update(s=>s.map(C=>C.id===t?U(z({}
3,C),{name:_.name,updatedAt:_.updated_at}):C)),!0}catch(_){return console.error("Erreur renameFolder",_),!1}})}deleteFolder(t){return f(this,null,function*(){try{yield it(this.api.deleteFolder(t)),this.folders.update(n=>n.filter(e=>e.id!==t)),this.conversations.update(n=>n.map(e=>e.folderId===t?U(z({},e),{folderId:null}):e)),this.selectedFolderId()===t&&this.selectedFolderId.set("all")}catch(n){console.error("Erreur deleteFolder",n)}})}renameConversation(t,n){return f(this,null,function*(){let e=n.trim();if(!e)return!1;try{let a=this.getConversationById(t);if(!a)return!1;let _=yield it(this.api.updateConversation(a.publicId,{title:e}));return this.conversations.update(s=>s.map(C=>C.id===t?U(z({},C),{title:_.title,updatedAt:_.updated_at}):C)),!0}catch(a){return console.error("Erreur renameConversation",a),!1}})}deleteConversation(t){return f(this,null,function*(){try{let n=this.getConversationById(t);if(!n)return;yield it(this.api.deleteConversation(n.publicId)),this.conversations.update(e=>e.filter(a=>a.id!==t)),this.messages.update(e=>{let a=z({},e);return delete a[t],a}),this.selectedConversationId()===t&&this.selectedConversationId.set(null)}catch(n){console.error("Erreur deleteConversation",n)}})}buildTitle(t){let n=t.trim().replace(/\s+/g," ");return n.length>40?`${n.slice(0,40)}\u2026`:n}buildConversationTitle(t){let n=t.replace(/\s+/g," ").trim().replace(/[ .,!?:;\-\n\r\t]+$/,"");if(!n)return"Nouvelle conversation";let a=n.split(" ").slice(0,6).join(" ");if(a.length>45){a=a.slice(0,45).trim();let _=a.lastIndexOf(" ");_>10&&(a=a.slice(0,_).trim())}return a||"Nouvelle conversation"}patchConversationTitle(t,n){this.conversations.update(e=>e.map(a=>a.id===t?U(z({},a),{title:n}):a))}static \u0275fac=function(n){return new(n||o)};static \u0275prov=wt({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})()});var Pt,Et=$(()=>{"use strict";T();T();Pt=(()=>{class o{mobileSidebarOpen=L(!1);openMobileSidebar(){this.mobileSidebarOpen.set(!0)}closeMobileSidebar(){this.mobileSidebarOpen.set(!1)}toggleMobileSidebar(){this.mobileSidebarOpen.update(t=>!t)}static \u0275fac=function(n){return new(n||o)};static \u0275prov=wt({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})()});function _n(o,g){if(o&1){let t=V();r(0,"div",9),p("click",function(e){return e.stopPropagation()}),r(1,"button",10),p("click",function(){x(t);let e=m(2).$implicit,a=m();return y(a.startRenameFolder(e.id,e.name))}),u(2,"i",11),r(3,"span"),h(4),d(5,"translate"),c()(),r(6,"button",12),p("click",function(){x(t);let e=m(2).$implicit,a=m();return y(a.deleteFolder(e.id))}),u(7,"i",13),r(8,"span"),h(9),d(10,"translate"),c()()()}o&2&&(i(4),k(l(5,2,"CHAT_FOLDER_LIST.RENAME")),i(5),k(l(10,4,"CHAT_FOLDER_LIST.DELETE")))}function hn(o,g){if(o&1){let t=V();r(0,"button",6,0),d(2,"translate"),p("click",function(e){x(t);let a=m(),_=a.$implicit,s=a.$index,C=m();return y(C.toggleFolderMenu(_.id,e,s))}),u(3,"i",7),c(),P(4,_n,11,6,"div",8)}if(o&2){let t=m().$implicit,n=m();B("is-open",n.openFolderMenuId()===t.id),b("aria-label",l(2,6,"CHAT_FOLDER_LIST.FOLDER_SETTINGS_ARIA"))("aria-expanded",n.openFolderMenuId()===t.id)("tabindex",n.isFolderMenuBtnVisible(t)?0:-1),i(4),v(n.openFolderMenuId()===t.id?4:-1)}}function mn(o,g){if(o&1){let t=V();r(0,"div",2)(1,"button",4),p("click",function(){let e=x(t).$implicit,a=m();return y(a.store.selectFolder(e.id))}),r(2,"span",5),h(3),d(4,"translate"),c()(),P(5,hn,5,8),c()}if(o&2){let t=g.$implicit,n=m();i(),B("is-active",n.store.selectedFolderId()===t.id),b("aria-pressed",n.store.selectedFolderId()===t.id),i(2),M(" ",t.id==="all"?l(4,5,"CHAT_FOLDER_LIST.ALL"):t.name," "),i(2),v(t.id!=="all"?5:-1)}}function gn(o,g){if(o&1){let t=V();r(0,"div",3)(1,"label",14),h(2),d(3,"translate"),c(),r(4,"input",15),d(5,"translate"),Ct("ngModelChange",function(e){x(t);let a=m();return pt(a.renameFolderValue,e)||(a.renameFolderValue=e),y(e)}),p("keydown.enter",function(){x(t);let e=m();return y(e.confirmRenameFolder())}),c(),_t(),r(6,"div",16)(7,"button",17),p("click",function(){x(t);let e=m();return y(e.cancelRenameFolder())}),h(8),d(9,"translate"),c(),r(10,"button",18),p("click",function(){x(t);let e=m();return y(e.confirmRenameFolder())}),h(11),d(12,"translate"),c()()()}if(o&2){let t=m();i(2),M(" ",l(3,5,"CHAT_FOLDER_LIST.RENAME_PLACEHOLDER")," "),i(2),gt("ngModel",t.renameFolderValue),S("placeholder",l(5,7,"CHAT_FOLDER_LIST.RENAME_PLACEHOLDER")),ht(),i(4),M(" ",l(9,9,"CHAT_FOLDER_LIST.CANCEL")," "),i(3),M(" ",l(12,11,"CHAT_FOLDER_LIST.SAVE")," ")}}var dn,ln,xe,ye=$(()=>{"use strict";T();ft();D();yt();T();ft();D();dn=["menuTrigger"],ln=(o,g)=>g.id;xe=(()=>{class o{store=O(ct);menuTriggers;openFolderMenuId=L(null);renameFolderId=L(null);renameFolderValue="";_activeMenuIndex=null;isFolderMenuBtnVisible(t){return this.store.selectedFolderId()===t.id||this.openFolderMenuId()===t.id}closeMenus(){this.openFolderMenuId.set(null),this._activeMenuIndex=null}onEscape(){this.openFolderMenuId()!==null&&(this._restoreFocus(),this.openFolderMenuId.set(null),this._activeMenuIndex=null)}_restoreFocus(){this._activeMenuIndex!==null&&this.menuTriggers.toArray()[this._activeMenuIndex]?.nativeElement?.focus()}toggleFolderMenu(t,n,e){n.stopPropagation();let a=this.openFolderMenuId()===t;this.openFolderMenuId.set(a?null:t),this._activeMenuIndex=a?null:e}startRenameFolder(t,n){this.renameFolderId.set(t),this.renameFolderValue=n,this.openFolderMenuId.set(null),this._activeMenuIndex=null}cancelRenameFolder(){this.renameFolderId.set(null),this.renameFolderValue=""}confirmRenameFolder(){return f(this,null,function*(){let t=this.renameFolderId();t===null||!(yield this.store.renameFolder(t,this.renameFolderValue))||this.cancelRenameFolder()})}deleteFolder(t){return f(this,null,function*(){yield this.store.deleteFolder(t),this.openFolderMenuId.set(null),this._activeMenuIndex=null})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-folder-list"]],viewQuery:function(n,e){if(n&1&&rt(dn,5),n&2){let a;j(a=Q())&&(e.menuTriggers=a)}},hostBindings:function(n,e){n&1&&p("click",function(){return e.closeMenus()}
3,tt)("keydown.escape",function(){return e.onEscape()},tt)},decls:4,vars:1,consts:[["menuTrigger",""],["aria-label","Dossiers",1,"chat-folder-list"],[1,"chat-folder-row"],["aria-live","polite",1,"chat-folder-rename-box"],["type","button",1,"chat-folder-item",3,"click"],[1,"chat-folder-item__label"],["type","button","aria-haspopup","menu",1,"chat-folder-menu-btn",3,"click"],["aria-hidden","true",1,"pi","pi-ellipsis-h"],["role","menu",1,"chat-folder-menu"],["role","menu",1,"chat-folder-menu",3,"click"],["type","button","role","menuitem",3,"click"],["aria-hidden","true",1,"pi","pi-pencil"],["type","button","role","menuitem",1,"is-danger",3,"click"],["aria-hidden","true",1,"pi","pi-trash"],["for","renameFolderInput",1,"sr-only"],["id","renameFolderInput","type","text",1,"input","is-small",3,"ngModelChange","keydown.enter","ngModel","placeholder"],[1,"chat-folder-rename-actions"],["type","button",1,"button","is-small","is-light",3,"click"],["type","button",1,"button","is-small","is-link",3,"click"]],template:function(n,e){n&1&&(r(0,"section",1),et(1,mn,6,7,"div",2,ln),P(3,gn,13,13,"div",3),c()),n&2&&(i(),nt(e.store.folders()),i(2),v(e.renameFolderId()!==null?3:-1))},dependencies:[Ot,ut,bt,Mt,R,F],styles:[".sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.chat-folder-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.chat-folder-row[_ngcontent-%COMP%]{position:relative}.chat-folder-item[_ngcontent-%COMP%]{width:100%;border:1px solid #dbe4ee;background:#fff;color:#334155;border-radius:5px;padding:.55rem 2.5rem .55rem .85rem;font-size:.875rem;text-align:left;cursor:pointer;transition:background-color .2s ease,border-color .2s ease,color .2s ease,box-shadow .2s ease}.chat-folder-item[_ngcontent-%COMP%]:hover{background:#f8fafc}.chat-folder-item[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.chat-folder-item.is-active[_ngcontent-%COMP%]{background:#eef2ff;border-color:#4338ca;color:#4338ca;font-weight:600}.chat-folder-item__label[_ngcontent-%COMP%]{display:block;padding-right:.25rem}.chat-folder-menu-btn[_ngcontent-%COMP%]{position:absolute;top:50%;right:.4rem;transform:translateY(-50%);width:28px;height:28px;border:none;background:transparent;color:#94a3b8;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .18s ease,background-color .18s ease,color .18s ease}.chat-folder-row[_ngcontent-%COMP%]:hover   .chat-folder-menu-btn[_ngcontent-%COMP%], .chat-folder-menu-btn[_ngcontent-%COMP%]:focus-visible, .chat-folder-menu-btn.is-open[_ngcontent-%COMP%]{opacity:1}.chat-folder-menu-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.chat-folder-menu-btn[_ngcontent-%COMP%]:hover{background:#f1f5f9;color:#475569}.chat-folder-row[_ngcontent-%COMP%]:has(.chat-folder-item.is-active)   .chat-folder-menu-btn[_ngcontent-%COMP%]{opacity:1}.chat-folder-menu[_ngcontent-%COMP%]{position:absolute;top:calc(100% + .3rem);right:0;min-width:138px;background:#fff;border:1px solid #e5e7eb;border-radius:5px;box-shadow:0 10px 24px #0f172a1a;padding:.25rem;z-index:30}.chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:100%;border:none;background:transparent;display:flex;align-items:center;gap:.45rem;padding:.5rem .6rem;border-radius:8px;cursor:pointer;text-align:left;color:#334155;font-size:.82rem;font-weight:500;line-height:1.2}.chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.78rem;width:.9rem;display:inline-flex;align-items:center;justify-content:center;flex:0 0 .9rem}.chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{background:#f8fafc}.chat-folder-menu[_ngcontent-%COMP%]   button.is-danger[_ngcontent-%COMP%]{color:#dc2626}.chat-folder-rename-box[_ngcontent-%COMP%]{margin-top:.35rem;padding:.75rem;border:1px solid #e5e7eb;border-radius:12px;background:#fafafa}.chat-folder-rename-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;
3gap:.5rem;margin-top:.65rem}.chat-folder-rename-actions[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}[data-theme=dark][_nghost-%COMP%]   .chat-folder-item[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-item[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-text-strong);box-shadow:none}[data-theme=dark][_nghost-%COMP%]   .chat-folder-item[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-item[_ngcontent-%COMP%]:hover{background:#485fc70f;border-color:color-mix(in srgb,var(--bulma-link) 35%,var(--bulma-border))}[data-theme=dark][_nghost-%COMP%]   .chat-folder-item[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-item[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-item.is-active[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-item.is-active[_ngcontent-%COMP%]{background:#485fc724;border-color:var(--bulma-link);color:var(--bulma-link);box-shadow:0 0 0 1px #485fc733}[data-theme=dark][_nghost-%COMP%]   .chat-folder-menu-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-menu-btn[_ngcontent-%COMP%]{color:var(--bulma-text)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-menu-btn[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-menu-btn[_ngcontent-%COMP%]:hover{background:#485fc714;color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-menu-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-menu-btn[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);box-shadow:0 12px 28px #00000059}[data-theme=dark][_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{background:#485fc714}[data-theme=dark][_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%]   button.is-danger[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-menu[_ngcontent-%COMP%]   button.is-danger[_ngcontent-%COMP%]{color:#f87171}[data-theme=dark][_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);box-shadow:none}[data-theme=dark][_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-text-strong);box-shadow:none}[data-theme=dark][_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]::placeholder, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]::placeholder{color:var(--bulma-text);opacity:.7}[data-theme=dark][_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:focus, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:focus, [data-theme=dark][_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:focus-visible{border-color:var(--bulma-link);box-shadow:0 0 0 .125em #485fc733}[data-theme=dark][_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .button.is-light[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .button.is-light[_ngcontent-%COMP%]{background:transparent;border-color:var(--bulma-border);color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .button.is-light[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-rename-box[_ngcontent-%COMP%]   .button.is-light[_ngcontent-%COMP%]:hover{background:#ffffff0a}[data-theme=dark][_nghost-%COMP%]   .chat-folder-rename-actions[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-rename-actions[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}"],changeDetection:1})}return o}
3)()});function St(o){let g=new Date(o);return Number.isNaN(g.getTime())?"":new Intl.DateTimeFormat("fr-FR",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}).format(g)}var $t=$(()=>{"use strict"});function Cn(o,g){o&1&&(r(0,"p",3),h(1),d(2,"translate"),c()),o&2&&(i(),M(" ",l(2,1,"CHAT_CONVERSATION_LIST.EMPTY")," "))}function un(o,g){if(o&1){let t=V();r(0,"div",17),p("click",function(e){return e.stopPropagation()}),r(1,"button",18),p("click",function(){x(t);let e=m().$implicit,a=m();return y(a.startRenameConversation(e.id,e.title))}),u(2,"i",19),r(3,"span"),h(4),d(5,"translate"),c()(),r(6,"button",18),p("click",function(){x(t);let e=m().$implicit,a=m();return y(a.startMoveConversation(e.id,e.folderId))}),u(7,"i",20),r(8,"span"),h(9),d(10,"translate"),c()(),r(11,"button",21),p("click",function(){x(t);let e=m().$implicit,a=m();return y(a.deleteConversation(e.id))}),u(12,"i",22),r(13,"span"),h(14),d(15,"translate"),c()()()}o&2&&(i(4),k(l(5,3,"CHAT_CONVERSATION_LIST.RENAME")),i(5),k(l(10,5,"CHAT_CONVERSATION_LIST.MOVE")),i(5),k(l(15,7,"CHAT_CONVERSATION_LIST.DELETE")))}function bn(o,g){if(o&1&&(r(0,"option",27),h(1),c()),o&2){let t=m().$implicit;S("ngValue",t.id),i(),k(t.name)}}function Mn(o,g){if(o&1&&P(0,bn,2,2,"option",27),o&2){let t=g.$implicit;v(t.id!=="all"?0:-1)}}function On(o,g){if(o&1){let t=V();r(0,"div",23),p("click",function(e){return e.stopPropagation()}),r(1,"label",24),h(2),d(3,"translate"),c(),r(4,"div",25)(5,"select",26),Ct("ngModelChange",function(e){x(t);let a=m(2);
3return pt(a.moveConversationFolderId,e)||(a.moveConversationFolderId=e),y(e)}),r(6,"option",27),h(7),d(8,"translate"),c(),et(9,Mn,1,1,null,null,we),c(),_t(),c(),r(11,"div",28)(12,"button",29),p("click",function(){x(t);let e=m(2);return y(e.cancelMoveConversation())}),h(13),d(14,"translate"),c(),r(15,"button",30),p("click",function(){x(t);let e=m(2);return y(e.confirmMoveConversation())}),h(16),d(17,"translate"),c()()()}if(o&2){let t=m().$implicit,n=m();i(),S("for","moveConversationSelect-"+t.id),i(),M(" ",l(3,8,"CHAT_CONVERSATION_LIST.MOVE_LABEL")," "),i(3),S("id","moveConversationSelect-"+t.id),gt("ngModel",n.moveConversationFolderId),ht(),i(),S("ngValue","none"),i(),M(" ",l(8,10,"CHAT_CONVERSATION_LIST.NO_FOLDER")," "),i(2),nt(n.store.folders()),i(4),M(" ",l(14,12,"CHAT_CONVERSATION_LIST.CANCEL")," "),i(3),M(" ",l(17,14,"CHAT_CONVERSATION_LIST.SAVE")," ")}}function fn(o,g){if(o&1){let t=V();r(0,"div",6)(1,"button",7),p("click",function(){let e=x(t).$implicit,a=m();return y(a.openConversation(e.publicId))}),r(2,"span",8),h(3),c(),r(4,"span",9),h(5),d(6,"translate"),c(),r(7,"div",10)(8,"span",11),u(9,"i",12),h(10),c(),r(11,"span",13),h(12),c()()(),r(13,"button",14,0),d(15,"translate"),p("click",function(e){let a=x(t),_=a.$implicit,s=a.$index,C=m();return y(C.toggleConversationMenu(_.id,e,s))}),u(16,"i",15),c(),P(17,un,16,9,"div",16),P(18,On,18,16,"div",5),c()}if(o&2){let t=g.$implicit,n=m();B("is-active",n.store.selectedConversationId()===t.id),i(),b("aria-current",n.store.selectedConversationId()===t.id?"page":null),i(2),k(t.title),i(2),M(" ",t.preview||l(6,14,"CHAT_CONVERSATION_LIST.EMPTY_CONVERSATION")," "),i(5),M(" ",n.getFolderLabel(t.folderId)," "),i(2),M(" ",n.formatDate(t.updatedAt)," "),i(),B("is-open",n.openConversationMenuId()===t.id),b("aria-label",l(15,16,"CHAT_CONVERSATION_LIST.MENU_ARIA"))("aria-expanded",n.openConversationMenuId()===t.id)("tabindex",n.isMenuBtnVisible(t)?0:-1),i(4),v(n.openConversationMenuId()===t.id?17:-1),i(),v(n.moveConversationId()===t.id?18:-1)}}function Pn(o,g){if(o&1){let t=V();r(0,"div",5)(1,"label",31),h(2),d(3,"translate"),c(),r(4,"input",32),d(5,"translate"),Ct("ngModelChange",function(e){x(t);let a=m();return pt(a.renameConversationValue,e)||(a.renameConversationValue=e),y(e)}),p("keydown.enter",function(){x(t);let e=m();return y(e.confirmRenameConversation())}),c(),_t(),r(6,"div",28)(7,"button",29),p("click",function(){x(t);let e=m();return y(e.cancelRenameConversation())}),h(8),d(9,"translate"),c(),r(10,"button",33),p("click",function(){x(t);let e=m();return y(e.confirmRenameConversation())}),h(11),d(12,"translate"),c()()()}if(o&2){let t=m();i(2),M(" ",l(3,6,"CHAT_CONVERSATION_LIST.RENAME_LABEL")," "),i(2),gt("ngModel",t.renameConversationValue),S("placeholder",l(5,8,"CHAT_CONVERSATION_LIST.RENAME_PLACEHOLDER")),ht(),i(4),M(" ",l(9,10,"CHAT_CONVERSATION_LIST.CANCEL")," "),i(2),S("disabled",!t.renameConversationValue.trim()),i(),M(" ",l(12,12,"CHAT_CONVERSATION_LIST.SAVE")," ")}}var pn,we,Te,Ee=$(()=>{"use strict";T();ft();Dt();D();yt();Et();$t();T();ft();D();pn=["menuTrigger"],we=(o,g)=>g.id;Te=(()=>{class o{store=O(ct);ui=O(Pt);translate=O(st);router=O(xt);route=O(kt);menuTriggers;moveConversationId=L(null);moveConversationFolderId=L(null);openConversationMenuId=L(null);renameConversationId=L(null);renameConversationValue="";_activeMenuIndex=null;isMenuBtnVisible(t){return this.store.selectedConversationId()===t.id||this.openConversationMenuId()===t.id}closeMenus(){this.openConversationMenuId.set(null),this._activeMenuIndex=null}onEscape(){this.openConversationMenuId()!==null&&(this._restoreFocus(),this.openConversationMenuId.set(null),this._activeMenuIndex=null)}_restoreFocus(){if(this._activeMenuIndex===null)return;this.menuTriggers.toArray()[this._activeMenuIndex]?.nativeElement?.focus()}getFolderLabel(t){return t==null?this.translate.instant("CHAT_CONVERSATION_LIST.NO_FOLDER"):this.store.folders().find(e=>e.id===t)?.name||this.translate.instant("CHAT_CONVERSATION_LIST.NO_FOLDER")}startMoveConversation(t,n){this.moveConversationId.set(t),this.moveConversationFolderId.set(n??"none"),this.openConversationMenuId.set(null),this._activeMenuIndex=null,this.cancelRenameConversation()}cancelMoveConversation(){this.moveConversationId.set(null),this.moveConversationFolderId.set(null)}confirmMoveConversation(){return f(this,null,function*(){let t=this.moveConversationId(),n=this.moveConversationFolderId();if(t===null||n===null)return;let e=n==="none"?null:n;(yield this.store.changeConversationFolder(t,e))&&this.cancelMoveConversation()})}getLangFromRoute(){let t=this.route;for(;t;){let n=t.snapshot.paramMap.get("lang");if(n)return n;t=t.parent}return null}openConversation(t){return f(this,null,function*(){if(this.openConversationMenuId.set(null),this._activeMenuIndex=null,this.cancelRenameConversation(),this.cancelMoveConversation(),!(yield this.store.selectConversationByPublicId(t)))return;this.ui.closeMobileSidebar();let e=this.getLangFromRoute();if(e){yield this.router.navigate(["/",e,"ai-chat","conversation",t]);return}yield this.router.navigate(["/ai-chat","conversation",t])})}toggleConversationMenu(t,n,e){n.stopPropagation();let a=this.openConversationMenuId()===t;this.openConversationMenuId.set(a?null:t),this._activeMenuIndex=a?null:e}startRenameConversation(t,n){this.renameConversationId.set(t),this.renameConversationValue=n,this.openConversationMenuId.set(null),this._activeMenuIndex=null,this.cancelMoveConversation()}cancelRenameConversation(){this.renameConversationId.set(null),this.renameConversationValue=""}confirmRenameConversation(){return f(this,null,function*(){let t=this.renameConversationId();t===null||!(yield this.store.renameConversation(t,this.renameConversationValue))||this.cancelRenameConversation()})}deleteConversation(t){return f(this,null,function*(){let n=this.store.selectedConversationId()===t;if(yield this.store.deleteConversation(t),this.openConversationMenuId.set(null),this._activeMenuIndex=null,this.cancelRenameConversation(),this.cancelMoveConversation(),n){let e=this.getLangFromRoute();if(e){yield this.router.navigate(["/",e,"ai-chat"]);return}yield this.router.navigate(["/ai-chat"])}})}formatDate(t){return St(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-conversation-list"]],viewQuery:function(n,e){if(n&1&&rt(pn,5),n&2){let a;j(a=Q())&&(e.menuTriggers=a)}},hostBindings:function(n,e){n&1&&p("click",function(){return e.closeMenus()}
3,tt)("keydown.escape",function(){return e.onEscape()},tt)},decls:6,vars:2,consts:[["menuTrigger",""],["aria-labelledby","chat-conversations-title",1,"chat-section"],[1,"chat-conversation-list"],[1,"chat-conversation-list__empty"],[1,"chat-conversation-card",3,"is-active"],["aria-live","polite",1,"chat-conversation-rename-box"],[1,"chat-conversation-card"],["type","button",1,"chat-conversation-item",3,"click"],[1,"chat-conversation-item__title"],[1,"chat-conversation-item__preview"],[1,"chat-conversation-item__meta"],[1,"chat-conversation-item__folder"],["aria-hidden","true",1,"pi","pi-folder"],["aria-hidden","true",1,"chat-conversation-item__date"],["type","button","aria-haspopup","menu",1,"chat-conversation-menu-btn",3,"click"],["aria-hidden","true",1,"pi","pi-ellipsis-h"],["role","menu",1,"chat-conversation-menu"],["role","menu",1,"chat-conversation-menu",3,"click"],["type","button","role","menuitem",3,"click"],["aria-hidden","true",1,"pi","pi-pencil"],["aria-hidden","true",1,"pi","pi-folder-open"],["type","button","role","menuitem",1,"is-danger",3,"click"],["aria-hidden","true",1,"pi","pi-trash"],["aria-live","polite",1,"chat-conversation-rename-box",3,"click"],[1,"chat-conversation-rename-box__label",3,"for"],[1,"select","is-small","is-fullwidth"],[3,"ngModelChange","id","ngModel"],[3,"ngValue"],[1,"chat-conversation-rename-actions"],["type","button",1,"button","is-small","is-light",3,"click"],["type","button",1,"button","is-small","is-link",3,"click"],["for","renameConversationInput",1,"chat-conversation-rename-box__label"],["id","renameConversationInput","type","text","maxlength","120",1,"input","is-small",3,"ngModelChange","keydown.enter","ngModel","placeholder"],["type","button",1,"button","is-small","is-link",3,"click","disabled"]],template:function(n,e){n&1&&(r(0,"section",1)(1,"div",2),P(2,Cn,3,3,"p",3),et(3,fn,19,18,"div",4,we),P(5,Pn,13,14,"div",5),c()()),n&2&&(i(2),v(e.store.filteredConversations().length===0?2:-1),i(),nt(e.store.filteredConversations()),i(2),v(e.renameConversationId()!==null?5:-1))},dependencies:[Ot,Pe,ve,ut,fe,bt,Vt,Mt,R,F],styles:[".chat-conversation-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.chat-conversation-list__empty[_ngcontent-%COMP%]{margin:0;padding:.75rem;color:#6b7280;font-size:.9rem;border:1px dashed #dbe4ee;border-radius:.75rem}.chat-conversation-card[_ngcontent-%COMP%]{position:relative}.chat-conversation-card.is-active[_ngcontent-%COMP%]   .chat-conversation-item[_ngcontent-%COMP%]{border-color:#6c63ff;background:#f8f7ff}.chat-conversation-item[_ngcontent-%COMP%]{width:100%;text-align:left;border:1px solid #e5e7eb;background:#fff;border-radius:5px;padding:.8rem 2.7rem .8rem .8rem;cursor:pointer;display:flex;flex-direction:column;gap:.35rem;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease}.chat-conversation-item[_ngcontent-%COMP%]:hover{background:#fafbff;border-color:#d7dcf6}.chat-conversation-item[_ngcontent-%COMP%]:focus-visible{outline:2px solid #6c63ff;outline-offset:2px}.chat-conversation-item__title[_ngcontent-%COMP%]{font-weight:700;color:#111827;font-size:.95rem;padding-right:.25rem}.chat-conversation-item__preview[_ngcontent-%COMP%]{color:#6b7280;font-size:.85rem;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.chat-conversation-item__date[_ngcontent-%COMP%]{color:#94a3b8;font-size:.75rem}.chat-conversation-menu-btn[_ngcontent-%COMP%]{position:absolute;top:.65rem;right:.55rem;width:28px;height:28px;border:none;background:transparent;color:#94a3b8;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .18s ease,background-color .18s ease,color .18s ease}.chat-conversation-card[_ngcontent-%COMP%]:hover   .chat-conversation-menu-btn[_ngcontent-%COMP%], .chat-conversation-menu-btn[_ngcontent-%COMP%]:focus-visible, .chat-conversation-menu-btn.is-open[_ngcontent-%COMP%], .chat-conversation-card.is-active[_ngcontent-%COMP%]   .chat-conversation-menu-btn[_ngcontent-%COMP%]{opacity:1}.chat-conversation-menu-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid #6c63ff;outline-offset:2px}.chat-conversation-menu-btn[_ngcontent-%COMP%]:hover{background:#f1f5f9;color:#475569}.chat-conversation-menu[_ngcontent-%COMP%]{position:absolute;top:2.35rem;right:.55rem;min-width:158px;background:#fff;background-image:none;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 10px 24px #0f172a1f;padding:.35rem;z-index:40}.chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:100%;border:none;background:transparent;display:flex;align-items:center;gap:.45rem;padding:.6rem .7rem;border-radius:8px;
3cursor:pointer;text-align:left;color:#334155;font-size:.82rem;font-weight:500}.chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus-visible{outline:2px solid #6c63ff;outline-offset:2px}.chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.78rem;width:.9rem;display:inline-flex;align-items:center;justify-content:center;flex:0 0 .9rem}.chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{background:#f8fafc}.chat-conversation-menu[_ngcontent-%COMP%]   button.is-danger[_ngcontent-%COMP%]{color:#dc2626}.chat-conversation-rename-box[_ngcontent-%COMP%]{margin-top:.35rem;padding:.85rem;border:1px solid #e5e7eb;border-radius:.85rem;background:#fafafa}.chat-conversation-rename-box__label[_ngcontent-%COMP%]{display:block;margin-bottom:.45rem;font-size:.82rem;font-weight:600;color:#475569}.chat-conversation-rename-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.65rem}.chat-conversation-item__meta[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap}.chat-conversation-item__folder[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;font-size:.74rem;color:#6366f1;background:#eef2ff;border:1px solid #dbe4ff;padding:.22rem .5rem;border-radius:999px}.chat-conversation-item__folder[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.72rem}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-list__empty[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-list__empty[_ngcontent-%COMP%]{color:var(--bulma-text);border-color:var(--bulma-border);background:#ffffff05}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-item[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-item[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-text-strong);box-shadow:none}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-item[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-item[_ngcontent-%COMP%]:hover{background:#485fc70f;border-color:color-mix(in srgb,var(--bulma-link) 35%,var(--bulma-border))}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-item[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-item[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-card.is-active[_ngcontent-%COMP%]   .chat-conversation-item[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-card.is-active[_ngcontent-%COMP%]   .chat-conversation-item[_ngcontent-%COMP%]{background:#485fc71f;border-color:var(--bulma-link);box-shadow:0 0 0 1px #485fc72e}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-item__title[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-item__title[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-item__preview[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-item__preview[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.85}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-item__date[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-item__date[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.72}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-menu-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-menu-btn[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.82}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-menu-btn[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-menu-btn[_ngcontent-%COMP%]:hover{background:#485fc714;color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-menu-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-menu-btn[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%]{background:#14161a!important;border:1px solid var(--bulma-border)!important;box-shadow:0 14px 30px #0000006b!important}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background:#14161a!important;color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover{background:#485fc714!important}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%]   button.is-danger[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-menu[_ngcontent-%COMP%]   button.is-danger[_ngcontent-%COMP%]{color:#f87171}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border)}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-rename-box__label[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-rename-box__label[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .select[_ngcontent-%COMP%]   select[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .select[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-text-strong);box-shadow:none}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]::placeholder, [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]::placeholder{color:var(--bulma-text);opacity:.7}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:focus, [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:focus{border-color:var(--bulma-link);box-shadow:0 0 0 .125em #485fc733}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .button.is-light[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .button.is-light[_ngcontent-%COMP%]{background:transparent;border-color:var(--bulma-border);color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .button.is-light[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-rename-box[_ngcontent-%COMP%]   .button.is-light[_ngcontent-%COMP%]:hover{background:#ffffff0a}[data-theme=dark][_nghost-%COMP%]   .chat-conversation-item__folder[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-conversation-item__folder[_ngcontent-%COMP%]{color:var(--bulma-link);background:#485fc71f;border-color:#485fc73d}"],changeDetection:1})}return o}
3)()});function xn(o,g){if(o&1&&(r(0,"p",21),h(1),c()),o&2){let t=m();i(),M(" ",t.errorMessage," ")}}var vn,kn,Se,Ie=$(()=>{"use strict";T();ft();D();T();ft();D();vn=["folderInput"],kn=["closeBtn"];Se=(()=>{class o{translate=O(st);visible=!1;existingNames=[];visibleChange=new J;createFolder=new J;folderInput;closeBtn;_triggerEl=null;folderName="";errorMessage="";ngOnChanges(t){t.visible&&(this.visible?(this._triggerEl=document.activeElement,setTimeout(()=>this.folderInput?.nativeElement?.focus(),50)):setTimeout(()=>this._triggerEl?.focus(),50))}onEscape(){this.visible&&this.close()}close(){this.folderName="",this.errorMessage="",this.visibleChange.emit(!1)}submit(){let t=this.folderName.trim();if(!t){this.errorMessage=this.translate.instant("CHAT_CREATE_FOLDER_DIALOG.ERROR.REQUIRED");return}if(this.existingNames.some(e=>e.trim().toLowerCase()===t.toLowerCase())){this.errorMessage=this.translate.instant("CHAT_CREATE_FOLDER_DIALOG.ERROR.DUPLICATE");return}this.createFolder.emit(t),this.folderName="",this.errorMessage="",this.visibleChange.emit(!1)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-create-folder-dialog"]],viewQuery:function(n,e){if(n&1&&rt(vn,5)(kn,5),n&2){let a;j(a=Q())&&(e.folderInput=a.first),j(a=Q())&&(e.closeBtn=a.first)}},hostBindings:function(n,e){n&1&&p("keydown.escape",function(){return e.onEscape()},tt)},inputs:{visible:"visible",existingNames:"existingNames"},outputs:{visibleChange:"visibleChange",createFolder:"createFolder"},features:[Tt],decls:43,vars:31,consts:[["modalCard",""],["closeBtn",""],["folderInput",""],[1,"modal"],[1,"modal-background",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","create-folder-title","aria-describedby","folderNameHelp",1,"modal-card","chat-folder-modal"],[1,"modal-card-head","chat-folder-modal__head"],[1,"chat-folder-modal__title-wrap"],["id","create-folder-title",1,"modal-card-title","chat-folder-modal__title"],["aria-hidden","true",1,"pi","pi-folder"],[1,"chat-folder-modal__subtitle"],["type","button",1,"chat-folder-modal__close",3,"click"],["aria-hidden","true",1,"pi","pi-times"],[1,"modal-card-body","chat-folder-modal__body"],[1,"field"],["for","folderName",1,"label","chat-folder-modal__label"],[1,"control","has-icons-left"],["id","folderName","type","text","maxlength","80",1,"input","chat-folder-modal__input",3,"ngModelChange","keydown.enter","placeholder","ngModel"],["aria-hidden","true",1,"icon","is-small","is-left","chat-folder-modal__input-icon"],[1,"pi","pi-folder"],["id","folderNameHelp",1,"help","chat-folder-modal__help"],["id","folderNameError","role","alert",1,"help","is-danger","chat-folder-modal__error"],[1,"modal-card-foot","chat-folder-modal__foot"],["type","button",1,"button","is-light","chat-folder-modal__cancel",3,"click"],["type","button",1,"button","is-link","chat-folder-modal__submit",3,"click","disabled"],[1,"icon","is-small"],["aria-hidden","true",1,"pi","pi-check"]],template:function(n,e){if(n&1){let a=V();r(0,"div",3)(1,"div",4),p("click",function(){return e.close()}),c(),r(2,"div",5,0)(4,"header",6)(5,"div",7)(6,"h2",8),u(7,"i",9),r(8,"span"),h(9),d(10,"translate"),c()(),r(11,"p",10),h(12),d(13,"translate"),c()(),r(14,"button",11,1),d(16,"translate"),p("click",function(){return e.close()}),u(17,"i",12),c()(),r(18,"section",13)(19,"div",14)(20,"label",15),h(21),d(22,"translate"),c(),r(23,"div",16)(24,"input",17,2),d(26,"translate"),Ct("ngModelChange",function(s){return x(a),pt(e.folderName,s)||(e.folderName=s),y(s)}),p("keydown.enter",function(){return e.submit()}),c(),_t(),r(27,"span",18),u(28,"i",19),c()(),r(29,"p",20),h(30),d(31,"translate"),c(),P(32,xn,2,1,"p",21),c()(),r(33,"footer",22)(34,"button",23),p("click",function(){return e.close()}),h(35),d(36,"translate"),c(),r(37,"button",24),p("click",function(){return e.submit()}),r(38,"span",25),u(39,"i",26),c(),r(40,"span"),h(41),d(42,"translate"),c()()()()()}n&2&&(B("is-active",e.visible),i(9),k(l(10,15,"CHAT_CREATE_FOLDER_DIALOG.TITLE")),i(3),M(" ",l(13,17,"CHAT_CREATE_FOLDER_DIALOG.SUBTITLE")," "),i(2),b("aria-label",l(16,19,"CHAT_CREATE_FOL
3DER_DIALOG.CLOSE_ARIA")),i(7),M(" ",l(22,21,"CHAT_CREATE_FOLDER_DIALOG.LABEL")," "),i(3),S("placeholder",l(26,23,"CHAT_CREATE_FOLDER_DIALOG.PLACEHOLDER")),gt("ngModel",e.folderName),b("aria-describedby",e.errorMessage?"folderNameError":"folderNameHelp")("aria-invalid",!!e.errorMessage),ht(),i(6),M(" ",l(31,25,"CHAT_CREATE_FOLDER_DIALOG.HELP")," "),i(2),v(e.errorMessage?32:-1),i(3),M(" ",l(36,27,"CHAT_CREATE_FOLDER_DIALOG.CANCEL")," "),i(2),S("disabled",!e.folderName.trim()),i(4),k(l(42,29,"CHAT_CREATE_FOLDER_DIALOG.SUBMIT")))},dependencies:[Ot,ut,bt,Vt,Mt,R,F],styles:["[_nghost-%COMP%]     .modal.is-active{z-index:1100!important}[_nghost-%COMP%]     .modal.is-active .modal-background{z-index:1100!important}[_nghost-%COMP%]     .modal.is-active .modal-card{z-index:1101!important}.chat-folder-modal[_ngcontent-%COMP%]{width:min(92vw,30rem);border-radius:18px;overflow:hidden;box-shadow:0 20px 48px #0f172a38;border:1px solid #e5e7eb;background:#fff}.chat-folder-modal__head[_ngcontent-%COMP%]{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1rem 1.25rem .95rem;background:#fff;border-bottom:1px solid #edf2f7}.chat-folder-modal__title-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:0;padding-right:2.5rem}.chat-folder-modal__title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.55rem;margin:0;color:#111827;font-size:1.02rem;font-weight:700;line-height:1.25}.chat-folder-modal__title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:#4f46e5;font-size:.92rem;flex:0 0 auto}.chat-folder-modal__subtitle[_ngcontent-%COMP%]{margin:0;font-size:.86rem;color:#6b7280;line-height:1.4}.chat-folder-modal__close[_ngcontent-%COMP%]{position:absolute;top:.9rem;right:1rem;width:2rem;height:2rem;border:none;background:transparent;color:#6b7280;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .18s ease,color .18s ease}.chat-folder-modal__close[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.9rem}.chat-folder-modal__close[_ngcontent-%COMP%]:hover{background:#f3f4f6;color:#111827}.chat-folder-modal__close[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4f46e5;outline-offset:2px}.chat-folder-modal__body[_ngcontent-%COMP%]{padding:1.1rem 1.25rem 1rem;background:#fff}.chat-folder-modal__label[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:#374151;margin-bottom:.5rem}.chat-folder-modal__input[_ngcontent-%COMP%]{height:2.5rem;font-size:.92rem;border-radius:10px;box-shadow:none}.chat-folder-modal__input[_ngcontent-%COMP%]::placeholder{font-size:.84rem;color:#767676}.chat-folder-modal__input-icon[_ngcontent-%COMP%]{color:#9ca3af}.chat-folder-modal__help[_ngcontent-%COMP%]{color:#6b7280;font-size:.8rem;margin-top:.45rem}.chat-folder-modal__error[_ngcontent-%COMP%]{font-size:.8rem;margin-top:.35rem}.chat-folder-modal__foot[_ngcontent-%COMP%]{justify-content:flex-end;gap:.65rem;padding:.95rem 1.25rem 1.15rem;border-top:1px solid #edf2f7;background:#fff}.chat-folder-modal__cancel[_ngcontent-%COMP%], .chat-folder-modal__submit[_ngcontent-%COMP%]{min-width:6rem;height:2.45rem;border-radius:10px;font-size:.92rem;font-weight:600}.chat-folder-modal__cancel[_ngcontent-%COMP%]:focus-visible, .chat-folder-modal__submit[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4f46e5;outline-offset:2px}@media(max-width:1023px){[_nghost-%COMP%]     .modal.is-active{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important}[_nghost-%COMP%]     .modal.is-active .modal-background{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important}.chat-folder-modal[_ngcontent-%COMP%]{width:calc(100vw - 2.5rem)!important;max-width:340px!important;border-radius:14px;margin:0!important}.chat-folder-modal__head[_ngcontent-%COMP%]{padding:.85rem 1rem .8rem}.chat-folder-modal__title[_ngcontent-%COMP%]{font-size:.95rem}.chat-folder-modal__subtitle[_ngcontent-%COMP%]{font-size:.8rem}.chat-folder-modal__body[_ngcontent-%COMP%]{padding:.9rem 1rem}.chat-folder-modal__foot[_ngcontent-%COMP%]{padding:.8rem 1rem 1rem;flex-wrap:wrap;gap:.5rem}.chat-folder-modal__foot[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{flex:1 1 auto}}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal[_ngcontent-%COMP%]{background:#111827;border:1px solid rgba(255,255,255,.12);box-shadow:0 20px 48px #0009}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__head[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__head[_ngcontent-%COMP%]{background:#111827;border-bottom:1px solid rgba(255,255,255,.08)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__body[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__body[_ngcontent-%COMP%]{background:#111827;background-image:none!important}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__foot[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__foot[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);background-image:none;border-top:1px solid var(--bulma-border)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__title[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__title[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__subtitle[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__subtitle[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.92}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__close[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__close[_ngcontent-%COMP%]{color:var(--bulma-text)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__close[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__close[_ngcontent-%COMP%]:hover{background:#485fc714;color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__close[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__close[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__label[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__label[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__input[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__input[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border:1px solid var(--bulma-border);color:var(--bulma-text-strong);box-shadow:none}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__input[_ngcontent-%COMP%]::placeholder, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__input[_ngcontent-%COMP%]::placeholder{color:#ffffff8c}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__input[_ngcontent-%COMP%]:focus, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__input[_ngcontent-%COMP%]:focus{border-color:var(--bulma-link);box-shadow:0 0 0 .125em #485fc738}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__input-icon[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__input-icon[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.8}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__help[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__help[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.82}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__cancel.button.is-light[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__cancel.button.is-light[_ngcontent-%COMP%]{background:transparent;border:1px solid var(--bulma-border);color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__cancel.button.is-light[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__cancel.button.is-light[_ngcontent-%COMP%]:hover{background:#ffffff0a}[data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__cancel[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__cancel[_ngcontent-%COMP%]:focus-visible, [data-theme=dark][_nghost-%COMP%]   .chat-folder-modal__submit[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-folder-modal__submit[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}"],changeDetection:1})}return o}
3)()});function En(o,g){o&1&&(r(0,"div",9)(1,"div",31)(2,"div",32),u(3,"i",33),r(4,"span"),h(5),d(6,"translate"),c()(),r(7,"span",34),h(8),d(9,"translate"),c()()()),o&2&&(i(5),k(l(6,2,"CHAT_SIDEBAR.QUOTA_LABEL")),i(3),M(" ",l(9,4,"CHAT_SIDEBAR.QUOTA_LOADING")," "))}function Sn(o,g){o&1&&(r(0,"p",44),h(1),d(2,"translate"),c()),o&2&&(i(),M(" ",l(2,1,"CHAT_SIDEBAR.QUOTA_EXCEEDED")," "))}function In(o,g){if(o&1&&(r(0,"div",35)(1,"div",31)(2,"div",32),u(3,"i",36),r(4,"span"),h(5),d(6,"translate"),c()()(),r(7,"div",37)(8,"div",38)(9,"strong"),h(10),c(),r(11,"span"),h(12),d(13,"translate"),c()(),r(14,"div",39),h(15),d(16,"translate"),c()(),r(17,"div",40),d(18,"translate"),u(19,"span",41),c(),r(20,"p",42),u(21,"i",43),r(22,"span"),h(23),d(24,"date"),d(25,"translate"),c()(),P(26,Sn,3,3,"p",44),c()),o&2){let t=g,n=m();B("chat-sidebar__quota--danger",n.store.quotaExceeded()),i(3),S("ngClass",n.store.quotaExceeded()?"pi-exclamation-circle":"pi-bolt"),i(2),k(l(6,16,"CHAT_SIDEBAR.QUOTA_LABEL")),i(5),k(t.remaining),i(2),k(Rt(13,18,"CHAT_SIDEBAR.QUOTA_REMAINING",Nt(32,yn,t.limit))),i(3),M(" ",Rt(16,21,"CHAT_SIDEBAR.QUOTA_USED",Nt(34,wn,t.used))," "),i(2),b("aria-label",l(18,24,"CHAT_SIDEBAR.QUOTA_PROGRESS_ARIA"))("aria-valuemin",0)("aria-valuemax",t.limit)("aria-valuenow",t.used)("aria-valuetext",t.used+" / "+t.limit),i(2),re("width",t.limit?t.used/t.limit*100:0,"%"),i(4),k(Rt(25,29,"CHAT_SIDEBAR.QUOTA_RESET",Nt(36,Tn,Rt(24,26,t.resetsAt,"dd/MM/yyyy")))),i(3),v(n.store.quotaExceeded()?26:-1)}}var yn,wn,Tn,Ae,Fe=$(()=>{"use strict";Kt();T();Dt();ft();D();yt();Et();ye();Ee();Ie();T();Kt();ft();D();yn=o=>({limit:o}),wn=o=>({used:o}),Tn=o=>({date:o});Ae=(()=>{class o{store=O(ct);ui=O(Pt);router=O(xt);route=O(kt);createFolderModalOpen=!1;existingFolderNames=vt(()=>this.store.folders().map(t=>t.name));ngOnInit(){this.store.init()}createConversation(){return f(this,null,function*(){let t=yield this.store.createConversation();t&&(this.ui.closeMobileSidebar(),yield this.router.navigate(["conversation",t.publicId],{relativeTo:this.route}))})}openCreateFolderModal(){this.createFolderModalOpen=!0}handleCreateFolder(t){this.store.createFolder(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-sidebar"]],decls:51,vars:33,consts:[["aria-label","Barre lat\xE9rale du chat",1,"chat-sidebar"],[1,"chat-sidebar__scroll"],[1,"chat-sidebar__top"],[1,"chat-sidebar__title-wrap"],["aria-hidden","true",1,"chat-sidebar__title-icon"],[1,"pi","pi-sparkles"],[1,"chat-sidebar__title-content"],[1,"chat-sidebar__title"],[1,"chat-sidebar__subtitle"],["aria-live","polite",1,"chat-sidebar__quota","chat-sidebar__quota--loading"],["aria-live","polite",1,"chat-sidebar__quota",3,"chat-sidebar__quota--danger"],["type","button",1,"button","is-link","is-fullwidth","chat-sidebar__new-chat",3,"click","disabled"],["aria-hidden","true",1,"icon","chat-sidebar__new-chat-icon"],[1,"pi","pi-plus"],[1,"chat-sidebar__new-chat-label"],[1,"chat-sidebar__search"],["for","chat-search",1,"label","is-size-7","mb-2"],[1,"control","has-icons-left"],["id","chat-search","type","search","autocomplete","off",1,"input",3,"ngModelChange","ngModel","placeholder"],["aria-hidden","true",1,"icon","is-left"],[1,"pi","pi-search"],[1,"chat-sidebar__section"],[1,"chat-sidebar-section-head"],["aria-hidden","true",1,"chat-sidebar-section-title"],[1,"pi","pi-folder"],["type","button",1,"chat-sidebar-section-add",3,"click"],["aria-hidden","true",1,"pi","pi-plus"],[1,"chat-sidebar__section","chat-sidebar__section--conversations"],[1,"chat-sidebar-section-head","chat-sidebar-section-head--static"],[1,"pi","pi-comments"],[3,"visibleChange","createFolder","visible","existingNames"],[1,"chat-sidebar__quota-head"],[1,"chat-sidebar__quota-label"],["aria-hidden","true",1,"pi","pi-bolt"],[1,"chat-sidebar__quota-badge"],["aria-live","polite",1,"chat-sidebar__quota"],["aria-hidden","true",1,"pi",3,"ngClass"],[1,"chat-sidebar__quota-stats"],[1,"chat-sidebar__quota-main"],["aria-hidden","true",1,"chat-sidebar__quota-used"],["role","progressbar",1,"chat-sidebar__quota-progress"],[1,"chat-sidebar__quota-progress-bar"],[1,"chat-sidebar__quota-reset"],["aria-hidden","true",1,"pi","pi-calendar"],["role","alert",1,"chat-sidebar__quota-alert"]],template:function(n,e){if(n&1&&(r(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),u(5,"i",5),c(),r(6,"div",6)(7,"h1",7),h(8),d(9,"translate"),c(),r(10,"p",8),h(11),d(12,"translate"),c()()(),P(13,En,10,6,"div",9)(14,In,27,38,"div",10),r(15,"button",11),d(16,"translate"),p("click",function(){return e.createConversation()}),r(17,"span",12),u(18,"i",13),c(),r(19,"span",14),h(20),d(21,"translate"),c()()(),r(22,"div",15)(23,"label",16),h(24),d(25,"translate"),c(),r(26,"div",17)(27,"input",18),d(28,"translate"),p("ngModelChange",function(_){return e.store.setSearchTerm(_)}),c(),_t(),r(29,"span",19),u(30,"i",20),c()()(),r(31,"div",21)(32,"div",22)(33,"div",23),u(34,"i",24),r(35,"span"),h(36),d(37,"translate"),c()(),r(38,"button",25),d(39,"translate"),p("click",function(){return e.openCreateFolderModal()}
3),u(40,"i",26),c()(),u(41,"app-chat-folder-list"),c(),r(42,"div",27)(43,"div",28)(44,"div",23),u(45,"i",29),r(46,"span"),h(47),d(48,"translate"),c()()(),u(49,"app-chat-conversation-list"),c()()(),r(50,"app-chat-create-folder-dialog",30),Ct("visibleChange",function(_){return pt(e.createFolderModalOpen,_)||(e.createFolderModalOpen=_),_}),p("createFolder",function(_){return e.handleCreateFolder(_)}),c()),n&2){let a;i(8),k(l(9,15,"CHAT_SIDEBAR.TITLE")),i(3),k(l(12,17,"CHAT_SIDEBAR.SUBTITLE")),i(2),v(e.store.loadingQuota()?13:(a=e.store.quota())?14:-1,a),i(2),S("disabled",e.store.quotaExceeded()||null),b("aria-label",l(16,19,"CHAT_SIDEBAR.NEW_CHAT_ARIA"))("aria-disabled",e.store.quotaExceeded()),i(5),k(l(21,21,"CHAT_SIDEBAR.NEW_CHAT")),i(4),k(l(25,23,"CHAT_SIDEBAR.SEARCH_LABEL")),i(3),S("ngModel",e.store.searchTerm())("placeholder",l(28,25,"CHAT_SIDEBAR.SEARCH_PLACEHOLDER")),ht(),i(9),k(l(37,27,"CHAT_SIDEBAR.FOLDERS_TITLE")),i(2),b("aria-label",l(39,29,"CHAT_SIDEBAR.ADD_FOLDER_ARIA")),i(9),k(l(48,31,"CHAT_SIDEBAR.CONVERSATIONS_TITLE")),i(3),gt("visible",e.createFolderModalOpen),S("existingNames",e.existingFolderNames())}},dependencies:[de,se,Ot,ut,bt,Mt,R,xe,Te,Se,ce,F],styles:["[_nghost-%COMP%]{display:block;height:100%}.chat-sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;background:#fff}.chat-sidebar__scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:1rem;padding:1rem;scrollbar-width:thin;scrollbar-color:#c7d2fe transparent}.chat-sidebar__top[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.9rem}.chat-sidebar__title-wrap[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.75rem}.chat-sidebar__title-icon[_ngcontent-%COMP%]{flex:0 0 auto;width:2.1rem;height:2.1rem;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;background:#eef2ff;color:#4f46e5;font-size:1rem}.chat-sidebar__title-content[_ngcontent-%COMP%]{min-width:0}.chat-sidebar__title[_ngcontent-%COMP%]{margin:0;font-size:1.125rem;font-weight:700;color:#1f2937;line-height:1.2}.chat-sidebar__subtitle[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.875rem;color:#6b7280}.chat-sidebar__quota[_ngcontent-%COMP%]{padding:.85rem .9rem;border:1px solid #e5e7eb;border-radius:14px;background:linear-gradient(180deg,#fafbff,#f5f7ff);box-shadow:0 6px 18px #4f46e50f}.chat-sidebar__quota--loading[_ngcontent-%COMP%]{background:#fafafa;box-shadow:none}.chat-sidebar__quota--danger[_ngcontent-%COMP%]{border-color:#fecaca;background:linear-gradient(180deg,#fff8f8,#fff1f1);box-shadow:0 6px 18px #ef444414}.chat-sidebar__quota-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.6rem}.chat-sidebar__quota-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.45rem;font-size:.8rem;font-weight:700;color:#374151}.chat-sidebar__quota-label[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.9rem;color:#4f46e5}.chat-sidebar__quota--danger[_ngcontent-%COMP%]   .chat-sidebar__quota-label[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:#dc2626}.chat-sidebar__quota-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-height:1.4rem;padding:.15rem .5rem;border-radius:999px;background:#e0e7ff;color:#4338ca;font-size:.72rem;font-weight:700;letter-spacing:.03em}.chat-sidebar__quota--danger[_ngcontent-%COMP%]   .chat-sidebar__quota-badge[_ngcontent-%COMP%]{background:#fee2e2;color:#b91c1c}.chat-sidebar__quota-stats[_ngcontent-%COMP%]{display:flex;align-items:flex-end;justify-content:space-between;gap:.75rem;margin-bottom:.65rem}.chat-sidebar__quota-main[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.35rem;min-width:0;color:#1f2937}.chat-sidebar__quota-main[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-size:1.15rem;line-height:1;font-weight:800}.chat-sidebar__quota-main[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.8rem;color:#6b7280}.chat-sidebar__quota-used[_ngcontent-%COMP%]{font-size:.74rem;color:#6b7280;white-space:nowrap}.chat-sidebar__quota-progress[_ngcontent-%COMP%]{position:relative;width:100%;height:8px;overflow:hidden;border-radius:999px;background:#e5e7eb;margin-bottom:.65rem}
3.chat-sidebar__quota-progress-bar[_ngcontent-%COMP%]{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#6366f1,#4f46e5);transition:width .25s ease}.chat-sidebar__quota--danger[_ngcontent-%COMP%]   .chat-sidebar__quota-progress-bar[_ngcontent-%COMP%]{background:linear-gradient(90deg,#f87171,#dc2626)}.chat-sidebar__quota-reset[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;margin:0;font-size:.73rem;color:#6b7280}.chat-sidebar__quota-reset[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.78rem}.chat-sidebar__quota-alert[_ngcontent-%COMP%]{margin:.55rem 0 0;font-size:.74rem;font-weight:600;color:#b91c1c}.chat-sidebar__new-chat[_ngcontent-%COMP%]{min-height:2.5rem;padding:.55rem .9rem;font-weight:600;font-size:.95rem;line-height:1}.chat-sidebar__new-chat[disabled][_ngcontent-%COMP%]{opacity:.7;cursor:not-allowed}.chat-sidebar__new-chat[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.chat-sidebar__new-chat-icon[_ngcontent-%COMP%]{width:1rem;height:1rem;margin-right:.2rem}.chat-sidebar__new-chat-icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.85rem}.chat-sidebar__new-chat-label[_ngcontent-%COMP%]{font-size:.95rem}.chat-sidebar__search[_ngcontent-%COMP%]{padding-bottom:.75rem;border-bottom:1px solid #eef2f7}.chat-sidebar__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.chat-sidebar__section--conversations[_ngcontent-%COMP%]{min-height:0}.chat-sidebar-section-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.15rem}.chat-sidebar-section-head--static[_ngcontent-%COMP%]{justify-content:flex-start}.chat-sidebar-section-title[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.45rem;font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:#6b7280;line-height:1}.chat-sidebar-section-title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.9rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;transform:translateY(-1px)}.chat-sidebar-section-add[_ngcontent-%COMP%]{width:24px;height:24px;border:1px solid #dbe4ee;background:#fff;color:#4f46e5;border-radius:3px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s ease,border-color .2s ease,color .2s ease,box-shadow .2s ease}.chat-sidebar-section-add[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.7rem}.chat-sidebar-section-add[_ngcontent-%COMP%]:hover{background:#f8faff;border-color:#cfd8ff;box-shadow:0 2px 8px #4f46e514}.chat-sidebar-section-add[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar[_ngcontent-%COMP%]{background:var(--bulma-box-background-color)}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__scroll[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__scroll[_ngcontent-%COMP%]{scrollbar-color:rgba(72,95,199,.35) transparent}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__title-icon[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__title-icon[_ngcontent-%COMP%]{background:#485fc729;color:var(--bulma-link);border:1px solid rgba(72,95,199,.28)}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__title[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__title[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__subtitle[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__subtitle[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.85}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota[_ngcontent-%COMP%]{background:linear-gradient(180deg,#485fc71f,#485fc70f);border-color:var(--bulma-border);box-shadow:none}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota--danger[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota--danger[_ngcontent-%COMP%]{background:linear-gradient(180deg,#dc262629,#dc262614);border-color:#f8717147}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota-label[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota-label[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota-main[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota-main[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota-main[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota-main[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota-used[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota-used[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota-reset[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota-reset[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.85}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota-badge[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota-badge[_ngcontent-%COMP%]{background:#485fc738;color:#c7d2fe}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota--danger[_ngcontent-%COMP%]   .chat-sidebar__quota-badge[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota--danger[_ngcontent-%COMP%]   .chat-sidebar__quota-badge[_ngcontent-%COMP%]{background:#dc26262e;color:#fecaca}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__quota-progress[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__quota-progress[_ngcontent-%COMP%]{background:#ffffff14}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]{border-bottom:1px solid var(--bulma-border)}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-text-strong);box-shadow:none}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]::placeholder, [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]::placeholder{color:var(--bulma-text);opacity:.7}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:focus, [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:focus{border-color:var(--bulma-link);box-shadow:0 0 0 .125em #485fc733;color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .icon.is-left[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__search[_ngcontent-%COMP%]   .icon.is-left[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.8}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar-section-title[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar-section-title[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.9}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar-section-title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar-section-title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar-section-add[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar-section-add[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar-section-add[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar-section-add[_ngcontent-%COMP%]:hover{background:#485fc714;border-color:var(--bulma-link);color:var(--bulma-link);box-shadow:0 2px 8px #0003}[data-theme=dark][_nghost-%COMP%]   .chat-sidebar-section-add[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar-section-add[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--bulma-link);outline-offset:2px}
3[data-theme=dark][_nghost-%COMP%]   .chat-sidebar__new-chat[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-sidebar__new-chat[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}"],changeDetection:1})}return o})()});var An,Re,De=$(()=>{"use strict";T();Kt();Dt();D();Fe();yt();Et();T();D();An=["closeBtn"],Re=(()=>{class o{store=O(ct);ui=O(Pt);platformId=O(ee);closeBtn;_triggerEl=null;_isMobile=!1;constructor(){Yt(this.platformId)&&(this._isMobile=window.innerWidth<=1023)}onResize(){Yt(this.platformId)&&(this._isMobile=window.innerWidth<=1023)}isMobileDrawerClosed(){return this._isMobile&&!this.ui.mobileSidebarOpen()}ngOnInit(){return f(this,null,function*(){yield this.store.init()})}onActivate(t){let n=t;n?.menuToggle?.subscribe&&n.menuToggle.subscribe(()=>{this._triggerEl=document.activeElement,this.ui.toggleMobileSidebar(),this.ui.mobileSidebarOpen()&&setTimeout(()=>this.closeBtn?.nativeElement?.focus(),50)})}closeSidebar(){this.ui.closeMobileSidebar(),setTimeout(()=>this._triggerEl?.focus(),50)}onEscape(){this.ui.mobileSidebarOpen()&&this.closeSidebar()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-ai-chat-shell"]],viewQuery:function(n,e){if(n&1&&rt(An,5),n&2){let a;j(a=Q())&&(e.closeBtn=a.first)}},hostBindings:function(n,e){n&1&&p("resize",function(){return e.onResize()},It)("keydown.escape",function(){return e.onEscape()},tt)},decls:15,vars:14,consts:[["sidebarEl",""],["closeBtn",""],[1,"ai-chat-page"],[1,"ai-chat-page__container","container","container--wide30"],[1,"ai-chat-page__inner"],["aria-hidden","true",1,"ai-chat-page__overlay",3,"click"],["role","dialog","aria-modal","true",1,"ai-chat-page__sidebar"],["type","button",1,"ai-chat-page__sidebar-close",3,"click"],["aria-hidden","true",1,"pi","pi-times"],["id","main-ai-chat-content",1,"ai-chat-page__content"],[3,"activate"]],template:function(n,e){n&1&&(r(0,"section",2),d(1,"translate"),r(2,"div",3)(3,"div",4)(4,"div",5),p("click",function(){return e.closeSidebar()}),c(),r(5,"aside",6,0),d(7,"translate"),r(8,"button",7,1),d(10,"translate"),p("click",function(){return e.closeSidebar()}),u(11,"i",8),c(),u(12,"app-chat-sidebar"),c(),r(13,"main",9)(14,"router-outlet",10),p("activate",function(_){return e.onActivate(_)}),c()()()()()),n&2&&(b("aria-label",l(1,8,"AI_CHAT_SHELL.SECTION_ARIA")),i(4),B("is-visible",e.ui.mobileSidebarOpen()),i(),B("is-open",e.ui.mobileSidebarOpen()),b("aria-label",l(7,10,"AI_CHAT_SHELL.SIDEBAR_ARIA"))("inert",e.isMobileDrawerClosed()||null),i(3),b("aria-label",l(10,12,"AI_CHAT_SHELL.CLOSE_ARIA")))},dependencies:[me,R,Ae,F],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block;width:100%}.ai-chat-page[_ngcontent-%COMP%]{height:calc(100vh - 4rem);overflow:hidden;background:#f7f8fb;position:relative}.ai-chat-page__container[_ngcontent-%COMP%]{width:100%;max-width:1440px;margin:0 auto}.ai-chat-page__inner[_ngcontent-%COMP%]{display:flex;flex-direction:row;height:calc(100vh - 4rem);overflow:hidden}.ai-chat-page__content[_ngcontent-%COMP%]{flex:1;min-width:0;background:transparent;overflow:hidden}.ai-chat-page__sidebar[_ngcontent-%COMP%]{width:320px;min-width:320px;flex-shrink:0;background:#fff;border-right:1px solid #e5e7eb;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#c7d2fe transparent}.ai-chat-page__sidebar-close[_ngcontent-%COMP%]{display:none}.ai-chat-page__sidebar-close[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.ai-chat-page__overlay[_ngcontent-%COMP%]{display:none}@media screen and (max-width:1023px){.ai-chat-page__sidebar[_ngcontent-%COMP%]{position:fixed;top:0;left:0;height:100dvh;width:85vw;max-width:320px;min-width:unset;z-index:1000;border-right:none;transform:translate(-110%);transition:transform .28s cubic-bezier(.4,0,.2,1);box-shadow:none}.ai-chat-page__sidebar.is-open[_ngcontent-%COMP%]{transform:translate(0);box-shadow:8px 0 40px #0f172a38}.ai-chat-page__sidebar-close[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;position:absolute;top:.8rem;right:.8rem;width:2rem;height:2rem;border:1px solid #e5e7eb;background:#fff;border-radius:50%;cursor:pointer;color:#374151;z-index:5;transition:background .15s}.ai-chat-page__sidebar-close[_ngcontent-%COMP%]:hover{background:#f3f4f6}.ai-chat-page__sidebar-close[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.78rem}.ai-chat-page__content[_ngcontent-%COMP%]{width:100%}.ai-chat-page__overlay[_ngcontent-%COMP%]{display:block;position:fixed;inset:0;z-index:999;background:transparent;pointer-events:none;transition:background .28s ease}.ai-chat-page__overlay.is-visible[_ngcontent-%COMP%]{background:#0f172a8c;pointer-events:auto;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}}[data-theme=dark][_nghost-%COMP%]   .ai-chat-page[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-page[_ngcontent-%COMP%]{background:var(--bulma-box-background-color)}[data-theme=dark][_nghost-%COMP%]   .ai-chat-page__inner[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-page__inner[_ngcontent-%COMP%]{background:transparent}[data-theme=dark][_nghost-%COMP%]   .ai-chat-page__sidebar[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-page__sidebar[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-right-color:var(--bulma-border);scrollbar-color:rgba(72,95,199,.35) transparent}[data-theme=dark][_nghost-%COMP%]   .ai-chat-page__sidebar-close[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-page__sidebar-close[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .ai-chat-page__sidebar-close[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-page__sidebar-close[_ngcontent-%COMP%]:hover{background:#485fc71a;border-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .ai-chat-page__sidebar-close[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-page__sidebar-close[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .ai-chat-page__content[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-page__content[_ngcontent-%COMP%]{background:var(--bulma-box-background-color)}[data-theme=dark][_nghost-%COMP%]   .ai-chat-page__overlay.is-visible[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-page__overlay.is-visible[_ngcontent-%COMP%]{background:#000000b3}'],changeDetection:1})}return o}
3)()});function Bn(o,g){if(o&1&&(r(0,"span",40),h(1),c()),o&2){let t=m(2);i(),k(t.quotaLabel)}}function Nn(o,g){o&1&&(r(0,"span",41),h(1),d(2,"translate"),c()),o&2&&(i(),M(" ",l(2,1,"CHAT_COMPOSER.QUOTA_EXCEEDED")," "))}function Vn(o,g){if(o&1&&(r(0,"div",5),P(1,Bn,2,1,"span",40),P(2,Nn,3,3,"span",41),c()),o&2){let t=m();i(),v(t.quotaLabel?1:-1),i(),v(t.quotaExceeded?2:-1)}}function qn(o,g){o&1&&u(0,"i",20)}function zn(o,g){o&1&&u(0,"i",21)}function $n(o,g){o&1&&u(0,"i",22)}function Un(o,g){if(o&1){let t=V();r(0,"button",42),p("click",function(){let e=x(t).$implicit,a=m();return y(a.selectTool(e))}),r(1,"span",27),u(2,"i",43),c(),r(3,"span"),h(4),d(5,"translate"),c()()}if(o&2){let t=g.$implicit;i(2),Ft(t.icon),i(2),k(l(5,3,t.labelKey))}}function jn(o,g){if(o&1){let t=V();r(0,"div",33),d(1,"translate"),d(2,"translate"),r(3,"span",27),u(4,"i",43),c(),r(5,"span"),h(6),d(7,"translate"),c(),r(8,"button",44),d(9,"translate"),p("click",function(){x(t);let e=m();return y(e.clearTool())}),u(10,"i",45),c()()}if(o&2){let t=m();b("aria-label",l(1,5,"CHAT_COMPOSER.TOOL_ACTIVE")+" "+l(2,7,t.selectedTool.labelKey)),i(4),Ft(t.selectedTool.icon),i(2),k(l(7,9,t.selectedTool.labelKey)),i(2),b("aria-label",l(9,11,"CHAT_COMPOSER.REMOVE_TOOL_ARIA"))}}function Qn(o,g){if(o&1&&(r(0,"span",27),u(1,"i",43),c()),o&2){let t=m().$implicit;i(),Ft(t.icon)}}function Wn(o,g){if(o&1){let t=V();r(0,"button",42),p("click",function(){let e=x(t).$implicit,a=m(2);return y(a.selectToolOption(e.id))}),P(1,Qn,2,2,"span",27),r(2,"span"),h(3),c()()}if(o&2){let t=g.$implicit;i(),v(t.icon?1:-1),i(2),k(t.label)}}function Gn(o,g){if(o&1){let t=V();r(0,"div",24,3)(2,"div",25)(3,"button",46),p("click",function(){x(t);let e=m();return y(e.toggleToolOptionsMenu())}),r(4,"span"),h(5),c(),r(6,"span",27),u(7,"i",47),c()()(),r(8,"div",48)(9,"div",31),et(10,Wn,4,2,"button",32,Le),c()()()}if(o&2){let t=m();B("is-active",t.toolOptionsMenuOpen)("is-dropup",t.toolOptionsMenuDropUp),i(3),b("aria-expanded",t.toolOptionsMenuOpen)("aria-controls","options-menu"),i(2),k(t.currentToolOptionLabel),i(5),nt(t.selectedTool.options)}}function Yn(o,g){if(o&1){let t=V();r(0,"div",35)(1,"span",27),u(2,"i",43),c(),r(3,"span",49),h(4),c(),r(5,"button",44),d(6,"translate"),p("click",function(){let e=x(t).$index,a=m();return y(a.removeFile(e))}),u(7,"i",45),c()()}if(o&2){let t=g.$implicit,n=m();b("aria-label",t.name),i(2),Ft(n.getFileIcon(t)),i(2),k(t.name),i(),b("aria-label",l(6,5,"CHAT_COMPOSER.REMOVE_FILE_ARIA")+" "+t.name)}}function Kn(o,g){if(o&1&&(r(0,"p",39),h(1),c()),o&2){let t=m();i(),k(t.errorMessage)}}var Fn,Rn,Dn,Ln,Le,Hn,He,Be=$(()=>{"use strict";T();ft();D();an();rn();Xt();T();ft();D();Fn=["fileInput"],Rn=["toolsDropdown"],Dn=["optionsDropdown"],Ln=["textareaRef"],Le=(o,g)=>g.id,Hn=(o,g)=>g.name;He=(()=>{class o{translate=O(st);auth=O(pe);loginModal=O(Ce);api=O(qt);ngZone=O(te);send=new J;fileInput;toolsDropdown;optionsDropdown;textareaRef;value="";toolsMenuOpen=!1;toolOptionsMenuOpen=!1;toolsMenuDropUp=!1;toolOptionsMenuDropUp=!1;selectedToolId=null;selectedToolOptionId=null;errorMessage="";maxMessageLength=4e3;selectedFiles=[];isRecording=!1;isTranscribing=!1;mediaRecorder;audioChunks=[];recordingStartTime=0;maxFiles=5;maxFileSizeMb=15;allowedFileTypes=["image/png","image/jpeg","image/webp","application/pdf","text/plain","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation"];disabled=!1;quotaLabel=null;quotaExceeded=!1;tools=[{id:"web_search",labelKey:"CHAT_COMPOSER.TOOL.WEB_SEARCH",icon:"pi pi-globe"},{id:"ideas",labelKey:"CHAT_COMPOSER.TOOL.IDEAS",icon:"pi pi-lightbulb"},{id:"code",labelKey:"CHAT_COMPOSER.TOOL.CODE",icon:"pi pi-code"},{id:"email",labelKey:"CHAT_COMPOSER.TOOL.EMAIL",icon:"pi pi-envelope"},{id:"academic",labelKey:"CHAT_COMPOSER.TOOL.ACADEMIC",icon:"pi pi-book"},{id:"seo",labelKey:"CHAT_COMPOSER.TOOL.SEO",icon:"pi pi-megaphone"}];get selectedTool(){return this.tools.find(t=>t.id===this.selectedToolId)??null}get currentToolOptionLabel(){return!this.selectedTool||!this.selectedTool.options?.length?this.translate.instant("CHAT_COMPOSER.OPTION_DEFAULT"):this.selectedTool.options.find(n=>n.id===this.selectedToolOptionId)?.label??this.selectedTool.options[0].label}get remainingCharacters(){return this.maxMessageLength-this.value.length}get isMessageTooLong(){return this.value.length>this.maxMessageLength}get canSubmit(){return!this.isMessageTooLong&&(!!this.value.trim()||this.selectedFiles.length>0)}onTextareaKeydown(t){this.disabled||t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.canSubmit&&this.submit())}toggleToolsMenu(){this.disabled||(this.toolsMenuOpen=!this.toolsMenuOpen,this.toolsMenuOpen&&
3(this.toolOptionsMenuOpen=!1,queueMicrotask(()=>this.updateToolsDropdownDirection())))}toggleToolOptionsMenu(){this.disabled||!this.selectedTool?.options?.length||(this.toolOptionsMenuOpen=!this.toolOptionsMenuOpen,this.toolOptionsMenuOpen&&(this.toolsMenuOpen=!1,queueMicrotask(()=>this.updateToolOptionsDropdownDirection())))}selectTool(t){this.selectedToolId=t.id,this.selectedToolOptionId=null,this.toolsMenuOpen=!1,this.toolOptionsMenuOpen=!1,this.errorMessage=""}selectToolOption(t){this.selectedToolOptionId=t,this.toolOptionsMenuOpen=!1}clearTool(){this.selectedToolId=null,this.selectedToolOptionId=null,this.toolOptionsMenuOpen=!1,this.toolsMenuOpen=!1}onFilesSelected(t){let n=t.target,e=Array.from(n.files??[]);if(this.disabled){this.resetFileInput();return}if(!e.length)return;let a=[...this.selectedFiles],_="";for(let s of e){if(a.length>=this.maxFiles){_=this.translate.instant("CHAT_COMPOSER.ERROR.MAX_FILES",{max:this.maxFiles});break}if(!this.allowedFileTypes.includes(s.type)){_=this.translate.instant("CHAT_COMPOSER.ERROR.INVALID_TYPE");continue}if(s.size/(1024*1024)>this.maxFileSizeMb){_=this.translate.instant("CHAT_COMPOSER.ERROR.FILE_TOO_LARGE",{max:this.maxFileSizeMb});continue}a.some(w=>w.name===s.name&&w.size===s.size&&w.lastModified===s.lastModified)||a.push(s)}this.selectedFiles=a,this.errorMessage=_,this.resetFileInput()}removeFile(t){this.selectedFiles=this.selectedFiles.filter((n,e)=>e!==t),this.errorMessage=""}getFileIcon(t){return t.type.startsWith("image/")?"pi pi-image":t.type==="application/pdf"?"pi pi-file-pdf":t.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"?"pi pi-file-word":t.type==="application/vnd.openxmlformats-officedocument.presentationml.presentation"?"pi pi-file":t.type==="text/plain"?"pi pi-file-edit":"pi pi-file"}ngAfterViewInit(){this.resetTextareaHeight()}autoResize(t){let n=t.target;n.style.height="auto",n.style.height=`${Math.min(n.scrollHeight,180)}px`}resetTextareaHeight(){let t=this.textareaRef?.nativeElement;t&&(t.style.height="auto")}submit(){if(!this.auth.isLoggedIn()){this.loginModal.open();return}let t=this.value.trim();if(!this.disabled){if(this.isMessageTooLong){this.errorMessage=this.translate.instant("CHAT_COMPOSER.ERROR.TOO_LONG",{max:this.maxMessageLength});return}!t&&!this.selectedFiles.length||(this.send.emit({message:t,tool:this.selectedToolId,toolOption:this.selectedToolOptionId,files:[...this.selectedFiles]}),this.value="",this.selectedFiles=[],this.clearTool(),this.errorMessage="",this.resetFileInput(),this.resetTextareaHeight())}}onEscape(){if(this.toolsMenuOpen){this.toolsMenuOpen=!1;return}this.toolOptionsMenuOpen&&(this.toolOptionsMenuOpen=!1)}onDocumentClick(t){let n=t.target;this.toolsMenuOpen&&!this.toolsDropdown?.nativeElement.contains(n)&&(this.toolsMenuOpen=!1),this.toolOptionsMenuOpen&&!this.optionsDropdown?.nativeElement.contains(n)&&(this.toolOptionsMenuOpen=!1)}onViewportChange(){this.toolsMenuOpen&&this.updateToolsDropdownDirection(),this.toolOptionsMenuOpen&&this.updateToolOptionsDropdownDirection()}updateToolsDropdownDirection(){this.toolsMenuDropUp=this.shouldOpenUp(this.toolsDropdown,280)}updateToolOptionsDropdownDirection(){this.toolOptionsMenuDropUp=this.shouldOpenUp(this.optionsDropdown,260)}shouldOpenUp(t,n){let e=t?.nativeElement;if(!e)return!1;let a=e.getBoundingClientRect(),_=window.innerHeight-a.bottom,s=a.top;return _>=n?!1:s>_}resetFileInput(){this.fileInput?.nativeElement&&(this.fileInput.nativeElement.value="")}toggleVoiceInput(){return f(this,null,function*(){this.disabled||this.isTranscribing||(this.isRecording?this.stopRecording():yield this.startRecording())})}startRecording(){return f(this,null,function*(){if(!navigator.mediaDevices?.getUserMedia){this.errorMessage=this.translate.instant("CHAT_COMPOSER.VOICE_ERROR_MIC");return}try{let t=yield navigator.mediaDevices.getUserMedia({audio:!0});this.audioChunks=[];let n=MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm";this.mediaRecorder=new MediaRecorder(t,{mimeType:n}),this.mediaRecorder.ondataavailable=e=>{e.data.size>0&&this.audioChunks.push(e.data)},this.mediaRecorder.onstop=()=>
3{t.getTracks().forEach(e=>e.stop()),this.ngZone.run(()=>this.sendAudioToWhisper())},this.mediaRecorder.start(500),this.isRecording=!0,this.recordingStartTime=Date.now(),this.errorMessage=""}catch(t){this.errorMessage=this.translate.instant("CHAT_COMPOSER.VOICE_ERROR_MIC")}})}stopRecording(){this.mediaRecorder?.stop(),this.isRecording=!1}sendAudioToWhisper(){return f(this,null,function*(){if(!this.audioChunks.length)return;if(Date.now()-this.recordingStartTime<1500){this.audioChunks=[];return}let t=new Blob(this.audioChunks,{type:"audio/webm"});if(t.size<3*1024){this.errorMessage=this.translate.instant("CHAT_COMPOSER.VOICE_TOO_SHORT"),this.audioChunks=[];return}this.isTranscribing=!0;try{let n=new File([t],"recording.webm",{type:"audio/webm"}),e=yield this.api.transcribeAudio(n);e.text&&(this.value=this.value?`${this.value} ${e.text}`:e.text,queueMicrotask(()=>{let a=this.textareaRef?.nativeElement;a&&(a.style.height="auto",a.style.height=`${Math.min(a.scrollHeight,180)}px`)}))}catch(n){this.errorMessage=this.translate.instant("CHAT_COMPOSER.VOICE_ERROR")}finally{this.isTranscribing=!1,this.audioChunks=[]}})}ngOnDestroy(){this.isRecording&&this.stopRecording()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-composer"]],viewQuery:function(n,e){if(n&1&&rt(Fn,5)(Rn,5)(Dn,5)(Ln,5),n&2){let a;j(a=Q())&&(e.fileInput=a.first),j(a=Q())&&(e.toolsDropdown=a.first),j(a=Q())&&(e.optionsDropdown=a.first),j(a=Q())&&(e.textareaRef=a.first)}},hostBindings:function(n,e){n&1&&p("keydown.escape",function(){return e.onEscape()},tt)("click",function(_){return e.onDocumentClick(_)},tt)("resize",function(){return e.onViewportChange()},It)("scroll",function(){return e.onViewportChange()},It)},inputs:{disabled:"disabled",quotaLabel:"quotaLabel",quotaExceeded:"quotaExceeded"},outputs:{send:"send"},decls:56,vars:57,consts:[["textareaRef",""],["fileInput",""],["toolsDropdown",""],["optionsDropdown",""],[1,"chat-composer",3,"ngSubmit"],["aria-live","polite",1,"chat-composer__quota"],[1,"chat-composer__box"],[1,"chat-composer__top"],["for","chat-message-input",1,"sr-only"],["id","chat-message-input","name","message","rows","1",1,"textarea","chat-composer__textarea",3,"ngModelChange","input","keydown","ngModel","placeholder","disabled"],[1,"chat-composer__meta"],["aria-hidden","true",1,"chat-composer__counter"],[1,"chat-composer__bottom"],[1,"chat-composer__left"],[1,"chat-composer__upload"],["type","file","accept","image/png,image/jpeg,image/webp,.pdf,.txt,.docx,.pptx","multiple","","hidden","",3,"change"],["type","button",1,"button","is-white","chat-icon-btn",3,"click","disabled"],[1,"icon"],["aria-hidden","true",1,"pi","pi-paperclip"],["type","button",1,"button","is-white","chat-icon-btn","chat-mic-btn",3,"click","disabled"],["aria-hidden","true",1,"pi","pi-spin","pi-spinner"],["aria-hidden","true",1,"pi","pi-stop-circle"],["aria-hidden","true",1,"pi","pi-microphone"],["role","separator","aria-hidden","true",1,"chat-composer__divider"],[1,"dropdown","chat-dropdown-wrapper"],[1,"dropdown-trigger"],["type","button","aria-haspopup","true",1,"button","is-white","chat-tool-btn",3,"click","disabled"],[1,"icon","is-small"],["aria-hidden","true",1,"pi","pi-sparkles"],[1,"chat-tool-label"],["id","tools-menu","role","menu",1,"dropdown-menu"],[1,"dropdown-content","chat-dropdown"],["type","button","role","menuitem",1,"dropdown-item","chat-dropdown__item"],["role","status",1,"chat-chip"],[1,"dropdown","chat-dropdown-wrapper",3,"is-active","is-dropup"],[1,"chat-chip","chat-chip--file"],[1,"chat-composer__right"],["type","submit",1,"button","is-link","is-rounded","chat-send-btn",3,"disabled"],["aria-hidden","true",1,"pi","pi-arrow-up-right"],["id","chat-error","role","alert",1,"help","is-danger","mt-2"],[1,"chat-composer__quota-text"],["role","alert",1,"chat-composer__quota-alert"],["type","button","role","menuitem",1,"dropdown-item","chat-dropdown__item",3,"click"],["aria-hidden","true"],["type","button",1,"chat-chip__remove",3,"click"],["aria-hidden","true",1,"pi","pi-times"],["type","button","aria-haspopup","true",1,"button","is-small","is-light","chat-option-btn",3,"click"],["aria-hidden","true",1,"pi","pi-angle-down"],["id","options-menu","role","menu",1,"dropdown-menu"],[1,"chat-chip__label"]],template:function(n,e){if(n&1){let a=V();r(0,"form",4),d(1,"translate"),p("ngSubmit",function(){return e.submit()}),P(2,Vn,3,2,"div",5),r(3,"div",6)(4,"div",7)(5,"label",8),h(6),d(7,"translate"),c(),r(8,"textarea",9,0),d(10,"translate"),Ct("ngModelChange",function(s){return x(a),pt(e.value,s)||(e.value=s),y(s)}),p("input",function(s){return e.autoResize(s)})("keydown",function(s){return e.onTextareaKeydown(s)}),c(),_t(),c(),r(11,"div",10)(12,"span",11),h(13),c()(),r(14,"div",12)(15,"div",13)(16,"div",14)(17,"input",15,1),d(19,"translate"),p("change",function(s){return e.onFilesSelected(s)}),c(),r(20,"button",16),d(21,"translate"),d(22,"translate"),p("click",function(){x(a);let s=ie(18);return y(s.click())}),r(23,"span",17),u(24,"i",18),c()()(),r(25,"button",19),d(26,"translate"),d(27,"translate"),p("click",function(){return e.toggleVoiceInput()}),r(28,"span",17),P(29,qn,1,0,"i",20)(30,zn,1,0,"i",21)(31,$n,1,0,"i",22),c()(),u(32,"div",23),r(33,"div",24,2)(35,"div",25)(36,"button",26),p("click",function(){return e.toggleToolsMenu()}),r(37,"span",27),u(38,"i",28),c(),r(39,"span",29),h(40),d(41,"translate"),c()()(),r(42,"div",30)(43,"div",31),et(44,Un,6,5,"button",32,Le),c()()(),P(46,jn,11,13,"div",33),P(47,Gn,12,7,"div",34),et(48,Yn,8,7,"div",35,Hn),c(),r(50,"div",36)(51,"button",37),d(52,"translate"),r(53,"span",17),u(54,"i",38),c()()()(),P(55,Kn,2,1,"p",39),c()()}n&2&&(b("aria-label",l(1,37,"CHAT_COMPOSER.FORM_ARIA")),i(2),v(e.quotaLabel||e.quotaExceeded?2:-1),i(4),M(" ",l(7,39,"CHAT_COMPOSER.PLACEHOLDER")," "),i(2),gt("ngModel",e.value),S("placeholder",l(10,41,"CHAT_COMPOSER.PLACEHOLDER"))("disabled",e.disabled),b("maxlength",e.maxMessageLength)("aria-describedby",e.errorMessage?"chat-error":null),ht(
3),i(4),B("chat-composer__counter--danger",e.remainingCharacters<=300),i(),Bt(" ",e.value.length," / ",e.maxMessageLength," "),i(4),b("aria-label",l(19,43,"CHAT_COMPOSER.ADD_FILES_ARIA")),i(3),S("disabled",e.disabled),b("aria-label",l(21,45,"CHAT_COMPOSER.ADD_FILES_ARIA"))("title",l(22,47,"CHAT_COMPOSER.ADD_FILES_ARIA")),i(5),B("is-recording",e.isRecording)("is-transcribing",e.isTranscribing),S("disabled",e.disabled||e.isTranscribing),b("aria-label",l(26,49,e.isRecording?"CHAT_COMPOSER.VOICE_STOP":"CHAT_COMPOSER.VOICE_START"))("title",l(27,51,e.isRecording?"CHAT_COMPOSER.VOICE_STOP":"CHAT_COMPOSER.VOICE_START")),i(4),v(e.isTranscribing?29:e.isRecording?30:31),i(4),B("is-active",e.toolsMenuOpen)("is-dropup",e.toolsMenuDropUp),i(3),S("disabled",e.disabled),b("aria-expanded",e.toolsMenuOpen)("aria-controls","tools-menu"),i(4),k(l(41,53,"CHAT_COMPOSER.ACTIONS")),i(4),nt(e.tools),i(2),v(e.selectedTool?46:-1),i(),v(e.selectedTool?.options?.length?47:-1),i(),nt(e.selectedFiles),i(3),S("disabled",e.disabled||!e.canSubmit),b("aria-label",l(52,55,"CHAT_COMPOSER.SEND_ARIA")),i(4),v(e.errorMessage?55:-1))},dependencies:[Ot,Oe,ut,bt,be,Mt,Me,R,F],styles:['@charset "UTF-8";.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[_nghost-%COMP%]{display:block}.chat-composer[_ngcontent-%COMP%]{position:sticky;bottom:0;z-index:5;padding:1rem 1.25rem 1.25rem;background:linear-gradient(to top,#f7f8fbfa,#f7f8fbe6);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.chat-composer__box[_ngcontent-%COMP%]{max-width:980px;margin:0 auto;background:#fff;border:1px solid #4258ff;border-radius:22px;box-shadow:0 10px 30px #0f172a14;padding:.85rem 1rem .9rem;overflow:visible}.chat-composer__top[_ngcontent-%COMP%]{margin-bottom:.5rem}.chat-composer__meta[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:-.15rem;margin-bottom:.4rem}.chat-composer__counter[_ngcontent-%COMP%]{font-size:.78rem;color:#6b7588}.chat-composer__counter--danger[_ngcontent-%COMP%]{color:#d14343;font-weight:600}.chat-composer__textarea[_ngcontent-%COMP%]{border:0;box-shadow:none;resize:none;min-height:28px;max-height:180px;overflow-y:auto;padding:.2rem .1rem;font-size:1rem;line-height:1.5;background:transparent}.chat-composer__textarea[_ngcontent-%COMP%]:focus{box-shadow:none;outline:none}.chat-composer__textarea[_ngcontent-%COMP%]::placeholder{color:#767676}.chat-composer__bottom[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}.chat-composer__left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;min-width:0;flex:1}.chat-composer__right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}.chat-composer__divider[_ngcontent-%COMP%]{width:1px;height:28px;background:#d5dbe5}.chat-icon-btn[_ngcontent-%COMP%], .chat-tool-btn[_ngcontent-%COMP%]{border:0;box-shadow:none;color:#243b63}.chat-tool-btn[_ngcontent-%COMP%]{font-weight:500}.chat-icon-btn[_ngcontent-%COMP%]:focus-visible, .chat-tool-btn[_ngcontent-%COMP%]:focus-visible, .chat-option-btn[_ngcontent-%COMP%]:focus-visible, .chat-send-btn[_ngcontent-%COMP%]:focus-visible, .chat-chip__remove[_ngcontent-%COMP%]:focus-visible, .chat-dropdown__item[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4258ff;outline-offset:2px;border-radius:4px}.chat-send-btn[_ngcontent-%COMP%]{min-width:48px;width:48px;height:48px;padding:0}.chat-send-btn[_ngcontent-%COMP%]:focus-visible{border-radius:999px}.chat-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.45rem;min-height:36px;border:1px solid #cfe8dc;background:#f5fbf8;color:#07854d;border-radius:999px;padding:.35rem .65rem;font-size:.95rem}.chat-chip--file[_ngcontent-%COMP%]{max-width:240px}.chat-chip__label[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-chip__remove[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;color:#07854d;cursor:pointer;padding:0}.chat-option-btn[_ngcontent-%COMP%]{border-radius:999px;min-height:36px;padding-inline:.85rem}
3.chat-option-btn[_ngcontent-%COMP%]:focus-visible{border-radius:999px}.chat-dropdown-wrapper[_ngcontent-%COMP%]{position:relative}.chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]{top:calc(100% + 8px);bottom:auto}.chat-dropdown-wrapper.is-dropup[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]{top:auto;bottom:calc(100% + 8px)}.chat-dropdown[_ngcontent-%COMP%]{min-width:220px;border-radius:14px;overflow:hidden;box-shadow:0 12px 30px #0f172a24;border:1px solid #edf0f5;background:#fff;background-image:none;opacity:1}.chat-dropdown__item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.65rem;padding:.8rem 1rem}.chat-dropdown__item[_ngcontent-%COMP%]:hover{background:#f6faf8}.chat-mic-btn[_ngcontent-%COMP%]{width:36px!important;height:36px!important;min-width:36px!important;border-radius:50%!important;background:#4258ff14!important;border:1.5px solid rgba(66,88,255,.22)!important;color:#4258ff!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important;transition:background .18s,border-color .18s,box-shadow .18s}.chat-mic-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#4258ff26!important;border-color:#4258ff66!important;box-shadow:0 0 0 3px #4258ff1a}.chat-mic-btn.is-recording[_ngcontent-%COMP%]{background:#dc26261a!important;border-color:#dc262666!important;color:#dc2626!important;box-shadow:0 0 0 3px #dc26261f;animation:_ngcontent-%COMP%_mic-pulse 1.1s ease-in-out infinite}.chat-mic-btn.is-transcribing[_ngcontent-%COMP%]{background:#4258ff1a!important;border-color:#4258ff4d!important;color:#4258ff!important;cursor:wait}@keyframes _ngcontent-%COMP%_mic-pulse{0%,to{box-shadow:0 0 0 3px #dc26261f}50%{box-shadow:0 0 0 6px #dc262638}}.chat-composer__quota[_ngcontent-%COMP%]{max-width:980px;margin:0 auto .5rem;display:flex;justify-content:space-between;align-items:center;gap:.75rem;flex-wrap:wrap;font-size:.92rem}.chat-composer__quota-text[_ngcontent-%COMP%]{color:#5b6475;font-weight:500}.chat-composer__quota-alert[_ngcontent-%COMP%]{color:#d14343;font-weight:600}@media(max-width:768px){.chat-composer[_ngcontent-%COMP%]{padding:.6rem .75rem .75rem}.chat-composer__box[_ngcontent-%COMP%]{border-radius:18px;padding:.7rem .85rem}.chat-composer__bottom[_ngcontent-%COMP%]{align-items:center;gap:.5rem}.chat-composer__left[_ngcontent-%COMP%]{gap:.4rem;flex-wrap:nowrap;overflow:visible}.chat-chip--file[_ngcontent-%COMP%]{max-width:140px;flex-shrink:0}.chat-send-btn[_ngcontent-%COMP%]{min-width:42px;width:42px;height:42px;flex-shrink:0}}@media(max-width:540px){.chat-tool-btn[_ngcontent-%COMP%]   .chat-tool-label[_ngcontent-%COMP%]{display:none}.chat-tool-btn[_ngcontent-%COMP%], .chat-icon-btn[_ngcontent-%COMP%]:not(.chat-mic-btn){width:36px!important;min-width:36px!important;height:36px!important;border-radius:50%!important;padding:0!important;background:#4258ff0f!important;border:1.5px solid rgba(66,88,255,.18)!important;color:#4258ff!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}.chat-composer__divider[_ngcontent-%COMP%]{flex-shrink:0;height:22px}.chat-mic-btn[_ngcontent-%COMP%]{flex-shrink:0}.chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]{left:0;right:auto;
3min-width:200px}}@media(max-width:540px){[data-theme=dark][_nghost-%COMP%]   .chat-tool-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-tool-btn[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-icon-btn[_ngcontent-%COMP%]:not(.chat-mic-btn), [data-theme=dark]   [_nghost-%COMP%]   .chat-icon-btn[_ngcontent-%COMP%]:not(.chat-mic-btn){background:#818cf81a!important;border-color:#818cf840!important;color:#818cf8!important}}[data-theme=dark][_nghost-%COMP%]   .chat-mic-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-mic-btn[_ngcontent-%COMP%]{background:#4258ff24!important;border-color:#4258ff4d!important;color:#818cf8!important}[data-theme=dark][_nghost-%COMP%]   .chat-mic-btn[_ngcontent-%COMP%]:hover:not(:disabled), [data-theme=dark]   [_nghost-%COMP%]   .chat-mic-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#4258ff38!important;border-color:#4258ff80!important}[data-theme=dark][_nghost-%COMP%]   .chat-mic-btn.is-recording[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-mic-btn.is-recording[_ngcontent-%COMP%]{background:#dc26262e!important;border-color:#dc262680!important;color:#f87171!important}[data-theme=dark][_nghost-%COMP%]   .chat-composer[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-composer[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);background-image:none;-webkit-backdrop-filter:none;backdrop-filter:none;border-top:1px solid var(--bulma-border)}[data-theme=dark][_nghost-%COMP%]   .chat-composer__box[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-composer__box[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border:1px solid var(--bulma-border);box-shadow:0 12px 30px #00000059}[data-theme=dark][_nghost-%COMP%]   .chat-composer__textarea[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-composer__textarea[_ngcontent-%COMP%]{color:var(--bulma-text-strong);background:transparent}[data-theme=dark][_nghost-%COMP%]   .chat-composer__textarea[_ngcontent-%COMP%]::placeholder, [data-theme=dark]   [_nghost-%COMP%]   .chat-composer__textarea[_ngcontent-%COMP%]::placeholder{color:#fff9}[data-theme=dark][_nghost-%COMP%]   .chat-composer__divider[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-composer__divider[_ngcontent-%COMP%]{background:var(--bulma-border)}[data-theme=dark][_nghost-%COMP%]   .chat-icon-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-icon-btn[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-tool-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-tool-btn[_ngcontent-%COMP%]{background:transparent;color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-icon-btn[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-icon-btn[_ngcontent-%COMP%]:hover, [data-theme=dark][_nghost-%COMP%]   .chat-tool-btn[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-tool-btn[_ngcontent-%COMP%]:hover{background:#485fc714;color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-option-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-option-btn[_ngcontent-%COMP%]{background:transparent;border:1px solid var(--bulma-border);color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-option-btn[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-option-btn[_ngcontent-%COMP%]:hover{background:#485fc714;border-color:var(--bulma-link);color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-chip[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-chip[_ngcontent-%COMP%]{background:#485fc71a;border-color:#485fc73d;color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-chip__remove[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-chip__remove[_ngcontent-%COMP%]{color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-chip__remove[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-chip__remove[_ngcontent-%COMP%]:hover{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-content[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-content[_ngcontent-%COMP%]{background:var(--bulma-box-background-color)!important;background-image:none!important;opacity:1}[data-theme=dark][_nghost-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%]:hover{background:#485fc714;color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-send-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-send-btn[_ngcontent-%COMP%]{box-shadow:none}[data-theme=dark][_nghost-%COMP%]   .help.is-danger[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .help.is-danger[_ngcontent-%COMP%]{color:#f87171}[data-theme=dark][_nghost-%COMP%]   .chat-composer__quota-text[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-composer__quota-text[_ngcontent-%COMP%]{color:var(--bulma-text)}[data-theme=dark][_nghost-%COMP%]   .chat-composer__quota-alert[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-composer__quota-alert[_ngcontent-%COMP%]{color:#f87171}[data-theme=dark][_nghost-%COMP%]   .chat-composer__counter[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-composer__counter[_ngcontent-%COMP%]{color:#ffffffa6}[data-theme=dark][_nghost-%COMP%]   .chat-composer__counter--danger[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-composer__counter--danger[_ngcontent-%COMP%]{color:#f87171;opacity:1}[data-theme=dark][_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]{background:transparent!important;background-image:none!important;box-shadow:none!important;border:0!important;opacity:1!important}[data-theme=dark][_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-content[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-content[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .chat-dropdown[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .chat-dropdown[_ngcontent-%COMP%]{background-color:#14161a!important;background:#14161a!important;background-image:none!important;opacity:1!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border:1px solid var(--bulma-border)!important;box-shadow:0 14px 34px #0000006b!important}[data-theme=dark][_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%]{background-color:#14161a!important;background:#14161a!important;color:var(--bulma-text-strong)!important}[data-theme=dark][_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]:hover, [data-theme=dark][_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown-wrapper[_ngcontent-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%]:hover{background:#485fc714!important;color:var(--bulma-link)!important}[data-theme=dark][_nghost-%COMP%]   .chat-icon-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-icon-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark][_nghost-%COMP%]   .chat-tool-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-tool-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark][_nghost-%COMP%]   .chat-option-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-option-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark][_nghost-%COMP%]   .chat-send-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-send-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark][_nghost-%COMP%]   .chat-chip__remove[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-chip__remove[_ngcontent-%COMP%]:focus-visible, [data-theme=dark][_nghost-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-dropdown__item[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--bulma-link);outline-offset:2px}'],changeDetection:1})}return o}
3)()});function Xn(o,g){if(o&1&&(I(0,"span",7),h(1),H()),o&2){let t=m();i(),M("\u2022 ",t.formatDate(t.conversation.updatedAt))}}var Ne,Ve=$(()=>{"use strict";T();Et();$t();D();T();D();Ne=(()=>{class o{ui=O(Pt);conversation=null;menuToggle=new J;toggle(){this.menuToggle.emit()}formatDate(t){return St(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-header"]],inputs:{conversation:"conversation"},outputs:{menuToggle:"menuToggle"},decls:15,vars:18,consts:[[1,"chat-header"],[1,"chat-header__left"],["type","button","aria-controls","chat-sidebar",1,"chat-header__menu-btn",3,"click"],["aria-hidden","true",1,"chat-header__arrow"],[1,"chat-header__text"],[1,"chat-header__title"],[1,"chat-header__meta"],["aria-hidden","true"]],template:function(n,e){n&1&&(I(0,"header",0),d(1,"translate"),I(2,"div",1)(3,"button",2),d(4,"translate"),d(5,"translate"),At("click",function(){return e.toggle()}),mt(6,"i",3),H(),I(7,"div",4)(8,"h2",5),h(9),d(10,"translate"),H(),I(11,"p",6),h(12),d(13,"translate"),P(14,Xn,2,1,"span",7),H()()()()),n&2&&(b("aria-label",l(1,8,"CHAT_HEADER.ARIA_LABEL")),i(3),B("is-open",e.ui.mobileSidebarOpen()),b("aria-label",e.ui.mobileSidebarOpen()?l(4,10,"CHAT_HEADER.CLOSE_MENU_ARIA"):l(5,12,"CHAT_HEADER.OPEN_MENU_ARIA"))("aria-expanded",e.ui.mobileSidebarOpen()),i(6),M(" ",e.conversation?.title||l(10,14,"CHAT_HEADER.DEFAULT_TITLE")," "),i(3),M(" ",l(13,16,"CHAT_HEADER.META_LABEL")," "),i(2),v(e.conversation?14:-1))},dependencies:[R,F],styles:[".chat-header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.85rem 1rem;border-bottom:1px solid #e5e7eb;background:#fff}.chat-header__left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.65rem;min-width:0}.chat-header__text[_ngcontent-%COMP%]{min-width:0}.chat-header__title[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:700;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-header__meta[_ngcontent-%COMP%]{margin:.2rem 0 0;font-size:.82rem;color:#6b7280}.chat-header__menu-btn[_ngcontent-%COMP%]{display:none;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer;color:#374151;flex-shrink:0;padding:0;transition:background .18s,border-color .18s}.chat-header__menu-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6;border-color:#d1d5db}.chat-header__menu-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.chat-header__arrow[_ngcontent-%COMP%]{display:block;width:.55rem;height:.55rem;border-right:2px solid currentColor;border-top:2px solid currentColor;border-radius:1px;transform:rotate(45deg) translate(-1px);transition:transform .3s cubic-bezier(.4,0,.2,1)}.chat-header__menu-btn.is-open[_ngcontent-%COMP%]   .chat-header__arrow[_ngcontent-%COMP%]{transform:rotate(-135deg) translate(-1px)}@media(max-width:1023px){.chat-header[_ngcontent-%COMP%]{padding:.6rem .85rem}.chat-header__menu-btn[_ngcontent-%COMP%]{display:inline-flex}.chat-header__title[_ngcontent-%COMP%]{font-size:.92rem}.chat-header__meta[_ngcontent-%COMP%]{font-size:.74rem;margin-top:.1rem}}[data-theme=dark][_nghost-%COMP%]   .chat-header[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-header[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-bottom-color:var(--bulma-border)}[data-theme=dark][_nghost-%COMP%]   .chat-header__title[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-header__title[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-header__meta[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-header__meta[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.85}[data-theme=dark][_nghost-%COMP%]   .chat-header__menu-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-header__menu-btn[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-header__menu-btn[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-header__menu-btn[_ngcontent-%COMP%]:hover{background:#485fc714;border-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-header__menu-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-header__menu-btn[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}"],changeDetection:1})}return o}
3)()});function Zn(o,g){if(o&1&&(I(0,"div",3)(1,"span",9),h(2),H(),I(3,"span",10),h(4),d(5,"translate"),H()()),o&2){let t=m();i(2),k(t.formatDate(t.message.createdAt)),i(2),Bt(" ",l(5,3,"CHAT_MESSAGE_ITEM.SENT_AT")," ",t.formatDate(t.message.createdAt)," ")}}function Jn(o,g){o&1&&(I(0,"div",5)(1,"div",11),mt(2,"span")(3,"span")(4,"span"),H()())}function to(o,g){if(o&1&&mt(0,"div",14),o&2){let t=m().$implicit;Gt("innerHTML",t.html,oe)}}function eo(o,g){o&1&&mt(0,"i",19)}function no(o,g){o&1&&mt(0,"i",20)}function oo(o,g){if(o&1){let t=V();I(0,"div",15)(1,"div",16)(2,"span",17),h(3),H(),I(4,"button",18),At("click",function(){x(t);let e=m(),a=e.$implicit,_=e.$index,s=m(3);return y(s.copyCode(a.content,_))}),P(5,eo,1,0,"i",19)(6,no,1,0,"i",20),H()(),I(7,"pre",21),d(8,"translate"),I(9,"code"),h(10),H()()()}if(o&2){let t=m(),n=t.$implicit,e=t.$index,a=m(3);i(3),M(" ",n.language||"code"," "),i(),b("aria-label","Copier le code"),i(),v(a.copiedIndex===e?5:6),i(2),b("aria-label",l(8,5,"CHAT_MESSAGE_ITEM.CODE_BLOCK_ARIA")+" "+(n.language||"code")),i(3),k(n.content)}}function ao(o,g){if(o&1&&(P(0,to,1,1,"div",14),P(1,oo,11,7,"div",15)),o&2){let t=g.$implicit;v(t.type==="text"&&t.html?0:-1),i(),v(t.type==="code"?1:-1)}}function io(o,g){if(o&1&&(I(0,"div",12),et(1,ao,2,2,null,null,ae),H()),o&2){let t=m(2);i(),nt(t.segments)}}function ro(o,g){if(o&1&&(I(0,"div",13),h(1),H()),o&2){let t=m(2);i(),M(" ",t.message.content," ")}}function so(o,g){if(o&1&&(I(0,"div",6),P(1,io,3,0,"div",12)(2,ro,2,1,"div",13),H()),o&2){let t=m();i(),v(t.message.role==="assistant"&&t.segments.length>0?1:2)}}function co(o,g){o&1&&(mt(0,"i",23),I(1,"span"),h(2),d(3,"translate"),H()),o&2&&(i(2),k(l(3,1,"CHAT_MESSAGE_ITEM.COPIED")))}function lo(o,g){o&1&&(mt(0,"i",24),I(1,"span"),h(2),d(3,"translate"),H()),o&2&&(i(2),k(l(3,1,"CHAT_MESSAGE_ITEM.COPY")))}function _o(o,g){if(o&1){let t=V();I(0,"div",7)(1,"button",22),d(2,"translate"),d(3,"translate"),At("click",function(){x(t);let e=m();return y(e.copyMessage())}),P(4,co,4,3)(5,lo,4,3),H()()}if(o&2){let t=m();i(),B("chat-message__action-btn--copied",t.showMsgCopyToast),Gt("title",l(2,5,"CHAT_MESSAGE_ITEM.COPY_MESSAGE_ARIA")),b("aria-label",l(3,7,"CHAT_MESSAGE_ITEM.COPY_MESSAGE_ARIA")),i(3),v(t.showMsgCopyToast?4:5)}}function ho(o,g){o&1&&(I(0,"div",8),h(1),d(2,"translate"),H()),o&2&&(i(),M(" ",l(2,1,"CHAT_MESSAGE_ITEM.COPY_TOAST")," "))}var Zt,qe=$(()=>{"use strict";T();nn();D();$t();T();D();Zt=(()=>{class o{translate=O(st);sanitizer=O(he);message;copiedIndex=null;segments=[];showCopyToast=!1;showMsgCopyToast=!1;copyToastTimeout=null;msgCopyToastTimeout=null;ngOnChanges(){this.segments=this.parseMessage(this.message?.content??"")}ngOnDestroy(){this.copyToastTimeout&&clearTimeout(this.copyToastTimeout),this.msgCopyToastTimeout&&clearTimeout(this.msgCopyToastTimeout)}formatDate(t){return St(t)}escapeHtml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}renderInline(t){return this.escapeHtml(t).replace(/\*\*\*(.+?)\*\*\*/g,"<strong><em>$1</em></strong>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/__(.+?)__/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/_(.+?)_/g,"<em>$1</em>").replace(/`([^`]+)`/g,(e,a)=>`<code>${a}</code>`).replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replace(/~~(.+?)~~/g,"<del>$1</del>")}renderMarkdown(t){let n=t.split(`
4`),e=[],a=!1,_=!1,s=0,C=!1,E=!1,w=!1,q=[],K=null,ot=()=>{if(q.length>0){let W=q.map(Lt=>this.renderInline(Lt)).join("<br>");e.push(`<p>${W}</p>`),q=[]}},X=()=>{a&&(e.push("</ul>"),a=!1,K=null),_&&(e.push("</div>"),_=!1,s=0,K=null)},lt=()=>{C&&(e.push("</blockquote>"),C=!1)},at=()=>{E&&(e.push("</tbody></table>"),E=!1,w=!1)};for(let W=0;W<n.length;W++){let Lt=n[W],N=Lt.trimEnd();if(N.trim()===""){ot(),X(),lt(),at();continue}let Ut=N.match(/^####\s+(.*)/),jt=N.match(/^###\s+(.*)/),Qt=N.match(/^##\s+(.*)/),Jt=N.match(/^#\s+(.*)/);if(Ut||jt||Qt||Jt){ot(),X(),lt(),at();let[G,Z]=Ut?[4,Ut]:jt?[3,jt]:Qt?[2,Qt]:[1,Jt];e.push(`<h${G}>${this.renderInline(Z[1])}</h${G}>`);continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test(N.trim())){ot(),X(),lt(),at(),e.push("<hr>");continue}if(N===">"||N.startsWith("> ")||N.startsWith(">")&&!N.startsWith(">>")){let G=N.startsWith("> ")?N.slice(2):N.slice(1).trim();if(!G){ot(),X(),lt(),at(),e.push('<div class="chat-message__md-sep"></div>');continue}ot(),X(),at(),C||(e.push("<blockquote>"),C=!0),e.push(`<p>${this.renderInline(G)}</p>`);continue}if(N.includes("|")&&N.trim().startsWith("|")){if(ot(),X(),lt(),/^\|[\s\-:|]+\|/.test(N)){w||(e.push("</thead><tbody>"),w=!0);continue}let G=N.replace(/^\||\|$/g,"").split("|").map(Z=>Z.trim());
4E?(e.push("<tr>"),G.forEach(Z=>e.push(`<td>${this.renderInline(Z)}</td>`)),e.push("</tr>")):(e.push("<table><thead><tr>"),G.forEach(Z=>e.push(`<th>${this.renderInline(Z)}</th>`)),e.push("</tr>"),E=!0,w=!1);continue}let Wt=N.match(/^(\s*)([-*+])\s+(.*)/);if(Wt){ot(),lt(),at(),_&&X();let G=Wt[1].length;a||(e.push("<ul>"),a=!0,K="ul");let Z=this.renderInline(Wt[3]);e.push(`<li style="margin-left:${G*.75}rem">${Z}</li>`);continue}let Ht=N.match(/^(\s*)(\d+)\.\s+(.*)/);if(Ht){ot(),lt(),at(),a&&X();let G=Ht[1].length,Z=parseInt(Ht[2],10);_||(e.push('<div class="chat-ol">'),_=!0,K="ol",s=Z-1),s=Z;let Ze=this.renderInline(Ht[3]),Je=G>0?` style="padding-left:${G*.75}em"`:"";e.push(`<div class="chat-ol__item"${Je}><span class="chat-ol-num" aria-hidden="true">${Z}</span><span class="chat-ol__sep" aria-hidden="true">-</span><span class="chat-ol__text">${Ze}</span></div>`);continue}if((a||_)&&/^\s{2,}/.test(Lt)&&N.trim()!==""){let G=this.renderInline(N.trim());e.push(`<p class="chat-message__li-sub">${G}</p>`);continue}ot(),X(),lt(),at(),q.push(N)}return ot(),X(),lt(),at(),e.join(`
5`)}parseMessage(t){let n=t??"",e=/```([a-zA-Z0-9_-]+)?\n([\s\S]*?)```/g,a=[],_=0,s;for(;(s=e.exec(n))!==null;){let C=s[0],E=(s[1]||"").trim(),w=s[2]??"",q=s.index;if(q>_){let K=n.slice(_,q).trim();K&&a.push({type:"text",content:K,html:this.sanitizer.bypassSecurityTrustHtml(this.renderMarkdown(K))})}a.push({type:"code",content:w.replace(/\n$/,""),language:E||"code"}),_=q+C.length}if(_<n.length){let C=n.slice(_).trim();C&&a.push({type:"text",content:C,html:this.sanitizer.bypassSecurityTrustHtml(this.renderMarkdown(C))})}return a.length||a.push({type:"text",content:n,html:this.sanitizer.bypassSecurityTrustHtml(this.renderMarkdown(n))}),a}copyMessage(){return f(this,null,function*(){let t=(this.message?.content??"").trim();if(t){try{yield navigator.clipboard.writeText(t)}catch(n){this.fallbackCopy(t)}this.showMsgCopyToast=!0,this.msgCopyToastTimeout&&clearTimeout(this.msgCopyToastTimeout),this.msgCopyToastTimeout=setTimeout(()=>{this.showMsgCopyToast=!1},2e3)}})}copyCode(t,n){return f(this,null,function*(){let e=t.trim();if(e){try{yield navigator.clipboard.writeText(e)}catch(a){this.fallbackCopy(e)}this.copiedIndex=n,setTimeout(()=>{this.copiedIndex=null},1500)}})}fallbackCopy(t){let n=document.createElement("textarea");n.value=t,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n)}openCopyToast(){this.showCopyToast=!0,this.copyToastTimeout&&clearTimeout(this.copyToastTimeout),this.copyToastTimeout=setTimeout(()=>{this.showCopyToast=!1},1800)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-message-item"]],inputs:{message:"message"},features:[Tt],decls:14,vars:16,consts:[[1,"chat-message"],["aria-hidden","true",1,"chat-message__avatar"],[1,"chat-message__content"],[1,"chat-message__meta"],[1,"chat-message__bubble-wrap"],[1,"chat-message__bubble","chat-message__bubble--typing"],[1,"chat-message__bubble"],[1,"chat-message__actions"],["role","status","aria-live","polite","aria-atomic","true",1,"chat-message__toast"],["aria-hidden","true"],[1,"sr-only"],[1,"chat-typing-dots"],[1,"chat-message__rich-content"],[1,"chat-message__plain-text"],[1,"chat-message__md",3,"innerHTML"],[1,"chat-code-block"],[1,"chat-code-block__header"],["aria-hidden","true",1,"chat-code-block__lang"],["type","button",1,"chat-code-block__copy",3,"click"],[1,"pi","pi-check"],[1,"pi","pi-copy"],["tabindex","0",1,"chat-code-block__pre"],["type","button",1,"chat-message__action-btn",3,"click","title"],["aria-hidden","true",1,"pi","pi-check"],["aria-hidden","true",1,"pi","pi-copy"]],template:function(n,e){n&1&&(I(0,"article",0),d(1,"translate"),d(2,"translate"),I(3,"div",1),h(4),d(5,"translate"),d(6,"translate"),H(),I(7,"div",2),P(8,Zn,6,5,"div",3),I(9,"div",4),P(10,Jn,5,0,"div",5)(11,so,3,1,"div",6),P(12,_o,6,9,"div",7),P(13,ho,3,3,"div",8),H()()()),n&2&&(B("chat-message--assistant",e.message.role==="assistant"),b("aria-label",e.message.role==="assistant"?l(1,8,"CHAT_MESSAGE_IT
5EM.ARIA_LABEL_ASSISTANT"):l(2,10,"CHAT_MESSAGE_ITEM.ARIA_LABEL_USER")),i(4),M(" ",e.message.role==="assistant"?l(5,12,"CHAT_MESSAGE_ITEM.AVATAR_AI"):l(6,14,"CHAT_MESSAGE_ITEM.AVATAR_USER")," "),i(4),v(e.message.role!=="assistant"||e.message.content?8:-1),i(2),v(e.message.role==="assistant"&&!e.message.content?10:11),i(2),v(e.message.role==="assistant"&&e.message.content?12:-1),i(),v(e.showCopyToast?13:-1))},dependencies:[R,F],styles:['@charset "UTF-8";.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[_nghost-%COMP%]{display:block}.chat-message[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:flex-start}.chat-message__avatar[_ngcontent-%COMP%]{min-width:2.25rem;width:2.25rem;height:2.25rem;border-radius:999px;background:#e5e7eb;color:#111827;display:inline-flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700;border:1px solid #d1d5db;flex-shrink:0}.chat-message--assistant[_ngcontent-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%]{background:#eef2ff;color:#4338ca;border-color:#c7d2fe}.chat-message__content[_ngcontent-%COMP%]{min-width:0;flex:1}.chat-message__meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;font-size:.8rem;color:#6b7280;margin-bottom:.35rem}.chat-message__meta[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:#111827;font-weight:700}.chat-message__bubble-wrap[_ngcontent-%COMP%]{position:relative}.chat-message__bubble[_ngcontent-%COMP%]{position:relative;background:#fff;border:1px solid #e5e7eb;border-radius:1rem;padding:.9rem 1.25rem;color:#111827;line-height:1.65;word-break:break-word;box-shadow:0 2px 10px #0f172a0a}.chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%]{background:#f8f7ff;border-color:#ddd6fe}.chat-message__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;margin-top:.4rem;padding-left:.25rem}.chat-message__action-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;padding:.28rem .65rem;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;color:#6b7280;font-size:.74rem;font-weight:500;cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease;line-height:1}.chat-message__action-btn[_ngcontent-%COMP%]   .pi[_ngcontent-%COMP%]{font-size:.78rem}.chat-message__action-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6;color:#374151;border-color:#d1d5db}.chat-message__action-btn--copied[_ngcontent-%COMP%]{color:#059669;border-color:#a7f3d0;background:#ecfdf5}.chat-message__action-btn--copied[_ngcontent-%COMP%]:hover{background:#d1fae5;color:#047857}.chat-message__action-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.chat-message__plain-text[_ngcontent-%COMP%]{white-space:pre-wrap}.chat-message__bubble--typing[_ngcontent-%COMP%]{padding:.75rem 1.1rem}.chat-typing-dots[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px}.chat-typing-dots[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background:#6366f1;opacity:.4;animation:_ngcontent-%COMP%_typingBounce 1.2s infinite ease-in-out}.chat-typing-dots[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(1){animation-delay:0s}.chat-typing-dots[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.chat-typing-dots[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_typingBounce{0%,60%,to{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}.chat-message__rich-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.chat-message__md[_ngcontent-%COMP%]{font-size:.95rem;line-height:1.7;color:inherit}.chat-message__md[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:first-child{margin-top:0}.chat-message__md[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:last-child{margin-bottom:0}.chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], .chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .chat-message__md[_ngcontent-%COMP%]   h4[_ng
5content-%COMP%]{font-weight:600;line-height:1.3;margin:1.1em 0 .45em;color:#0f172a}.chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:1.2rem}.chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:1.08rem}.chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:1rem}.chat-message__md[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:.95rem}.chat-message__md[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 0 .75em}.chat-message__md[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-weight:600}.chat-message__md[_ngcontent-%COMP%]   em[_ngcontent-%COMP%]{font-style:italic}.chat-message__md[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.85em;background:#6366f11a;color:#4338ca;padding:.15em .4em;border-radius:.3em;border:1px solid rgba(99,102,241,.15)}.chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%], .chat-message__md[_ngcontent-%COMP%]   ol[_ngcontent-%COMP%]{margin:.5em 0 .75em;padding-left:0}.chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{list-style:none;padding-left:0}.chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{position:relative;padding-left:1.35em;margin-bottom:.35em}.chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before{content:"";position:absolute;left:.15em;top:.62em;width:5px;height:5px;border-radius:50%;background:#6366f1}.chat-ol[_ngcontent-%COMP%]{margin:.5em 0 .75em;display:flex;flex-direction:column;gap:.35em}.chat-ol__item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.6em;line-height:1.6}.chat-ol-num[_ngcontent-%COMP%]{flex-shrink:0;color:#4338ca;font-size:.95em;font-weight:700;line-height:1.6}.chat-ol__sep[_ngcontent-%COMP%]{color:#9ca3af;font-weight:400;flex-shrink:0}.chat-ol__text[_ngcontent-%COMP%]{flex:1;min-width:0}.chat-message__md[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:0}.chat-message__li-sub[_ngcontent-%COMP%]{margin:.15em 0 .35em 1.5em;font-size:.92em;color:#4b5563;line-height:1.6}.chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%], .chat-message__md[_ngcontent-%COMP%]   ol[_ngcontent-%COMP%]   ol[_ngcontent-%COMP%], .chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   ol[_ngcontent-%COMP%], .chat-message__md[_ngcontent-%COMP%]   ol[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:.25em 0 .25em .5em}.chat-message__md[_ngcontent-%COMP%]   blockquote[_ngcontent-%COMP%]{margin:.75em 0;padding:.6em 1em;border-left:3px solid #a5b4fc;background:#6366f10d;border-radius:0 .5rem .5rem 0;color:#4b5563;font-style:italic}.chat-message__md[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%], .chat-message__md-sep[_ngcontent-%COMP%]{border:none;border-top:1px dashed #e5e7eb;margin:.6em 0;opacity:.6}.chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#4338ca;text-decoration:underline;text-underline-offset:2px}.chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:#3730a3}.chat-message__md[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.88rem;margin:.75em 0}.chat-message__md[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background:#f1f0ff;color:#3730a3;font-weight:600;padding:.5em .75em;text-align:left;border:1px solid #ddd6fe}.chat-message__md[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:.45em .75em;border:1px solid #e5e7eb;vertical-align:top}.chat-message__md[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n)   td[_ngcontent-%COMP%]{background:#6366f108}.chat-code-block[_ngcontent-%COMP%]{overflow:hidden;border-radius:.95rem;border:1px solid rgba(15,23,42,.08);box-shadow:0 6px 20px #0f172a0f}.chat-code-block__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.65rem .9rem;background:#f8fafc;border-bottom:1px solid rgba(15,23,42,.08);border-top-left-radius:.95rem;border-top-right-radius:.95rem}.chat-code-block__lang[_ngcontent-%COMP%]{font-size:.78rem;font-weight:700;color:#374151;text-transform:lowercase}.chat-code-block__copy[_ngcontent-%COMP%]{width:auto;height:1.8rem;padding:0 .55rem;border-radius:.5rem;border:1px solid #e2e8f0;background:#fff;color:#334155;display:inline-flex;align-items:center;gap:.3rem;font-size:.72rem;font-weight:600;cursor:pointer;transition:all .2s ease}.copied-text[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:#22c55e}.chat-code-block__copy[_ngcontent-%COMP%]:hover{background:#f1f5f9;color:#0f172a;border-color:#cbd5f5}.chat-code-block__copy[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.chat-code-block__pre[_ngcontent-%COMP%]{margin:0;padding:1rem;overflow:auto;white-space:pre;background:#0f172a;color:#e2e8f0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.92rem;line-height:1.55}.chat-code-block__pre[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.chat-code-block__pre[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]{font:inherit;color:inherit}.chat-message__toast[_ngcontent-%COMP%]{position:absolute;top:-2.4rem;right:0;background:#111827;color:#fff;border-radius:.7rem;padding:.5rem .75rem;font-size:.76rem;white-space:nowrap;z-index:2}.dark[_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%]{background:#18181b;border-color:#3f3f46;color:#a1a1aa}.dark[_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%]:hover, .dark   [_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%]:hover, [data-theme=dark][_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%]:hover, body.dark[_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%]:hover, body.dark   [_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%]:hover, body.theme-dark[_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%]:hover, body.theme-dark   [_nghost-%COMP%]   .chat-message__action-btn[_ngcontent-%COMP%]:hover{background:#27272a;color:#f4f4f5;border-color:#52525b}.dark[_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%]{color:#34d399;border-color:#065f46;background:#022c22}.dark[_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%]:hover, .dark   [_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%]:hover, [data-theme=dark][_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%]:hover, body.dark[_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%]:hover, body.dark   [_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%]:hover, body.theme-dark[_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%]:hover, body.theme-dark   [_nghost-%COMP%]   .chat-message__action-btn--copied[_ngcontent-%COMP%]:hover{background:#064e3b;color:#6ee7b7}
5.dark[_nghost-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%]{background:#232326;color:#f4f4f5;border-color:#323238}.dark[_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__avatar[_ngcontent-%COMP%]{background:#262238;color:#c4b5fd;border-color:#4c3f91}.dark[_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%]{color:#a1a1aa}.dark[_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__meta[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:#f5f5f5}.dark[_nghost-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%]{background:#18181b;border-color:#2a2a31;color:#f4f4f5}.dark[_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%]{background:#1c1b22;border-color:#4c3f91;color:#f3f4f6}.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], .dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h4[_ng
5content-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{color:#f1f5f9}.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   code[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   code[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   code[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   code[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   code[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   code[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   code[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   code[_ngcontent-%COMP%]{background:#8b5cf626;color:#c4b5fd;border-color:#8b5cf633}.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before, .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before, [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before, [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before, body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before, body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before, body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before, body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before{background:#818cf8}.dark[_nghost-%COMP%]   .chat-ol-num[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-ol-num[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-ol-num[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-ol-num[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-ol-num[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-ol-num[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-ol-num[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-ol-num[_ngcontent-%COMP%]{color:#a5b4fc}.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   blockquote[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   blockquote[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   blockquote[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   blockquote[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   blockquote[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   blockquote[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   blockquote[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   blockquote[_ngcontent-%COMP%]{border-left-color:#6366f1;background:#6366f114;color:#a1a1aa}.dark[_nghost-%COMP%]   .chat-message__li-sub[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__li-sub[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__li-sub[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__li-sub[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__li-sub[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__li-sub[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__li-sub[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__li-sub[_ngcontent-%COMP%]{color:#a1a1aa}.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   hr[_ngcontent-%COMP%]{border-top-color:#3f3f46}.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#818cf8}.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background:#1e1b4b;color:#a5b4fc;border-color:#312e81}.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border-color:#27272a}.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n)   td[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n)   td[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n)   td[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n)   td[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n)   td[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n)   td[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n)   td[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message__md[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n)   td[_ngcontent-%COMP%]{background:#6366f10d}.dark[_nghost-%COMP%]   .chat-code-block[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-code-block[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-code-block[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-code-block[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-code-block[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-code-block[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-code-block[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-code-block[_ngcontent-%COMP%]{border-color:#32323a;background:#09090b}.dark[_nghost-%COMP%]   .chat-code-block__header[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-code-block__header[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-code-block__header[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-code-block__header[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-code-block__header[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-code-block__header[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-code-block__header[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-code-block__header[_ngcontent-%COMP%]{background:#18181b;border-bottom-color:#27272a}.dark[_nghost-%COMP%]   .chat-code-block__lang[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-code-block__lang[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-code-block__lang[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-code-block__lang[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-code-block__lang[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-code-block__lang[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-code-block__lang[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-code-block__lang[_ngcontent-%COMP%]{color:#cbd5e1}.dark[_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%]{color:#cbd5e1}.dark[_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%]:hover, .dark   [_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%]:hover, [data-theme=dark][_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%]:hover, body.dark[_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%]:hover, body.dark   [_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%]:hover, body.theme-dark[_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%]:hover, body.theme-dark   [_nghost-%COMP%]   .chat-code-block__copy[_ngcontent-%COMP%]:hover{background:#ffffff14;color:#fff}.dark[_nghost-%COMP%]   .chat-code-block__pre[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-code-block__pre[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-code-block__pre[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-code-block__pre[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-code-block__pre[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-code-block__pre[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-code-block__pre[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-code-block__pre[_ngcontent-%COMP%]{background:#09090b;color:#e4e4e7}
5@media screen and (max-width:767px){.chat-message__avatar[_ngcontent-%COMP%]{display:none}.chat-message[_ngcontent-%COMP%]{gap:0;align-items:flex-end}.chat-message[_ngcontent-%COMP%]:not(.chat-message--assistant){flex-direction:row-reverse;justify-content:flex-start}.chat-message[_ngcontent-%COMP%]:not(.chat-message--assistant)   .chat-message__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;max-width:88%}.chat-message[_ngcontent-%COMP%]:not(.chat-message--assistant)   .chat-message__meta[_ngcontent-%COMP%]{justify-content:flex-end;text-align:right}.chat-message[_ngcontent-%COMP%]:not(.chat-message--assistant)   .chat-message__bubble[_ngcontent-%COMP%]{border-radius:1rem 1rem .25rem}.chat-message--assistant[_ngcontent-%COMP%]   .chat-message__content[_ngcontent-%COMP%]{max-width:100%}.chat-message--assistant[_ngcontent-%COMP%]   .chat-message__bubble[_ngcontent-%COMP%]{border-radius:1rem 1rem 1rem .25rem}.chat-message__bubble[_ngcontent-%COMP%]{padding:.75rem 1rem}}'],changeDetection:1})}return o})()});var ze,$e=$(()=>{"use strict";D();T();D();ze=(()=>{class o{static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-typing-indicator"]],decls:7,vars:3,consts:[["role","status","aria-live","polite","aria-atomic","true",1,"chat-typing"],["aria-hidden","true",1,"chat-typing__dot","chat-typing__dot--1"],["aria-hidden","true",1,"chat-typing__dot","chat-typing__dot--2"],["aria-hidden","true",1,"chat-typing__dot","chat-typing__dot--3"],[1,"chat-typing__text"]],template:function(n,e){n&1&&(I(0,"div",0),mt(1,"span",1)(2,"span",2)(3,"span",3),I(4,"span",4),h(5),d(6,"translate"),H()()),n&2&&(i(5),M(" ",l(6,1,"CHAT_TYPING_INDICATOR.TEXT")," "))},dependencies:[R,F],styles:["[_nghost-%COMP%]{display:inline-block}.chat-typing[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;background:#fff;border:1px solid #e5e7eb;border-radius:999px;padding:.6rem .9rem;font-size:.85rem;color:#6b7280}.chat-typing__dot[_ngcontent-%COMP%]{width:.45rem;height:.45rem;border-radius:999px;background:#9ca3af;display:inline-block;opacity:.4}@media(prefers-reduced-motion:no-preference){.chat-typing__dot[_ngcontent-%COMP%]{animation:chatDotBounce 1.4s ease-in-out infinite}}.chat-typing__dot--1[_ngcontent-%COMP%]{animation-delay:0s}.chat-typing__dot--2[_ngcontent-%COMP%]{animation-delay:.22s}.chat-typing__dot--3[_ngcontent-%COMP%]{animation-delay:.44s}@keyframes _ngcontent-%COMP%_chatDotBounce{0%,60%,to{transform:translateY(0);background:#9ca3af;opacity:.4}30%{transform:translateY(-.35rem);background:#6366f1;opacity:1}}.chat-typing__text[_ngcontent-%COMP%]{margin-left:.3rem}[data-theme=dark][_nghost-%COMP%]   .chat-typing[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-typing[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-text)}[data-theme=dark][_nghost-%COMP%]   .chat-typing__dot[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-typing__dot[_ngcontent-%COMP%]{background:var(--bulma-text)}"],changeDetection:1})}return o})()});function po(o,g){if(o&1&&u(0,"app-chat-message-item",2),o&2){let t=g.$implicit;S("message",t)}}function Co(o,g){o&1&&u(0,"app-chat-typing-indicator")}var mo,go,Ue,je=$(()=>{"use strict";T();D();qe();$e();T();D();mo=["scrollAnchor"],go=(o,g)=>g.id;Ue=(()=>{class o{messages=[];sending=!1;streaming=!1;scrollAnchor;messageElements;shouldScroll=!1;shouldScrollNewMessageToTop=!1;ngOnChanges(t){let n=t.streaming,e=t.messages;if(n?.currentValue===!0&&n?.previousValue===!1){this.shouldScrollNewMessageToTop=!0;return}if(e&&!e.previousValue?.length&&e.currentValue?.length){this.shouldScroll=!0;return}}ngAfterViewChecked(){this.shouldScrollNewMessageToTop?(this.shouldScrollNewMessageToTop=!1,this.scrollUserMessageToTop()):this.shouldScroll&&(this.shouldScroll=!1,this.scrollToBottom())}scrollUserMessageToTop(){let t=this.messageElements?.toArray();if(!t?.length)return;let n=t.length>=2?t[t.length-2].nativeElement:t[t.length-1].nativeElement,e=this.getScrollableParent(n);if(!e)return;let a=e.getBoundingClientRect(),_=n.getBoundingClientRect(),s=e.scrollTop+_.top-a.top-16,C=this.prefersReducedMotion()?"instant":"smooth";e.scrollTo({top:s,behavior:C})}scrollToBottom(){let t=this.scrollAnchor?.nativeElement;if(!t)return;let n=this.getScrollableParent(t);if(!n)return;let e=this.prefersReducedMotion()?"instant":"smooth";n.scrollTo({top:n.scrollHeight,behavior:e})}prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}getScrollableParent(t){let n=t.parentElement;for(;n;){let{overflow:e,overflowY:a}=window.getComputedStyle(n);if(/(auto|scroll)/.test(e+a))return n;n=n.parentElement}return null}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-message-list"]],viewQuery:function(n,e){if(n&1&&rt(mo,5)(Zt,5,ne),n&2){let a;j(a=Q())&&(e.scrollAnchor=a.first),j(a=Q())&&(e.messageElements=a)}},inputs:{messages:"messages",sending:"sending",streaming:"streaming"},features:[Tt],decls:7,vars:4,consts:[["scrollAnchor",""],["aria-live","polite","aria-relevant","additions",1,"chat-message-list"],[3,"message"],["aria-hidden","true"]],template:function(n,e){n&1&&(r(0,"section",1),d(1,"translate"),et(2,po,1,1,"app-ch
5at-message-item",2,go),P(4,Co,1,0,"app-chat-typing-indicator"),u(5,"div",3,0),c()),n&2&&(b("aria-label",l(1,2,"CHAT_MESSAGE_LIST.ARIA_LABEL")),i(2),nt(e.messages),i(2),v(e.sending?4:-1))},dependencies:[R,Zt,ze,F],styles:[".chat-message-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;max-width:980px;margin:0 auto;width:100%;background:#f8fafc;border-radius:1rem}@media screen and (min-width:768px){.chat-message-list[_ngcontent-%COMP%]{padding:1.25rem 1.5rem}}.dark[_nghost-%COMP%]   .chat-message-list[_ngcontent-%COMP%], .dark   [_nghost-%COMP%]   .chat-message-list[_ngcontent-%COMP%], [data-theme=dark][_nghost-%COMP%]   .chat-message-list[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-message-list[_ngcontent-%COMP%], body.dark[_nghost-%COMP%]   .chat-message-list[_ngcontent-%COMP%], body.dark   [_nghost-%COMP%]   .chat-message-list[_ngcontent-%COMP%], body.theme-dark[_nghost-%COMP%]   .chat-message-list[_ngcontent-%COMP%], body.theme-dark   [_nghost-%COMP%]   .chat-message-list[_ngcontent-%COMP%]{background:#121212}"],changeDetection:1})}return o})()});function uo(o,g){o&1&&(r(0,"div",5),u(1,"span",7),h(2),d(3,"translate"),c()),o&2&&(i(2),M(" ",l(3,1,"CHAT_TYPING_INDICATOR.TEXT")," "))}var Qe,We=$(()=>{"use strict";T();Dt();D();Be();Ve();je();yt();T();D();Qe=(()=>{class o{store=O(ct);translate=O(st);route=O(kt);router=O(xt);menuToggle=new J;quotaLabel(){let t=this.store.quota();return t?this.translate.instant("AI_CHAT_CONVERSATION.QUOTA_LABEL",{used:t.used,limit:t.limit}):null}ngOnInit(){return f(this,null,function*(){let t=this.route.snapshot.paramMap.get("conversationId");if(!t){yield this.navigateToChatHome();return}this.store.conversations().length||(yield this.store.loadConversations(null)),(yield this.store.selectConversationByPublicId(t))||(yield this.navigateToChatHome())})}onSend(t){return f(this,null,function*(){yield this.store.sendMessage(t)})}navigateToChatHome(){return f(this,null,function*(){let t=this.findLang();if(t){yield this.router.navigate(["/",t,"ai-chat"]);return}yield this.router.navigate(["/ai-chat"])})}findLang(){let t=this.route;for(;t;){let n=t.snapshot.paramMap.get("lang");if(n)return n;t=t.parent}return null}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-ai-chat-conversation"]],outputs:{menuToggle:"menuToggle"},decls:9,vars:14,consts:[[1,"ai-chat-conversation"],[1,"ai-chat-conversation__container"],[3,"menuToggle","conversation"],["role","log","aria-live","polite","aria-relevant","additions",1,"ai-chat-conversation__body"],[3,"messages","sending","streaming"],["role","status","aria-live","polite","aria-atomic","true",1,"ai-chat-conversation__writing-banner"],[3,"send","disabled","quotaExceeded","quotaLabel"],["aria-hidden","true",1,"writing-pulse"]],template:function(n,e){n&1&&(r(0,"section",0),d(1,"translate"),r(2,"div",1)(3,"app-chat-header",2),p("menuToggle",function(){return e.menuToggle.emit()}),c(),r(4,"div",3),d(5,"translate"),u(6,"app-chat-message-list",4),c(),P(7,uo,4,3,"div",5),r(8,"app-chat-composer",6),p("send",function(_){return e.onSend(_)}),c()()()),n&2&&(b("aria-label",e.store.selectedConversation()?.title||l(1,10,"AI_CHAT_CONVERSATION.SECTION_ARIA")),i(3),S("conversation",e.store.selectedConversation()),i(),b("aria-label",l(5,12,"AI_CHAT_CONVERSATION.LOG_ARIA")),i(2),S("messages",e.store.selectedMessages())("sending",e.store.sending())("streaming",e.store.streaming()),i(),v(e.store.sending()||e.store.streaming()?7:-1),i(),S("disabled",e.store.sending()||e.store.streaming()||e.store.quotaExceeded())("quotaExceeded",e.store.quotaExceeded())("quotaLabel",e.quotaLabel()))},dependencies:[R,Ne,Ue,He,F],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow:hidden}.ai-chat-conversation[_ngcontent-%COMP%]{height:100%;overflow:hidden;background:#f7f8fb;padding:1rem}.ai-chat-conversation__body[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;padding:.5rem 0 0;scroll-padding-bottom:80px}.ai-chat-conversation__container[_ngcontent-%COMP%]{max-width:1100px;height:100%;margin:0 auto;display:flex;flex-direction:column;border-radius:20px;overflow:hidden;background:#f7f8fb}@media(max-width:768px){.ai-chat-conversation[_ngcontent-%COMP%]{height:calc(100vh - 3.5rem);padding:.5rem}.ai-chat-conversation__container[_ngcontent-%COMP%]{border-radius:14px}}[data-theme=dark][_nghost-%COMP%]   .ai-chat-conversation[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-conversation[_ngcontent-%COMP%]{background:var(--bulma-box-background-color)}[data-theme=dark][_nghost-%COMP%]   .ai-chat-conversation__container[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-conversation__container[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border:1px solid var(--bulma-border);box-shadow:0 10px 30px #0006}[data-theme=dark][_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%]{background:transparent;scrollbar-width:thin;scrollbar-color:#6d66f7 #14161a}[data-theme=dark][_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%]::-webkit-scrollbar, [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%]::-webkit-scrollbar{width:10px}[data-theme=dark][_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%]::-webkit-scrollbar-track, [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#14161a;border-radius:10px}[data-theme=dark][_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#6b64f2,#3273db);border-radius:10px}[data-theme=dark][_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover, [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-conversation__body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#6b64f2,#3273db)}.ai-chat-conversation__writing-banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.35rem 1.25rem;font-size:.78rem;font-weight:500;color:#6366f1;background:#6366f10f;border-top:1px solid rgba(99,102,241,.15);animation:_ngcontent-%COMP%_bannerFadeIn .2s ease}@keyframes _ngcontent-%COMP%_bannerFadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.writing-pulse[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background:#6366f1;flex-shrink:0;animation:_ngcontent-%COMP%_writingPulse 1.1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.writing-pulse[_ngcontent-%COMP%]{animation:none;opacity:.7}}@keyframes _ngcontent-%COMP%_writingPulse{0%,to{opacity:.25;transform:scale(.85)}50%{opacity:1;transform:scale(1.15)}}[data-theme=dark][_nghost-%COMP%]   .ai-chat-conversation__writing-banner[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-conversation__writing-banner[_ngcontent-%COMP%]{color:#a5b4fc;background:#6366f11a;border-top-color:#6366f140}[data-theme=dark][_nghost-%COMP%]   .writing-pulse[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .writing-pulse[_ngcontent-%COMP%]{background:#a5b4fc}'],changeDetection:1})}return o}
5)()});var Ge,Ye=$(()=>{"use strict";T();D();cn();T();D();Ge=(()=>{class o{eyebrow="";title="";description="";startChat=new J;onStart(){this.startChat.emit()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-chat-empty-state"]],inputs:{eyebrow:"eyebrow",title:"title",description:"description"},outputs:{startChat:"startChat"},decls:23,vars:15,consts:[[1,"chat-empty-state"],[1,"chat-empty-state__box"],[1,"chat-empty-state__content"],[1,"chat-empty-state__eyebrow"],[1,"chat-empty-state__title"],[1,"chat-empty-state__text"],["type","button",1,"chat-empty-state__cta",3,"click"],[1,"icon","is-small"],["aria-hidden","true",1,"pi","pi-plus"],[1,"chat-empty-state__privacy"],["aria-hidden","true",1,"chat-empty-state__illustration"],["src","assets/imgs/Chat-bot.svg","alt","","draggable","false","width","200","height","200",1,"chat-empty-state__img"]],template:function(n,e){n&1&&(r(0,"section",0),d(1,"translate"),r(2,"div",1)(3,"div",2)(4,"p",3),h(5),d(6,"translate"),c(),r(7,"h2",4),h(8),d(9,"translate"),c(),r(10,"p",5),h(11),d(12,"translate"),c(),r(13,"button",6),p("click",function(){return e.onStart()}),r(14,"span",7),u(15,"i",8),c(),r(16,"span"),h(17),d(18,"translate"),c()(),r(19,"div",9),u(20,"app-privacy-badge"),c()(),r(21,"div",10),u(22,"img",11),c()()()),n&2&&(b("aria-label",e.title||l(1,5,"CHAT_EMPTY_STATE.TITLE")),i(5),M(" ",e.eyebrow||l(6,7,"CHAT_EMPTY_STATE.EYEBROW")," "),i(3),M(" ",e.title||l(9,9,"CHAT_EMPTY_STATE.TITLE")," "),i(3),M(" ",e.description||l(12,11,"CHAT_EMPTY_STATE.DESCRIPTION")," "),i(6),k(l(18,13,"CHAT_EMPTY_STATE.START_BTN")))},dependencies:[R,ke,F],styles:[".chat-empty-state[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:55vh;padding:1.5rem 1rem}.chat-empty-state__box[_ngcontent-%COMP%]{width:100%;max-width:780px;background:#fff;border:1px solid #e5e7eb;border-radius:1.25rem;padding:2rem 2rem 2rem 2.25rem;box-shadow:0 8px 30px #0f172a0d;display:flex;align-items:center;gap:1.5rem}.chat-empty-state__content[_ngcontent-%COMP%]{flex:1;min-width:0}.chat-empty-state__eyebrow[_ngcontent-%COMP%]{margin:0 0 .5rem;color:#4338ca;font-weight:700;font-size:.82rem;text-transform:uppercase;letter-spacing:.05em}.chat-empty-state__title[_ngcontent-%COMP%]{margin:0 0 .85rem;color:#111827;font-size:1.45rem;font-weight:700;line-height:1.3}.chat-empty-state__text[_ngcontent-%COMP%]{margin:0;color:#4b5563;line-height:1.65;font-size:.95rem}.chat-empty-state__cta[_ngcontent-%COMP%]{display:none;margin-top:1.25rem;align-items:center;gap:.5rem;padding:.65rem 1.4rem;background:#4f46e5;color:#fff;font-size:.92rem;font-weight:600;border:none;border-radius:2rem;cursor:pointer;transition:background .2s,transform .15s}@media(max-width:1023px){.chat-empty-state__cta[_ngcontent-%COMP%]{display:inline-flex}}.chat-empty-state__cta[_ngcontent-%COMP%]:hover{background:#4338ca;transform:translateY(-1px)}.chat-empty-state__cta[_ngcontent-%COMP%]:active{transform:translateY(0)}.chat-empty-state__privacy[_ngcontent-%COMP%]{margin-top:.75rem}.chat-empty-state__cta[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4f46e5;outline-offset:3px}.chat-empty-state__illustration[_ngcontent-%COMP%]{flex-shrink:0;width:200px;aspect-ratio:1;display:flex;align-items:center;justify-content:center}.chat-empty-state__img[_ngcontent-%COMP%]{width:100%;height:auto;display:block;aspect-ratio:1}@media(prefers-reduced-motion:no-preference){.chat-empty-state__img[_ngcontent-%COMP%]{animation:floatIn .6s cubic-bezier(.34,1.56,.64,1) both}}@keyframes _ngcontent-%COMP%_floatIn{0%{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(max-width:640px){.chat-empty-state[_ngcontent-%COMP%]{min-height:unset;padding:1rem;align-items:flex-start}.chat-empty-state__box[_ngcontent-%COMP%]{flex-direction:column-reverse;padding:1.25rem;gap:1rem;border-radius:1rem}.chat-empty-state__illustration[_ngcontent-%COMP%]{width:130px;margin:0 auto}.chat-empty-state__title[_ngcontent-%COMP%]{font-size:1.15rem}.chat-empty-state__text[_ngcontent-%COMP%]{font-size:.88rem}}[data-theme=dark][_nghost-%COMP%]   .chat-empty-state__box[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-empty-state__box[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);box-shadow:0 18px 40px #00000059}[data-theme=dark][_nghost-%COMP%]   .chat-empty-state__eyebrow[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-empty-state__eyebrow[_ngcontent-%COMP%]{color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-empty-state__title[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-empty-state__title[_ngcontent-%COMP%]{color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .chat-empty-state__text[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-empty-state__text[_ngcontent-%COMP%]{color:var(--bulma-text);opacity:.88}[data-theme=dark][_nghost-%COMP%]   .chat-empty-state__img[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-empty-state__img[_ngcontent-%COMP%]{filter:brightness(.88) saturate(.9)}[data-theme=dark][_nghost-%COMP%]   .chat-empty-state__cta[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .chat-empty-state__cta[_ngcontent-%COMP%]{background:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .chat-empty-state__cta[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .chat-empty-state__cta[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}"],changeDetection:1})}return o}
5)()});var Ke,Xe=$(()=>{"use strict";T();Dt();D();Ye();yt();Et();sn();T();D();Ke=(()=>{class o{store=O(ct);ui=O(Pt);router=O(xt);route=O(kt);translate=O(st);seo=O(ue);menuToggle=new J;langSub;ngOnInit(){this.setSeo(),this.langSub=this.translate.onLangChange.subscribe(()=>this.setSeo())}ngOnDestroy(){this.langSub?.unsubscribe()}setSeo(){let t=this.translate.currentLang||"fr",n="https://textiaa.com",e=`/${t}/ai-chat`,a=`${n}${e}`,_=this.translate.instant("AI_CHAT_HOME.SEO.TITLE"),s=this.translate.instant("AI_CHAT_HOME.SEO.DESCRIPTION");this.seo.setTitle(_),this.seo.setDescription(s),this.seo.setCanonical(a),this.seo.setOgBasics({siteName:"Textiaa",type:"website",image:`${n}/assets/og/landing-en.jpg`}),this.seo.setHreflangs(n,[{lang:"fr",path:"/fr/ai-chat"},{lang:"en",path:"/en/ai-chat"},{lang:"es",path:"/es/ai-chat"},{lang:"de",path:"/de/ai-chat"},{lang:"it",path:"/it/ai-chat"},{lang:"pl",path:"/pl/ai-chat"},{lang:"ar",path:"/ar/ai-chat"},{lang:"x-default",path:"/fr/ai-chat"}]),this.seo.setJsonLd({"@context":"https://schema.org","@type":"WebPage","@id":`${a}#ai-chat`,url:a,name:_,inLanguage:t,description:s,isPartOf:{"@id":`${n}/#app`},about:{"@type":"SoftwareApplication",name:"Textiaa \u2013 Assistant IA"}})}onNewConversation(){this.store.createConversation().then(t=>{if(!t)return;let n=this.findLang();n?this.router.navigate(["/",n,"ai-chat","conversation",t.publicId]):this.router.navigate(["/ai-chat","conversation",t.publicId])})}findLang(){let t=this.route;for(;t;){let n=t.snapshot.paramMap.get("lang");if(n)return n;t=t.parent}return null}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-ai-chat-home"]],outputs:{menuToggle:"menuToggle"},decls:8,vars:9,consts:[[1,"ai-home-topbar"],["type","button","aria-controls","chat-sidebar",1,"ai-home-menu-btn",3,"click"],["aria-hidden","true",1,"pi","pi-bars"],[1,"ai-chat-home"],[3,"startChat"]],template:function(n,e){n&1&&(r(0,"div",0)(1,"button",1),d(2,"translate"),d(3,"translate"),p("click",function(){return e.menuToggle.emit()}),u(4,"i",2),c()(),r(5,"section",3),d(6,"translate"),r(7,"app-chat-empty-state",4),p("startChat",function(){return e.onNewConversation()}),c()()),n&2&&(i(),b("aria-label",e.ui.mobileSidebarOpen()?l(2,3,"AI_CHAT_HOME.CLOSE_MENU_ARIA"):l(3,5,"AI_CHAT_HOME.OPEN_MENU_ARIA"))("aria-expanded",e.ui.mobileSidebarOpen()),i(4),b("aria-label",l(6,7,"AI_CHAT_HOME.SECTION_ARIA")))},dependencies:[R,Ge,F],styles:[".ai-home-topbar[_ngcontent-%COMP%]{display:none;padding:.75rem 1rem 0}.ai-home-menu-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border:1px solid #e5e7eb;background:#fff;border-radius:10px;cursor:pointer;color:#374151;transition:background .18s,border-color .18s}.ai-home-menu-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6}.ai-home-menu-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid #4338ca;outline-offset:2px}.ai-home-menu-btn[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:1rem}@media(max-width:1023px){.ai-home-topbar[_ngcontent-%COMP%]{display:block}}.ai-chat-home[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;align-items:center}[data-theme=dark][_nghost-%COMP%]   .ai-home-menu-btn[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-home-menu-btn[_ngcontent-%COMP%]{background:var(--bulma-box-background-color);border-color:var(--bulma-border);color:var(--bulma-text-strong)}[data-theme=dark][_nghost-%COMP%]   .ai-home-menu-btn[_ngcontent-%COMP%]:hover, [data-theme=dark]   [_nghost-%COMP%]   .ai-home-menu-btn[_ngcontent-%COMP%]:hover{background:#485fc714;border-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .ai-home-menu-btn[_ngcontent-%COMP%]:focus-visible, [data-theme=dark]   [_nghost-%COMP%]   .ai-home-menu-btn[_ngcontent-%COMP%]:focus-visible{outline-color:var(--bulma-link)}[data-theme=dark][_nghost-%COMP%]   .ai-chat-home[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .ai-chat-home[_ngcontent-%COMP%]{background:transparent}"],changeDetection:1})}return o})()});var hr,bo=$(()=>{De();We();Xe();hr=[{path:"",component:Re,children:[{path:"",pathMatch:"full",component:Ke,data:{breadcrumb:"Chat IA",icon:"forum"}},{path:"conversation/:conversationId",component:Qe,data:{breadcrumb:"C
5onversation",icon:"forum"}}]}]});bo();export{hr as AI_CHAT_ROUTES};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.