PageSourceSearch

https://app.mentortools.com/app/_next/static/chunks/1045-d24d8d4e34ea86c5.js

js mentortools.com collected 2026-10-01 13:55:54 UTC 37,122 bytes, 2 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];if(null!=a)for(var n in a)a.hasOwnProperty(n)&&(e[n]=a[n])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:mentortools-frontend":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="104102ff-d45f-4306-881d-37660c52919c",e._sentryDebugIdIdentifier="sentry-dbid-104102ff-d45f-4306-881d-37660c52919c")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1045],{11045:(e,t,a)=>{a.d(t,{T:()=>eD});var n=a(37876),s=a(14232),r=a(89099),l=a(66950),i=a(22208),o=a(62902),c=a(31941),d=a(64713),y=a(48711),u=a(12772),x=a(4262),m=a(28201),p=a(67768),h=a(97685),f=a(14958),g=a(30942),A=a(2997),C=a(14901),_=a(92535);let j="mentorAgent:openChatId:v1",w="mentorAgent:starter:v1",b=e=>{try{return localStorage.getItem(e)}catch{return null}},v=(e,t)=>{try{localStorage.setItem(e,t)}catch{}},S=e=>{v(j,String(e))},T=(e,t)=>{let a=b(w),n={};if(a)try{n=JSON.parse(a)}catch{n={}}n[String(e)]=t,v(w,JSON.stringify(n))},k=new Set,I=new Set,E=null;var V=a(37213),P=a(77981),M=a(58935),L=a(74359),N=a(66731),F=a(49067),O=a(34020);let W=({enabled:e=!1})=>{let t=(0,r.useRouter)(),{data:a,...n}=(0,O.A)({queryDataKey:N.f.getFactsList.queryKey,queryCountKey:N.f.getFactsListCount.queryKey,queryDataFn:({limit:e,offset:t})=>F.A.getFactsList({limit:e,offset:t}),queryCountFn:F.A.getFactsListCount,enabled:e},{initialPage:parseInt(`${t.query?.page}`)||1,initialLimit:parseInt(`${t.query?.limit}`)||10,initialOrder:{ascending:!!t.query?.ascending}});return{data:a,...n}};var G=a(8062),R=a(80315),z=a(10266),D=a(9236),K=a(38388),q=a(85811),H=a(3801),$=a(35431);let B=(0,d.Ay)(l.A)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(2),width:"100%",marginBottom:e.spacing(2),flexWrap:"wrap"})),Q=(0,d.Ay)(l.A)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(2),marginLeft:"auto",flexShrink:0})),J=(0,d.Ay)(i.A)(({theme:e})=>({borderRadius:e.spacing(10),textTransform:"none",padding:e.spacing(1.25,2.5),whiteSpace:"nowrap"})),X=(0,d.Ay)(H.A)(({theme:e})=>({borderRadius:e.spacing(10),textTransform:"none",padding:e.spacing(1.25,2.5),whiteSpace:"nowrap"})),U=(0,d.Ay)(c.A)({fontWeight:600,minWidth:0}),Y=(0,s.memo)(({title:e,activeTab:t,isStarting:a,onNewConversation:r,onSelectTab:l})=>{let{t:i}=(0,g.o)("translation",{keyPrefix:"PAGE.AGENT"}),{t:o}=(0,g.o)("translation",{keyPrefix:"NAVIGATION.rootMenu"}),[c,d]=(0,s.useState)(null),y=(0,s.useCallback)(e=>{d(e.currentTarget)},[]),u=(0,s.useCallback)(()=>{d(null)},[]),x=(0,s.useCallback)(e=>{l(e),d(null)},[l]);return(0,n.jsxs)(B,{children:[e&&(0,n.jsx)(U,{variant:"h5",noWrap:!0,children:e}),(0,n.jsxs)(Q,{children:[(0,n.jsx)(X,{variant:"outlined",loading:a,startIcon:(0,n.jsx)(q.In,{icon:"tabler:plus"}),onClick:r,"data-testid":"agent-new-conversation",children:i("new_conversation")}),(0,n.jsx)(J,{variant:"outlined","aria-haspopup":"menu","aria-expanded":c?"true":void 0,onClick:y,startIcon:(0,n.jsx)(q.In,{icon:"tabler:sparkles"}),endIcon:(0,n.jsx)(q.In,{icon:"tabler:chevron-down"}),"data-testid":"agent-menu",children:o("mentorAgent")}),(0,n.jsx)(R.A,{anchorEl:c,open:!!c,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{sx:{mt:1,minWidth:220,borderRadius:2}},children:$.vR.map(e=>{let a=e.value.toUpperCase();return(0,n.jsxs)(z.A,{selected:t===a,onClick:()=>x(a),children:[(0,n.jsx)(D.A,{children:(0,n.jsx)(q.In,{icon:e.icon,fontSize:20})}),(0,n.jsx)(K.A,{children:i(e.label)})]},e.value)})})]})]})});var Z=a(26183),ee=a(8600),et=a(74234),ea=a(19610),en=a(18664),es=a(60072),er=a(74086),el=a(51802),ei=a(71950),eo=a(5157),ec=a(16361),ed=a(73127),ey=a(90154),eu=a(14583),ex=a(57555);let em=(0,d.Ay)(ea.A)(({theme:e})=>({display:"flex",flexDirection:"column",padding:e.spacing(3),gap:e.spacing(3),borderRadius:2*e.shape.borderRadius,boxSh
1adow:e.shadows[1],border:`1px solid ${e.palette.divider}`})),ep=(0,d.Ay)(l.A)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(2),padding:e.spacing(1,2),borderRadius:e.spacing(1.5),backgroundColor:e.palette.action.hover,border:`1px solid ${e.palette.divider}`,color:e.palette.text.secondary})),eh=({label:e})=>{let t=(0,et.A)();return(0,n.jsxs)(o.A,{direction:"row",alignItems:"center",gap:t.spacing(1),alignSelf:"flex-start","data-sentry-element":"Stack","data-sentry-component":"ActiveStatus","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(l.A,{width:8,height:8,borderRadius:"50%",bgcolor:"success.main","data-sentry-element":"Box","data-sentry-source-file":"ChannelsView.tsx"}),(0,n.jsx)(c.A,{variant:"body2",color:"success.main",sx:{fontWeight:600},"data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:e})]})},ef=({label:e})=>{let t=(0,et.A)();return(0,n.jsxs)(ep,{"data-sentry-element":"InfoBox","data-sentry-component":"NotConnectedBox","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(eo.A,{icon:"tabler:alert-circle",color:t.palette.action.disabled,fontSize:18,"data-sentry-element":"Icon","data-sentry-source-file":"ChannelsView.tsx"}),(0,n.jsx)(c.A,{variant:"body2",color:"text.disabled","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:e})]})},eg=({onClose:e})=>{let{notify:t}=(0,ec.A)(),{t:a}=(0,g.o)("translation",{keyPrefix:"PAGE.AGENT.tabs.channels"}),{t:r}=(0,g.o)("translation"),l=(0,et.A)(),[d,y]=(0,s.useState)(null),[x,m]=(0,s.useState)(""),[p,h]=(0,s.use
1State)(""),[f,A]=(0,s.useState)(null),[C,_]=(0,s.useState)(null),{data:j,isLoading:w}=(0,V.ev)({entity:ex.lH.TELEGRAM}),{data:b,isLoading:v}=(0,V.ev)({entity:ex.lH.WHATSAPP}),{mutate:S,isPending:T}=(0,V.J2)(),k=e=>()=>{y(d===e?null:e)},I=(e,n)=>()=>{let s=n===ex.lH.TELEGRAM?x:p,r=n===ex.lH.TELEGRAM?"Telegram":"WhatsApp",l=n===ex.lH.TELEGRAM?A:_;if("connect"===e&&n===ex.lH.WHATSAPP){let e=el.Yj().regex(/^\d+$/,a("whatsapp.invalid_phone_number")).min(8,a("whatsapp.invalid_phone_number")).safeParse(s);if(!e.success)return void l(e.error.errors[0].message)}S({external_system_type:n,external_user_id:"connect"===e?s:null},{onSuccess:()=>{y(null),n===ex.lH.TELEGRAM?m(""):h(""),l(null),"disconnect"===e&&t(a("disconnect_success",{system:r}),{type:"success"}),"connect"===e&&t(a("connect_success",{system:r}),{type:"success"})},onError:e=>{t(a("connect_error",{system:r}),{type:"error"});let n=(0,ed.i5)(e,"UserIDAlreadyExists",a("user_id_already_in_use")),s=(0,ed.i5)(e,"InvalidUserID",a("invalid_user_id"));(n||s)&&l(n||s)}})},E=(0,s.useMemo)(()=>!!j?.external_user_id,[j]),P=(0,s.useMemo)(()=>!!b?.external_user_id,[b]),M=e=>"development"===ey.A.publicEnv?a(`${e}.bot_link_dev`):"staging"===ey.A.publicEnv?a(`${e}.bot_link_stage`):a(`${e}.bot_link_prod`);return w||v?(0,n.jsx)(u.A,{}):(0,n.jsxs)(eu.m,{"data-sentry-element":"Container","data-sentry-component":"ChannelsView","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsxs)(o.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between","data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsxs)(o.A,{gap:l.spacing(1),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(c.A,{variant:"h4",fontWeight:600,"data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("header_secondary")}),(0,n.jsx)(c.A,{variant:"body1","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("description")})]}),e&&(0,n.jsx)(ee.A,{title:r("ACTION.close"),arrow:!0,children:(0,n.jsx)(Z.A,{onClick:e,children:(0,n.jsx)(eo.A,{icon:"tabler:x",fontSize:24})})})]}),(0,n.jsxs)(o.A,{gap:l.spacing(4),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(em,{"data-sentry-element":"ChannelCard","data-sentry-source-file":"ChannelsView.tsx",children:(0,n.jsxs)(o.A,{direction:"row",gap:l.spacing(3),alignItems:"center","data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(eu.L,{color:l.colorWithOpacity(l.palette.secondary,.1),sx:{alignSelf:"flex-start"},"data-sentry-element":"IconBox","data-sentry-source-file":"ChannelsView.tsx",children:(0,n.jsx)(eo.A,{icon:"tabler:message-circle",fontSize:24,color:l.palette.success.main,"data-sentry-element":"Icon","data-sentry-source-file":"ChannelsView.tsx"})}),(0,n.jsxs)(o.A,{flex:1,gap:l.spacing(1),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsxs)(o.A,{direction:"row",alignItems:"center",gap:l.spacing(2),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(c.A,{variant:"h6",fontWeight:600,"data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("mentortools_web.header")}),(0,n.jsx)(en.A,{label:a("default"),size:"small",sx:{height:20},"data-sentry-element":"Chip","data-sentry-source-file":"ChannelsView.tsx"})]}),(0,n.jsx)(c.A,{variant:"body2","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("mentortools_web.description")})]}),(0,n.jsx)(eh,{label:a("active"),"data-sentry-element":"ActiveStatus","data-sentry-source-file":"ChannelsView.tsx"})]})}),(0,n.jsxs)(em,{"data-sentry-element":"ChannelCard","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsxs)(o.A,{direction:"row",gap:l.spacing(3),alignItems:"flex-start","data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(eu.L,{color:l.colorWithOpacity(l.palette.secondary,.1),"data-sentry-element":"IconBox","data-sentry-source-file":"ChannelsView.tsx",children:(0,n.jsx)(eo.A,{icon:"tabler:brand-telegram",fontSize:24,"data-sentry-element":"Icon","data-sentry-source-file":"ChannelsView.tsx"})}),(0,n.jsxs)(o.A,{flex:1,gap:l.spacing(1),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsxs)(o.A,{direction:"row",alignItems:"center",gap:l.spacing(2),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(c.A,{variant:"h6",sx:{fontWeight:600},"data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("telegram.header")}),E?(0,n.jsxs)(o.A,{direction:"row",gap:l.spacing(1),children:[(0,n.jsx)(c.A,{variant:"caption",color:l.palette.success.main,children:a("connected_as")}),(0,n.jsxs)(c.A,{variant:"caption",children:[" ",j?.external_user_id]})]}):(0,n.jsx)(en.A,{label:E?a("active"):a("not_connected"),size:"small",color:E?"success":"default",sx:{height:20,fontSize:"0.75rem"}})]}),(0,n.jsxs)(o.A,{direction:"row",gap:l.spacing(2),flexWrap:"wrap","data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(c.A,{variant:"body2","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("telegram.description")}),E&&(0,n.jsx)(ei.h,{value:M(ex.lH.TELEGRAM),size:50})]})]}),E?(0,n.jsx)(i.A,{variant:"outlined",color:"primary",size:"small",sx:{textTransform:"none"},onClick:I("disconnect",ex.lH.TELEGRAM),children:a("disconnect")}):(0,n.jsx)(n.Fragment,{children:"telegram"===d?(0,n.jsx)(ei.h,{value:M(ex.lH.TELEGRAM),size:50}):(0,n.jsx)(i.A,{variant:"outlined",color:"primary",size:"small",sx:{textTransform:"none"},onClick:k("telegram"),children:a("connect")})})]}),(0,n.jsx)(er.A,{in:"telegram"===d&&!E,"data-sentry-element":"Collapse","data-sentry-source-file":"ChannelsView.tsx",children:(0,n.jsxs)(o.A,{gap:l.spacing(3),sx:{pl:0},"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsxs)(o.A,{gap:l.spacing(1),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(c.A,{variant:"body2","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("telegram.instructions.step_1")}),(0,n.jsx)(c.A,{variant:"body2","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("telegram.instructions.step_2")}),(0,n.jsx)(c.A,{variant:"body2","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("telegram.instructions.step_3")})]}),(0,n.jsxs)(o.A,{direction:"row",gap:l.spacing(2),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(es.A,{fullWidth:!0,size:"small",placeholder:a("telegram.user_id"),value:x,onChange:e=>m(e.target.value),helperText:f,error:!!f,"data-sentry-element":"TextField","data-sentry-source-file":"ChannelsView.tsx"}),(0,n.jsx)(i.A,{variant:"contained",color:"primary",sx:{textTransform:"none",alignSelf:"flex-start"},onClick:I("connect",ex.lH.TELEGRAM),disabled:T,"data-sentry-element":"Button","data-sentry-source-file":"ChannelsView.tsx",children:r("ACTION.save")})]})]})}),!E&&(0,n.jsx)(ef,{label:a("channel_is_not_connected")})]}),(0,n.jsxs)(em,{"data-sentry-element":"ChannelCard","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsxs)(o.A,{direction:"row",gap:l.spacing(3),alignItems:"flex-start","data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(eu.L,{color:l.colorWithOpacity(l.palette.secondary,.1),"data-sentry-element":"IconBox","data-sentry-source-file":"ChannelsView.tsx",children:(0,n.jsx)(eo.A,{icon:"tabler:brand-whatsapp",fontSize:24,"data-sentry-element":"Icon","data-sentry-source-file":"ChannelsView.tsx"})}),(0,n.jsxs)(o.A,{flex:1,gap:l.spacing(1),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsxs)(o.A,{direction:"row",alignItems:"center",gap:l.spacing(2),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(c.A,{variant:"h6",sx:{fontWeight:600},"data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("whatsapp.header")}),P?(0,n.jsxs)(o.A,{direction:"row",gap:l.spacing(1),children:[(0,n.jsx)(c.A,{variant:"caption",color:l.palette.success.main,children:a("connected_as")}),(0,n.jsxs)(c.A,{variant:"caption",children:[" ",b?.external_user_id]})]}):(0,n.jsx)(en.A,{label:P?a("active"):a("not_connected"),size:"small",color:P?"success":"default",sx:{height:20,fontSize:"0.75rem"}})]}),(0,n.jsxs)(o.A,{direction:"row",gap:l.spacing(2),flexWrap:"wrap","data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(c.A,{variant:"body2","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("whatsapp.description")}),P&&(0,n.jsx)(ei.h,{value:M(ex.lH.WHATSAPP),size:50})]})]}),P?(0,n.jsx)(i.A,{variant:"outlined",color:"primary",size:"small",sx:{textTransform:"none"},onClick:I("disconnect",ex.lH.WHATSAPP),children:a("disconnect")}):(0,n.jsx)(n.Fragment,{children:"whatsapp"===d?(0,n.jsx)(ei.h,{value:M(ex.lH.WHATSAPP),size:50}):(0,n.jsx)(i.A,{variant:"outlined",color:"primary",size:"small",sx:{textTransform:"none"},onClick:k("whatsapp"),children:a("connect")})})]}),(0,n.jsx)(er.A,{in:"whatsapp"===d&&!P,"data-sentry-element":"Collapse","data-sentry-source-file":"ChannelsView.tsx",children:(0,n.jsxs)(o.A,{gap:l.spacing(3),sx:{pl:0},"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsxs)(o.A,{gap:l.spacing(1),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(c.A,{variant:"body2","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("whatsapp.instructions.step_1")}),(0,n.jsx)(c.A,{variant:"body2","data-sentry-element":"Typography","data-sentry-source-file":"ChannelsView.tsx",children:a("whatsapp.instructions.step_2")})]}),(0,n.jsxs)(o.A,{direction:"row",gap:l.spacing(2),"data-sentry-element":"Stack","data-sentry-source-file":"ChannelsView.tsx",children:[(0,n.jsx)(es.A,{fullWidth:!0,size:"small",placeholder:a("whatsapp.phone_number"),value:p,onChange:e=>h(e.target.value),helperText:C,error:!!C,"data-sentry-element":"TextField","data-sentry-source-file":"ChannelsView.tsx"}),(0,n.jsx)(i.A,{variant:"contained",color:"primary",sx:{textTransform:"none",alignSelf:"flex-start"},onClick:I("connect",ex.lH.WHATSAPP),disabled:T,"data-sentry-element":"Button","data-sentry-source-file":"ChannelsView.tsx",children:r("ACTION.save")})]})]})}),!P&&(0,n.jsx)(ef,{label:a("channel_is_not_connected")})]})]})]})};var eA=a(40097),eC=a(88992),e_=a(13810),ej=a(63456),ew=a(75542),eb=a(30833);let ev=e=>({academy_info:e?.academy_info||"",portal_owner_info:e?.portal_owner_info||"",goal:e?.goal||"",agent_name:e?.agent_name||"",agent_personality:e?.agent_personality||""}),eS=({onSubmit:e,data:t})=>{let a=(0,et.A)(),{t:r}=(0,g.o)("translation",{keyPrefix:"PAGE.AGENT.tabs.context"}),{t:l}=(0,ej.Bd)("translation"),{control:c,handleSubmit:d,reset:y,formState:{isDirty:u,isSubmitting:x}}=(0,eC.mN)({resolver:(0,e_.u)(eb.Wl),defaultValues:ev(t)}),m=(0,s.useCallback)(()=>{y(ev(t),{keepDefaultValues:!0})},[t,y]);return(0,s.useEffect)(()=>{m()},[t,m]),(0,n.jsxs)("form",{onSubmit:d(e),"data-sentry-component":"ContextForm","data-sentry-source-file":"ContextForm.tsx",children:[(0,n.jsxs)(o.A,{gap:a.spacing(6),sx:{mt:a.spacing(4),mb:a.spacing(12)},"data-sentry-element":"Stack","data-sentry-source-file":"ContextForm.tsx",children:[(0,n.jsx)(eC.xI,{name:"agent_name",control:c,render:({field:e,fieldState:{error:t}})=>(0,n.jsx)(ew.Ay,{...e,fullWidth:!0,label:r("agent_name_label"),placeholder:r("agent_name_placeholder"),error:!!t,helperText:t?l(`${t.message}
1`,{count:eb._K.agent_name}):""}),"data-sentry-element":"Controller","data-sentry-source-file":"ContextForm.tsx"}),(0,n.jsx)(eC.xI,{name:"agent_personality",control:c,render:({field:e,fieldState:{error:t}})=>(0,n.jsx)(ew.Ay,{...e,fullWidth:!0,multiline:!0,rows:15,label:r("agent_personality_label"),placeholder:r("agent_personality_placeholder"),error:!!t,helperText:t?l(`${t.message}`,{count:eb._K.agent_personality}):""}),"data-sentry-element":"Controller","data-sentry-source-file":"ContextForm.tsx"}),(0,n.jsx)(eC.xI,{name:"academy_info",control:c,render:({field:e,fieldState:{error:t}})=>(0,n.jsx)(ew.Ay,{...e,fullWidth:!0,multiline:!0,rows:15,label:r("academy_info_label"),placeholder:r("academy_info_placeholder"),error:!!t,helperText:t?l(`${t.message}`,{count:eb._K.academy_info}):""}),"data-sentry-element":"Controller","data-sentry-source-file":"ContextForm.tsx"}),(0,n.jsx)(eC.xI,{name:"portal_owner_info",control:c,render:({field:e,fieldState:{error:t}})=>(0,n.jsx)(ew.Ay,{...e,fullWidth:!0,multiline:!0,rows:15,label:r("portal_owner_info_label"),placeholder:r("portal_owner_info_placeholder"),error:!!t,helperText:t?l(`${t.message}`,{count:eb._K.portal_owner_info}):""}),"data-sentry-element":"Controller","data-sentry-source-file":"ContextForm.tsx"}),(0,n.jsx)(eC.xI,{name:"goal",control:c,render:({field:e,fieldState:{error:t}})=>(0,n.jsx)(ew.Ay,{...e,fullWidth:!0,multiline:!0,rows:15,label:r("goal_label"),placeholder:r("goal_placeholder"),error:!!t,helperText:t?l(`${t.message}`,{count:eb._K.goal}):""}),"data-sentry-element":"Controller","data-sentry-source-file":"ContextForm.tsx"})]}),(0,n.jsxs)(o.A,{gap:a.spacing(2),direction:"row",justifyContent:"flex-end","data-sentry-element":"Stack","data-sentry-source-file":"ContextForm.tsx",children:[(0,n.jsx)(i.A,{variant:"outlined",disabled:!u||x,onClick:m,"data-sentry-element":"Button","data-sentry-source-file":"ContextForm.tsx",children:l("ACTION.cancel")}),(0,n.jsx)(H.A,{type:"submit",variant:"contained",disabled:!u||x,loading:x,"data-sentry-element":"LoadingButton","data-sentry-source-file":"ContextForm.tsx",children:l("ACTION.save")})]})]})},eT=({data:e,isLoading:t,onClose:a})=>{let{t:s}=(0,g.o)("translation",{keyPrefix:"PAGE.AGENT.tabs"}),{t:r}=(0,g.o)(),l=(0,et.A)(),{mutateAsync:i}=(()=>{let{notify:e}=(0,ec.A)(),t=(0,p.jE)();return(0,eA.n)({mutationFn:F.A.updatePortalAIInfo,onSuccess:({data:a})=>{a.done&&t.setQueryData(N.f.getPortalAIInfo.queryKey,e=>e?{...e,data:{...e.data,result:a.result}}:e),e("AGENT.update_context",{type:"success"})},onError:()=>{e("AGENT.update_context",{type:"error"})}})})();return t?(0,n.jsx)(o.A,{children:(0,n.jsx)(u.A,{})}):(0,n.jsxs)(eu.m,{"data-sentry-element":"Container","data-sentry-component":"ContextView","data-sentry-source-file":"ContextView.tsx",children:[(0,n.jsxs)(o.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between","data-sentry-element":"Stack","data-sentry-source-file":"ContextView.tsx",children:[(0,n.jsxs)(o.A,{gap:l.spacing(1),"data-sentry-element":"Stack","data-sentry-source-file":"ContextView.tsx",children:[(0,n.jsx)(c.A,{variant:"h4",fontWeight:600,"data-sentry-element":"Typography","data-sentry-source-file":"ContextView.tsx",children:s("context.header")}),(0,n.jsx)(c.A,{variant:"body1","data-sentry-element":"Typography","data-sentry-source-file":"ContextView.tsx",children:s("context.description")})]}),a&&(0,n.jsx)(ee.A,{title:r("ACTION.close"),arrow:!0,children:(0,n.jsx)(Z.A,{onClick:a,children:(0,n.jsx)(eo.A,{icon:"tabler:x",fontSize:24})})})]}),(0,n.jsx)(eS,{onSubmit:i,data:e,"data-sentry-element":"ContextForm","data-sentry-source-file":"ContextView.tsx"})]})};var ek=a(27874),eI=a(79219),eE=a(62727),eV=a(76068),eP=a(90432),eM=a(97009),eL=a(16791),eN=a(61349),eF=a(44114),eO=a(78021);let eW=()=>{let e,t=(0,et.A)(),{t:a}=(0,g.o)("translation",{keyPrefix:"PAGE.AGENT.tabs.memory"}),{t:r}=(0,g.o)(),[l,i]=(0,s.useState)("Facts"),[d,y]=(0,s.useState)(null),{isOpen:u,open:x,close:m}=(0,eV.A)(),{isOpen:h,open:f,close:A}=(0,eV.A)(),[C,_]=(0,s.useState)(null),{isOpen:j,open:w,close:b}=(0,eV.A)(),{isOpen:v,open:S,close:T}=(0,eV.A)(),{data:k=[],isLoading:I,query:E,itemsCount:V,pagesCount:P,itemsPerPageCount:M}=W({enabled:!0}),{mutateRemoveFact:O,isRemovingFact:G,mutateClearAllFacts:R,isClearingAllFacts:z,mutateRemoveProfileByKey:D,isRemovingProfileByKey:K,mutateClearProfile:q,isClearingProfile:$}=(()=>{let{notify:e}=(0,ec.A)(),t=(0,p.jE)(),{mutateAsync:a,isPending:n}=(0,eA.n)({mutationFn:F.A.clearAllFacts,onSuccess:()=>{t.invalidateQueries({queryKey:[N.f.getFactsList.queryKey]}),t.invalidateQueries({queryKey:[N.f.getFactsListCount.queryKey]}),e("AGENT.clear_all_memory_facts",{type:"success"})},onError:()=>{e("AGENT.clear_all_memory_facts",{type:"error"})}}),{mutateAsync:s,isPending:r}=(0,eA.n)({mutationFn:F.A.removeFactById,onSuccess:()=>{t.invalidateQueries({queryKey:[N.f.getFactsList.queryKey]}),t.invalidateQueries({queryKey:[N.f.getFactsListCount.queryKey]}),e("AGENT.delete_memory_fact",{type:"success"})},onError:()=>{e("AGENT.delete_memory_fact",{type:"error"})}}),{mutateAsync:l,isPending:i}=(0,eA.n)({mutationFn:F.A.clearProfile,onSuccess:()=>{t.invalidateQueries(N.f.getProfile),e("AGENT.clear_profile",{type:"success"})},onError:()=>{e("AGENT.clear_profile",{type:"error"})}}),{mutateAsync:o,isPending:c}=(0,eA.n)({mutationFn:F.A.removeProfileByKey,onSuccess:()=>{t.invalidateQueries(N.f.getProfile),e("AGENT.delete_profile_key",{type:"success"})},onError:()=>{e("AGENT.delete_profile_key",{type:"error"})}});return{mutateClearAllFacts:a,isClearingAllFacts:n,mutateRemoveFact:s,isRemovingFact:r,mutateClearProfile:l,isClearingProfile:i,mutateRemoveProfileByKey:o,isRemovingProfileByKey:c}})(),{data:B}=(0,L.I)({...N.f.getProfile,queryFn:F.A.getProfile,select:({data:e})=>e.result}),Q=async()=>{d&&(await O(d.id),m())},J=async()=>{await R(),A()},X=async()=>{C&&(await D(C),b(),_(null))},U=async()=>{await q(),T()},Y=(e=e=>{y(e),x()},[{id:"fact_type",label:a("facts.table_labels.fact_type"),render:e=>(0,n.jsx)(c.A,{variant:"body1",children:e?.fact_type})},{id:"importance",label:a("facts.table_labels.importance"),render:e=>{let t=e?.importance||0,s="success",r="low";return t>3&&t<=7?(s="warning",r="medium"):t>7&&(s="error",r="high"),(0,n.jsx)(eF.A,{skin:"light",size:"small",label:a(`facts.importance_levels.${r}`),color:s,sx:{textTransform:"capitalize"}})}},{id:"content",label:a("facts.table_labels.content"),render:e=>(0,n.jsx)(c.A,{variant:"body1",children:e?.content})},{cell:r("actions"),label:r("actions"),render:t=>(0,n.jsx)(Z.A,{color:"error",onClick:()=>e(t),children:(0,n.jsx)(eo.A,{icon:"tabler:trash"})})}]),ee=(0,s.useMemo)(()=>Object.entries(B?.knowledge_state||{}),[B]),ea=0===ee.length;return(0,n.jsxs)(eI.Ay,{value:l,"data-sentry-element":"TabContext","data-sentry-component":"MemoryContent","data-sentry-source-file":"MemoryContent.tsx",children:[(0,n.jsx)(o.A,{direction:"row",justifyContent:"space-between",alignItems:"center","data-sentry-element":"Stack","data-sentry-source-file":"MemoryContent.tsx",children:(0,n.jsxs)(eM.w,{onChange:(e,t)=>
1{i(t)},"aria-label":"memory tabs","data-sentry-element":"TabList","data-sentry-source-file":"MemoryContent.tsx",children:[(0,n.jsx)(ek.A,{label:a("facts.header"),value:"Facts","data-sentry-element":"Tab","data-sentry-source-file":"MemoryContent.tsx"}),(0,n.jsx)(ek.A,{label:a("profile.header"),value:"Profile","data-sentry-element":"Tab","data-sentry-source-file":"MemoryContent.tsx"})]})}),(0,n.jsxs)(o.A,{"data-sentry-element":"Stack","data-sentry-source-file":"MemoryContent.tsx",children:[(0,n.jsx)(eE.A,{value:"Facts",sx:{p:0},"data-sentry-element":"TabPanel","data-sentry-source-file":"MemoryContent.tsx",children:(0,n.jsx)(eL.A,{hasData:k.length>0,isLoading:I,emptyStateMessage:a("facts.no_facts"),paginationControlsProps:{page:E.page,pageSize:E.limit,onChangePageSize:E.onChangeLimit,onChangePage:E.onChangePage,itemsCount:V,pagesCount:P,itemsPerPageCount:M},...k.length>0&&{controls:(0,n.jsx)(o.A,{justifyContent:"flex-end",direction:"row",children:(0,n.jsx)(H.A,{variant:"tonal",color:"error",onClick:f,children:r("ACTION.remove_all")})})},"data-sentry-element":"PaginationDataWrapper","data-sentry-source-file":"MemoryContent.tsx",children:(0,n.jsx)(eP.A,{data:k,columns:Y,"data-sentry-element":"GenericTable","data-sentry-source-file":"MemoryContent.tsx"})})}),(0,n.jsx)(eE.A,{value:"Profile",sx:{p:0},"data-sentry-element":"TabPanel","data-sentry-source-file":"MemoryContent.tsx",children:(0,n.jsxs)(o.A,{gap:t.spacing(4),"data-sentry-element":"Stack","data-sentry-source-file":"MemoryContent.tsx",children:[(0,n.jsxs)(o.A,{gap:t.spacing(4),"data-sentry-element":"Stack","data-sentry-source-file":"MemoryContent.tsx",children:[!ea&&(0,n.jsx)(o.A,{direction:"row",justifyContent:"flex-end",children:(0,n.jsx)(H.A,{variant:"tonal",color:"error",onClick:S,loading:$,children:r("ACTION.remove_all")})}),ea&&(0,n.jsx)(eO.JW,{sx:{p:4},children:(0,n.jsx)(c.A,{variant:"body2",children:a("profile.empty_profile_knowledge_state")})})]}),ee.map(([e,a])=>(0,n.jsxs)(eO.JW,{children:[(0,n.jsxs)(o.A,{flex:1,gap:t.spacing(1),children:[(0,n.jsx)(o.A,{flexDirection:"row",alignItems:"center",gap:t.spacing(1),children:(0,n.jsx)(c.A,{variant:"h6",children:e})}),(0,n.jsx)(c.A,{variant:"body2",children:`${a}`})]}),(0,n.jsx)(Z.A,{onClick:()=>{_(e),w()},children:(0,n.jsx)(eo.A,{icon:"tabler:trash",color:t.palette.error.main})})]},e))]})})]}),(0,n.jsx)(eN.A,{isOpen:u,isLoading:G,entityType:"fact",entityTitle:d?.content,confirmWord:r("FORM.delete"),onClose:()=>{m(),y(null)},onDelete:Q,"data-sentry-element":"DeleteConfirmationModal","data-sentry-source-file":"MemoryContent.tsx"}),(0,n.jsx)(eN.A,{isOpen:h,isLoading:z,entityType:"all_facts",confirmWord:r("FORM.delete"),onClose:A,onDelete:J,"data-sentry-element":"DeleteConfirmationModal","data-sentry-source-file":"MemoryContent.tsx"}),(0,n.jsx)(eN.A,{isOpen:j,isLoading:K,entityType:"profile_key",entityTitle:C||"",confirmWord:r("FORM.delete"),onClose:b,onDelete:X,"data-sentry-element":"DeleteConfirmationModal","data-sentry-source-file":"MemoryContent.tsx"}),(0,n.jsx)(eN.A,{isOpen:v,isLoading:$,entityType:"all_profile",confirmWord:r("FORM.delete"),onClose:T,onDelete:U,"data-sentry-element":"DeleteConfirmationModal","data-sentry-source-file":"MemoryContent.tsx"})]})},eG=({isLoading:e,onClose:t})=>{let{t:a}=(0,g.o)("translation",{keyPrefix:"PAGE.AGENT.tabs"}),{t:s}=(0,g.o)(),r=(0,et.A)();return e?(0,n.jsx)(o.A,{children:(0,n.jsx)(u.A,{})}):(0,n.jsxs)(eu.m,{"data-sentry-element":"Container","data-sentry-component":"MemoryView","data-sentry-source-file":"MemoryView.tsx",children:[(0,n.jsxs)(o.A,{direction:"row",alignItems:"flex-start",justifyContent:"space-between","data-sentry-element":"Stack","data-sentry-source-file":"MemoryView.tsx",children:[(0,n.jsxs)(o.A,{gap:r.spacing(1),"data-sentry-element":"Stack","data-sentry-source-file":"MemoryView.tsx",children:[(0,n.jsx)(c.A,{variant:"h4",fontWeight:600,"data-sentry-element":"Typography","data-sentry-source-file":"MemoryView.tsx",children:a("memory.header")}),(0,n.jsx)(c.A,{variant:"body1","data-sentry-element":"Typography","data-sentry-source-file":"MemoryView.tsx",children:a("memory.description")})]}),t&&(0,n.jsx)(ee.A,{title:s("ACTION.close"),arrow:!0,children:(0,n.jsx)(Z.A,{onClick:t,children:(0,n.jsx)(eo.A,{icon:"tabler:x",fontSize:24})})})]}),(0,n.jsx)(eW,{"data-sentry-element":"MemoryContent","data-sentry-source-file":"MemoryView.tsx"})]})},eR=(0,d.Ay)(l.A)(({theme:e,layout:t})=>({height:"horizontal"===t?"calc(100vh - 9rem)":"calc(100vh - 6rem)",display:"flex",flexDirection:"column",maxWidth:"1200px",margin:"0 auto",width:"100%",p:e.spacing(2)})),ez=(0,d.Ay)(l.A,{shouldForwardProp:e=>"hasActiveChatArea"!==e})(({hasActiveChatArea:e})=>({flex:1,display:"flex",flexDirection:"column",borderRadius:0,bgcolor:"transparent",boxShadow:"none",position:"relative",...e&&{overflow:"auto"}})),eD=()=>{let{settings:e}=(0,x.t)(),{user:t}=(0,f.A)(),{t:a}=(0,g.o)("translation",{keyPrefix:"PAGE.AGENT"}),l=(0,r.useRouter)(),{id:d}=l.query,v=(0,s.useMemo)(()=>
1{if(!l.isReady||"string"!=typeof d)return null;let e=parseInt(d,10);return Number.isNaN(e)?null:e},[d,l.isReady]),{refetch:O,isInsufficientCredits:R,isLoading:z}=(0,V.z5)(!0),{mutateAsync:D}=(0,V.PE)(),[K,q]=(0,s.useState)(v),[H,B]=(0,s.useState)(null),{data:Q,error:J}=(0,V.GZ)(K),X=(0,y.F0)(J)&&J.response?.status===404,[U,Z]=(0,s.useState)(null),{data:ee=[],isLoading:et}=(0,V.EA)({enabled:U===$.ly.TOOLS}),{mutate:ea}=(0,V.zL)(),{data:en,isLoading:es}=(({enabled:e=!1})=>(0,L.I)({enabled:e,queryKey:N.f.getPortalAIInfo.queryKey,queryFn:F.A.getPortalAIInfo,select:e=>e.data.result}))({enabled:U===$.ly.CONTEXT}),{data:er,isLoading:el}=W({enabled:U===$.ly.CONTEXT}),{data:ei=[],isLoading:eo}=(0,V.WZ)({enabled:U===$.ly.SKILLS}),{mutate:ec}=(0,V.sO)(),ed=(0,s.useCallback)(()=>Z(null),[]),ey=(0,s.useCallback)(e=>{Z(t=>t===e?null:e)},[]);(0,s.useEffect)(()=>{v&&(q(v),S(v))},[v]),(0,s.useEffect)(()=>{K?B((e=>{let t=b(w);if(!t)return null;try{return JSON.parse(t)[String(e)]??null}catch{return null}})(K)):B(null)},[K]);let eu=(0,s.useMemo)(()=>{if(!H)return null;if(H.trim()===a("starter.follow_up").trim())return H;let e=t?.firstName?.trim();return a("starter.first_visit",{name:e?` ${e}`:""})},[H,a,t?.firstName]);(0,s.useEffect)(()=>{K&&H&&eu&&H!==eu&&(T(K,eu),B(eu))},[K,H,eu]);let em=(e,t)=>{U===$.ly.TOOLS&&ea([{key:e,is_active:t}]),U===$.ly.SKILLS&&ec([{key:e,is_active:t}])},ep=(0,s.useCallback)((e,t)=>{let a=t?.replace?l.replace:l.push;if(Z(null),!e){q(null),a("/agent");return}S(e),q(e),a(`/agent/${e}`,void 0,{shallow:!0})},[l]),{isStartingConversation:eh,entryError:ef,startFollowUpConversation:eA,retryEntry:eC}=(({isRouterReady:e,routeChatId:t,isChatMissing:a,openChat:n})=>{let{t:r}=(0,g.o)("translation",{keyPrefix:"PAGE.AGENT"}),{user:l}=(0,f.A)(),i=(0,p.jE)(),{mutateAsync:o,isPending:c}
1=(0,A.P)(),d=e&&!t,y=(0,C.X)(d),[u,x]=(0,s.useState)(!1),[m,w]=(0,s.useState)(0),v=(0,s.useRef)(n),V=(0,s.useRef)(!1),P=(0,s.useRef)(null);v.current=n;let M=(0,s.useCallback)(e=>{if("follow_up"===e)return r("starter.follow_up");let t=l?.firstName?.trim();return r("starter.first_visit",{name:t?` ${t}`:""})},[r,l?.firstName]),L=(0,s.useCallback)(async e=>{let t=M(e),a=await o({auto_slug:!0,conversation_starter:t,..."first"===e?{name:r("getting_started")}:{}}),n=a.data.result?.id;return n?(T(n,t),S(n),I.add(n),i.invalidateQueries({queryKey:_.A.getAssistantSharedPrimaryChatTopics.queryKey}),n):null},[M,o,i,r]),N=(0,s.useCallback)(()=>{x(!0),h.Ay.error(r("starter.start_error"))},[r]),F=(0,s.useCallback)(async e=>{try{x(!1);let t=await L(e);if(!t)return void N();v.current(t,{replace:"first"===e})}catch{N()}},[L,N]),O=(0,s.useCallback)(()=>{F("follow_up")},[F]),W=(0,s.useCallback)(()=>{V.current=!1,E=null,x(!1),w(e=>e+1)},[]);return(0,s.useEffect)(()=>{if(!(!a||!t||I.has(t))&&P.current!==t){P.current=t,k.add(t);try{localStorage.removeItem(j)}catch{}V.current=!1,v.current(null,{replace:!0})}},[a,t]),(0,s.useEffect)(()=>{if(!d||V.current)return;let e=(()=>{let e=b(j);if(!e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null})();if(e&&!k.has(e)){V.current=!0,v.current(e,{replace:!0});return}if(y.isError)return void x(!0);if(!y.isSuccess)return;let t=(e=>{let t=e.filter(e=>!k.has(e.id));if(0===t.length)return null;let a=t[0];for(let e=1;e<t.length;e+=1){let n=t[e];(n.last_updated_at??0)>(a.last_updated_at??0)&&(a=n)}return a})(y.data?.pages.flat()??[]);if(t){V.current=!0,S(t.id),v.current(t.id,{replace:!0});return}V.current=!0,E||(E=L("first").finally(()=>{E=null})),E.then(e=>{if(!e){x(!0),V.current=!1;return}v.current(e,{replace:!0})}).catch(()=>{x(!0),V.current=!1})},[L,m,d,y.data,y.isError,y.isSuccess]),{isStartingConversation:c,entryError:u,startFollowUpConversation:O,retryEntry:W}})({isRouterReady:l.isReady,routeChatId:v,isChatMissing:X,openChat:ep}),{data:e_,fetchNextPage:ej,hasNextPage:ew,isFetchingNextPage:eb}=(0,P.n)({chatId:K,isEnabled:!!K}),{mutateAsync:ev,isPending:eS}=(0,M.b)(),{mutateAsync:ek,isPending:eI}=(0,m.wy)(),eE=(0,s.useMemo)(()=>Q?.members?.find(e=>!!e.bot_id)?.id,[Q]),eV=(0,s.useMemo)(()=>{let e=new Set,t=(e_?.pages?.flat()??[]).sort((e,t)=>e.id-t.id).filter(t=>!e.has(t.id.toString())&&(e.add(t.id.toString()),!0)).map(e=>({id:e.id.toString(),content:e.text,sender:e.chat_member_id===eE?"ai":"user",timestamp:e.added_at,chat_message_type:e.chat_message_type,chat_session:e.chat_session,attachments:e.attachments,file_id:e.file_id,run_id:e.run_id,chat_id:e.chat_id,feedback:e.feedback}));if(!eu)return t;let n=new Set([H,eu].filter(e=>!!e).map(e=>e.trim())),s=H?.trim()===a("starter.follow_up").trim(),r=t.some(e=>"user"===e.sender),l=t.findIndex(e=>"ai"===e.sender&&n.has(e.content.trim())),i=-1;return(l>=0?i=l:s||r||(i=t.findIndex(e=>"ai"===e.sender&&e.chat_message_type===ex.C.TEXT)),i>=0)?t[i].content===eu?t:t.map((e,t)=>t===i?{...e,content:eu}:e):[{id:`local-starter-${K}`,content:eu,sender:"ai",timestamp:Date.now(),chat_message_type:ex.C.TEXT,chat_session:null},...t]},[e_,eE,H,eu,K,a]),eP=(0,s.useMemo)(()=>!H||H.trim()===a("starter.follow_up").trim()||eV.some(e=>"user"===e.sender)?[]:[a("starter.goals.launch_course"),a("starter.goals.more_customers"),a("starter.goals.automate_marketing")],[eV,H,a]),eM=(0,s.useMemo)(()=>{if(!K||!e_?.pages)return!1;let e=e_.pages.flat().some(e=>e.chat_session?.id===K&&e.chat_message_type===ex.C.SESSION_START);return ew&&!e},[e_,K,ew]),eL=(0,s.useCallback)(async e=>{if(!K)return;let t=K;if(!t)try{let e=(await D({auto_slug:!0})).data.result;if(!e?.id)return;t=e.id,ep(t)}catch(e){console.error("Failed to start session",e);return}if(e.scheduleData){let a={text:e.text,attachments:e.attachments,chat_message_type:e.chat_message_type,file_id:e.file_id,...e.scheduleData};await ek({chatId:t,requestBody:a})}else{let a={text:e.text,attachments:e.attachments,chat_message_type:e.chat_message_type,file_id:e.file_id};await ev({chatId:t,message:a})}O()},[K,ev,D,ep,O,ek]);return(0,n.jsxs)(eR,{layout:e.layout,"data-sentry-element":"Container","data-sentry-component":"AgentView","data-sentry-source-file":"AgentView.tsx",children:[(0,n.jsx)(Y,{title:Q?.name,activeTab:U,isStarting:eh||!K&&!ef,onNewConversation:K?eA:eC,onSelectTab:ey,"data-sentry-element":"AgentConversationHeader","data-sentry-source-file":"AgentView.tsx"}),(0,n.jsxs)(ez,{hasActiveChatArea:!!K||!!U,"data-sentry-element":"ChatArea","data-sentry-source-file":"AgentView.tsx",children:[!U&&K&&(0,n.jsx)(G.i$,{messages:eV,onSendMessage:eL,isLoading:eS,onLoadMore:ej,hasNextPage:eM,isFetchingNextPage:eb,isInsufficientCredits:R,isLoadingCredits:z||eI,goalOptions:eP}),!U&&!K&&ef&&(0,n.jsxs)(o.A,{alignItems:"center",justifyContent:"center",flex:1,gap:2,children:[(0,n.jsx)(c.A,{variant:"body1",children:a("starter.start_error")}),(0,n.jsx)(i.A,{variant:"outlined",onClick:eC,children:a("starter.retry")})]}),!U&&!K&&!ef&&(0,n.jsx)(u.A,{}),U===$.ly.THREADS&&(0,n.jsx)(G.T0,{onClose:ed,onSelectChat:e=>{ep(e),ed()}}),U===$.ly.TOOLS&&(0,n.jsx)(G.$x,{data:ee,isLoading:et,onToggleTool:em,onClose:ed}),U===$.ly.SKILLS&&(0,n.jsx)(G.U,{data:ei,isLoading:eo,onToggleSkill:em,onClose:ed}
1),U===$.ly.CHANNELS&&(0,n.jsx)(eg,{onClose:ed}),U===$.ly.CONTEXT&&(0,n.jsx)(eT,{data:en,isLoading:es,onClose:ed}),U===$.ly.MEMORY&&(0,n.jsx)(eG,{data:er,isLoading:el,onClose:ed})]})]})}}}]);
2//# sourceMappingURL=1045-d24d8d4e34ea86c5.js.map

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.