@blueking/ai-blueking 2.1.4-dev.3 → 2.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -251,7 +251,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
251
251
  `),f+=`$$`):f+=s}return{content:e+f,suffix:f}}function kTe(e){let t=0;for(let n of e){let e=n.trim();/^:::\s*\S+/.test(e)?t++:e===`:::`&&t--}return t>0?`
252
252
  :::`:``}function ATe(e){let t=e.lastIndexOf(`^[`);if(t!==-1&&!e.slice(t+2).includes(`]`))return`]`;let n=e.lastIndexOf(`[^`);return n!==-1&&!e.slice(n+2).includes(`]`)?`]`:``}function jTe(e){let t=e.split(`
253
253
  `),n=t[t.length-1]||``,r=n.lastIndexOf(`![`);if(r===-1)return``;let i=n.slice(r+1);if(/^\[[^\]]*\]\([^)]*\)/.test(i))return``;if(!i.includes(`]`))return`](#)`;let a=i.indexOf(`]`),o=i.slice(a+1);return o.startsWith(`(`)&&o.startsWith(`(`)&&!o.includes(`)`)?`)`:``}function MTe(e){let t=e.split(`
254
- `),n=t[t.length-1]||``,r=n.lastIndexOf(`[`);if(r===-1||r>0&&n[r-1]===`!`)return``;let i=n.slice(r);if(/^\[[^\]]*\]\([^)]*\)/.test(i))return``;if(!i.includes(`]`))return`](#)`;let a=i.indexOf(`]`),o=i.slice(a+1);return o.startsWith(`(`)&&o.startsWith(`(`)&&!o.includes(`)`)?`)`:``}function wp(e,t){let n=0,r=0;for(;r<e.length;){if(e.substring(r,r+t.length)===t&&(r===0||e[r-1]!==`\\`)){n++,r+=t.length;continue}r++}return n%2==1?t:``}function NTe(e,t){let n=t+t,r=e.split(n).join(``),i=0;for(let e=0;e<r.length;e++)r[e]===t&&(e===0||r[e-1]!==`\\`)&&i++;return i%2==1?t:``}function PTe(e,t){let n=e;n=n.replace(/\$\$[^$]*\$\$/g,``),n=n.replace(/\$[^$\n]+\$/g,``),n=n.replace(/\\\([^)]*\\\)/g,``),n=n.replace(/\\\[[^\]]*\\\]/g,``);let r=0,i=0;for(;i<n.length;){if(n[i]===t){if(i>0&&n[i-1]===`\\`){i++;continue}if(t===`^`){if(n[i+1]===`[`){i+=2;continue}if(i>0&&n[i-1]===`[`){i++;continue}}if(t===`~`&&n[i+1]===`~`){i+=2;continue}r++}i++}return r%2==1?t:``}function FTe(e,t){if(!t)return``;let n=[`*`,`-`,`_`],r=t[0]??``;if(!r||!n.includes(r))return t;let i=0;for(let t=e.length-1;t>=0&&e[t]===r;t--)i++;return i+t.length>=3?`​`+t:t}function ITe(e,t){let n=e.slice(t).trimEnd();if(!n||n.endsWith(`\\`)||/\\(begin|end)\{[^}]*$/.test(n))return!0;let r=n.match(/\\([a-zA-Z]+)$/);if(r?.[1]){let e=r[1];if(ETe.has(e))return!1;if(DTe.has(e))return!0;let t=[...ETe,...DTe];for(let n of t)if(n.startsWith(e)&&n!==e&&n.length>e.length)return!0;for(let t of TTe)if(t.startsWith(e)&&t!==e)return!0;return!1}return!!/\\(begin|end)$/.test(n)}function LTe(e,t){let n=t+1,r=e.length;if(n>=r)return null;let i=n;for(;n<r;){let t=e[n];if(t&&/[a-zA-Z]/.test(t))n++;else break}return n===i?null:{cmd:e.substring(i,n),endIdx:n}}function RTe(e,t){let n=t,r=e.length;for(;n<r;){let t=e[n];if(t&&/\s/.test(t))n++;else break}if(n>=r||e[n]!==`{`)return null;n++;let i=n;for(;n<r&&e[n]!==`}`;)n++;return n>=r?null:{name:e.substring(i,n),endIdx:n+1}}var zTe=e=>{if(typeof document>`u`)return null;let t=document.cookie.split(`;`).find(t=>t.trim().startsWith(`${e}=`));return t?t.split(`=`)[1]:null},BTe=e=>{let t=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3),r=e%1e3,i=[];return t>0&&i.push(`${t}m`),n>0&&i.push(`${n}s`),(r>0||i.length===0)&&i.push(`${r}ms`),i.join(``)},Tp=()=>`id_${Math.random().toString(36).substring(2,9)}`,VTe=e=>{if(e<1)return`<1s`;let t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,a=[];return t>0&&a.push(`${t}d`),n>0&&a.push(`${n}h`),r>0&&a.push(`${r}m`),i>0&&a.push(`${i}s`),a.join(``)},Ep=zTe(`blueking_language`)===`en`,HTe={发送:`Send`,停止:`Stop`,问问小鲸:`Ask AI`,复制:`Copy`,分享:`Share`,点赞:`Like`,不满意:`Unsatisfied`,删除:`Delete`,引用:`Quote`,重新生成:`Regenerate`,重新生成将清空下文内容:`Regenerating will clear the content below`,提交:`Submit`,取消:`Cancel`,预览内容:`Preview Content`,跳转详情:`Jump to Detail`,"调用工具:":`Call Tool:`,调用中:`Calling...`,调用成功:`Call Success`,调用失败:`Call Failed`,说出您的想法:`Tell us your thoughts`,"什么原因让你满意?":`What makes you satisfied?`,"什么原因让你不满意?":`What makes you dissatisfied?`,返回内容:`Return Content`,编辑:`Edit`,深度思考:`Deep Thinking`,"图片加载中...":`Loading image...`,图片加载失败:`Failed to load image`,思考中:`Thinking...`,已思考完成:`Thinking Completed`,思考失败:`Thinking Failed`,复制成功:`Copy Success`,复制失败:`Copy Failed`,返回底部:`Return to bottom`,停止生成:`Stop generating`,正在停止:`Stopping`,耗时:`Duration`,参数:`Parameters`,描述:`Description`,执行情况:`Execution Status`,执行中:`Running`,成功:`Success`,失败:`Failed`,挂起:`Pending`,待执行:`To Be Executed`,详情:`Details`,重试:`Retry`,节点:`Node`,节点配置:`Node Config`,节点输出:`Node Output`,基础信息:`Basic Info`,流程模板:`Flow Template`,节点名称:`Node Name`,步骤名称:`Step Name`,执行方案:`Execution Plan`,是否可选:`Optional`,失败处理:`Failure Handler`,超时控制:`Timeout Control`,是:`Yes`,否:`No`,输入参数:`Input Params`,输出参数:`Output Params`,参数名:`Param Name`,参数值:`Param Value`,名称:`Name`,变量说明:`Description`,结构化输出:`Structured Output`,手动跳过:`Manual Skip`,暂无数据:`No Data`,"调用 MCP:":`Call MCP:`,更多:`More`,算法方案评审单:`Algorithm Plan Review Ticket`,评审中:`Reviewing`,已废弃:`Abandoned`,已批准:`Approved`,已通过:`Approved`,已取消:`Cancelled`,已过期:`Expired`,已拒绝:`Rejected`,已撤销:`Revoked`,单据编号:`Ticket No.`,提交时间:`Submitted At`,当前处理人:`Current Handler`,无:`None`,查看单据详情:`View Ticket Detail`,复制单据:`Copy Ticket`,复制单据链接:`Copy Ticket Link`,取消审批:`Cancel Approval`,"当前会话有 {count} 个待审批单,如需继续,请先取消审批":`There are {count} pending approval tickets in the current conversation. To continue, cancel approval first.`,暂不支持的中断消息:`Unsupported interrupt message`,检索中:`Searching`,检索完成:`Search Completed`,上传文件:`Upload File`,"请求中...":`Requesting...`,取消满意:`Cancel satisfied`,取消不满意:`Cancel dissatisfied`,"确认删除该回答?":`Confirm delete this answer?`,"删除操作无法撤回,请谨慎操作!":`This operation cannot be undone. Please proceed with caution!`,预览:`Preview`,缩小:`Zoom Out`,放大:`Zoom In`,旋转:`Rotate`,下载:`Download`,"抱歉,图片加载失败,可尝试重新加载":`Sorry, image loading failed. Please try reloading.`,重置:`Reset`,重新加载:`Reload`,宽:`W`,高:`H`,上传图片:`Upload Image`,"搜索 关键字":`Search keyword`,选择日期:`Select date`,在对话中定位:`Locate in Chat`,全选:`Select All`,确定:`Confirm`,"上传图片, 最多支持上传 3 个, 最大支持 2.4MB":`Upload Image, up to 3 images supported, max 2.4MB each`,"你好,我是小鲸":`Hello, I am BlueKing AI Bot`,清空搜索:`Clear Search`,搜索结果为空:`Search Result is Empty`,有效证据:`Valid Evidence`,全屏:`Full Screen`,退出全屏:`Exit Full Screen`,请选择以继续:`Please choose to continue`,继续:`Continue`,"收到信息:":`Received: `,待审批:`Pending`,已审批:`Approved`,完成:`Done`,跳过:`Skip`,单选:`Single`,多选:`Multiple`,其他:`Others`,回答内容:`Answers`,已回复:`Replied`,"请输入...":`Please enter...`},Dp=e=>Ep?HTe[e]:e,Op=function(e){return e.ABANDONED=`abandoned`,e.APPROVED=`approved`,e.CANCELLED=`cancelled`,e.DRAFT=`draft`,e.EXPIRED=`expired`,e.PENDING=`pending`,e.REJECTED=`rejected`,e.REVOKED=`revoked`,e}({}),kp=function(e){return e.AIDevToolApproval=`aidev:tool_approval`,e.UserQuestion=`aidev:user_question`,e}({}),Ap=function(e){return e.Binary=`binary`,e.FlowAgent=`flow_agent`,e.Function=`function`,e.KeyValue=`key_value`,e.KnowledgeRag=`knowledge_rag`,e.Other=`other`,e.ReferenceDocument=`reference_document`,e.Text=`text`,e}({}),jp=function(e){return e.Activity=`activity`,e.Assistant=`assistant`,e.Developer=`developer`,e.Guide=`guide`,e.Hidden=`hidden`,e.HiddenAssistant=`hidden-assistant`,e.HiddenGuide=`hidden-guide`,e.HiddenSystem=`hidden-system`,e.HiddenUser=`hidden-user`,e.Info=`info`,e.Interrupt=`interrupt`,e.Loading=`loading`,e.Pause=`pause`,e.Placeholder=`placeholder`,e.Reasoning=`reasoning`,e.System=`system`,e.TemplateAssistant=`template-assistant`,e.TemplateGuide=`template-guide`,e.TemplateHidden=`template-hidden`,e.TemplateSystem=`template-system`,e.TemplateUser=`template-user`,e.Tool=`tool`,e.User=`user`,e}({}),Mp=function(e){return e.Complete=`complete`,e.Disabled=`disabled`,e.Error=`error`,e.Fetching=`fetching`,e.Pending=`pending`,e.Stop=`stop`,e.StopLoading=`stop-loading`,e.Streaming=`streaming`,e.Success=`success`,e}({}),UTe={[Op.ABANDONED]:Dp(`已废弃`),[Op.APPROVED]:Dp(`已通过`),[Op.CANCELLED]:Dp(`已取消`),[Op.EXPIRED]:Dp(`已过期`),[Op.PENDING]:Dp(`待审批`),[Op.REJECTED]:Dp(`已拒绝`),[Op.REVOKED]:Dp(`已撤销`),[Op.DRAFT]:Dp(`待审批`)},Np=function(e){return e.ApprovalCancel=`approval_cancel`,e.FlowNodeRetry=`flow_node_retry`,e.FlowNodeSkip=`flow_node_skip`,e}({}),WTe=9999,GTe=WTe+1+1,KTe=GTe+1,qTe=KTe+1,JTe=[{description:Dp(`复制`),id:`copy`,name:Dp(`复制`)},{description:Dp(`引用`),id:`cite`,name:Dp(`引用`)},{description:Dp(`重新生成将清空下文内容`),id:`rebuild`,name:Dp(`重新生成`)},{description:Dp(`分享`),id:`share`,name:Dp(`分享`)}],YTe=[{description:Dp(`复制`),id:`copy`,name:Dp(`复制`)},{description:Dp(`引用`),id:`cite`,name:Dp(`引用`)},{description:Dp(`编辑`),id:`edit`,name:Dp(`编辑`)},{description:Dp(`删除`),id:`delete`,name:Dp(`删除`)}],XTe=[{description:Dp(`点赞`),id:`like`,name:Dp(`点赞`)},{description:Dp(`不满意`),id:`unlike`,name:Dp(`不满意`)},{description:Dp(`删除`),id:`delete`,name:Dp(`删除`)}],ZTe=2.4*1024*1024,QTe=`ai-is-keyword`,Pp=function(e){return e.Chat=`chat`,e.Share=`share`,e.Test=`test`,e}({}),$Te=`__loading__`,Fp={class:`ai-common-icon`,style:{verticalAlign:`middle`,fill:`currentColor`,overflow:`hidden`},viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},eEe={js:`javascript`,ts:`typescript`,py:`python`},tEe=0;function nEe(e){let t=`${e}-${++tEe}`;return{id:e=>`${t}-${e}`,ref:e=>`url(#${t}-${e})`}}var rEe=Qn({name:`AIBluekingIcon`,setup(){let e=nEe(`blueking-icon`);return()=>U(`svg`,{...Fp,viewBox:`0 0 24 24`,class:{[Fp.class]:!0,"ai-blueking-icon":!0}},[U(`defs`,{},[U(`linearGradient`,{x1:`45.02491%`,y1:`35.5927467%`,x2:`99.2803929%`,y2:`81.0358394%`,id:e.id(1)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#EB8CEC`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(2)},[U(`stop`,{"stop-color":`#FFFFFF`,"stop-opacity":`0.885701426`,offset:`0%`}),U(`stop`,{"stop-color":`#FFFFFF`,"stop-opacity":`0.29`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(3)},[U(`stop`,{"stop-color":`#1562FC`,offset:`0%`}),U(`stop`,{"stop-color":`#EB8CEC`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`95.0902604%`,x2:`35.112422%`,y2:`19.6450217%`,id:e.id(4)},[U(`stop`,{"stop-color":`#DC63FE`,offset:`0.0150240385%`}),U(`stop`,{"stop-color":`#235DFA`,offset:`100%`})]),U(`linearGradient`,{x1:`46.6072083%`,y1:`95.8855311%`,x2:`46.6072083%`,y2:`50%`,id:e.id(5)},[U(`stop`,{"stop-color":`#B962FD`,offset:`0%`}),U(`stop`,{"stop-color":`#565FFB`,offset:`99.984976%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(6)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#A826E2`,offset:`100%`})])]),U(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},[U(`g`,{transform:`translate(-1940, -1102)`},[U(`g`,{transform:`translate(1941, 1103.2578)`},[U(`path`,{d:`M9.5,4.7422389 C13.6421356,4.7422389 17,8.10010327 17,12.2422389 L17.001443,17.8260065 C18.766577,18.002886 20,18.503758 20,19.7276221 C19.9911111,19.736626 19.9733333,19.7388478 19.92,19.740251 L19.8835437,19.7409966 C19.8766933,19.7411051 19.86944,19.7412059 19.86176,19.7412992 L19.223277,19.7414596 C19.1990044,19.7413893 19.1739733,19.7413146 19.14816,19.7412361 L18.89408,19.7404278 C18.86336,19.7403275 18.8317867,19.7402239 18.7993363,19.7401172 L18.59392,19.7394428 C18.5578667,19.7393249 18.5208889,19.7392045 18.482963,19.7390817 L18.24384,19.7383188 C18.1184,19.7379252 17.984,19.7375147 17.84,19.7370938 L17.5390104,19.7362397 C17.371281,19.7357782 17.19212,19.7353095 17.0007483,19.7348414 L9.5,19.7422389 C6.21251981,19.7422389 3.41905896,17.6270907 2.40625547,14.6834322 C1.03363082,14.4093871 0,13.203242 0,11.7568557 L1.21619234,11.7563718 C1.49913049,11.7561381 1.76533428,11.755827 2.01579346,11.7554549 C2.26623611,7.84031745 5.52132054,4.7422389 9.5,4.7422389 Z`,fill:e.ref(1)}),U(`path`,{d:`M9.5,6.7422389 C12.5375661,6.7422389 15,9.20467277 15,12.2422389 L15,15.7422389 C15,16.8468084 14.1045695,17.7422389 13,17.7422389 L9.5,17.7422389 C6.46243388,17.7422389 4,15.279805 4,12.2422389 C4,9.20467277 6.46243388,6.7422389 9.5,6.7422389 Z`,fill:e.ref(2)}),U(`rect`,{fill:e.ref(3),x:`18`,y:`7.7422389`,width:`2`,height:`9`,rx:`1`}),U(`path`,{d:`M18.9843802,1 C18.9843802,2.52940392 20.1288357,3.79150593 21.6080665,3.97662574 L21.9843802,4 C20.4549762,4 19.1928742,5.14445555 19.0077544,6.62368637 L18.9843802,7 C18.9843802,5.47059608 17.8399246,4.20849407 16.3606938,4.02337426 L15.9843802,4 C17.5137841,4 18.7758861,2.85554445 18.9610059,1.37631363 L18.9843802,1 Z`,fill:e.ref(4),"fill-rule":`nonzero`}),U(`path`,{d:`M14.9843802,-1.0658141e-14 C14.9843802,1.01960262 15.7473505,1.86100395 16.7335044,1.98441716 L16.9843802,2 C15.9647776,2 15.1233762,2.76297037 14.999963,3.74912425 L14.9843802,4 C14.9843802,2.98039738 14.2214098,2.13899605 13.2352559,2.01558284 L12.9843802,2 C14.0039828,2 14.8453841,1.23702963 14.9687973,0.250875751 L14.9843802,-1.0658141e-14 Z`,fill:e.ref(5),"fill-rule":`nonzero`}),U(`path`,{d:`M15.9843802,5 C15.9843802,5.50980131 16.3658654,5.93050198 16.8589423,5.99220858 L16.9843802,6 C16.4745789,6 16.0538782,6.38148518 15.9921716,6.87456212 L15.9843802,7 C15.9843802,6.49019869 15.602895,6.06949802 15.109818,6.00779142 L14.9843802,6 C15.4941815,6 15.9148821,5.61851482 15.9765887,5.12543788 L15.9843802,5 Z`,fill:`#8860FC`,"fill-rule":`nonzero`}),U(`rect`,{fill:`#16204D`,x:`6.5`,y:`10.7422389`,width:`2`,height:`3`,rx:`1`}),U(`rect`,{fill:`#16204D`,x:`10.5`,y:`10.7422389`,width:`2`,height:`3`,rx:`1`}),U(`path`,{d:`M12.1896605,4.7422389 C11.9209486,3.40890556 11.3915034,2.7422389 10.6013249,2.7422389 C9.41605731,2.7422389 9.42887356,4.32659654 10.6013249,4.18645894 C11.2198089,4.11253447 11.6391525,4.29779445 11.8593557,4.7422389 L12.1896605,4.7422389 Z`,fill:e.ref(6),transform:`translate(10.9534, 3.7422) scale(-1, 1) translate(-10.9534, -3.7422)`}),U(`path`,{d:`M9.71717378,4.7422389 C9.4484618,3.40890556 8.9190166,2.7422389 8.12883818,2.7422389 C6.94357055,2.7422389 6.95638679,4.32659654 8.12883818,4.18645894 C8.74732212,4.11253447 9.16666571,4.29779445 9.38686894,4.7422389 L9.71717378,4.7422389 Z`,fill:e.ref(6)})])])])])}}),iEe=Qn({name:`AIBluekingBannerIcon`,setup(){let e=nEe(`banner-icon`);return()=>U(`svg`,{...Fp,viewBox:`0 0 309 93`,class:{[Fp.class]:!0,"ai-blueking-banner-icon":!0}},[U(`defs`,{},[U(`linearGradient`,{x1:`45.02491%`,y1:`35.5927467%`,x2:`99.2803929%`,y2:`81.0358394%`,id:e.id(1)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#EB8CEC`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(2)},[U(`stop`,{"stop-color":`#FFFFFF`,"stop-opacity":`0.885701426`,offset:`0%`}),U(`stop`,{"stop-color":`#FFFFFF`,"stop-opacity":`0.29`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(3)},[U(`stop`,{"stop-color":`#1562FC`,offset:`0%`}),U(`stop`,{"stop-color":`#EB8CEC`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`95.0902604%`,x2:`35.112422%`,y2:`19.6450217%`,id:e.id(4)},[U(`stop`,{"stop-color":`#DC63FE`,offset:`0.0150240385%`}),U(`stop`,{"stop-color":`#235DFA`,offset:`100%`})]),U(`linearGradient`,{x1:`46.6072083%`,y1:`95.8855311%`,x2:`46.6072083%`,y2:`50%`,id:e.id(5)},[U(`stop`,{"stop-color":`#B962FD`,offset:`0%`}),U(`stop`,{"stop-color":`#565FFB`,offset:`99.984976%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(6)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#A826E2`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`-38.6691405%`,x2:`50%`,y2:`100%`,id:e.id(7)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#9F7BF1`,"stop-opacity":`0.15`,offset:`62.335824%`}),U(`stop`,{"stop-color":`#EB8CEC`,"stop-opacity":`0`,offset:`100%`})])]),U(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},[U(`g`,{transform:`translate(0, 0.2974)`},[U(`g`,{transform:`translate(124.4167, 0)`},[U(`path`,{d:`M28.3965776,12.9425679 C38.3377031,12.9425679 46.3965776,21.0014424 46.3965776,30.9425679 L46.3969075,48.6505618 C51.2162571,49.132982 54.5842089,50.4998157 54.5842089,53.8408323 C54.5842089,53.8444226 54.5842089,53.8477257 54.5824622,53.8507588 L54.5702354,53.8590653 C54.5370482,53.8709895 54.4250414,53.8772107 54.0470184,53.8795761 L53.8473221,53.8804155 C53.8227592,53.8804783 53.7973775,53.8805312 53.7711498,53.8805746 L53.4140599,53.8806511 C53.3806271,53.8806219 53.3462391,53.8805842 53.3108685,53.8805382 L52.8375142,53.8796076 C51.6610285,53.8767057 49.6921211,53.8685916 46.3970568,53.8605313 L46.3965776,53.8807246 L23.4584209,53.8807246 C14.9044209,53.8807246 7.74404265,47.9139206 5.91235374,39.9153803 C2.4976649,38.935189 0,35.8013205 0,32.0869334 L1.43000256,32.0866983 C1.58407741,32.0866469 1.73656386,32.0865873 1.88747828,32.0865198 L3.20370552,32.0857063 C4.00314289,32.0850715 4.75405903,32.0842107 5.4593989,32.0831725 L5.45842089,30.9425679 C5.45842089,21.0014424 13.5172954,12.9425679 23.4584209,12.9425679 L28.3965776,12.9425679 Z`,fill:e.ref(1)}),U(`rect`,{fill:e.ref(2),x:`10.9168418`,y:`18.4009888`,width:`30.0213149`,height:`30.0213149`,rx:`12`}),U(`rect`,{fill:e.ref(3),x:`49.125788`,y:`21.1301993`,width:`5.45842089`,height:`24.562894`,rx:`2`}),U(`path`,{d:`M51.8123687,2.72921045 C51.8123687,6.90327561 54.9358287,10.3478176 58.9729609,10.8530485 L60,10.9168418 C55.8259348,10.9168418 52.3813929,14.0403018 51.8761619,18.077434 L51.8123687,19.1044731 C51.8123687,14.930408 48.6889086,11.485866 44.6517764,10.9806351 L43.6247373,10.9168418 C47.7988025,10.9168418 51.2433445,7.79338174 51.7485754,3.75624952 L51.8123687,2.72921045 Z`,fill:e.ref(4),"fill-rule":`nonzero`}),U(`path`,{d:`M40.8955269,0 C40.8955269,2.78271011 42.9778336,5.07907143 45.6692551,5.41589204 L46.3539478,5.45842089 C43.5712377,5.45842089 41.2748763,7.54072759 40.9380557,10.2321491 L40.8955269,10.9168418 C40.8955269,8.13413168 38.8132202,5.83777036 36.1217987,5.50094974 L35.437106,5.45842089 C38.2198161,5.45842089 40.5161774,3.3761142 40.852998,0.684692719 L40.8955269,0 Z`,fill:e.ref(5),"fill-rule":`nonzero`}),U(`path`,{d:`M44.4235306,12.0484656 C44.4235306,13.4398207 45.464684,14.5880013 46.8103947,14.7564116 L47.1527411,14.7776761 C45.761386,14.7776761 44.6132054,15.8188294 44.4447951,17.1645402 L44.4235306,17.5068865 C44.4235306,16.1155315 43.3823773,14.9673508 42.0366665,14.7989405 L41.6943202,14.7776761 C43.0856752,14.7776761 44.2338559,13.7365227 44.4022662,12.390812 L44.4235306,12.0484656 Z`,fill:`#8860FC`,"fill-rule":`nonzero`}),U(`rect`,{fill:`#16204D`,x:`17.7398679`,y:`29.3178306`,width:`5.45842089`,height:`8.18763134`,rx:`2`}),U(`rect`,{fill:`#16204D`,x:`28.6567097`,y:`29.3178306`,width:`5.45842089`,height:`8.18763134`,rx:`2`}),U(`path`,{d:`M33.2681489,12.9425679 C32.5347773,9.30362068 31.08981,7.48414704 28.9332468,7.48414704 C25.698402,7.48414704 25.7333802,11.8081925 28.9332468,11.4257275 C30.6212196,11.223972 31.7656965,11.7295855 32.3666775,12.9425679 L33.2681489,12.9425679 Z`,fill:e.ref(6),transform:`translate(29.8942, 10.2134) scale(-1, 1) translate(-29.8942, -10.2134)`}),U(`path`,{d:`M26.5202122,12.9425679 C25.7868406,9.30362068 24.3418733,7.48414704 22.1853101,7.48414704 C18.9504653,7.48414704 18.9854435,11.8081925 22.1853101,11.4257275 C23.8732829,11.223972 25.0177598,11.7295855 25.6187408,12.9425679 L26.5202122,12.9425679 Z`,fill:e.ref(6)})]),U(`path`,{d:`M309,81.279814 C309,66.0493667 239.827994,53.7026496 154.5,53.7026496 C69.1720062,53.7026496 0,66.0493667 0,81.279814 C0,96.5102614 309,96.5102614 309,81.279814 Z`,fill:e.ref(7),opacity:`0.22710455`})])])])}}),Ip=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-document-icon":!0}},[U(`g`,{fill:`none`},[U(`path`,{fill:`#3D4265`,d:`M708.9230754909091 157.53846132363637L984.6153867636364 157.53846132363637C1006.3669061818182 157.53846132363637 1024 175.17155421090908 1024 196.9230764218182L1024 945.2307688727273C1024 988.7338123636364 988.7338123636364 1024 945.2307688727273 1024L708.9230754909091 1024 708.9230754909091 157.53846132363637Z`}),U(`path`,{fill:`#3A84FF`,d:`M0 984.6153867636364C0 995.0608337454545 4.149438594327273 1005.0784674909091 11.535486650181818 1012.4645143272728 18.921534743272726 1019.8505611636365 28.939165649454548 1024 39.38461500509091 1024L945.2307688727273 1024C901.7277253818182 1024 866.4615377454545 988.7338123636364 866.4615377454545 945.2307688727273L866.4615377454545 39.384615051636366C866.4615377454545 17.633092747636365 848.8284439272727 0 827.0769245090909 0L39.38461500509091 0C17.633092747636365 0 0 17.633092747636365 0 39.384615051636366L0 984.6153867636364Z`}),U(`path`,{fill:`#FFF`,d:`M196.92307688727274 288.82051304727275C175.17155467636363 288.82051304727275 157.53846132363637 306.45360593454546 157.53846132363637 328.2051281454546 157.53846132363637 349.9566508218182 175.17155467636363 367.5897437090909 196.92307688727274 367.5897437090909L354.4615391418182 367.5897437090909C376.2130618181818 367.5897437090909 393.8461547054545 349.9566508218182 393.8461547054545 328.2051281454546 393.8461547054545 306.45360593454546 376.2130618181818 288.82051304727275 354.4615391418182 288.82051304727275L196.92307688727274 288.82051304727275ZM196.92307688727274 525.1282059636363C175.17155467636363 525.1282059636363 157.53846132363637 542.7612997818183 157.53846132363637 564.5128192000001 157.53846132363637 586.2643432727273 175.17155467636363 603.8974370909091 196.92307688727274 603.8974370909091L669.5384622545455 603.8974370909091C691.2899816727273 603.8974370909091 708.9230754909091 586.2643432727273 708.9230754909091 564.5128192000001 708.9230754909091 542.7612997818183 691.2899816727273 525.1282059636363 669.5384622545455 525.1282059636363L196.92307688727274 525.1282059636363ZM196.92307688727274 761.4358993454546C175.17155467636363 761.4358993454546 157.53846132363637 779.0689885090909 157.53846132363637 800.8205125818182 157.53846132363637 822.5720366545454 175.17155467636363 840.2051304727273 196.92307688727274 840.2051304727273L433.23076933818186 840.2051304727273C454.9822915490909 840.2051304727273 472.61538676363637 822.5720366545454 472.61538676363637 800.8205125818182 472.61538676363637 779.0689885090909 454.9822915490909 761.4358993454546 433.23076933818186 761.4358993454546L196.92307688727274 761.4358993454546Z`})])]),aEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-preview-icon":!0}},[U(`path`,{fillRule:`evenodd`,d:`M512 192C759.4 192 960 335.3 960 512 960 688.7 759.4 832 512 832 264.6 832 64 688.7 64 512 64 335.3 264.6 192 512 192ZM512 256C457.8 256 405.4 263.5 356.1 278.4 309.5 292.5 267.8 312.5 232.4 337.8 165.1 385.9 128 447.8 128 512 128 576.2 165.1 638.1 232.4 686.2 267.8 711.5 309.5 731.5 356.1 745.6 405.4 760.5 457.8 768 512 768 566.2 768 618.6 760.5 667.9 745.6 714.5 731.5 756.2 711.5 791.6 686.2 858.9 638.1 896 576.2 896 512 896 447.8 858.9 385.9 791.6 337.8 756.2 312.5 714.5 292.5 667.9 278.4 618.6 263.5 566.2 256 512 256ZM512 352C600.4 352 672 423.6 672 512 672 600.4 600.4 672 512 672 423.6 672 352 600.4 352 512 352 423.6 423.6 352 512 352ZM512 416C459.1 416 416 459.1 416 512 416 564.9 459.1 608 512 608 564.9 608 608 564.9 608 512 608 459.1 564.9 416 512 416Z`})]),oEe=U(`svg`,{...Fp,viewBox:`0 0 64 64`,class:{[Fp.class]:!0,"ai-target-icon":!0}},[U(`g`,null,[U(`path`,{d:`M54 8H31v4h18.2L22.6 38.6l2.8 2.8L52 14.8V33h4V10c0-1.1-.9-2-2-2z`}),U(`path`,{d:`M52 44v8H12V12h7.9V8H10c-1.1 0-2 .9-2 2v44c0 1.1.9 2 2 2h44c1.1 0 2-.9 2-2V44h-4z`})])]),sEe=U(`svg`,{...Fp,viewBox:`0 0 64 64`,class:{[Fp.class]:!0,"ai-remove-icon":!0}},[U(`path`,{fill:`#737987`,d:`M32,4C16.5,4,4,16.5,4,32s12.5,28,28,28s28-12.5,28-28S47.5,4,32,4z M43.3,40.5l-2.8,2.8L32,34.8l-8.5,8.5l-2.8-2.8l8.5-8.5l-8.5-8.5l2.8-2.8l8.5,8.5l8.5-8.5l2.8,2.8L34.8,32L43.3,40.5z`})]),Lp=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-arrow-right-icon":!0}},[U(`path`,{d:`M822.3999999999999 493.43999999999994l-439.03999999999996-356.48c-10.239999999999998-8.32-26.24-10.879999999999999-40.31999999999999-7.04s-23.04 14.08-23.04 25.599999999999998v712.96c0 11.52 8.959999999999999 21.119999999999997 23.04 25.599999999999998 4.4799999999999995 1.2799999999999998 8.959999999999999 1.92 13.44 1.92 10.239999999999998 0 19.84-3.1999999999999997 26.88-8.959999999999999l439.03999999999996-356.48c12.799999999999999-10.239999999999998 12.799999999999999-26.88 0-37.12z`})]);U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-link-icon":!0}},[U(`path`,{d:`M263.04 760.96a148.48 148.48 0 0 1-1.92-224l92.48-92.48L308.48 398.72 216 491.2a212.8 212.8 0 0 0 1.92 314.88 212.8 212.8 0 0 0 314.88 1.92l92.48-92.48L579.84 672l-92.48 92.48A148.48 148.48 0 0 1 263.04 760.96Z`}),U(`path`,{d:`M491.2 216L398.72 308.48l45.44 45.12 92.48-92.48a148.48 148.48 0 0 1 224 1.92 148.48 148.48 0 0 1 1.92 224L672 579.84l45.12 45.44 92.48-92.48a212.8 212.8 0 0 0-1.92-314.88A212.8 212.8 0 0 0 491.2 216Z`}),U(`path`,{d:`M398.78566017615634 579.8877413259167L579.8049961599127 398.86840534216054 625.0598301558516 444.1232393380996 444.0404941720955 625.1425753218557 398.78566017615634 579.8877413259167z`})]);var cEe=U(`svg`,{...Fp,viewBox:`0 0 24 18`,class:{[Fp.class]:!0,"ai-image-error-icon":!0}},[U(`path`,{d:`M8.018 0l-.774 2.941.856 2.206-.757 1.47 1.26-1.272-.232-2.224 1.102-3.088h7.228c1.322.01 2.388 1.085 2.39 2.408v5.196a5.42 5.42 0 0 0-1.186.144V2.46c-.035-.645-.542-1.164-1.186-1.213H10.346L9.388 3.04l-.18 2.573-2.636 2.261.859-2.629-1.186-2.006.18-1.978H2.57c-.334-.01-.658.115-.9.346a1.24 1.24 0 0 0-.385.885L1.252 13.07l3.921-4.834c.477-.481 1.068-.481 1.436 0l3.44 4.47 3.344-3.375c.194-.242.495-.372.804-.349.309.024.586.198.742.467l.171.221a5.45 5.45 0 0 0-.928 2.874c0 1.896 1.074 3.54 2.648 4.359l-.122.005H2.39C1.065 16.877.017 15.776.048 14.45L0 2.393C.044 1.071 1.131.024 2.452.033h5.566zM19.09 8.25a4.295 4.295 0 1 1 0 8.591 4.295 4.295 0 0 1 0-8.591zm0 5.83a.46.46 0 1 0 0 .92.46.46 0 0 0 0-.92zm0-3.936a.434.434 0 0 0-.433.408l.126 2.915a.307.307 0 0 0 .614 0l.122-2.822a.434.434 0 0 0-.43-.5zm-5.405-5.737a2.03 2.03 0 0 1 .95 1.653 2.03 2.03 0 0 1-.95 1.653 1.93 1.93 0 0 1-1.918 0 2.03 2.03 0 0 1-.95-1.653c.004-.678.364-1.304.95-1.653a1.93 1.93 0 0 1 1.918 0z`,fill:`currentColor`,"fill-rule":`nonzero`})]),lEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-success-icon":!0}},[U(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M16 2C23.7313 2 30 8.26875 30 16C30 23.7313 23.7313 30 16 30C8.26875 30 2 23.7313 2 16C2 8.26875 8.26875 2 16 2ZM22.0028 11L14.0038 19L10 15L8.5 16.5026L14.0038 22L23.5 12.5L22.0028 11Z`,fill:`#65C389`})]),uEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-failed-icon":!0}},[U(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M16 2C23.7313 2 30 8.26875 30 16C30 23.7313 23.7313 30 16 30C8.26875 30 2 23.7313 2 16C2 8.26875 8.26875 2 16 2ZM20.2426 10.3431L15.9996 14.5862L11.757 10.3435L10.3431 11.7574L14.5858 16L10.3431 20.2426L11.758 21.6575L16.0006 17.4149L20.2426 21.6569L21.6565 20.243L17.4145 16.001L21.6575 11.758L20.2426 10.3431Z`,fill:`#FF5656`})]),dEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-suspended-icon":!0}},[U(`path`,{d:`M16 2C23.732 2 30 8.26801 30 16C30 23.732 23.732 30 16 30C8.26801 30 2 23.732 2 16C2 8.26801 8.26801 2 16 2ZM14 10H11V22H14V10ZM21 10H18V22H21V10Z`,fill:`#F59500`})]),fEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-pending-icon":!0}},[U(`path`,{d:`M16 2C23.732 2 30 8.26801 30 16C30 23.732 23.732 30 16 30C8.26801 30 2 23.732 2 16C2 8.26801 8.26801 2 16 2ZM9.69434 7.7002C9.14293 7.7002 8.7002 8.15033 8.7002 8.7002V8.74023C8.70032 9.28999 9.14301 9.74023 9.69434 9.74023H11.1191V12.1201C11.1192 13.6989 11.8616 15.1043 13.0137 16C11.8616 16.8957 11.1192 18.3011 11.1191 19.8799V22.2598H9.71387C9.69649 22.2598 9.67908 22.2608 9.66211 22.2627C9.14435 22.2999 8.73938 22.734 8.73926 23.2598V23.2998C8.73926 23.8316 9.15347 24.2693 9.67969 24.2979C9.69103 24.2987 9.70239 24.2998 9.71387 24.2998H22.3057C22.8571 24.2998 23.2998 23.8497 23.2998 23.2998V23.2598C23.2997 22.71 22.857 22.2598 22.3057 22.2598H20.8408V19.8799C20.8408 18.3007 20.0978 16.8956 18.9453 16C20.0978 15.1044 20.8408 13.6993 20.8408 12.1201V9.74023H22.2666C22.8178 9.74006 23.2606 9.28989 23.2607 8.74023V8.7002C23.2607 8.15043 22.8179 7.70037 22.2666 7.7002H9.69434ZM22.4463 23.9854L22.3057 24C22.3951 24 22.48 23.9813 22.5586 23.9502C22.5223 23.9645 22.4852 23.9773 22.4463 23.9854ZM9.05273 23.4316C9.06084 23.4745 9.07245 23.516 9.08789 23.5557C9.07298 23.5174 9.06081 23.4777 9.05273 23.4365V23.4316ZM9.44531 22.623C9.48274 22.6058 9.52184 22.5915 9.5625 22.5811L9.56445 22.5801C9.5231 22.5906 9.48336 22.6054 9.44531 22.623ZM15.9805 17.0195C16.7368 17.0196 17.447 17.3158 17.9814 17.8564L17.9824 17.8574C18.5188 18.3966 18.8134 19.1145 18.8135 19.8799V22.2598H13.1475V19.8799C13.1475 19.1145 13.4412 18.3966 13.9775 17.8574L13.9785 17.8564C14.5131 17.3156 15.2239 17.0195 15.9805 17.0195ZM18.8135 9.74023V12.1201C18.8134 12.8855 18.5188 13.6034 17.9824 14.1426L17.9814 14.1436C17.447 14.6842 16.7368 14.9804 15.9805 14.9805C15.2239 14.9805 14.5131 14.6844 13.9785 14.1436L13.9775 14.1426L13.7881 13.9316C13.3725 13.4226 13.1475 12.7897 13.1475 12.1201V9.74023H18.8135ZM12.875 12.5459C12.87 12.5086 12.866 12.4712 12.8623 12.4336L12.8506 12.2773C12.8549 12.3676 12.8632 12.4572 12.875 12.5459Z`,fill:`#B8BBC4`})]),pEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-skipped-icon":!0}},[U(`path`,{d:`M16 2C23.732 2 30 8.26801 30 16C30 23.732 23.732 30 16 30C8.26801 30 2 23.732 2 16C2 8.26801 8.26801 2 16 2ZM17.0156 8.8125C16.6831 8.81258 16.4131 9.08514 16.4131 9.4209V11.8574L16.3984 11.8594C14.1864 12.2432 12.5291 13.4566 12.3467 13.5947C11.5353 14.1512 10.813 14.8455 10.1973 15.6533C9.70507 16.3019 9.28342 17.0276 8.93945 17.8086C8.4036 19.027 8.23229 19.9214 8.19238 20.167V20.1709C8.18865 20.1842 8.18638 20.1997 8.18262 20.2168L8.18066 20.2246C8.16356 20.309 8.13736 20.4356 8.12598 20.6387C8.11649 20.8244 8.18634 20.9396 8.24707 21.0049C8.33639 21.1008 8.46603 21.1533 8.61426 21.1533C8.8347 21.1533 9.00412 20.9708 9.15234 20.8115L9.1543 20.8096C9.17706 20.7847 9.19793 20.7613 9.2207 20.7383C9.86489 20.0898 10.6804 19.5176 11.5811 19.084C12.3449 18.7176 13.2058 18.4188 14.1387 18.1963C15.0584 17.9775 15.8738 17.8771 16.3945 17.8311L16.415 17.8291V20.5596C16.415 20.8953 16.6851 21.1679 17.0176 21.168L16.999 21.1836L17.0371 21.1875L17.0176 21.168C17.1639 21.168 17.3068 21.1145 17.417 21.0166L23.6729 15.4385C23.6918 15.4213 23.7086 15.4039 23.7256 15.3848C23.9441 15.1315 23.9197 14.748 23.6709 14.5254L17.415 8.96387C17.3048 8.86601 17.1619 8.8125 17.0156 8.8125Z`,fill:`#5B7290`})]),mEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-execution-icon":!0}},[U(`path`,{"fill-rule":`evenodd`,d:`M512 64A448 448 0 1 1 64 512 448 448 0 0 1 512 64Zm0 64A384 384 0 0 0 128 512 384 384 0 0 0 784 784 384 384 0 0 0 784 240 384 384 0 0 0 512 128ZM448 576V256h64V512H768v64Z`})]),Rp=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-node-output-icon":!0}},[U(`path`,{d:`M800 128c17.664 0 32 12.288 32 27.424v545.408L594.016 896H224c-17.664 0-32-12.288-32-27.424V155.424C192 140.288 206.336 128 224 128z m-26.176 59.072H250.176v649.856h276.384v-134.88c0-31.52 28.704-57.12 64-57.12h183.264V187.072zM735.52 704h-144.96a13.024 13.024 0 0 0-5.824 1.216v122.432L735.52 704zM704 480v64H320v-64h384z m-128-96v64h-256v-64h256z m96-128v64H320V256h352z`})]),hEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-node-tab-icon":!0}},[U(`path`,{d:`M374.656 640c57.184 0 105.184 41.088 118.72 96.384 1.312-0.16 2.624-0.384 3.968-0.384h368c16.928 0 30.656 14.336 30.656 32s-13.76 32-30.656 32h-368c-1.376 0-2.656-0.256-3.936-0.384-13.568 55.296-61.568 96.384-118.72 96.384-57.184 0-105.216-41.088-118.72-96.384-1.344 0.16-2.624 0.384-3.968 0.384H190.656C173.76 800 160 785.664 160 768s13.76-32 30.656-32h61.344c1.344 0 2.624 0.256 3.936 0.384C269.472 681.088 317.504 640 374.656 640z m0 64c-33.824 0-61.312 28.704-61.312 64s27.52 64 61.312 64c33.824 0 61.344-28.704 61.344-64s-27.52-64-61.344-64z m306.688-320c57.152 0 105.184 41.088 118.72 96.384 1.28-0.16 2.56-0.384 3.936-0.384h61.344c16.928 0 30.656 14.336 30.656 32s-13.76 32-30.656 32h-61.344c-1.344 0-2.624-0.256-3.936-0.384-13.536 55.296-61.568 96.384-118.72 96.384-57.184 0-105.184-41.088-118.72-96.384-1.312 0.16-2.624 0.384-3.968 0.384h-368C173.76 544 160 529.664 160 512s13.76-32 30.656-32h368c1.376 0 2.656 0.256 3.936 0.384 13.568-55.296 61.568-96.384 118.72-96.384z m0 64c-33.824 0-61.344 28.704-61.344 64s27.52 64 61.344 64 61.312-28.704 61.312-64-27.52-64-61.312-64z m-306.688-288c57.184 0 105.184 41.088 118.72 96.384 1.312-0.16 2.624-0.384 3.968-0.384h368c16.928 0 30.656 14.336 30.656 32s-13.76 32-30.656 32h-368c-1.376 0-2.656-0.256-3.936-0.384-13.568 55.296-61.568 96.384-118.72 96.384-57.184 0-105.216-41.088-118.72-96.384-1.344 0.16-2.624 0.384-3.968 0.384H190.656C173.76 320 160 305.664 160 288s13.76-32 30.656-32h61.344c1.344 0 2.624 0.256 3.936 0.384C269.472 201.088 317.504 160 374.656 160z m0 64c-33.824 0-61.312 28.704-61.312 64s27.52 64 61.312 64c33.824 0 61.344-28.704 61.344-64s-27.52-64-61.344-64z`})]),gEe=U(`svg`,{...Fp,class:`ai-common-icon ai-zoom-in-icon`},[U(`path`,{d:`M637.02 482.06H546.3V391.34c0-17.67-14.33-32-32-32s-32 14.33-32 32v90.72H391.58c-17.67 0-32 14.33-32 32s14.33 32 32 32h90.72v90.72c0 17.67 14.33 32 32 32s32-14.33 32-32v-90.72h90.72c17.67 0 32-14.33 32-32s-14.33-32-32-32z`}),U(`path`,{d:`M514.3 195.78c-175.72 0-318.28 142.56-318.28 318.28S338.58 832.34 514.3 832.34s318.28-142.56 318.28-318.28-142.56-318.28-318.28-318.28z m0 572.56c-140.28 0-254.28-114-254.28-254.28s114-254.28 254.28-254.28 254.28 114 254.28 254.28-114 254.28-254.28 254.28z`})]),_Ee=U(`svg`,{...Fp,class:`ai-common-icon ai-zoom-out-icon`},[U(`path`,{d:`M637.02 482.06H391.58c-17.67 0-32 14.33-32 32s14.33 32 32 32h245.44c17.67 0 32-14.33 32-32s-14.33-32-32-32z`}),U(`path`,{d:`M514.3 195.78c-175.72 0-318.28 142.56-318.28 318.28S338.58 832.34 514.3 832.34s318.28-142.56 318.28-318.28-142.56-318.28-318.28-318.28z m0 572.56c-140.28 0-254.28-114-254.28-254.28s114-254.28 254.28-254.28 254.28 114 254.28 254.28-114 254.28-254.28 254.28z`})]),vEe=U(`svg`,{...Fp,class:`ai-common-icon ai-rotate-icon`},[U(`path`,{d:`M817.76 328.31H402.28c-59.68 0-108.24 48.55-108.24 108.24v415.44c0 59.68 48.55 108.24 108.24 108.24h415.47c59.65 0 108.2-48.55 108.2-108.24V436.55c0-59.69-48.55-108.24-108.19-108.24z m30.39 523.68c0 16.79-13.64 30.43-30.39 30.43H402.28c-16.79 0-30.43-13.64-30.43-30.43V436.55c0-16.79 13.64-30.43 30.43-30.43h415.47c16.75 0 30.39 13.64 30.39 30.43v415.44z`}),U(`path`,{d:`M248.91 368.43c-18.27-11.32-42.25-5.66-53.57 12.61l-18.16 29.33c-0.87-8.47-1.33-17.1-1.33-25.76 0-134 109.04-243.03 243.07-243.03 44.64 0 88.29 12.2 126.17 35.29 18.39 11.13 42.32 5.32 53.49-12.99 11.17-18.35 5.36-42.28-12.99-53.49-50.11-30.51-107.74-46.62-166.67-46.62-176.93 0-320.88 143.91-320.88 320.84 0 48.14 10.41 94.41 30.89 137.53 6.12 12.84 18.77 21.35 32.98 22.11 0.72 0.04 1.44 0.08 2.17 0.08a38.92 38.92 0 0 0 33.09-18.43L261.52 422c11.29-18.28 5.66-42.25-12.61-53.57z`})]),yEe=U(`svg`,{...Fp,class:`ai-common-icon ai-fit-screen-icon`},[U(`path`,{d:`M160 160h240v64H224v176H160V160zM160 624h64v176h176v64H160V624zM624 160h240v240h-64V224H624V160zM800 624h64v240H624v-64h176V624z`})]),bEe=U(`svg`,{...Fp,class:`ai-common-icon ai-download-icon`},[U(`path`,{d:`M544 654.4V192h-64v462.4l-147.2-147.2-45.2 45.2L512 776.8l224.4-224.4-45.2-45.2L544 654.4zM832 832H192v64h640v-64z`})]),xEe=U(`svg`,{...Fp,class:`ai-common-icon ai-close-icon`},[U(`path`,{d:`M557.3 512l214.9-214.9c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L512 466.7 297.1 251.8c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L466.7 512 251.8 726.9c-12.5 12.5-12.5 32.8 0 45.3 6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4L512 557.3l214.9 214.9c6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4c12.5-12.5 12.5-32.8 0-45.3L557.3 512z`})]),SEe=U(`svg`,{...Fp,class:`ai-common-icon ai-arrow-left-icon`},[U(`path`,{d:`M672 165.2L333.2 504c-5.6 5.6-5.6 14.8 0 20.4L672 863.2`,fill:`none`,stroke:`currentColor`,"stroke-width":`64`,"stroke-linecap":`round`})]),CEe=U(`svg`,{...Fp,class:`ai-common-icon ai-arrow-right-preview-icon`},[U(`path`,{d:`M352 165.2L690.8 504c5.6 5.6 5.6 14.8 0 20.4L352 863.2`,fill:`none`,stroke:`currentColor`,"stroke-width":`64`,"stroke-linecap":`round`})]);U(`svg`,{...Fp,class:`ai-common-icon ai-reload-icon`},[U(`path`,{d:`M889.6 398.4c-16-35.2-35.2-65.6-60.8-92.8-24-27.2-52.8-48-84.8-65.6-32-17.6-67.2-28.8-102.4-35.2-35.2-6.4-72-8-108.8-3.2V108.8l-256 192 256 192V400c27.2-4.8 54.4-4.8 81.6-1.6 27.2 4.8 52.8 14.4 76.8 27.2 24 12.8 46.4 30.4 64 51.2 17.6 20.8 32 44.8 41.6 70.4 9.6 25.6 14.4 52.8 14.4 81.6s-4.8 56-14.4 81.6c-9.6 25.6-24 49.6-41.6 70.4-17.6 20.8-40 38.4-64 51.2-24 12.8-49.6 22.4-76.8 27.2-27.2 4.8-54.4 4.8-81.6 1.6-27.2-4.8-52.8-14.4-76.8-27.2-24-12.8-46.4-30.4-64-51.2-17.6-20.8-32-44.8-41.6-70.4-9.6-25.6-14.4-52.8-14.4-81.6h-64c0 38.4 6.4 75.2 19.2 110.4 12.8 35.2 30.4 67.2 52.8 96 22.4 28.8 49.6 52.8 80 72 30.4 19.2 64 33.6 99.2 43.2 35.2 9.6 72 12.8 108.8 11.2 36.8-1.6 72-9.6 105.6-22.4 33.6-12.8 64-30.4 92.8-52.8 28.8-22.4 52.8-49.6 72-80 19.2-30.4 33.6-64 43.2-99.2 9.6-35.2 12.8-72 11.2-108.8-1.6-36.8-9.6-72-22.4-105.6z`})]);var wEe=U(`svg`,{...Fp,viewBox:`0 0 200 180`,class:`ai-common-icon ai-image-broken-icon`},[U(`g`,{fill:`none`},[U(`rect`,{x:`30`,y:`20`,width:`100`,height:`86`,rx:`4`,fill:`#C4C6CC`,opacity:`0.6`}),U(`circle`,{cx:`55`,cy:`45`,r:`8`,fill:`#979BA5`,opacity:`0.5`}),U(`path`,{d:`M30 80l25-20 20 15 25-25 30 30v26H30V80z`,fill:`#979BA5`,opacity:`0.5`}),U(`circle`,{cx:`120`,cy:`80`,r:`36`,fill:`#FFE8C3`,stroke:`#FF9C01`,"stroke-width":`3`}),U(`text`,{x:`120`,y:`88`,"text-anchor":`middle`,"font-size":`32`,"font-weight":`bold`,fill:`#FF9C01`},`!`)])]),TEe=U(`svg`,{...Fp,class:`ai-common-icon ai-image-size-icon`},[U(`path`,{d:`M864 160H160c-35.2 0-64 28.8-64 64v576c0 35.2 28.8 64 64 64h704c35.2 0 64-28.8 64-64V224c0-35.2-28.8-64-64-64z m0 640H160V224h704v576z`})]),EEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-close-circle-icon":!0}},[U(`path`,{d:`M512 70.246391c230.929037 0 418.133279 187.204242 418.133279 418.133279s-187.204242 418.133279-418.133279 418.133279-418.133279-187.204242-418.133279-418.133279 187.204242-418.133279 418.133279-418.133279z m0 59.733325c-197.938508 0-358.399953 160.461446-358.399953 358.399954s160.461446 358.399953 358.399953 358.399953 358.399953-160.461446 358.399953-358.399953-160.461446-358.399953-358.399953-358.399954z m0 123.199984c129.884516 0 235.199969 105.315453 235.199969 235.19997s-105.315453 235.199969-235.199969 235.199969-235.199969-105.315453-235.199969-235.199969 105.315453-235.199969 235.199969-235.19997z m71.276791 140.165182l-71.283324 71.282391-71.276791-71.275858-23.751464 23.751464 71.275858 71.276791-71.275858 71.27679 23.769197 23.769197 71.276791-71.27679 71.265591 71.26559 23.751463-23.751463-71.264657-71.265591 71.282391-71.283324-23.769197-23.769197z`})]),DEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-doc-link-icon":!0}},[U(`path`,{d:`M320.950857 203.337143H191.634286a32.036571 32.036571 0 0 0-31.670857 31.890286v639.561142c0 17.408 14.409143 31.890286 31.670857 31.890286h129.316571a32.036571 32.036571 0 0 0 31.670857-31.890286V235.227429a32.036571 32.036571 0 0 0-31.670857-31.890286z m-35.84 130.486857H227.474286a28.964571 28.964571 0 0 1 0-58.002286h57.490285a28.964571 28.964571 0 0 1 0 58.002286z m293.156572-237.860571H448.877714a32.036571 32.036571 0 0 0-31.597714 31.963428v746.788572c0 17.481143 14.409143 31.963429 31.597714 31.963428h129.462857a32.036571 32.036571 0 0 0 31.524572-31.890286V127.926857c1.462857-17.408-12.873143-31.890286-31.597714-31.890286z m-34.523429 132.022857h-57.490286a28.964571 28.964571 0 0 1 0-58.002286h57.490286a28.964571 28.964571 0 0 1 0 58.002286z m383.780571 613.449143l-120.685714-628.004572a33.792 33.792 0 0 0-33.060571-26.038857H768l-126.537143 24.649143a32.768 32.768 0 0 0-25.819428 37.668571l122.148571 629.394286c2.925714 15.945143 15.872 26.112 31.670857 26.112h5.705143l126.537143-24.649143a35.108571 35.108571 0 0 0 25.819428-39.131428z m-165.302857-529.334858l-57.490285 11.556572h-5.705143a30.72 30.72 0 0 1-28.745143-23.186286 29.696 29.696 0 0 1 22.966857-34.816l57.490286-11.556571c15.798857-2.925714 31.670857 7.241143 34.523428 23.186285a29.696 29.696 0 0 1-22.966857 34.816z`})]),OEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-delete-circle-icon":!0}},[U(`path`,{d:`M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64z m180.8 584l-44.8 44.8-136-136-136 136-44.8-44.8 136-136-136-136 44.8-44.8 136 136 136-136 44.8 44.8-136 136 136 136z`})]),kEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-delete-circle-icon":!0}},[U(`path`,{d:`M470.8352 362.7008l-192.8192 186.368a160.768 160.768 0 0 0 0.0512 232.8576c66.4576 64.2048 174.4384 64.3072 240.896 0.0512l241.0496-233.0112a34.9184 34.9184 0 0 1 48.1792 0c13.312 12.8512 13.312 33.7408 0 46.592l-241.0496 233.0112c-93.0816 89.9584-244.224 89.856-337.2544-0.0512a225.1264 225.1264 0 0 1-0.0512-326.0416l337.408-326.144a174.1824 174.1824 0 0 1 240.896 0 160.512 160.512 0 0 1 0 232.96l-192.8192 186.368-144.384 139.5712a104.6528 104.6528 0 0 1-144.6912 0.1024 96.1536 96.1536 0 0 1 0.1536-139.8784l337.0496-325.7856a34.9184 34.9184 0 0 1 48.128 0c13.312 12.8512 13.312 33.7408 0 46.592L374.6304 642.048a31.8464 31.8464 0 0 0-0.1536 46.7456 34.816 34.816 0 0 0 48.3328-0.1536l144.384-139.52 192.8192-186.4192a96.1536 96.1536 0 0 0 0-139.776 103.68 103.68 0 0 0-72.2944-29.0304c-27.136 0-53.1456 10.4448-72.2432 29.0304l-144.5888 139.776z`})]),AEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-check-circle-icon":!0}},[U(`path`,{d:`M512 85.333333c235.52 0 426.666667 191.146667 426.666667 426.666667s-191.146667 426.666667-426.666667 426.666667S85.333333 747.52 85.333333 512 276.48 85.333333 512 85.333333m-42.666667 618.666667l298.666667-298.666667-60.16-60.16L469.333333 583.253333l-131.84-131.413333L277.333333 512l192 192z`})]),jEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-time-icon":!0}},[U(`path`,{d:`M512 70.4a441.6 441.6 0 1 0 0 883.2 441.6 441.6 0 0 0 0-883.2z m0 64a377.6 377.6 0 1 1 0 755.2 377.6 377.6 0 0 1 0-755.2z`}),U(`path`,{d:`M544 480V256a32 32 0 1 0-64 0v230.4c0 31.7952 25.8048 57.6 57.6 57.6H768a32 32 0 1 0 0-64h-224z`})]),MEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-close-circle-icon":!0}},[U(`path`,{d:`M85.333333 512C85.333333 276.352 276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512z m269.653334-96.661333l96.810666 96.810666-96.810666 96.810667c-16.661333 16.661333-16.384 43.84 0.277333 60.501333l0.512 0.512c16.64 16.64 42.88 16 59.541333-0.682666l96.810667-96.810667 96.832 96.810667c16.64 16.682667 42.88 17.344 59.541333 0.682666l0.512-0.512c16.64-16.64 16.938667-43.84 0.277334-60.501333l-96.810667-96.810667 96.810667-96.810666c16.661333-16.661333 16.384-43.861333-0.277334-60.522667l-0.490666-0.490667c-16.682667-16.661333-42.901333-16-59.562667 0.661334l-96.832 96.810666-96.810667-96.810666c-16.64-16.64-42.88-17.322667-59.541333-0.661334a109.44 109.44 0 0 1-0.512 0.490667c-16.64 16.661333-16.938667 43.861333-0.277333 60.522667z`})]),NEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-revoked-icon":!0}},[U(`path`,{d:`M512 64a448.056889 448.056889 0 1 1-0.056889 896.056889A448.056889 448.056889 0 0 1 512 64zM448 256l-128 96.256L448.284444 448 448 384l128.113778 0.113778a128 128 0 0 1 0 255.886222h-224.142222v64h224.028444a192 192 0 1 0 0-384h-128V256z`})]),PEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-help-doc-icon":!0},viewBox:`0 0 16 16`},[U(`path`,{d:`M8 1C11.8656 1 15 4.13438 15 8C15 11.8656 11.8656 15 8 15C7.07969 15 6.2 14.8234 5.39531 14.5H2C1.72344 14.5 1.5 14.2766 1.5 14V10.6047C1.17812 9.79844 1 8.92031 1 8C1 4.13438 4.13438 1 8 1ZM8.54825 10.1578H7.37878V11.3687H8.54825V10.1578ZM8.07669 4.62969C7.4876 4.62969 6.98847 4.81875 6.5793 5.19844C6.17013 5.57812 5.91911 6.1375 5.8248 6.87656L7.07407 7.06875C7.14082 6.25156 7.44262 5.84219 7.98092 5.84219C8.18406 5.84219 8.35817 5.9125 8.50037 6.05156C8.64401 6.19062 8.71511 6.38125 8.71511 6.62344C8.71511 6.82031 8.67593 6.98438 8.60048 7.11719C8.52358 7.25 8.38864 7.39375 8.19421 7.54688C7.82277 7.84219 7.59497 8.06719 7.50791 8.22188C7.42085 8.37656 7.37732 8.75312 7.37732 9.34844V9.53438L8.5555 9.53281C8.5555 9.21562 8.58597 8.99687 8.64836 8.87969C8.71075 8.7625 8.88922 8.59844 9.18377 8.38906C9.86136 7.9125 10.2009 7.31875 10.2009 6.60781C10.2009 6.03437 9.99776 5.5625 9.59004 5.18906C9.18232 4.81563 8.67883 4.62969 8.07669 4.62969Z`})]),FEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-info-icon":!0}},[U(`path`,{d:`M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zM512 896C299.2 896 128 724.8 128 512S299.2 128 512 128s384 171.2 384 384S724.8 896 512 896z`}),U(`path`,{d:`M494.4 403.2c-28.8 6.4-56 20.8-76.8 41.6-24 22.4 1.6 44.8 16 27.2 9.6-12.8 24-22.4 40-28.8 11.2-1.6 17.6 1.6 19.2 9.6 1.6 14.4 0 27.2-4.8 41.6-4.8 19.2-14.4 51.2-25.6 94.4-22.4 76.8-33.6 124.8-30.4 140.8 3.2 17.6 12.8 32 28.8 41.6 17.6 8 38.4 9.6 57.6 4.8 30.4-6.4 57.6-22.4 80-44.8 25.6-25.6-3.2-43.2-17.6-28.8-9.6 12.8-24 22.4-40 25.6-14.4 3.2-22.4-3.2-25.6-16-1.6-14.4 1.6-28.8 6.4-41.6 40-136 57.6-212.8 52.8-232-3.2-14.4-12.8-27.2-25.6-33.6C532.8 398.4 512 398.4 494.4 403.2z`}),U(`path`,{d:`M608 304A48 48 0 0 1 560 352 48 48 0 0 1 512 304 48 48 0 0 1 608 304z`})]),IEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-enter-icon":!0}},[U(`path`,{d:`M853.312 213.312a42.88 42.88 0 0 1 39.424 26.24c2.176 5.184 3.264 10.752 3.264 16.384v170.688a213.376 213.376 0 0 1-213.312 213.312H273.6l97.92 97.856a42.688 42.688 0 1 1-60.352 60.288L140.48 627.392a42.688 42.688 0 0 1 0-60.288l170.688-170.688a42.688 42.688 0 0 1 60.352 60.352L273.664 554.624h409.024a128 128 0 0 0 128-128V255.936a42.624 42.624 0 0 1 42.624-42.624z`})]),LEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-skip-icon":!0},viewBox:`0 0 16 16`},[U(`path`,{d:`M8.90283 2.5C9.0329 2.5 9.15984 2.54778 9.25781 2.63477L14.8184 7.57764C15.0396 7.77544 15.0618 8.11664 14.8677 8.3418L14.8203 8.38965L9.25928 13.3481C9.16135 13.4351 9.03479 13.4829 8.90479 13.4829L8.92139 13.5L8.8877 13.4966L8.90479 13.4829C8.60922 13.4829 8.36922 13.2408 8.36914 12.9424V10.5151L8.35059 10.5166C7.88774 10.5575 7.16279 10.6464 6.34521 10.8408C5.51593 11.0387 4.75076 11.3046 4.07178 11.6304C3.27109 12.0159 2.54628 12.5246 1.97363 13.1011C1.95343 13.1215 1.93477 13.1419 1.91455 13.1641L1.91309 13.1655C1.78136 13.3071 1.63093 13.4692 1.43506 13.4692L1.38623 13.4673C1.27492 13.4573 1.17834 13.4125 1.10889 13.3379C1.0616 13.2871 1.00802 13.2025 1.00098 13.0713V13.0122C1.00605 12.9217 1.01435 12.8483 1.02344 12.7881L1.0498 12.6436L1.05127 12.6367C1.05461 12.6215 1.05672 12.6081 1.06006 12.5962V12.5928C1.09553 12.3744 1.24727 11.5792 1.72363 10.4961C2.02937 9.80192 2.40431 9.15706 2.8418 8.58057C3.38909 7.86249 4.03116 7.24513 4.75244 6.75049C4.90953 6.63152 6.29681 5.61619 8.1709 5.24268L8.354 5.2085L8.36768 5.20703V3.04053C8.36777 2.74214 8.60732 2.50005 8.90283 2.5ZM9.36768 6.08887L8.50342 6.19775C6.78304 6.50227 5.47434 7.45858 5.35645 7.54785L5.3374 7.56201L5.31787 7.5752C4.68887 8.00657 4.12342 8.54907 3.63721 9.18701C3.25072 9.69661 2.91527 10.2725 2.63916 10.8994C2.55608 11.0883 2.48518 11.2675 2.42285 11.4341C2.80507 11.1708 3.21334 10.934 3.63818 10.7295L3.63916 10.729C4.38977 10.3689 5.2233 10.0805 6.11328 9.86816H6.11426C6.99177 9.65947 7.76654 9.56436 8.26221 9.52051L8.27783 9.51904L9.36914 9.41895V11.9106L13.7715 7.98486L9.36768 4.07031V6.08887Z`})]),REe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-send-message-icon":!0}},[U(`path`,{d:`M873.6 99.2L118.4 476.8c-28.8 16-28.8 44.8-6.4 60.8l182.4 112c16 6.4 28.8 6.4 44.8-6.4L736 288 390.4 672c-6.4 6.4-6.4 16-6.4 22.4v166.4c0 16 6.4 28.8 22.4 38.4s28.8 0 38.4-6.4l89.6-89.6 182.4 121.6c28.8 16 54.4 6.4 60.8-22.4L928 147.2c6.4-38.4-19.2-60.8-54.4-48z`})]),zEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-loading-message-icon":!0}},[U(`path`,{d:`M512 64c247.424 0 448 200.576 448 448s-200.576 448-448 448S64 759.424 64 512 264.576 64 512 64z m0 64C299.936 128 128 299.936 128 512s171.936 384 384 384 384-171.936 384-384S724.064 128 512 128z m0 192a192 192 0 1 1 0 384 192 192 0 0 1 0-384z`})]),BEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-thinking-icon":!0}},[U(`path`,{d:`M528 96c61.856 0 112 50.144 112 112 0 0.376-0.002 0.751-0.006 1.126C774.73 260.666 870.4 391.16 870.4 544c0 22.55-2.082 44.612-6.066 66.007C883.94 630.144 896 657.663 896 688c0 61.856-50.144 112-112 112a112.7 112.7 0 0 1-19.49-1.69C699.754 862.65 610.519 902.4 512 902.4s-187.753-39.75-252.539-104.088A112.33 112.33 0 0 1 240 800c-61.856 0-112-50.144-112-112 0-30.337 12.061-57.856 31.65-78.025A361.172 361.172 0 0 1 153.6 544c0-164.845 111.29-303.696 262.836-345.518C421.232 141.079 469.35 96 528 96z m-91.48 176.633l-4.469 1.278C315.47 308.366 230.4 416.249 230.4 544c0 10.923 0.622 21.7 1.832 32.3l1.623-0.134L240 576c61.856 0 112 50.144 112 112 0 26.132-8.95 50.173-23.95 69.226C377.36 799.817 441.67 825.6 512 825.6c70.33 0 134.639-25.783 183.99-68.412C680.95 738.173 672 714.132 672 688c0-61.856 50.144-112 112-112 2.607 0 5.194 0.09 7.757 0.264A280.989 280.989 0 0 0 793.6 544c0-119.973-75.025-222.422-180.718-262.99C592.35 304.904 561.938 320 528 320c-37.782 0-71.195-18.708-91.48-47.367z`})]),zp=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-collapsed-icon":!0}},[U(`path`,{d:`M373.15678637 997.95124768l-104.13241023-104.1324102 381.81883749-381.81883748-381.81883749-381.81883748 104.13241023-104.1324102 485.95124773 485.95124768z`})]),VEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-error-icon":!0}},[U(`path`,{d:`M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64z m0 704c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m48-459.2L544 608c0 17.6-14.4 32-32 32s-32-14.4-32-32l-16-299.2V304c0-27.2 20.8-48 48-48s48 20.8 48 48v4.8z`})]);U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-content-loading-icon":!0}},[U(`path`,{fillRule:`evenodd`,d:`M621.2037824 0C1168.33181568 0 1148.103769856 748.7917952 621.2037824 682.56061184 343.25692288000005 647.62276864 136.18899583999996 761.4358976 0 1024 49.3838336 341.33333376 256.45176064 0 621.2037824 0Z`})]);var HEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-arrow-down-icon":!0}},[U(`path`,{d:`M810.666628 571.545259l-85.526922-83.200123-171.019311 166.469312-0.035467-554.735928H440.048409l0.0672 554.735928-171.121977-166.469312L183.466709 571.545259l313.59996 305.066494L810.666628 571.545259z`})]),UEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-full-screen-icon":!0}},[U(`path`,{d:`M85.333333 938.666667V768H0v213.333333c0 23.466667 19.2 42.666667 42.666667 42.666667H256v-85.333333H85.333333zM85.333333 85.333333h170.666667V0H42.666667C19.2 0 0 19.2 0 42.666667V256h85.333333V85.333333z m853.333334 853.333334H768v85.333333h213.333333c23.466667 0 42.666667-19.2 42.666667-42.666667V768h-85.333333v170.666667z m42.666666-938.666667H768v85.333333h170.666667v170.666667h85.333333V42.666667c0-23.466667-19.2-42.666667-42.666667-42.666667z`})]),WEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-un-full-screen-icon":!0}},[U(`path`,{d:`M170.666667 853.333333v170.666667h85.333333V810.666667c0-23.466667-19.2-42.666667-42.666667-42.666667H0v85.333333h170.666667z m0-682.666666H0v85.333333h213.333333c23.466667 0 42.666667-19.2 42.666667-42.666667V0H170.666667v170.666667z m682.666666 682.666666h170.666667V768H810.666667c-23.466667 0-42.666667 19.2-42.666667 42.666667V1024h85.333333v-170.666667z m-42.666666-597.333333H1024V170.666667h-170.666667V0H768v213.333333c0 23.466667 19.2 42.666667 42.666667 42.666667z`})]),Bp=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-close-icon":!0}},[U(`path`,{d:`M757.09004048 196.21090938L512 446.01421987l-245.09004048-249.80331049-70.69905014 70.69905014 249.80331049 245.09004048-249.80331049 245.09004048 70.69905014 70.69905014 245.09004048-249.80331049 245.09004048 249.80331049 70.69905014-70.69905014-249.80331049-245.09004048 249.80331049-245.09004048z`})]);U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-more-icon":!0}},[U(`path`,{fillRule:`evenodd`,d:`M512.5492576 319.99489568C547.8894304 319.70050624 576.292128 290.79913056 575.9977312 255.44678368 575.6905376 220.0944368 546.8014496 191.7050432 511.4484768 191.99943264 476.3130976 192.29382208 448 220.87520896 448 255.99716352L448 256.54754464C448.3071936 291.88709184 477.2090816 320.2892864 512.5492576 319.99489568M511.4484768 431.9994336C476.3130976 432.2938208 448 460.8752096 448 495.9971648L448 496.5475456C448.3071936 531.8870912 477.2090816 560.2892864 512.5492576 559.994896 547.8894304 559.7005056 576.292128 530.7991296 575.9977312 495.446784 575.6905376 460.0944352 546.8014496 431.7050432 511.4484768 431.9994336M511.4484768 671.9994336C476.3130976 672.2938208 448 700.8752096 448 735.9971648L448 736.5475456C448.3071936 771.8870912 477.2090816 800.2892864 512.5492576 799.994896 547.8894304 799.7005056 576.292128 770.7991296 575.9977312 735.446784 575.6905376 700.0944352 546.8014496 671.7050432 511.4484768 671.9994336`})]);var GEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-agent-icon":!0}},[U(`path`,{d:`M512 96c-16.123 0-71.894 216.944-144 287.93-72.106 70.985-272 111.597-272 128 0 16.402 195.757 35.541 272 112 76.243 76.458 127.616 304 144 304s62.134-220.233 144-304c81.866-83.768 272-95.31 272-112 0-16.69-200.746-56.427-272-128C584.746 312.356 528.123 96 512 96z`})]),KEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-more-agent-icon":!0}},[U(`path`,{d:`M176 560H416a48 48 0 0 1 48 48v240a48 48 0 0 1-48 48H176a48 48 0 0 1-48-48V608a48 48 0 0 1 48-48z m0-432H416a48 48 0 0 1 48 48V416a48 48 0 0 1-48 48H176A48 48 0 0 1 128 416V176A48 48 0 0 1 176 128zM608 560h240a48 48 0 0 1 48 48v240a48 48 0 0 1-48 48H608a48 48 0 0 1-48-48V608a48 48 0 0 1 48-48zM848 128H608a51.648 51.648 0 0 0-48 48V416a51.648 51.648 0 0 0 48 48h240A51.712 51.712 0 0 0 896 416V176a51.712 51.712 0 0 0-48-48z m0 264a22.72 22.72 0 0 1-24 24h-192a22.72 22.72 0 0 1-24-24v-192a22.72 22.72 0 0 1 24-24h192a22.72 22.72 0 0 1 24 24v192z`})]),qEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-copy-icon":!0}},[U(`path`,{d:`M672 704L672 832C672 867.346224 643.346224 896 608 896L192 896C156.653776 896 128 867.346224 128 832L128 384C128 348.653776 156.653776 320 192 320L352 320 352 216.88888896C352 168.2420416 389.7269152 128 437.3333344 128L810.6666656 128C858.2730848 128 896 168.2420416 896 216.88888896L896 615.1111104C896 663.7579584 858.2730848 704 810.6666656 704L672 704ZM608 384L192 384 192 832 608 832 608 384ZM672 640L810.6666656 640C821.9706208 640 832 629.3019968 832 615.1111104L832 216.88888896C832 202.69800448 821.9706208 192 810.6666656 192L437.3333344 192C426.0293792 192 416 202.69800448 416 216.88888896L416 320 608 320C643.346224 320 672 348.653776 672 384L672 640Z`})]),JEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-cite-icon":!0}},[U(`path`,{fillRule:`evenodd`,d:`M642.2717056 192L642.2717056 256 416 256C309.961328 256 224 341.961328 224 448 224 554.038672 309.961328 640 416 640L771.712 640 640 509.52 686 464 896 672 686 880 640 834.48 771.712 704 416 704C277.28274368 704 164.33462816 593.6691904 160.12181824 455.9737376L160 448C160 306.615104 274.615104 192 416 192L642.2717056 192Z`})]),YEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-rebuild-icon":!0}},[U(`g`,null,[U(`path`,{d:`M844.0772288 379.89662848C860.4577216 421.55369728 869.3925312 467.67402368 869.3925312 512.3065977599999 869.3925312 710.17767424 708.56589312 869.3671872 512 869.3671872 427.1192736 869.3671872 345.21681792000004 839.6121408 281.18398848000004 784.5652992L352.66249536 784.5652992 352.66249536 725.05519936 184.39017791999999 725.05519936 184.39017791999999 891.6834752 243.9556 891.6834752 243.9556 830.6856256C419.67359552 977.97312 683.2505888 955.656832 830.675008 780.1020416 931.936224 659.59409088 955.7623936 494.453568 894.70784 350.14157952L844.0772288 379.89662848Z`}),U(`path`,{d:`M179.9227712 644.7165664C163.54227967999998 603.0594976 154.607466496 556.9391711999999 154.607466496 512.3065977599999 154.607466496 314.43552064 315.43410688 155.246007232 512 155.246007232 596.8807264 155.246007232 678.78318208 185.00105664 742.8160128 240.0478976L671.33750464 240.0478976 671.33750464 299.55799551999996 839.609824 299.55799551999996 839.609824 132.92972032 780.0444032 132.92972032 780.0444032 193.9275712C604.3264044800001 45.152325248 340.7494112 68.956364544 193.32499072000002 244.51115456 92.0637731136 365.019104 68.237604224 530.15962688 129.292162048 674.47161536L179.9227712 644.7165664Z`})])]),XEe={copy:qEe,cite:JEe,rebuild:YEe,share:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-share-icon":!0}},[U(`path`,{d:`M954.2973504 473.91614016L566.9315014399999 132.1331402944C556.1972671999999 122.695581056 539.74588608 130.46066144 539.74588608 144.915657216L539.74588608 345.37419392000004C539.74588608 354.33390208000003 532.8619750400001 361.86005696 524.11124032 362.21844544 299.85908159999997 370.46137664 111.309920448 537.11194816 71.639923584 765.6442368L64.28930653056 808.0535232C61.3723950016 824.5393856 81.207393408 834.813184 92.525010176 822.6279808L121.46077254400001 791.328736C226.1195584 677.95856 371.4984288 614.28490048 523.29450496 614.8822144000001 532.39526912 614.8822144000001 539.86256256 622.40836928 539.86256256 631.72646592L539.86256256 827.8843456C539.86256256 842.3393408 556.43062016 850.104416 567.04817792 840.6668608L954.4140288 499.48117376C961.8813248 492.67179584 961.8813248 480.60605568 954.2973504 473.91614016ZM157.39712256 678.9142624C222.73594112 524.92674496 371.61510528 421.233056 541.7293862399999 421.233056L581.39938304 421.233056C590.5001472 421.233056 597.85076416 413.70690112 597.85076416 404.38880512L597.85076416 237.97715904 879.624416 486.69865664 597.85076416 734.82284096 597.85076416 572.59239232C597.85076416 563.27429568 590.5001472 555.7481408 581.39938304 555.7481408L545.3463564799999 555.7481408C404.98457344 550.01392768 268.23976064 594.21515456 157.39712256 678.9142624Z`})]),like:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-like-icon":!0}},[U(`path`,{"fill-rule":`evenodd`,d:`M192 448.9971328L192 896 128 896 128 448.9971328 192 448.9971328ZM448 128C492.4018176 134.634696 524.4018176 145.30136288 544 160 586.6666656 192 608 234.66666656 608 288L608 384 843.5169184 384C849.3750016 384 855.2053472 384.8042912 860.8446368 386.3903392 894.8707136 395.9601728 914.6964128 431.3016416 905.1265792 465.3277184L797.1265792 849.3277184C789.3635424 876.9296288 764.1897344 896 735.5169184 896L288 896 288 448 448 128ZM483.008 201.024L352 463.04 352 832 735.5169184 832 843.5169184 448 544 448 544 288C544 254.81113408 532.1510912 231.11331968 505.6 211.2 501.3777696 208.03332736 494.5455392 204.77854912 485.19824 201.68239552L483.008 201.024Z`})]),unlike:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-un-like-icon":!0}},[U(`path`,{d:`M192 575.0028672000001L192 128 128 128 128 575.0028672000001 192 575.0028672000001ZM448 896C492.4018176 889.365304 524.4018176 878.6986371200001 544 864 586.6666656 832 608 789.3333334399999 608 736L608 640 843.5169184 640C849.3750016 640 855.2053472 639.1957087999999 860.8446368 637.6096608 894.8707136 628.0398272 914.6964128 592.6983584 905.1265792 558.6722816L797.1265792 174.67228160000002C789.3635424 147.07037119999995 764.1897344 128 735.5169184 128L288 128 288 576 448 896ZM483.008 822.976L352 560.96 352 192 735.5169184 192 843.5169184 576 608 576 544 576 544 736C544 769.18886592 532.1510912 792.88668032 505.6 812.8 501.3777696 815.9666726400001 494.5455392 819.22145088 485.19824 822.31760448L483.008 822.976Z`})]),delete:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-delete-icon":!0}},[U(`g`,null,[U(`path`,{d:`M659.2 246.4V185.6c0-32-25.6-57.6-57.6-57.6h-176c-32 0-57.6 25.6-57.6 57.6v57.6H128v57.6h102.4v531.2c0 32 25.6 57.6 57.6 57.6h441.6c32 0 57.6-25.6 57.6-57.6V304H896V246.4H659.2zM422.4 201.6c0-9.6 6.4-16 16-16h147.2c9.6 0 16 6.4 16 16v44.8h-176V201.6zM732.8 822.4c0 9.6-6.4 16-16 16H304c-9.6 0-16-6.4-16-16V304h441.6V822.4z`}),U(`path`,{d:`M576 384H640V704H576V384z`}),U(`path`,{d:`M384 384H448V704H384V384z`})])]),edit:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-edit-icon":!0}},[U(`path`,{d:`M160.07583932 763.37440051h703.84832136v100.54976017H160.07583932zM336.03791965 687.96208035h-100.5497602v-100.54976021l351.92416069-351.92416069 100.54976021 100.5497602zM613.25360852 210.60209379l49.77213129-49.77213128 99.5442626 99.54426259-49.77213131 49.77213129z`})]),activeLike:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-active-like-icon":!0}},[U(`path`,{"fill-rule":`evenodd`,d:`M192 448.9971328L192 896 128 896 128 448.9971328 192 448.9971328ZM288 448L288 896 759.7584608 896C774.0948672 896 786.6817696 886.464816 790.5632896 872.6638592L916.5632896 424.6638592C921.348208 407.6508192 911.4353568 389.9800864 894.4223168 385.1951712 891.6026752 384.402144 888.6875008 384 885.7584608 384L608 384 608 384 608 288C608 234.66666656 586.6666656 192 544 160 524.4018176 145.30136288 492.4018176 134.634696 448 128L288 448Z`})]),activeUnLike:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-active-un-like-icon":!0}},[U(`path`,{"fill-rule":`evenodd`,d:`M192 575.0028672000001L192 128 128 128 128 575.0028672000001 192 575.0028672000001ZM448 896C492.4018176 889.365304 524.4018176 878.6986371200001 544 864 586.6666656 832 608 789.3333334399999 608 736L608 640 843.5169184 640C849.3750016 640 855.2053472 639.1957087999999 860.8446368 637.6096608 894.8707136 628.0398272 914.6964128 592.6983584 905.1265792 558.6722816L797.1265792 174.67228160000002C789.3635424 147.07037119999995 764.1897344 128 735.5169184 128L288 128 288 576 448 896Z`})])},ZEe=[{id:`ai-chat`,name:Dp(`问问小鲸`),icon:()=>rEe}],QEe=Qn({__name:`scroll-btn`,props:{disabled:{type:Boolean},loading:{type:Boolean},title:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=e=>{n.loading||n.disabled||r(`click`,e)};return(t,n)=>(B(),V(`div`,{class:xe([`ai-scroll-btn`,{"is-loading":e.loading,"is-disabled":e.disabled}]),onClick:i},[e.loading?(B(),Gr(z(Xl),{key:0,mode:`spin`,size:`mini`,theme:`primary`})):pr(t.$slots,`icon`,{key:1}),pr(t.$slots,`title`,{},()=>[Qr(ke(e.title),1)])],2))}}),$Ee={class:`ai-loading-ring`},eDe={fill:`none`,viewBox:`0 0 26 26`},tDe=[`fill`],nDe={class:`ai-loading-star`},rDe={fill:`none`,viewBox:`0 0 26 26`},iDe=[`fill`],Vp=Qn({name:`AiLoading`,__name:`ai-loading`,props:{size:{default:16},stopLoading:{type:Boolean,default:!1}},setup(e){let t=0,n=t++,r=`ai-loading-ring-${n}`,i=`ai-loading-star-${n}`;return(t,n)=>(B(),V(`div`,{class:xe([`ai-loading`,{"ai-loading-stopped":e.stopLoading}]),style:ge({width:e.size+`px`,height:e.size+`px`})},[H(`div`,$Ee,[(B(),V(`svg`,eDe,[H(`path`,{d:`M24.957 7.79785C25.6279 9.36608 26 11.0926 26 12.9062C26 19.5598 21.0013 25.0441 14.5547 25.8125L14.3154 23.8252C19.7702 23.175 24 18.5361 24 12.9062C24 11.3717 23.6848 9.91092 23.1172 8.58398L24.957 7.79785ZM11.6836 1.98633C6.2292 2.63694 2 7.27669 2 12.9062C2 14.4404 2.31452 15.9009 2.88184 17.2275L1.04199 18.0137C0.371448 16.4458 0 14.7194 0 12.9062C0 6.25306 4.99814 0.768818 11.4443 0L11.6836 1.98633Z`,fill:`url(#${r})`},null,8,tDe),H(`defs`,null,[H(`linearGradient`,{id:r,gradientUnits:`userSpaceOnUse`,x1:`6.50423`,x2:`25.6886`,y1:`2.96507`,y2:`19.2824`},[...n[0]||=[H(`stop`,{"stop-color":`#235DFA`},null,-1),H(`stop`,{offset:`0.538462`,"stop-color":`#8A77EC`},null,-1),H(`stop`,{offset:`1`,"stop-color":`#EB8CEC`},null,-1)]])])]))]),H(`div`,nDe,[(B(),V(`svg`,rDe,[H(`path`,{d:`M13 5.90625C13 5.90625 14.1206 8.77684 15.625 10.2812C17.1294 11.7857 20 12.9062 20 12.9062C20 12.9062 17.1294 14.0268 15.625 15.5312C14.1206 17.0357 13 19.9062 13 19.9062C13 19.9062 11.8794 17.0357 10.375 15.5312C8.87059 14.0268 6 12.9062 6 12.9062C6 12.9062 8.87059 11.7857 10.375 10.2812C11.8794 8.77684 13 5.90625 13 5.90625Z`,fill:`url(#${i})`},null,8,iDe),H(`defs`,null,[H(`linearGradient`,{id:i,gradientUnits:`userSpaceOnUse`,x1:`6`,x2:`20`,y1:`5.90625`,y2:`19.9062`},[...n[1]||=[H(`stop`,{"stop-color":`#235DFA`},null,-1),H(`stop`,{offset:`0.538462`,"stop-color":`#8A77EC`},null,-1),H(`stop`,{offset:`1`,"stop-color":`#EB8CEC`},null,-1)]])])]))])],6))}}),aDe=[`src`],Hp=Qn({__name:`shortcut-btn`,props:{mode:{},shortcut:{}},emits:[`click`],setup(e,{expose:t,emit:n}){let r=e,i=cn(!1),a=n;Ln(()=>r.shortcut?.icon,()=>{i.value=!1},{immediate:!0});let o=e=>{a(`click`,e)},s=$n(`el`);return t({get $el(){return s.value}}),(t,n)=>(B(),V(`button`,{ref_key:`el`,ref:s,class:xe([`ai-shortcut-btn`,{"is-menu-mode":e.mode===`menu`}]),onClick:n[1]||=t=>o(e.shortcut)},[pr(t.$slots,`default`,{},()=>[e.shortcut?.icon?(B(),V(Lr,{key:0},[typeof e.shortcut.icon==`string`?(B(),V(Lr,{key:0},[e.shortcut.icon.startsWith(`http`)?(B(),V(Lr,{key:0},[i.value?(B(),Gr(z(GEe),{key:1,class:`ai-shortcut-btn-icon`})):(B(),V(`img`,{key:0,class:`ai-common-icon ai-shortcut-btn-icon`,src:e.shortcut.icon,onError:n[0]||=e=>i.value=!0},null,40,aDe))],64)):(B(),V(`span`,{key:1,class:xe(e.shortcut.icon)},null,2))],64)):(B(),Gr(lr(typeof e.shortcut?.icon==`function`?e.shortcut.icon?.(U):e.shortcut.icon),{key:1,class:`ai-shortcut-btn-icon`}))],64)):e.shortcut&&!e.shortcut.components?.length?(B(),Gr(z(GEe),{key:1,class:`ai-shortcut-btn-icon`})):$r(`v-if`,!0),Qr(` `+ke(e.shortcut?.alias||e.shortcut?.name),1)]),pr(t.$slots,`append`)],2))}}),oDe={class:`ai-selection-popover-content`},sDe={key:0,class:`shortcut-menu`},cDe=Qn({__name:`ai-selection`,props:yr({excludeSelectors:{default:()=>[]},maxShortcutCount:{default:3},offset:{default:10},shortcuts:{default:()=>ZEe}},{visible:{type:Boolean,required:!0},visibleModifiers:{}}),emits:yr([`selectShortcut`,`selectionChange`],[`update:visible`]),setup(e,{emit:t}){let n=e,r=Dr(e,`visible`),i=t,a=$n(`popoverRef`),o=$n(`moreMenuRef`),s=cn({x:0,y:0}),l=cn(``),u=cn(null),d=cn(!1),f=e=>{if(e?.shadowRoot instanceof ShadowRoot){try{let t=e.shadowRoot;if(typeof t.getSelection==`function`){let e=t.getSelection();if(e&&!e.isCollapsed&&e.toString().trim())return e}}catch{m();return}try{let t=document.createTreeWalker(e.shadowRoot,NodeFilter.SHOW_ELEMENT,null),n=t.nextNode();for(;n;){if(n instanceof Element){let e=f(n);if(e)return e}n=t.nextNode()}}catch{m()}}},p=async()=>{if(u.value=window.getSelection(),!u.value){let e=document.activeElement;if(e){let t=f(e);t&&(u.value=t)}}let e=u.value?.toString()?.trim();if(!e){m();return}if(n.excludeSelectors.length>0&&u.value?.rangeCount)try{let e=u.value.getRangeAt(0).commonAncestorContainer,t=e.nodeType===Node.TEXT_NODE?e.parentNode:e;for(;t&&t!==document.body;){if(t instanceof Element){for(let e of n.excludeSelectors)if(t.closest(e)){m();return}}t=t.parentNode}}catch{}e!==l.value&&i(`selectionChange`,e),l.value=e;let t=null;try{if(u.value?.rangeCount){let e=u.value?.getRangeAt(0);(e?.getClientRects()).length>0&&(t=e.getBoundingClientRect())}}catch{m();return}let o=document.activeElement;if(!t||t.width===0&&t.height===0)if(o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement)t=o.getBoundingClientRect();else{m();return}r.value=!0,await En();let d=a.value.getBoundingClientRect(),p=window.innerWidth,h=window.innerHeight,g=t.left+t.width/2-d.width/2;g<8?g=8:g+d.width>p-8&&(g=p-d.width-8);let _,v=t.top,y=h-t.bottom,b=d.height+n.offset;_=v>=b?t.top-d.height-n.offset:y>=b?t.bottom+n.offset:v>=y?Math.max(8,t.top-d.height-n.offset):Math.min(h-d.height-8,t.bottom+n.offset),s.value={x:g,y:_}},m=()=>{r.value&&=(u.value?.removeAllRanges(),!1)},h=e=>{m(),i(`selectShortcut`,e,l.value)},g=null,_=e=>{g&&clearTimeout(g),g=window.setTimeout(()=>{p()},e)},v=()=>{_(200)},y=()=>{_(300)},b=e=>{r.value&&a.value?.contains(e.target)||m()},x=e=>{!u.value||!r.value||e.target instanceof HTMLElement&&e.target.contains(u.value?.anchorNode)&&m()},S=()=>{o.value?.show()};return or(()=>{document.addEventListener(`selectionchange`,y),document.addEventListener(`mouseup`,v),document.addEventListener(`mousedown`,b),document.addEventListener(`scroll`,x,!0),window.addEventListener(`resize`,m),window.addEventListener(`blur`,m)}),cr(()=>{document.removeEventListener(`selectionchange`,y),document.removeEventListener(`mouseup`,v),document.removeEventListener(`mousedown`,b),document.removeEventListener(`scroll`,x,!0),window.removeEventListener(`resize`,m),window.removeEventListener(`blur`,m)}),(t,n)=>(B(),Gr(Un,{to:`body`},[Yr(vi,{name:`ai-fade`},{default:jn(()=>[r.value?(B(),V(`div`,{key:0,ref_key:`popoverRef`,ref:a,class:`ai-selection-popover`,style:ge({left:`${s.value.x}px`,top:`${s.value.y}px`,zIndex:z(qTe),"--selection-z-index":z(qTe)}),onMousedown:n[2]||=Mi(()=>{},[`stop`])},[H(`div`,oDe,[pr(t.$slots,`default`,{shortcuts:e.shortcuts},()=>[(B(!0),V(Lr,null,dr(e.shortcuts.slice(0,e.maxShortcutCount),(t,n)=>(B(),V(Lr,{key:t.id},[n<e.maxShortcutCount?(B(),Gr(Hp,{key:0,shortcut:t,onClick:e=>h(t)},null,8,[`shortcut`,`onClick`])):$r(`v-if`,!0)],64))),128)),e.shortcuts.length>e.maxShortcutCount?(B(),V(Lr,{key:0},[n[3]||=H(`div`,{class:`ai-divider`,style:{margin:`0 4px`}},null,-1),Yr(z(bp),{ref_key:`moreMenuRef`,ref:o,arrow:!1,interactive:``,offset:[0,6],theme:`ai-chat-box-light light`,trigger:`manual`,onHidden:n[0]||=()=>{d.value=!1},onShow:n[1]||=()=>{d.value=!0}},{content:jn(()=>[d.value?(B(),V(`div`,sDe,[(B(!0),V(Lr,null,dr(e.shortcuts.slice(e.maxShortcutCount),e=>(B(),Gr(Hp,{key:e.id,mode:`menu`,shortcut:e,onClick:t=>h(e)},null,8,[`shortcut`,`onClick`]))),128))])):$r(`v-if`,!0)]),default:jn(()=>[Yr(Hp,{style:{width:`28px`},onClick:S},{default:jn(()=>[Yr(z(zp),{class:`shortcut-btn-more-icon`})]),_:1})]),_:1},512)],64)):$r(`v-if`,!0)])])],36)):$r(`v-if`,!0)]),_:3})]))}}),lDe=(e,t,n)=>{let r=cn([]),i=async()=>{if(!e.value||t.value.length===0)return;await En();let i=e.value.offsetWidth,a=new Set,o=0;for(let e=0;e<n.items.value.length;e++){let r=t.value[e];if(!r)continue;let s=r.offsetWidth,l=o+s+(a.size>0?n.gap:0),u=n.items.value[e],d=n.moreItemRef?.value?.$el?.offsetWidth??0;if(u&&l+n.gap+d<=i)a.add(u),o=l;else break}r.value=Array.from(a)},a=null;return Ln([t,n.moreItemRef],()=>{En(()=>{i()})}),or(()=>{e.value&&(a=new ResizeObserver(()=>{i()}),a.observe(e.value)),En(()=>{i()})}),Ie(()=>{a?.disconnect()}),{visibleItems:r,calculateVisibleMenuItems:i}},uDe={class:`shortcut-menu`},dDe=4,fDe=Qn({__name:`shortcut-btns`,props:{shortcuts:{}},emits:[`selectShortcut`],setup(e,{emit:t}){let n=()=>document.body,r=e,i=t,a=$n(`containerRef`),o=cn([]),s=$n(`moreMenuRef`),l=$n(`moreBtnRef`),{visibleItems:u}=lDe(a,o,{items:fi(()=>r.shortcuts),gap:dDe,moreItemRef:l}),d=fi(()=>r.shortcuts.filter(e=>!u.value.includes(e))),f=cn(!1),p=(e,t)=>{e&&`$el`in e?o.value[t]=e.$el:e&&e instanceof HTMLElement&&(o.value[t]=e)};Ln(()=>r.shortcuts,()=>{o.value=Array(r.shortcuts.length).fill(null)},{deep:!0});let m=()=>{f.value=!f.value},h=e=>{f.value=!1,i(`selectShortcut`,e)};return Ln(f,e=>{e?s.value?.show():s.value?.hide()}),(t,r)=>(B(),V(`div`,{ref_key:`containerRef`,ref:a,class:`shortcut-btns`},[(B(!0),V(Lr,null,dr(e.shortcuts,(e,t)=>(B(),Gr(Hp,{key:e.key||e.id,ref_for:!0,ref:e=>p(e,t),class:xe([`shortcut-btns-item`,{"shortcut-btns-item-hidden":!z(u).includes(e)}]),shortcut:e,onClick:t=>h(e)},null,8,[`class`,`shortcut`,`onClick`]))),128)),d.value.length>0?(B(),Gr(z(bp),{key:0,ref_key:`moreMenuRef`,ref:s,"append-to":n,arrow:!1,interactive:``,offset:[0,6],theme:`ai-chat-box-light light`,trigger:`manual`,"z-index":z(KTe),onHidden:r[0]||=()=>{f.value=!1}},{content:jn(()=>[H(`div`,uDe,[(B(!0),V(Lr,null,dr(d.value,e=>(B(),Gr(Hp,{key:e.id,mode:`menu`,shortcut:e,onClick:t=>h(e)},null,8,[`shortcut`,`onClick`]))),128))])]),default:jn(()=>[Yr(Hp,{ref_key:`moreBtnRef`,ref:l,class:`shortcut-btns-item shortcut-btns-more`,onClick:m},{default:jn(()=>[Yr(z(KEe),{class:`shortcut-btns-more-icon`}),H(`span`,null,ke(z(Dp)(`更多`)),1)]),_:1},512)]),_:1},8,[`z-index`])):$r(`v-if`,!0)],512))}}),pDe={class:`shortcut-render`},mDe={class:`shortcut-render-header`},hDe={class:`header-name`},gDe={class:`shortcut-render-content`},_De={class:`shortcut-render-form-label`},vDe={class:`shortcut-footer`},yDe=Qn({__name:`shortcut-render`,props:{alias:{},components:{},description:{},formModel:{},icon:{type:[Function,String,Object]},id:{},key:{},name:{}},emits:[`close`,`submit`],setup(e,{emit:t}){let n=e,r=t,i=$n(`formRef`),a=Jt({}),o=cn({});In(()=>{if(n.formModel)for(let e in n.formModel)a[e]=n.formModel[e];for(let e of n?.components??[])e.key&&(a[e.key]=e.default??e.props?.default??e.props?.modelValue)});let s=(e,t)=>{if(e.type===`textarea`)return`span 2`;let r=0;for(let e=0;e<t;e++)r+=n.components?.[e]?.type===`textarea`?2:1;return t===(n.components?.length??0)-1&&r%2==0?`span 2`:`auto`},l=e=>({...e.formItemProps,property:e.key,label:e.name??e.formItemProps?.label,required:e.fillBack??e.formItemProps?.required}),u=e=>{let{options:t,...n}=e?.props??{},{options:r,...i}=e??{},o=t??r,s={class:`shortcut-render-form-item_${e.type}`,...i,...n,modelValue:a[e.key],onChange:t=>{a[e.key]=t},"onUpdate:modelValue":t=>{a[e.key]=t}};switch(e.type){case`text`:case`input`:return U(hu,s);case`textarea`:return U(hu,{...s,type:`textarea`});case`number`:return U(hu,{...s,type:`number`});case`select`:return U(Rye,s,o?.map(e=>U(Rye.Option,{...e})));case`checkboxGroup`:return U(Su.Group,s,o?.map(e=>U(Su,{class:`shortcut-render-form-item_checkbox`,...e})));case`radioGroup`:return U(Wbe.Group,s,o?.map(e=>U(Wbe,{class:`shortcut-render-form-item_radio`,...e})));case`switcher`:return U(uxe,s);default:return null}},d=async()=>{await i.value?.validate?.().catch(()=>!1)&&r(`submit`,{...a})},f=()=>{r(`close`)},p=()=>{r(`close`)};return(t,n)=>(B(),V(`div`,pDe,[H(`div`,mDe,[Yr(z(BEe),{class:`header-icon`}),H(`span`,hDe,ke(e.alias||e.name),1),Yr(z(Bp),{class:`header-close`,onClick:p})]),H(`div`,gDe,[Yr(z(cd),{ref_key:`formRef`,ref:i,class:`shortcut-render-form`,"form-type":`vertical`,model:a,rules:o.value},{default:jn(()=>[(B(!0),V(Lr,null,dr(e.components,(e,t)=>(B(),Gr(z(cd).FormItem,ri({key:e.id,ref_for:!0},l(e),{class:`shortcut-render-form-item`,style:{gridColumn:s(e,t)}}),{label:jn(()=>[H(`span`,_De,ke(e.name??e.formItemProps?.label),1)]),default:jn(()=>[(B(),Gr(lr(u(e))))]),_:2},1040,[`style`]))),128)),Yr(z(cd).FormItem,{class:`shortcut-footer-item`},{default:jn(()=>[H(`div`,vDe,[Yr(z(iu),{theme:`primary`,onClick:d},{default:jn(()=>[Qr(ke(z(Dp)(`提交`)),1)]),_:1}),Yr(z(iu),{onClick:f},{default:jn(()=>[Qr(ke(z(Dp)(`取消`)),1)]),_:1})])]),_:1})]),_:1},8,[`model`,`rules`])])]))}}),bDe=typeof navigator<`u`&&`clipboard`in navigator,xDe=e=>{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`-9999px`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand(`copy`)}catch{return!1}finally{document.body.removeChild(t)}},Up=()=>({copy:async e=>{let t=!1;if(bDe)try{await navigator.clipboard.writeText(e),t=!0}catch{t=xDe(e)}else t=xDe(e);ud({message:Dp(t?`复制成功`:`复制失败`),theme:t?`success`:`error`})}}),SDe=()=>{let e=cn({column:0,line:0}),t=cn([]);return{commandSelection:e,docSnapshot:t,GetCursorPosition:(t,n)=>{let[,r]=n,[i,a]=r;e.value={column:a,line:i}},GetDocSnapshot:e=>{t.value=e}}},CDe=Symbol(`CONTAINER_SCROLL_TOKEN`),wDe=(e,t)=>{let n=cn(!1),r=null,i=cn(0),a=cn(!0),o=aee((e,t)=>{let n,r=!1;return{get(){return e(),r},set(e){if(e===!1){r=!1,n&&clearTimeout(n),t();return}n&&clearTimeout(n),n=setTimeout(()=>{r=e,t()},300)}}});Pn(CDe,fi(()=>({autoScrollEnabled:a.value,isScrollBottom:n,scrollBottomHeight:i,debouncedShowScrollBottomBtn:o,toScrollBottom:s,toScrollTop:l})));let s=()=>{a.value=!0,un(t)?.scrollIntoView({behavior:`smooth`,block:`end`})},l=()=>{un(e)?.scrollTo({top:0,behavior:`smooth`})},u=()=>{let t=un(e);if(!t)return;let{scrollHeight:r,scrollTop:a,clientHeight:s}=t,l=r-a-s;i.value=Math.max(0,l),o.value=!n.value&&i.value>100},d=e=>{e.deltaY<0&&(a.value=!1)};return or(()=>{In(()=>{let s=un(e),l=un(t);!s||!l||(r?.disconnect(),s.removeEventListener(`scroll`,u),s.removeEventListener(`wheel`,d),u(),r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(n.value=!0,i.value=0,a.value=!0,o.value=!1):(n.value=!1,u())})}),r.observe(l),s.addEventListener(`scroll`,u,{passive:!0}),s.addEventListener(`wheel`,d,{passive:!0}))})}),Ie(()=>{r?.disconnect();let t=un(e);t&&(t.removeEventListener(`scroll`,u),t.removeEventListener(`wheel`,d))}),{autoScrollEnabled:a,isScrollBottom:n,scrollBottomHeight:i,toScrollBottom:s,toScrollTop:l,debouncedShowScrollBottomBtn:o}},TDe=()=>Fn(CDe,void 0),EDe=Symbol(`CUSTOM_TAB_TOKEN`),DDe=`execution`;function ODe(e){let t={label:Dp(`执行情况`),name:DDe},n=cn([t]),r=sn(t),i=cn(!0),a=e=>{n.value.find(t=>t.name===e.name)||(n.value=[...n.value,e]),i.value=!1,En(()=>{s(e)})},o=e=>{n.value=n.value.filter(t=>t.name!==e)},s=n=>{r.value=n??t,e.onTabChange?.(n)},l=()=>{n.value=[t],r.value=t,i.value=!0};return Pn(EDe,{tabs:n,selectedTab:r,addCustomTab:a,removeCustomTab:o,selectCustomTab:s,resetCustomTab:l}),{tabs:n,selectedTab:r,isCollapse:i,addCustomTab:a,removeCustomTab:o,selectCustomTab:s,resetCustomTab:l}}var kDe=()=>Fn(EDe),Wp=(()=>{if(typeof document>`u`)return null;let e=document.documentElement;return typeof e.requestFullscreen==`function`?{request:`requestFullscreen`,exit:`exitFullscreen`,element:`fullscreenElement`,change:`fullscreenchange`}:typeof e.webkitRequestFullscreen==`function`?{request:`webkitRequestFullscreen`,exit:`webkitExitFullscreen`,element:`webkitFullscreenElement`,change:`webkitfullscreenchange`}:null})(),ADe=e=>{let t=!!Wp,n=cn(!1),r=()=>z(e)??(typeof document>`u`?null:document.documentElement),i=()=>Wp?document[Wp.element]??null:null,a=()=>{let t=i(),r=z(e);n.value=r?t===r:!!t},o=async()=>{if(!Wp||n.value)return;let e=r();try{await e?.[Wp.request]?.()}catch{}},s=async()=>{if(!(!Wp||!i()))try{await document[Wp.exit]?.()}catch{}};return Wp&&(document.addEventListener(Wp.change,a),Ie(()=>{document.removeEventListener(Wp.change,a)})),{isSupported:t,isFullScreen:Xt(n),enter:o,exit:s,toggle:()=>n.value?s():o()}},jDe=Symbol(`GLOBAL_CONFIG_TOKEN`),MDe=e=>(Pn(jDe,e),{size:e.size,supportUpload:e.supportUpload}),NDe=()=>Fn(jDe,void 0),Gp=e=>{let t=cn(0);or(()=>{window.addEventListener(`keydown`,i,!0)}),Ie(()=>{window.removeEventListener(`keydown`,i,!0)});let n=t=>{e.onSelect?.(t)},r=()=>{En(()=>{let t=e.menuRef.value?.querySelector(`.is-active`);t&&t.scrollIntoView({block:`nearest`})})},i=i=>{if(e.menuRef.value?.offsetParent&&e.items.value?.length){if(i.key===`ArrowUp`)i.preventDefault(),i.stopPropagation(),t.value=(t.value-1+e.items.value?.length)%e.items.value?.length,r();else if(i.key===`ArrowDown`)i.preventDefault(),i.stopPropagation(),t.value=(t.value+1)%e.items.value?.length,r();else if(i.key===`Enter`||i.key===`NumpadEnter`){i.preventDefault(),i.stopPropagation();let r=e.items.value?.[t.value];r&&n(r)}}};return{activeIndex:t}},PDe={toolCall(e){let{toolCalls:t}=e;return t?.length?t.flatMap(e=>[e.function.name,e.function.mcpName,e.function.description,e.function.arguments,e.id].filter(Boolean)):[]},[Ap.FlowAgent](e){let t=e.content;return t?t.flatMap(e=>[e.task_name,...Object.values(e.nodes??{}).map(e=>e.name)]).filter(Boolean):[]}},FDe=e=>{if(e.role===jp.Assistant&&e.toolCalls?.length)return`toolCall`;if(e.role===jp.Activity)return e.activityType},IDe=e=>e.role===jp.Assistant&&!!e.toolCalls?.length||e.role===jp.Activity&&e.activityType===Ap.FlowAgent,LDe=(e,t)=>{let n=FDe(e);if(!n)return!0;let r=PDe[n];return r?r(e).some(e=>e.toLowerCase().includes(t)):!0},RDe=new Set([Op.PENDING,Op.DRAFT]),zDe=e=>{for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.role!==jp.Interrupt)continue;let r=n.content;if(r?.outcome?.type!==`interrupt`)continue;let i=r.outcome.interrupts.find(e=>e.reason===kp.UserQuestion);if(i)return i}},BDe=e=>e.reduce((e,t)=>{if(t.role!==jp.Interrupt)return e;let n=t.content;return n?.outcome?.type===`interrupt`?e+n.outcome.interrupts.filter(e=>e.reason===kp.AIDevToolApproval&&RDe.has(e.metadata?.ticket?.status)).length:e},0),VDe=e=>{let t=sn([]),n=cn(!1);In(()=>{let n=[],r=[];for(let t of e.messages.value){if(t?.uid||(t.uid=Tp()),t.role===jp.User){n.length>0&&(r.push({messages:n,type:jp.Assistant,isHover:!1,checked:!1,uid:Tp(),pause:n?.some(e=>e.property?.extra?.pause)??!1}),n=[]),r.push({messages:[t],type:jp.User,isHover:!1,checked:!1,uid:Tp()});continue}if(t.role===jp.Tool){let n=e.messages.value.find(e=>e.role===jp.Assistant&&e.toolCalls?.some(e=>e.id===t.toolCallId));if(n){let e=n.toolCalls?.find(e=>e.id===t.toolCallId);e&&(e.toolMessage=t),n.status=t.error?Mp.Error:n.status||Mp.Complete;continue}}n.push(t)}n.length>0&&r.push({messages:n,type:jp.Assistant,isHover:!1,checked:!1,uid:Tp(),pause:n?.some(e=>e.property?.extra?.pause)??!1}),e.messages.value.at(-1)?.role===jp.User&&r.push({messages:[{role:jp.Loading,content:``,status:Mp.Pending,messageId:``,id:$Te,uid:Tp()}],type:jp.Loading,isHover:!1,checked:!1,uid:Tp()}),t.value=r});let r=fi(()=>{let n=e.keyword?.value?.trim().toLowerCase(),r=e=>IDe(e)&&(!n||LDe(e,n));return t.value.filter((e,n)=>{if(e.messages.some(r)){let r=t.value.at(n-1);if(r){let t=r.messages.filter(e=>e.role===jp.User);if(t?.length)for(let n of t){let t=n.content;if(typeof t==`string`){e.userMessageTitle=t;break}else if(Array.isArray(t)&&t.some(e=>e.type===Ap.Text)){e.userMessageTitle=t.filter(e=>e.type===Ap.Text)?.join(`
254
+ `),n=t[t.length-1]||``,r=n.lastIndexOf(`[`);if(r===-1||r>0&&n[r-1]===`!`)return``;let i=n.slice(r);if(/^\[[^\]]*\]\([^)]*\)/.test(i))return``;if(!i.includes(`]`))return`](#)`;let a=i.indexOf(`]`),o=i.slice(a+1);return o.startsWith(`(`)&&o.startsWith(`(`)&&!o.includes(`)`)?`)`:``}function wp(e,t){let n=0,r=0;for(;r<e.length;){if(e.substring(r,r+t.length)===t&&(r===0||e[r-1]!==`\\`)){n++,r+=t.length;continue}r++}return n%2==1?t:``}function NTe(e,t){let n=t+t,r=e.split(n).join(``),i=0;for(let e=0;e<r.length;e++)r[e]===t&&(e===0||r[e-1]!==`\\`)&&i++;return i%2==1?t:``}function PTe(e,t){let n=e;n=n.replace(/\$\$[^$]*\$\$/g,``),n=n.replace(/\$[^$\n]+\$/g,``),n=n.replace(/\\\([^)]*\\\)/g,``),n=n.replace(/\\\[[^\]]*\\\]/g,``);let r=0,i=0;for(;i<n.length;){if(n[i]===t){if(i>0&&n[i-1]===`\\`){i++;continue}if(t===`^`){if(n[i+1]===`[`){i+=2;continue}if(i>0&&n[i-1]===`[`){i++;continue}}if(t===`~`&&n[i+1]===`~`){i+=2;continue}r++}i++}return r%2==1?t:``}function FTe(e,t){if(!t)return``;let n=[`*`,`-`,`_`],r=t[0]??``;if(!r||!n.includes(r))return t;let i=0;for(let t=e.length-1;t>=0&&e[t]===r;t--)i++;return i+t.length>=3?`​`+t:t}function ITe(e,t){let n=e.slice(t).trimEnd();if(!n||n.endsWith(`\\`)||/\\(begin|end)\{[^}]*$/.test(n))return!0;let r=n.match(/\\([a-zA-Z]+)$/);if(r?.[1]){let e=r[1];if(ETe.has(e))return!1;if(DTe.has(e))return!0;let t=[...ETe,...DTe];for(let n of t)if(n.startsWith(e)&&n!==e&&n.length>e.length)return!0;for(let t of TTe)if(t.startsWith(e)&&t!==e)return!0;return!1}return!!/\\(begin|end)$/.test(n)}function LTe(e,t){let n=t+1,r=e.length;if(n>=r)return null;let i=n;for(;n<r;){let t=e[n];if(t&&/[a-zA-Z]/.test(t))n++;else break}return n===i?null:{cmd:e.substring(i,n),endIdx:n}}function RTe(e,t){let n=t,r=e.length;for(;n<r;){let t=e[n];if(t&&/\s/.test(t))n++;else break}if(n>=r||e[n]!==`{`)return null;n++;let i=n;for(;n<r&&e[n]!==`}`;)n++;return n>=r?null:{name:e.substring(i,n),endIdx:n+1}}var zTe=e=>{if(typeof document>`u`)return null;let t=document.cookie.split(`;`).find(t=>t.trim().startsWith(`${e}=`));return t?t.split(`=`)[1]:null},BTe=e=>{let t=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3),r=e%1e3,i=[];return t>0&&i.push(`${t}m`),n>0&&i.push(`${n}s`),(r>0||i.length===0)&&i.push(`${r}ms`),i.join(``)},Tp=()=>`id_${Math.random().toString(36).substring(2,9)}`,VTe=e=>{if(e<1)return`<1s`;let t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,a=[];return t>0&&a.push(`${t}d`),n>0&&a.push(`${n}h`),r>0&&a.push(`${r}m`),i>0&&a.push(`${i}s`),a.join(``)},Ep=zTe(`blueking_language`)===`en`,HTe={发送:`Send`,停止:`Stop`,问问小鲸:`Ask AI`,复制:`Copy`,分享:`Share`,点赞:`Like`,不满意:`Unsatisfied`,删除:`Delete`,引用:`Quote`,重新生成:`Regenerate`,重新生成将清空下文内容:`Regenerating will clear the content below`,提交:`Submit`,取消:`Cancel`,预览内容:`Preview Content`,跳转详情:`Jump to Detail`,"调用工具:":`Call Tool:`,调用中:`Calling...`,调用成功:`Call Success`,调用失败:`Call Failed`,说出您的想法:`Tell us your thoughts`,"什么原因让你满意?":`What makes you satisfied?`,"什么原因让你不满意?":`What makes you dissatisfied?`,返回内容:`Return Content`,编辑:`Edit`,深度思考:`Deep Thinking`,"图片加载中...":`Loading image...`,图片加载失败:`Failed to load image`,思考中:`Thinking...`,已思考完成:`Thinking Completed`,思考失败:`Thinking Failed`,复制成功:`Copy Success`,复制失败:`Copy Failed`,返回底部:`Return to bottom`,停止生成:`Stop generating`,正在停止:`Stopping`,耗时:`Duration`,参数:`Parameters`,描述:`Description`,执行情况:`Execution Status`,执行中:`Running`,成功:`Success`,失败:`Failed`,挂起:`Pending`,待执行:`To Be Executed`,详情:`Details`,重试:`Retry`,节点:`Node`,节点配置:`Node Config`,节点输出:`Node Output`,基础信息:`Basic Info`,流程模板:`Flow Template`,节点名称:`Node Name`,步骤名称:`Step Name`,执行方案:`Execution Plan`,是否可选:`Optional`,失败处理:`Failure Handler`,超时控制:`Timeout Control`,是:`Yes`,否:`No`,输入参数:`Input Params`,输出参数:`Output Params`,参数名:`Param Name`,参数值:`Param Value`,名称:`Name`,变量说明:`Description`,结构化输出:`Structured Output`,手动跳过:`Manual Skip`,暂无数据:`No Data`,"调用 MCP:":`Call MCP:`,更多:`More`,算法方案评审单:`Algorithm Plan Review Ticket`,评审中:`Reviewing`,已废弃:`Abandoned`,已批准:`Approved`,已通过:`Approved`,已取消:`Cancelled`,已过期:`Expired`,已拒绝:`Rejected`,已撤销:`Revoked`,单据编号:`Ticket No.`,提交时间:`Submitted At`,当前处理人:`Current Handler`,无:`None`,查看单据详情:`View Ticket Detail`,复制单据:`Copy Ticket`,复制单据链接:`Copy Ticket Link`,取消审批:`Cancel Approval`,"当前会话有 {count} 个待审批单,如需继续,请先取消审批":`There are {count} pending approval tickets in the current conversation. To continue, cancel approval first.`,暂不支持的中断消息:`Unsupported interrupt message`,检索中:`Searching`,检索完成:`Search Completed`,上传文件:`Upload File`,"请求中...":`Requesting...`,取消满意:`Cancel satisfied`,取消不满意:`Cancel dissatisfied`,"确认删除该回答?":`Confirm delete this answer?`,"删除操作无法撤回,请谨慎操作!":`This operation cannot be undone. Please proceed with caution!`,预览:`Preview`,缩小:`Zoom Out`,放大:`Zoom In`,旋转:`Rotate`,下载:`Download`,"抱歉,图片加载失败,可尝试重新加载":`Sorry, image loading failed. Please try reloading.`,重置:`Reset`,重新加载:`Reload`,宽:`W`,高:`H`,上传图片:`Upload Image`,"搜索 关键字":`Search keyword`,选择日期:`Select date`,在对话中定位:`Locate in Chat`,全选:`Select All`,确定:`Confirm`,"上传图片, 最多支持上传 3 个, 最大支持 2.4MB":`Upload Image, up to 3 images supported, max 2.4MB each`,"你好,我是小鲸":`Hello, I am BlueKing AI Bot`,清空搜索:`Clear Search`,搜索结果为空:`Search Result is Empty`,有效证据:`Valid Evidence`,全屏:`Full Screen`,退出全屏:`Exit Full Screen`,请选择以继续:`Please choose to continue`,继续:`Continue`,"收到信息:":`Received: `,待审批:`Pending`,已审批:`Approved`,完成:`Done`,跳过:`Skip`,单选:`Single`,多选:`Multiple`,其他:`Others`,回答内容:`Answers`,已回复:`Replied`,"请输入...":`Please enter...`},Dp=e=>Ep?HTe[e]:e,Op=function(e){return e.ABANDONED=`abandoned`,e.APPROVED=`approved`,e.CANCELLED=`cancelled`,e.DRAFT=`draft`,e.EXPIRED=`expired`,e.PENDING=`pending`,e.REJECTED=`rejected`,e.REVOKED=`revoked`,e}({}),kp=function(e){return e.AIDevToolApproval=`aidev:tool_approval`,e.UserQuestion=`aidev:user_question`,e}({}),Ap=function(e){return e.Binary=`binary`,e.FlowAgent=`flow_agent`,e.Function=`function`,e.KeyValue=`key_value`,e.KnowledgeRag=`knowledge_rag`,e.Other=`other`,e.ReferenceDocument=`reference_document`,e.Text=`text`,e}({}),jp=function(e){return e.Activity=`activity`,e.Assistant=`assistant`,e.Developer=`developer`,e.Guide=`guide`,e.Hidden=`hidden`,e.HiddenAssistant=`hidden-assistant`,e.HiddenGuide=`hidden-guide`,e.HiddenSystem=`hidden-system`,e.HiddenUser=`hidden-user`,e.Info=`info`,e.Interrupt=`interrupt`,e.Loading=`loading`,e.Pause=`pause`,e.Placeholder=`placeholder`,e.Reasoning=`reasoning`,e.System=`system`,e.TemplateAssistant=`template-assistant`,e.TemplateGuide=`template-guide`,e.TemplateHidden=`template-hidden`,e.TemplateSystem=`template-system`,e.TemplateUser=`template-user`,e.Tool=`tool`,e.User=`user`,e}({}),Mp=function(e){return e.Complete=`complete`,e.Disabled=`disabled`,e.Error=`error`,e.Fetching=`fetching`,e.Pending=`pending`,e.Stop=`stop`,e.StopLoading=`stop-loading`,e.Streaming=`streaming`,e.Success=`success`,e}({}),UTe={[Op.ABANDONED]:Dp(`已废弃`),[Op.APPROVED]:Dp(`已通过`),[Op.CANCELLED]:Dp(`已取消`),[Op.EXPIRED]:Dp(`已过期`),[Op.PENDING]:Dp(`待审批`),[Op.REJECTED]:Dp(`已拒绝`),[Op.REVOKED]:Dp(`已撤销`),[Op.DRAFT]:Dp(`待审批`)},Np=function(e){return e.ApprovalCancel=`approval_cancel`,e.FlowNodeRetry=`flow_node_retry`,e.FlowNodeSkip=`flow_node_skip`,e}({}),WTe=9999,GTe=WTe+1+1,KTe=GTe+1,qTe=KTe+1,JTe=[{description:Dp(`复制`),id:`copy`,name:Dp(`复制`)},{description:Dp(`引用`),id:`cite`,name:Dp(`引用`)},{description:Dp(`重新生成将清空下文内容`),id:`rebuild`,name:Dp(`重新生成`)},{description:Dp(`分享`),id:`share`,name:Dp(`分享`)}],YTe=[{description:Dp(`复制`),id:`copy`,name:Dp(`复制`)},{description:Dp(`引用`),id:`cite`,name:Dp(`引用`)},{description:Dp(`编辑`),id:`edit`,name:Dp(`编辑`)},{description:Dp(`删除`),id:`delete`,name:Dp(`删除`)}],XTe=[{description:Dp(`点赞`),id:`like`,name:Dp(`点赞`)},{description:Dp(`不满意`),id:`unlike`,name:Dp(`不满意`)},{description:Dp(`删除`),id:`delete`,name:Dp(`删除`)}],ZTe=2.4*1024*1024,QTe=`ai-is-keyword`,Pp=function(e){return e.Chat=`chat`,e.Share=`share`,e.Test=`test`,e}({}),$Te=`__loading__`,Fp={class:`ai-common-icon`,style:{verticalAlign:`middle`,fill:`currentColor`,overflow:`hidden`},viewBox:`0 0 1024 1024`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},eEe={js:`javascript`,ts:`typescript`,py:`python`},tEe=0;function nEe(e){let t=`${e}-${++tEe}`;return{id:e=>`${t}-${e}`,ref:e=>`url(#${t}-${e})`}}var rEe=Qn({name:`AIBluekingIcon`,setup(){let e=nEe(`blueking-icon`);return()=>U(`svg`,{...Fp,viewBox:`0 0 24 24`,class:{[Fp.class]:!0,"ai-blueking-icon":!0}},[U(`defs`,{},[U(`linearGradient`,{x1:`45.02491%`,y1:`35.5927467%`,x2:`99.2803929%`,y2:`81.0358394%`,id:e.id(1)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#EB8CEC`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(2)},[U(`stop`,{"stop-color":`#FFFFFF`,"stop-opacity":`0.885701426`,offset:`0%`}),U(`stop`,{"stop-color":`#FFFFFF`,"stop-opacity":`0.29`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(3)},[U(`stop`,{"stop-color":`#1562FC`,offset:`0%`}),U(`stop`,{"stop-color":`#EB8CEC`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`95.0902604%`,x2:`35.112422%`,y2:`19.6450217%`,id:e.id(4)},[U(`stop`,{"stop-color":`#DC63FE`,offset:`0.0150240385%`}),U(`stop`,{"stop-color":`#235DFA`,offset:`100%`})]),U(`linearGradient`,{x1:`46.6072083%`,y1:`95.8855311%`,x2:`46.6072083%`,y2:`50%`,id:e.id(5)},[U(`stop`,{"stop-color":`#B962FD`,offset:`0%`}),U(`stop`,{"stop-color":`#565FFB`,offset:`99.984976%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(6)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#A826E2`,offset:`100%`})])]),U(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},[U(`g`,{transform:`translate(-1940, -1102)`},[U(`g`,{transform:`translate(1941, 1103.2578)`},[U(`path`,{d:`M9.5,4.7422389 C13.6421356,4.7422389 17,8.10010327 17,12.2422389 L17.001443,17.8260065 C18.766577,18.002886 20,18.503758 20,19.7276221 C19.9911111,19.736626 19.9733333,19.7388478 19.92,19.740251 L19.8835437,19.7409966 C19.8766933,19.7411051 19.86944,19.7412059 19.86176,19.7412992 L19.223277,19.7414596 C19.1990044,19.7413893 19.1739733,19.7413146 19.14816,19.7412361 L18.89408,19.7404278 C18.86336,19.7403275 18.8317867,19.7402239 18.7993363,19.7401172 L18.59392,19.7394428 C18.5578667,19.7393249 18.5208889,19.7392045 18.482963,19.7390817 L18.24384,19.7383188 C18.1184,19.7379252 17.984,19.7375147 17.84,19.7370938 L17.5390104,19.7362397 C17.371281,19.7357782 17.19212,19.7353095 17.0007483,19.7348414 L9.5,19.7422389 C6.21251981,19.7422389 3.41905896,17.6270907 2.40625547,14.6834322 C1.03363082,14.4093871 0,13.203242 0,11.7568557 L1.21619234,11.7563718 C1.49913049,11.7561381 1.76533428,11.755827 2.01579346,11.7554549 C2.26623611,7.84031745 5.52132054,4.7422389 9.5,4.7422389 Z`,fill:e.ref(1)}),U(`path`,{d:`M9.5,6.7422389 C12.5375661,6.7422389 15,9.20467277 15,12.2422389 L15,15.7422389 C15,16.8468084 14.1045695,17.7422389 13,17.7422389 L9.5,17.7422389 C6.46243388,17.7422389 4,15.279805 4,12.2422389 C4,9.20467277 6.46243388,6.7422389 9.5,6.7422389 Z`,fill:e.ref(2)}),U(`rect`,{fill:e.ref(3),x:`18`,y:`7.7422389`,width:`2`,height:`9`,rx:`1`}),U(`path`,{d:`M18.9843802,1 C18.9843802,2.52940392 20.1288357,3.79150593 21.6080665,3.97662574 L21.9843802,4 C20.4549762,4 19.1928742,5.14445555 19.0077544,6.62368637 L18.9843802,7 C18.9843802,5.47059608 17.8399246,4.20849407 16.3606938,4.02337426 L15.9843802,4 C17.5137841,4 18.7758861,2.85554445 18.9610059,1.37631363 L18.9843802,1 Z`,fill:e.ref(4),"fill-rule":`nonzero`}),U(`path`,{d:`M14.9843802,-1.0658141e-14 C14.9843802,1.01960262 15.7473505,1.86100395 16.7335044,1.98441716 L16.9843802,2 C15.9647776,2 15.1233762,2.76297037 14.999963,3.74912425 L14.9843802,4 C14.9843802,2.98039738 14.2214098,2.13899605 13.2352559,2.01558284 L12.9843802,2 C14.0039828,2 14.8453841,1.23702963 14.9687973,0.250875751 L14.9843802,-1.0658141e-14 Z`,fill:e.ref(5),"fill-rule":`nonzero`}),U(`path`,{d:`M15.9843802,5 C15.9843802,5.50980131 16.3658654,5.93050198 16.8589423,5.99220858 L16.9843802,6 C16.4745789,6 16.0538782,6.38148518 15.9921716,6.87456212 L15.9843802,7 C15.9843802,6.49019869 15.602895,6.06949802 15.109818,6.00779142 L14.9843802,6 C15.4941815,6 15.9148821,5.61851482 15.9765887,5.12543788 L15.9843802,5 Z`,fill:`#8860FC`,"fill-rule":`nonzero`}),U(`rect`,{fill:`#16204D`,x:`6.5`,y:`10.7422389`,width:`2`,height:`3`,rx:`1`}),U(`rect`,{fill:`#16204D`,x:`10.5`,y:`10.7422389`,width:`2`,height:`3`,rx:`1`}),U(`path`,{d:`M12.1896605,4.7422389 C11.9209486,3.40890556 11.3915034,2.7422389 10.6013249,2.7422389 C9.41605731,2.7422389 9.42887356,4.32659654 10.6013249,4.18645894 C11.2198089,4.11253447 11.6391525,4.29779445 11.8593557,4.7422389 L12.1896605,4.7422389 Z`,fill:e.ref(6),transform:`translate(10.9534, 3.7422) scale(-1, 1) translate(-10.9534, -3.7422)`}),U(`path`,{d:`M9.71717378,4.7422389 C9.4484618,3.40890556 8.9190166,2.7422389 8.12883818,2.7422389 C6.94357055,2.7422389 6.95638679,4.32659654 8.12883818,4.18645894 C8.74732212,4.11253447 9.16666571,4.29779445 9.38686894,4.7422389 L9.71717378,4.7422389 Z`,fill:e.ref(6)})])])])])}}),iEe=Qn({name:`AIBluekingBannerIcon`,setup(){let e=nEe(`banner-icon`);return()=>U(`svg`,{...Fp,viewBox:`0 0 309 93`,class:{[Fp.class]:!0,"ai-blueking-banner-icon":!0}},[U(`defs`,{},[U(`linearGradient`,{x1:`45.02491%`,y1:`35.5927467%`,x2:`99.2803929%`,y2:`81.0358394%`,id:e.id(1)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#EB8CEC`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(2)},[U(`stop`,{"stop-color":`#FFFFFF`,"stop-opacity":`0.885701426`,offset:`0%`}),U(`stop`,{"stop-color":`#FFFFFF`,"stop-opacity":`0.29`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(3)},[U(`stop`,{"stop-color":`#1562FC`,offset:`0%`}),U(`stop`,{"stop-color":`#EB8CEC`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`95.0902604%`,x2:`35.112422%`,y2:`19.6450217%`,id:e.id(4)},[U(`stop`,{"stop-color":`#DC63FE`,offset:`0.0150240385%`}),U(`stop`,{"stop-color":`#235DFA`,offset:`100%`})]),U(`linearGradient`,{x1:`46.6072083%`,y1:`95.8855311%`,x2:`46.6072083%`,y2:`50%`,id:e.id(5)},[U(`stop`,{"stop-color":`#B962FD`,offset:`0%`}),U(`stop`,{"stop-color":`#565FFB`,offset:`99.984976%`})]),U(`linearGradient`,{x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,id:e.id(6)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#A826E2`,offset:`100%`})]),U(`linearGradient`,{x1:`50%`,y1:`-38.6691405%`,x2:`50%`,y2:`100%`,id:e.id(7)},[U(`stop`,{"stop-color":`#235DFA`,offset:`0%`}),U(`stop`,{"stop-color":`#9F7BF1`,"stop-opacity":`0.15`,offset:`62.335824%`}),U(`stop`,{"stop-color":`#EB8CEC`,"stop-opacity":`0`,offset:`100%`})])]),U(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},[U(`g`,{transform:`translate(0, 0.2974)`},[U(`g`,{transform:`translate(124.4167, 0)`},[U(`path`,{d:`M28.3965776,12.9425679 C38.3377031,12.9425679 46.3965776,21.0014424 46.3965776,30.9425679 L46.3969075,48.6505618 C51.2162571,49.132982 54.5842089,50.4998157 54.5842089,53.8408323 C54.5842089,53.8444226 54.5842089,53.8477257 54.5824622,53.8507588 L54.5702354,53.8590653 C54.5370482,53.8709895 54.4250414,53.8772107 54.0470184,53.8795761 L53.8473221,53.8804155 C53.8227592,53.8804783 53.7973775,53.8805312 53.7711498,53.8805746 L53.4140599,53.8806511 C53.3806271,53.8806219 53.3462391,53.8805842 53.3108685,53.8805382 L52.8375142,53.8796076 C51.6610285,53.8767057 49.6921211,53.8685916 46.3970568,53.8605313 L46.3965776,53.8807246 L23.4584209,53.8807246 C14.9044209,53.8807246 7.74404265,47.9139206 5.91235374,39.9153803 C2.4976649,38.935189 0,35.8013205 0,32.0869334 L1.43000256,32.0866983 C1.58407741,32.0866469 1.73656386,32.0865873 1.88747828,32.0865198 L3.20370552,32.0857063 C4.00314289,32.0850715 4.75405903,32.0842107 5.4593989,32.0831725 L5.45842089,30.9425679 C5.45842089,21.0014424 13.5172954,12.9425679 23.4584209,12.9425679 L28.3965776,12.9425679 Z`,fill:e.ref(1)}),U(`rect`,{fill:e.ref(2),x:`10.9168418`,y:`18.4009888`,width:`30.0213149`,height:`30.0213149`,rx:`12`}),U(`rect`,{fill:e.ref(3),x:`49.125788`,y:`21.1301993`,width:`5.45842089`,height:`24.562894`,rx:`2`}),U(`path`,{d:`M51.8123687,2.72921045 C51.8123687,6.90327561 54.9358287,10.3478176 58.9729609,10.8530485 L60,10.9168418 C55.8259348,10.9168418 52.3813929,14.0403018 51.8761619,18.077434 L51.8123687,19.1044731 C51.8123687,14.930408 48.6889086,11.485866 44.6517764,10.9806351 L43.6247373,10.9168418 C47.7988025,10.9168418 51.2433445,7.79338174 51.7485754,3.75624952 L51.8123687,2.72921045 Z`,fill:e.ref(4),"fill-rule":`nonzero`}),U(`path`,{d:`M40.8955269,0 C40.8955269,2.78271011 42.9778336,5.07907143 45.6692551,5.41589204 L46.3539478,5.45842089 C43.5712377,5.45842089 41.2748763,7.54072759 40.9380557,10.2321491 L40.8955269,10.9168418 C40.8955269,8.13413168 38.8132202,5.83777036 36.1217987,5.50094974 L35.437106,5.45842089 C38.2198161,5.45842089 40.5161774,3.3761142 40.852998,0.684692719 L40.8955269,0 Z`,fill:e.ref(5),"fill-rule":`nonzero`}),U(`path`,{d:`M44.4235306,12.0484656 C44.4235306,13.4398207 45.464684,14.5880013 46.8103947,14.7564116 L47.1527411,14.7776761 C45.761386,14.7776761 44.6132054,15.8188294 44.4447951,17.1645402 L44.4235306,17.5068865 C44.4235306,16.1155315 43.3823773,14.9673508 42.0366665,14.7989405 L41.6943202,14.7776761 C43.0856752,14.7776761 44.2338559,13.7365227 44.4022662,12.390812 L44.4235306,12.0484656 Z`,fill:`#8860FC`,"fill-rule":`nonzero`}),U(`rect`,{fill:`#16204D`,x:`17.7398679`,y:`29.3178306`,width:`5.45842089`,height:`8.18763134`,rx:`2`}),U(`rect`,{fill:`#16204D`,x:`28.6567097`,y:`29.3178306`,width:`5.45842089`,height:`8.18763134`,rx:`2`}),U(`path`,{d:`M33.2681489,12.9425679 C32.5347773,9.30362068 31.08981,7.48414704 28.9332468,7.48414704 C25.698402,7.48414704 25.7333802,11.8081925 28.9332468,11.4257275 C30.6212196,11.223972 31.7656965,11.7295855 32.3666775,12.9425679 L33.2681489,12.9425679 Z`,fill:e.ref(6),transform:`translate(29.8942, 10.2134) scale(-1, 1) translate(-29.8942, -10.2134)`}),U(`path`,{d:`M26.5202122,12.9425679 C25.7868406,9.30362068 24.3418733,7.48414704 22.1853101,7.48414704 C18.9504653,7.48414704 18.9854435,11.8081925 22.1853101,11.4257275 C23.8732829,11.223972 25.0177598,11.7295855 25.6187408,12.9425679 L26.5202122,12.9425679 Z`,fill:e.ref(6)})]),U(`path`,{d:`M309,81.279814 C309,66.0493667 239.827994,53.7026496 154.5,53.7026496 C69.1720062,53.7026496 0,66.0493667 0,81.279814 C0,96.5102614 309,96.5102614 309,81.279814 Z`,fill:e.ref(7),opacity:`0.22710455`})])])])}}),Ip=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-document-icon":!0}},[U(`g`,{fill:`none`},[U(`path`,{fill:`#3D4265`,d:`M708.9230754909091 157.53846132363637L984.6153867636364 157.53846132363637C1006.3669061818182 157.53846132363637 1024 175.17155421090908 1024 196.9230764218182L1024 945.2307688727273C1024 988.7338123636364 988.7338123636364 1024 945.2307688727273 1024L708.9230754909091 1024 708.9230754909091 157.53846132363637Z`}),U(`path`,{fill:`#3A84FF`,d:`M0 984.6153867636364C0 995.0608337454545 4.149438594327273 1005.0784674909091 11.535486650181818 1012.4645143272728 18.921534743272726 1019.8505611636365 28.939165649454548 1024 39.38461500509091 1024L945.2307688727273 1024C901.7277253818182 1024 866.4615377454545 988.7338123636364 866.4615377454545 945.2307688727273L866.4615377454545 39.384615051636366C866.4615377454545 17.633092747636365 848.8284439272727 0 827.0769245090909 0L39.38461500509091 0C17.633092747636365 0 0 17.633092747636365 0 39.384615051636366L0 984.6153867636364Z`}),U(`path`,{fill:`#FFF`,d:`M196.92307688727274 288.82051304727275C175.17155467636363 288.82051304727275 157.53846132363637 306.45360593454546 157.53846132363637 328.2051281454546 157.53846132363637 349.9566508218182 175.17155467636363 367.5897437090909 196.92307688727274 367.5897437090909L354.4615391418182 367.5897437090909C376.2130618181818 367.5897437090909 393.8461547054545 349.9566508218182 393.8461547054545 328.2051281454546 393.8461547054545 306.45360593454546 376.2130618181818 288.82051304727275 354.4615391418182 288.82051304727275L196.92307688727274 288.82051304727275ZM196.92307688727274 525.1282059636363C175.17155467636363 525.1282059636363 157.53846132363637 542.7612997818183 157.53846132363637 564.5128192000001 157.53846132363637 586.2643432727273 175.17155467636363 603.8974370909091 196.92307688727274 603.8974370909091L669.5384622545455 603.8974370909091C691.2899816727273 603.8974370909091 708.9230754909091 586.2643432727273 708.9230754909091 564.5128192000001 708.9230754909091 542.7612997818183 691.2899816727273 525.1282059636363 669.5384622545455 525.1282059636363L196.92307688727274 525.1282059636363ZM196.92307688727274 761.4358993454546C175.17155467636363 761.4358993454546 157.53846132363637 779.0689885090909 157.53846132363637 800.8205125818182 157.53846132363637 822.5720366545454 175.17155467636363 840.2051304727273 196.92307688727274 840.2051304727273L433.23076933818186 840.2051304727273C454.9822915490909 840.2051304727273 472.61538676363637 822.5720366545454 472.61538676363637 800.8205125818182 472.61538676363637 779.0689885090909 454.9822915490909 761.4358993454546 433.23076933818186 761.4358993454546L196.92307688727274 761.4358993454546Z`})])]),aEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-preview-icon":!0}},[U(`path`,{fillRule:`evenodd`,d:`M512 192C759.4 192 960 335.3 960 512 960 688.7 759.4 832 512 832 264.6 832 64 688.7 64 512 64 335.3 264.6 192 512 192ZM512 256C457.8 256 405.4 263.5 356.1 278.4 309.5 292.5 267.8 312.5 232.4 337.8 165.1 385.9 128 447.8 128 512 128 576.2 165.1 638.1 232.4 686.2 267.8 711.5 309.5 731.5 356.1 745.6 405.4 760.5 457.8 768 512 768 566.2 768 618.6 760.5 667.9 745.6 714.5 731.5 756.2 711.5 791.6 686.2 858.9 638.1 896 576.2 896 512 896 447.8 858.9 385.9 791.6 337.8 756.2 312.5 714.5 292.5 667.9 278.4 618.6 263.5 566.2 256 512 256ZM512 352C600.4 352 672 423.6 672 512 672 600.4 600.4 672 512 672 423.6 672 352 600.4 352 512 352 423.6 423.6 352 512 352ZM512 416C459.1 416 416 459.1 416 512 416 564.9 459.1 608 512 608 564.9 608 608 564.9 608 512 608 459.1 564.9 416 512 416Z`})]),oEe=U(`svg`,{...Fp,viewBox:`0 0 64 64`,class:{[Fp.class]:!0,"ai-target-icon":!0}},[U(`g`,null,[U(`path`,{d:`M54 8H31v4h18.2L22.6 38.6l2.8 2.8L52 14.8V33h4V10c0-1.1-.9-2-2-2z`}),U(`path`,{d:`M52 44v8H12V12h7.9V8H10c-1.1 0-2 .9-2 2v44c0 1.1.9 2 2 2h44c1.1 0 2-.9 2-2V44h-4z`})])]),sEe=U(`svg`,{...Fp,viewBox:`0 0 64 64`,class:{[Fp.class]:!0,"ai-remove-icon":!0}},[U(`path`,{fill:`#737987`,d:`M32,4C16.5,4,4,16.5,4,32s12.5,28,28,28s28-12.5,28-28S47.5,4,32,4z M43.3,40.5l-2.8,2.8L32,34.8l-8.5,8.5l-2.8-2.8l8.5-8.5l-8.5-8.5l2.8-2.8l8.5,8.5l8.5-8.5l2.8,2.8L34.8,32L43.3,40.5z`})]),Lp=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-arrow-right-icon":!0}},[U(`path`,{d:`M822.3999999999999 493.43999999999994l-439.03999999999996-356.48c-10.239999999999998-8.32-26.24-10.879999999999999-40.31999999999999-7.04s-23.04 14.08-23.04 25.599999999999998v712.96c0 11.52 8.959999999999999 21.119999999999997 23.04 25.599999999999998 4.4799999999999995 1.2799999999999998 8.959999999999999 1.92 13.44 1.92 10.239999999999998 0 19.84-3.1999999999999997 26.88-8.959999999999999l439.03999999999996-356.48c12.799999999999999-10.239999999999998 12.799999999999999-26.88 0-37.12z`})]);U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-link-icon":!0}},[U(`path`,{d:`M263.04 760.96a148.48 148.48 0 0 1-1.92-224l92.48-92.48L308.48 398.72 216 491.2a212.8 212.8 0 0 0 1.92 314.88 212.8 212.8 0 0 0 314.88 1.92l92.48-92.48L579.84 672l-92.48 92.48A148.48 148.48 0 0 1 263.04 760.96Z`}),U(`path`,{d:`M491.2 216L398.72 308.48l45.44 45.12 92.48-92.48a148.48 148.48 0 0 1 224 1.92 148.48 148.48 0 0 1 1.92 224L672 579.84l45.12 45.44 92.48-92.48a212.8 212.8 0 0 0-1.92-314.88A212.8 212.8 0 0 0 491.2 216Z`}),U(`path`,{d:`M398.78566017615634 579.8877413259167L579.8049961599127 398.86840534216054 625.0598301558516 444.1232393380996 444.0404941720955 625.1425753218557 398.78566017615634 579.8877413259167z`})]);var cEe=U(`svg`,{...Fp,viewBox:`0 0 24 18`,class:{[Fp.class]:!0,"ai-image-error-icon":!0}},[U(`path`,{d:`M8.018 0l-.774 2.941.856 2.206-.757 1.47 1.26-1.272-.232-2.224 1.102-3.088h7.228c1.322.01 2.388 1.085 2.39 2.408v5.196a5.42 5.42 0 0 0-1.186.144V2.46c-.035-.645-.542-1.164-1.186-1.213H10.346L9.388 3.04l-.18 2.573-2.636 2.261.859-2.629-1.186-2.006.18-1.978H2.57c-.334-.01-.658.115-.9.346a1.24 1.24 0 0 0-.385.885L1.252 13.07l3.921-4.834c.477-.481 1.068-.481 1.436 0l3.44 4.47 3.344-3.375c.194-.242.495-.372.804-.349.309.024.586.198.742.467l.171.221a5.45 5.45 0 0 0-.928 2.874c0 1.896 1.074 3.54 2.648 4.359l-.122.005H2.39C1.065 16.877.017 15.776.048 14.45L0 2.393C.044 1.071 1.131.024 2.452.033h5.566zM19.09 8.25a4.295 4.295 0 1 1 0 8.591 4.295 4.295 0 0 1 0-8.591zm0 5.83a.46.46 0 1 0 0 .92.46.46 0 0 0 0-.92zm0-3.936a.434.434 0 0 0-.433.408l.126 2.915a.307.307 0 0 0 .614 0l.122-2.822a.434.434 0 0 0-.43-.5zm-5.405-5.737a2.03 2.03 0 0 1 .95 1.653 2.03 2.03 0 0 1-.95 1.653 1.93 1.93 0 0 1-1.918 0 2.03 2.03 0 0 1-.95-1.653c.004-.678.364-1.304.95-1.653a1.93 1.93 0 0 1 1.918 0z`,fill:`currentColor`,"fill-rule":`nonzero`})]),lEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-success-icon":!0}},[U(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M16 2C23.7313 2 30 8.26875 30 16C30 23.7313 23.7313 30 16 30C8.26875 30 2 23.7313 2 16C2 8.26875 8.26875 2 16 2ZM22.0028 11L14.0038 19L10 15L8.5 16.5026L14.0038 22L23.5 12.5L22.0028 11Z`,fill:`#65C389`})]),uEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-failed-icon":!0}},[U(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M16 2C23.7313 2 30 8.26875 30 16C30 23.7313 23.7313 30 16 30C8.26875 30 2 23.7313 2 16C2 8.26875 8.26875 2 16 2ZM20.2426 10.3431L15.9996 14.5862L11.757 10.3435L10.3431 11.7574L14.5858 16L10.3431 20.2426L11.758 21.6575L16.0006 17.4149L20.2426 21.6569L21.6565 20.243L17.4145 16.001L21.6575 11.758L20.2426 10.3431Z`,fill:`#FF5656`})]),dEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-suspended-icon":!0}},[U(`path`,{d:`M16 2C23.732 2 30 8.26801 30 16C30 23.732 23.732 30 16 30C8.26801 30 2 23.732 2 16C2 8.26801 8.26801 2 16 2ZM14 10H11V22H14V10ZM21 10H18V22H21V10Z`,fill:`#F59500`})]),fEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-pending-icon":!0}},[U(`path`,{d:`M16 2C23.732 2 30 8.26801 30 16C30 23.732 23.732 30 16 30C8.26801 30 2 23.732 2 16C2 8.26801 8.26801 2 16 2ZM9.69434 7.7002C9.14293 7.7002 8.7002 8.15033 8.7002 8.7002V8.74023C8.70032 9.28999 9.14301 9.74023 9.69434 9.74023H11.1191V12.1201C11.1192 13.6989 11.8616 15.1043 13.0137 16C11.8616 16.8957 11.1192 18.3011 11.1191 19.8799V22.2598H9.71387C9.69649 22.2598 9.67908 22.2608 9.66211 22.2627C9.14435 22.2999 8.73938 22.734 8.73926 23.2598V23.2998C8.73926 23.8316 9.15347 24.2693 9.67969 24.2979C9.69103 24.2987 9.70239 24.2998 9.71387 24.2998H22.3057C22.8571 24.2998 23.2998 23.8497 23.2998 23.2998V23.2598C23.2997 22.71 22.857 22.2598 22.3057 22.2598H20.8408V19.8799C20.8408 18.3007 20.0978 16.8956 18.9453 16C20.0978 15.1044 20.8408 13.6993 20.8408 12.1201V9.74023H22.2666C22.8178 9.74006 23.2606 9.28989 23.2607 8.74023V8.7002C23.2607 8.15043 22.8179 7.70037 22.2666 7.7002H9.69434ZM22.4463 23.9854L22.3057 24C22.3951 24 22.48 23.9813 22.5586 23.9502C22.5223 23.9645 22.4852 23.9773 22.4463 23.9854ZM9.05273 23.4316C9.06084 23.4745 9.07245 23.516 9.08789 23.5557C9.07298 23.5174 9.06081 23.4777 9.05273 23.4365V23.4316ZM9.44531 22.623C9.48274 22.6058 9.52184 22.5915 9.5625 22.5811L9.56445 22.5801C9.5231 22.5906 9.48336 22.6054 9.44531 22.623ZM15.9805 17.0195C16.7368 17.0196 17.447 17.3158 17.9814 17.8564L17.9824 17.8574C18.5188 18.3966 18.8134 19.1145 18.8135 19.8799V22.2598H13.1475V19.8799C13.1475 19.1145 13.4412 18.3966 13.9775 17.8574L13.9785 17.8564C14.5131 17.3156 15.2239 17.0195 15.9805 17.0195ZM18.8135 9.74023V12.1201C18.8134 12.8855 18.5188 13.6034 17.9824 14.1426L17.9814 14.1436C17.447 14.6842 16.7368 14.9804 15.9805 14.9805C15.2239 14.9805 14.5131 14.6844 13.9785 14.1436L13.9775 14.1426L13.7881 13.9316C13.3725 13.4226 13.1475 12.7897 13.1475 12.1201V9.74023H18.8135ZM12.875 12.5459C12.87 12.5086 12.866 12.4712 12.8623 12.4336L12.8506 12.2773C12.8549 12.3676 12.8632 12.4572 12.875 12.5459Z`,fill:`#B8BBC4`})]),pEe=U(`svg`,{...Fp,viewBox:`0 0 32 32`,class:{[Fp.class]:!0,"ai-bk-flow-skipped-icon":!0}},[U(`path`,{d:`M16 2C23.732 2 30 8.26801 30 16C30 23.732 23.732 30 16 30C8.26801 30 2 23.732 2 16C2 8.26801 8.26801 2 16 2ZM17.0156 8.8125C16.6831 8.81258 16.4131 9.08514 16.4131 9.4209V11.8574L16.3984 11.8594C14.1864 12.2432 12.5291 13.4566 12.3467 13.5947C11.5353 14.1512 10.813 14.8455 10.1973 15.6533C9.70507 16.3019 9.28342 17.0276 8.93945 17.8086C8.4036 19.027 8.23229 19.9214 8.19238 20.167V20.1709C8.18865 20.1842 8.18638 20.1997 8.18262 20.2168L8.18066 20.2246C8.16356 20.309 8.13736 20.4356 8.12598 20.6387C8.11649 20.8244 8.18634 20.9396 8.24707 21.0049C8.33639 21.1008 8.46603 21.1533 8.61426 21.1533C8.8347 21.1533 9.00412 20.9708 9.15234 20.8115L9.1543 20.8096C9.17706 20.7847 9.19793 20.7613 9.2207 20.7383C9.86489 20.0898 10.6804 19.5176 11.5811 19.084C12.3449 18.7176 13.2058 18.4188 14.1387 18.1963C15.0584 17.9775 15.8738 17.8771 16.3945 17.8311L16.415 17.8291V20.5596C16.415 20.8953 16.6851 21.1679 17.0176 21.168L16.999 21.1836L17.0371 21.1875L17.0176 21.168C17.1639 21.168 17.3068 21.1145 17.417 21.0166L23.6729 15.4385C23.6918 15.4213 23.7086 15.4039 23.7256 15.3848C23.9441 15.1315 23.9197 14.748 23.6709 14.5254L17.415 8.96387C17.3048 8.86601 17.1619 8.8125 17.0156 8.8125Z`,fill:`#5B7290`})]),mEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-execution-icon":!0}},[U(`path`,{"fill-rule":`evenodd`,d:`M512 64A448 448 0 1 1 64 512 448 448 0 0 1 512 64Zm0 64A384 384 0 0 0 128 512 384 384 0 0 0 784 784 384 384 0 0 0 784 240 384 384 0 0 0 512 128ZM448 576V256h64V512H768v64Z`})]),Rp=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-node-output-icon":!0}},[U(`path`,{d:`M800 128c17.664 0 32 12.288 32 27.424v545.408L594.016 896H224c-17.664 0-32-12.288-32-27.424V155.424C192 140.288 206.336 128 224 128z m-26.176 59.072H250.176v649.856h276.384v-134.88c0-31.52 28.704-57.12 64-57.12h183.264V187.072zM735.52 704h-144.96a13.024 13.024 0 0 0-5.824 1.216v122.432L735.52 704zM704 480v64H320v-64h384z m-128-96v64h-256v-64h256z m96-128v64H320V256h352z`})]),hEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-node-tab-icon":!0}},[U(`path`,{d:`M374.656 640c57.184 0 105.184 41.088 118.72 96.384 1.312-0.16 2.624-0.384 3.968-0.384h368c16.928 0 30.656 14.336 30.656 32s-13.76 32-30.656 32h-368c-1.376 0-2.656-0.256-3.936-0.384-13.568 55.296-61.568 96.384-118.72 96.384-57.184 0-105.216-41.088-118.72-96.384-1.344 0.16-2.624 0.384-3.968 0.384H190.656C173.76 800 160 785.664 160 768s13.76-32 30.656-32h61.344c1.344 0 2.624 0.256 3.936 0.384C269.472 681.088 317.504 640 374.656 640z m0 64c-33.824 0-61.312 28.704-61.312 64s27.52 64 61.312 64c33.824 0 61.344-28.704 61.344-64s-27.52-64-61.344-64z m306.688-320c57.152 0 105.184 41.088 118.72 96.384 1.28-0.16 2.56-0.384 3.936-0.384h61.344c16.928 0 30.656 14.336 30.656 32s-13.76 32-30.656 32h-61.344c-1.344 0-2.624-0.256-3.936-0.384-13.536 55.296-61.568 96.384-118.72 96.384-57.184 0-105.184-41.088-118.72-96.384-1.312 0.16-2.624 0.384-3.968 0.384h-368C173.76 544 160 529.664 160 512s13.76-32 30.656-32h368c1.376 0 2.656 0.256 3.936 0.384 13.568-55.296 61.568-96.384 118.72-96.384z m0 64c-33.824 0-61.344 28.704-61.344 64s27.52 64 61.344 64 61.312-28.704 61.312-64-27.52-64-61.312-64z m-306.688-288c57.184 0 105.184 41.088 118.72 96.384 1.312-0.16 2.624-0.384 3.968-0.384h368c16.928 0 30.656 14.336 30.656 32s-13.76 32-30.656 32h-368c-1.376 0-2.656-0.256-3.936-0.384-13.568 55.296-61.568 96.384-118.72 96.384-57.184 0-105.216-41.088-118.72-96.384-1.344 0.16-2.624 0.384-3.968 0.384H190.656C173.76 320 160 305.664 160 288s13.76-32 30.656-32h61.344c1.344 0 2.624 0.256 3.936 0.384C269.472 201.088 317.504 160 374.656 160z m0 64c-33.824 0-61.312 28.704-61.312 64s27.52 64 61.312 64c33.824 0 61.344-28.704 61.344-64s-27.52-64-61.344-64z`})]),gEe=U(`svg`,{...Fp,class:`ai-common-icon ai-zoom-in-icon`},[U(`path`,{d:`M637.02 482.06H546.3V391.34c0-17.67-14.33-32-32-32s-32 14.33-32 32v90.72H391.58c-17.67 0-32 14.33-32 32s14.33 32 32 32h90.72v90.72c0 17.67 14.33 32 32 32s32-14.33 32-32v-90.72h90.72c17.67 0 32-14.33 32-32s-14.33-32-32-32z`}),U(`path`,{d:`M514.3 195.78c-175.72 0-318.28 142.56-318.28 318.28S338.58 832.34 514.3 832.34s318.28-142.56 318.28-318.28-142.56-318.28-318.28-318.28z m0 572.56c-140.28 0-254.28-114-254.28-254.28s114-254.28 254.28-254.28 254.28 114 254.28 254.28-114 254.28-254.28 254.28z`})]),_Ee=U(`svg`,{...Fp,class:`ai-common-icon ai-zoom-out-icon`},[U(`path`,{d:`M637.02 482.06H391.58c-17.67 0-32 14.33-32 32s14.33 32 32 32h245.44c17.67 0 32-14.33 32-32s-14.33-32-32-32z`}),U(`path`,{d:`M514.3 195.78c-175.72 0-318.28 142.56-318.28 318.28S338.58 832.34 514.3 832.34s318.28-142.56 318.28-318.28-142.56-318.28-318.28-318.28z m0 572.56c-140.28 0-254.28-114-254.28-254.28s114-254.28 254.28-254.28 254.28 114 254.28 254.28-114 254.28-254.28 254.28z`})]),vEe=U(`svg`,{...Fp,class:`ai-common-icon ai-rotate-icon`},[U(`path`,{d:`M817.76 328.31H402.28c-59.68 0-108.24 48.55-108.24 108.24v415.44c0 59.68 48.55 108.24 108.24 108.24h415.47c59.65 0 108.2-48.55 108.2-108.24V436.55c0-59.69-48.55-108.24-108.19-108.24z m30.39 523.68c0 16.79-13.64 30.43-30.39 30.43H402.28c-16.79 0-30.43-13.64-30.43-30.43V436.55c0-16.79 13.64-30.43 30.43-30.43h415.47c16.75 0 30.39 13.64 30.39 30.43v415.44z`}),U(`path`,{d:`M248.91 368.43c-18.27-11.32-42.25-5.66-53.57 12.61l-18.16 29.33c-0.87-8.47-1.33-17.1-1.33-25.76 0-134 109.04-243.03 243.07-243.03 44.64 0 88.29 12.2 126.17 35.29 18.39 11.13 42.32 5.32 53.49-12.99 11.17-18.35 5.36-42.28-12.99-53.49-50.11-30.51-107.74-46.62-166.67-46.62-176.93 0-320.88 143.91-320.88 320.84 0 48.14 10.41 94.41 30.89 137.53 6.12 12.84 18.77 21.35 32.98 22.11 0.72 0.04 1.44 0.08 2.17 0.08a38.92 38.92 0 0 0 33.09-18.43L261.52 422c11.29-18.28 5.66-42.25-12.61-53.57z`})]),yEe=U(`svg`,{...Fp,class:`ai-common-icon ai-fit-screen-icon`},[U(`path`,{d:`M160 160h240v64H224v176H160V160zM160 624h64v176h176v64H160V624zM624 160h240v240h-64V224H624V160zM800 624h64v240H624v-64h176V624z`})]),bEe=U(`svg`,{...Fp,class:`ai-common-icon ai-download-icon`},[U(`path`,{d:`M544 654.4V192h-64v462.4l-147.2-147.2-45.2 45.2L512 776.8l224.4-224.4-45.2-45.2L544 654.4zM832 832H192v64h640v-64z`})]),xEe=U(`svg`,{...Fp,class:`ai-common-icon ai-close-icon`},[U(`path`,{d:`M557.3 512l214.9-214.9c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L512 466.7 297.1 251.8c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L466.7 512 251.8 726.9c-12.5 12.5-12.5 32.8 0 45.3 6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4L512 557.3l214.9 214.9c6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4c12.5-12.5 12.5-32.8 0-45.3L557.3 512z`})]),SEe=U(`svg`,{...Fp,class:`ai-common-icon ai-arrow-left-icon`},[U(`path`,{d:`M672 165.2L333.2 504c-5.6 5.6-5.6 14.8 0 20.4L672 863.2`,fill:`none`,stroke:`currentColor`,"stroke-width":`64`,"stroke-linecap":`round`})]),CEe=U(`svg`,{...Fp,class:`ai-common-icon ai-arrow-right-preview-icon`},[U(`path`,{d:`M352 165.2L690.8 504c5.6 5.6 5.6 14.8 0 20.4L352 863.2`,fill:`none`,stroke:`currentColor`,"stroke-width":`64`,"stroke-linecap":`round`})]);U(`svg`,{...Fp,class:`ai-common-icon ai-reload-icon`},[U(`path`,{d:`M889.6 398.4c-16-35.2-35.2-65.6-60.8-92.8-24-27.2-52.8-48-84.8-65.6-32-17.6-67.2-28.8-102.4-35.2-35.2-6.4-72-8-108.8-3.2V108.8l-256 192 256 192V400c27.2-4.8 54.4-4.8 81.6-1.6 27.2 4.8 52.8 14.4 76.8 27.2 24 12.8 46.4 30.4 64 51.2 17.6 20.8 32 44.8 41.6 70.4 9.6 25.6 14.4 52.8 14.4 81.6s-4.8 56-14.4 81.6c-9.6 25.6-24 49.6-41.6 70.4-17.6 20.8-40 38.4-64 51.2-24 12.8-49.6 22.4-76.8 27.2-27.2 4.8-54.4 4.8-81.6 1.6-27.2-4.8-52.8-14.4-76.8-27.2-24-12.8-46.4-30.4-64-51.2-17.6-20.8-32-44.8-41.6-70.4-9.6-25.6-14.4-52.8-14.4-81.6h-64c0 38.4 6.4 75.2 19.2 110.4 12.8 35.2 30.4 67.2 52.8 96 22.4 28.8 49.6 52.8 80 72 30.4 19.2 64 33.6 99.2 43.2 35.2 9.6 72 12.8 108.8 11.2 36.8-1.6 72-9.6 105.6-22.4 33.6-12.8 64-30.4 92.8-52.8 28.8-22.4 52.8-49.6 72-80 19.2-30.4 33.6-64 43.2-99.2 9.6-35.2 12.8-72 11.2-108.8-1.6-36.8-9.6-72-22.4-105.6z`})]);var wEe=U(`svg`,{...Fp,viewBox:`0 0 200 180`,class:`ai-common-icon ai-image-broken-icon`},[U(`g`,{fill:`none`},[U(`rect`,{x:`30`,y:`20`,width:`100`,height:`86`,rx:`4`,fill:`#C4C6CC`,opacity:`0.6`}),U(`circle`,{cx:`55`,cy:`45`,r:`8`,fill:`#979BA5`,opacity:`0.5`}),U(`path`,{d:`M30 80l25-20 20 15 25-25 30 30v26H30V80z`,fill:`#979BA5`,opacity:`0.5`}),U(`circle`,{cx:`120`,cy:`80`,r:`36`,fill:`#FFE8C3`,stroke:`#FF9C01`,"stroke-width":`3`}),U(`text`,{x:`120`,y:`88`,"text-anchor":`middle`,"font-size":`32`,"font-weight":`bold`,fill:`#FF9C01`},`!`)])]),TEe=U(`svg`,{...Fp,class:`ai-common-icon ai-image-size-icon`},[U(`path`,{d:`M864 160H160c-35.2 0-64 28.8-64 64v576c0 35.2 28.8 64 64 64h704c35.2 0 64-28.8 64-64V224c0-35.2-28.8-64-64-64z m0 640H160V224h704v576z`})]),EEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-close-circle-icon":!0}},[U(`path`,{d:`M512 70.246391c230.929037 0 418.133279 187.204242 418.133279 418.133279s-187.204242 418.133279-418.133279 418.133279-418.133279-187.204242-418.133279-418.133279 187.204242-418.133279 418.133279-418.133279z m0 59.733325c-197.938508 0-358.399953 160.461446-358.399953 358.399954s160.461446 358.399953 358.399953 358.399953 358.399953-160.461446 358.399953-358.399953-160.461446-358.399953-358.399953-358.399954z m0 123.199984c129.884516 0 235.199969 105.315453 235.199969 235.19997s-105.315453 235.199969-235.199969 235.199969-235.199969-105.315453-235.199969-235.199969 105.315453-235.199969 235.199969-235.19997z m71.276791 140.165182l-71.283324 71.282391-71.276791-71.275858-23.751464 23.751464 71.275858 71.276791-71.275858 71.27679 23.769197 23.769197 71.276791-71.27679 71.265591 71.26559 23.751463-23.751463-71.264657-71.265591 71.282391-71.283324-23.769197-23.769197z`})]),DEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-doc-link-icon":!0}},[U(`path`,{d:`M320.950857 203.337143H191.634286a32.036571 32.036571 0 0 0-31.670857 31.890286v639.561142c0 17.408 14.409143 31.890286 31.670857 31.890286h129.316571a32.036571 32.036571 0 0 0 31.670857-31.890286V235.227429a32.036571 32.036571 0 0 0-31.670857-31.890286z m-35.84 130.486857H227.474286a28.964571 28.964571 0 0 1 0-58.002286h57.490285a28.964571 28.964571 0 0 1 0 58.002286z m293.156572-237.860571H448.877714a32.036571 32.036571 0 0 0-31.597714 31.963428v746.788572c0 17.481143 14.409143 31.963429 31.597714 31.963428h129.462857a32.036571 32.036571 0 0 0 31.524572-31.890286V127.926857c1.462857-17.408-12.873143-31.890286-31.597714-31.890286z m-34.523429 132.022857h-57.490286a28.964571 28.964571 0 0 1 0-58.002286h57.490286a28.964571 28.964571 0 0 1 0 58.002286z m383.780571 613.449143l-120.685714-628.004572a33.792 33.792 0 0 0-33.060571-26.038857H768l-126.537143 24.649143a32.768 32.768 0 0 0-25.819428 37.668571l122.148571 629.394286c2.925714 15.945143 15.872 26.112 31.670857 26.112h5.705143l126.537143-24.649143a35.108571 35.108571 0 0 0 25.819428-39.131428z m-165.302857-529.334858l-57.490285 11.556572h-5.705143a30.72 30.72 0 0 1-28.745143-23.186286 29.696 29.696 0 0 1 22.966857-34.816l57.490286-11.556571c15.798857-2.925714 31.670857 7.241143 34.523428 23.186285a29.696 29.696 0 0 1-22.966857 34.816z`})]),OEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-delete-circle-icon":!0}},[U(`path`,{d:`M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64z m180.8 584l-44.8 44.8-136-136-136 136-44.8-44.8 136-136-136-136 44.8-44.8 136 136 136-136 44.8 44.8-136 136 136 136z`})]),kEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-delete-circle-icon":!0}},[U(`path`,{d:`M470.8352 362.7008l-192.8192 186.368a160.768 160.768 0 0 0 0.0512 232.8576c66.4576 64.2048 174.4384 64.3072 240.896 0.0512l241.0496-233.0112a34.9184 34.9184 0 0 1 48.1792 0c13.312 12.8512 13.312 33.7408 0 46.592l-241.0496 233.0112c-93.0816 89.9584-244.224 89.856-337.2544-0.0512a225.1264 225.1264 0 0 1-0.0512-326.0416l337.408-326.144a174.1824 174.1824 0 0 1 240.896 0 160.512 160.512 0 0 1 0 232.96l-192.8192 186.368-144.384 139.5712a104.6528 104.6528 0 0 1-144.6912 0.1024 96.1536 96.1536 0 0 1 0.1536-139.8784l337.0496-325.7856a34.9184 34.9184 0 0 1 48.128 0c13.312 12.8512 13.312 33.7408 0 46.592L374.6304 642.048a31.8464 31.8464 0 0 0-0.1536 46.7456 34.816 34.816 0 0 0 48.3328-0.1536l144.384-139.52 192.8192-186.4192a96.1536 96.1536 0 0 0 0-139.776 103.68 103.68 0 0 0-72.2944-29.0304c-27.136 0-53.1456 10.4448-72.2432 29.0304l-144.5888 139.776z`})]),AEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-check-circle-icon":!0}},[U(`path`,{d:`M512 85.333333c235.52 0 426.666667 191.146667 426.666667 426.666667s-191.146667 426.666667-426.666667 426.666667S85.333333 747.52 85.333333 512 276.48 85.333333 512 85.333333m-42.666667 618.666667l298.666667-298.666667-60.16-60.16L469.333333 583.253333l-131.84-131.413333L277.333333 512l192 192z`})]),jEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-time-icon":!0}},[U(`path`,{d:`M512 70.4a441.6 441.6 0 1 0 0 883.2 441.6 441.6 0 0 0 0-883.2z m0 64a377.6 377.6 0 1 1 0 755.2 377.6 377.6 0 0 1 0-755.2z`}),U(`path`,{d:`M544 480V256a32 32 0 1 0-64 0v230.4c0 31.7952 25.8048 57.6 57.6 57.6H768a32 32 0 1 0 0-64h-224z`})]),MEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-close-circle-icon":!0}},[U(`path`,{d:`M85.333333 512C85.333333 276.352 276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512z m269.653334-96.661333l96.810666 96.810666-96.810666 96.810667c-16.661333 16.661333-16.384 43.84 0.277333 60.501333l0.512 0.512c16.64 16.64 42.88 16 59.541333-0.682666l96.810667-96.810667 96.832 96.810667c16.64 16.682667 42.88 17.344 59.541333 0.682666l0.512-0.512c16.64-16.64 16.938667-43.84 0.277334-60.501333l-96.810667-96.810667 96.810667-96.810666c16.661333-16.661333 16.384-43.861333-0.277334-60.522667l-0.490666-0.490667c-16.682667-16.661333-42.901333-16-59.562667 0.661334l-96.832 96.810666-96.810667-96.810666c-16.64-16.64-42.88-17.322667-59.541333-0.661334a109.44 109.44 0 0 1-0.512 0.490667c-16.64 16.661333-16.938667 43.861333-0.277333 60.522667z`})]),NEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-revoked-icon":!0}},[U(`path`,{d:`M512 64a448.056889 448.056889 0 1 1-0.056889 896.056889A448.056889 448.056889 0 0 1 512 64zM448 256l-128 96.256L448.284444 448 448 384l128.113778 0.113778a128 128 0 0 1 0 255.886222h-224.142222v64h224.028444a192 192 0 1 0 0-384h-128V256z`})]),PEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-help-doc-icon":!0},viewBox:`0 0 16 16`},[U(`path`,{d:`M8 1C11.8656 1 15 4.13438 15 8C15 11.8656 11.8656 15 8 15C7.07969 15 6.2 14.8234 5.39531 14.5H2C1.72344 14.5 1.5 14.2766 1.5 14V10.6047C1.17812 9.79844 1 8.92031 1 8C1 4.13438 4.13438 1 8 1ZM8.54825 10.1578H7.37878V11.3687H8.54825V10.1578ZM8.07669 4.62969C7.4876 4.62969 6.98847 4.81875 6.5793 5.19844C6.17013 5.57812 5.91911 6.1375 5.8248 6.87656L7.07407 7.06875C7.14082 6.25156 7.44262 5.84219 7.98092 5.84219C8.18406 5.84219 8.35817 5.9125 8.50037 6.05156C8.64401 6.19062 8.71511 6.38125 8.71511 6.62344C8.71511 6.82031 8.67593 6.98438 8.60048 7.11719C8.52358 7.25 8.38864 7.39375 8.19421 7.54688C7.82277 7.84219 7.59497 8.06719 7.50791 8.22188C7.42085 8.37656 7.37732 8.75312 7.37732 9.34844V9.53438L8.5555 9.53281C8.5555 9.21562 8.58597 8.99687 8.64836 8.87969C8.71075 8.7625 8.88922 8.59844 9.18377 8.38906C9.86136 7.9125 10.2009 7.31875 10.2009 6.60781C10.2009 6.03437 9.99776 5.5625 9.59004 5.18906C9.18232 4.81563 8.67883 4.62969 8.07669 4.62969Z`})]),FEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-info-icon":!0}},[U(`path`,{d:`M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zM512 896C299.2 896 128 724.8 128 512S299.2 128 512 128s384 171.2 384 384S724.8 896 512 896z`}),U(`path`,{d:`M494.4 403.2c-28.8 6.4-56 20.8-76.8 41.6-24 22.4 1.6 44.8 16 27.2 9.6-12.8 24-22.4 40-28.8 11.2-1.6 17.6 1.6 19.2 9.6 1.6 14.4 0 27.2-4.8 41.6-4.8 19.2-14.4 51.2-25.6 94.4-22.4 76.8-33.6 124.8-30.4 140.8 3.2 17.6 12.8 32 28.8 41.6 17.6 8 38.4 9.6 57.6 4.8 30.4-6.4 57.6-22.4 80-44.8 25.6-25.6-3.2-43.2-17.6-28.8-9.6 12.8-24 22.4-40 25.6-14.4 3.2-22.4-3.2-25.6-16-1.6-14.4 1.6-28.8 6.4-41.6 40-136 57.6-212.8 52.8-232-3.2-14.4-12.8-27.2-25.6-33.6C532.8 398.4 512 398.4 494.4 403.2z`}),U(`path`,{d:`M608 304A48 48 0 0 1 560 352 48 48 0 0 1 512 304 48 48 0 0 1 608 304z`})]),IEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-enter-icon":!0}},[U(`path`,{d:`M853.312 213.312a42.88 42.88 0 0 1 39.424 26.24c2.176 5.184 3.264 10.752 3.264 16.384v170.688a213.376 213.376 0 0 1-213.312 213.312H273.6l97.92 97.856a42.688 42.688 0 1 1-60.352 60.288L140.48 627.392a42.688 42.688 0 0 1 0-60.288l170.688-170.688a42.688 42.688 0 0 1 60.352 60.352L273.664 554.624h409.024a128 128 0 0 0 128-128V255.936a42.624 42.624 0 0 1 42.624-42.624z`})]),LEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-skip-icon":!0},viewBox:`0 0 16 16`},[U(`path`,{d:`M8.90283 2.5C9.0329 2.5 9.15984 2.54778 9.25781 2.63477L14.8184 7.57764C15.0396 7.77544 15.0618 8.11664 14.8677 8.3418L14.8203 8.38965L9.25928 13.3481C9.16135 13.4351 9.03479 13.4829 8.90479 13.4829L8.92139 13.5L8.8877 13.4966L8.90479 13.4829C8.60922 13.4829 8.36922 13.2408 8.36914 12.9424V10.5151L8.35059 10.5166C7.88774 10.5575 7.16279 10.6464 6.34521 10.8408C5.51593 11.0387 4.75076 11.3046 4.07178 11.6304C3.27109 12.0159 2.54628 12.5246 1.97363 13.1011C1.95343 13.1215 1.93477 13.1419 1.91455 13.1641L1.91309 13.1655C1.78136 13.3071 1.63093 13.4692 1.43506 13.4692L1.38623 13.4673C1.27492 13.4573 1.17834 13.4125 1.10889 13.3379C1.0616 13.2871 1.00802 13.2025 1.00098 13.0713V13.0122C1.00605 12.9217 1.01435 12.8483 1.02344 12.7881L1.0498 12.6436L1.05127 12.6367C1.05461 12.6215 1.05672 12.6081 1.06006 12.5962V12.5928C1.09553 12.3744 1.24727 11.5792 1.72363 10.4961C2.02937 9.80192 2.40431 9.15706 2.8418 8.58057C3.38909 7.86249 4.03116 7.24513 4.75244 6.75049C4.90953 6.63152 6.29681 5.61619 8.1709 5.24268L8.354 5.2085L8.36768 5.20703V3.04053C8.36777 2.74214 8.60732 2.50005 8.90283 2.5ZM9.36768 6.08887L8.50342 6.19775C6.78304 6.50227 5.47434 7.45858 5.35645 7.54785L5.3374 7.56201L5.31787 7.5752C4.68887 8.00657 4.12342 8.54907 3.63721 9.18701C3.25072 9.69661 2.91527 10.2725 2.63916 10.8994C2.55608 11.0883 2.48518 11.2675 2.42285 11.4341C2.80507 11.1708 3.21334 10.934 3.63818 10.7295L3.63916 10.729C4.38977 10.3689 5.2233 10.0805 6.11328 9.86816H6.11426C6.99177 9.65947 7.76654 9.56436 8.26221 9.52051L8.27783 9.51904L9.36914 9.41895V11.9106L13.7715 7.98486L9.36768 4.07031V6.08887Z`})]),REe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-send-message-icon":!0}},[U(`path`,{d:`M873.6 99.2L118.4 476.8c-28.8 16-28.8 44.8-6.4 60.8l182.4 112c16 6.4 28.8 6.4 44.8-6.4L736 288 390.4 672c-6.4 6.4-6.4 16-6.4 22.4v166.4c0 16 6.4 28.8 22.4 38.4s28.8 0 38.4-6.4l89.6-89.6 182.4 121.6c28.8 16 54.4 6.4 60.8-22.4L928 147.2c6.4-38.4-19.2-60.8-54.4-48z`})]),zEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-loading-message-icon":!0}},[U(`path`,{d:`M512 64c247.424 0 448 200.576 448 448s-200.576 448-448 448S64 759.424 64 512 264.576 64 512 64z m0 64C299.936 128 128 299.936 128 512s171.936 384 384 384 384-171.936 384-384S724.064 128 512 128z m0 192a192 192 0 1 1 0 384 192 192 0 0 1 0-384z`})]),BEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-thinking-icon":!0}},[U(`path`,{d:`M528 96c61.856 0 112 50.144 112 112 0 0.376-0.002 0.751-0.006 1.126C774.73 260.666 870.4 391.16 870.4 544c0 22.55-2.082 44.612-6.066 66.007C883.94 630.144 896 657.663 896 688c0 61.856-50.144 112-112 112a112.7 112.7 0 0 1-19.49-1.69C699.754 862.65 610.519 902.4 512 902.4s-187.753-39.75-252.539-104.088A112.33 112.33 0 0 1 240 800c-61.856 0-112-50.144-112-112 0-30.337 12.061-57.856 31.65-78.025A361.172 361.172 0 0 1 153.6 544c0-164.845 111.29-303.696 262.836-345.518C421.232 141.079 469.35 96 528 96z m-91.48 176.633l-4.469 1.278C315.47 308.366 230.4 416.249 230.4 544c0 10.923 0.622 21.7 1.832 32.3l1.623-0.134L240 576c61.856 0 112 50.144 112 112 0 26.132-8.95 50.173-23.95 69.226C377.36 799.817 441.67 825.6 512 825.6c70.33 0 134.639-25.783 183.99-68.412C680.95 738.173 672 714.132 672 688c0-61.856 50.144-112 112-112 2.607 0 5.194 0.09 7.757 0.264A280.989 280.989 0 0 0 793.6 544c0-119.973-75.025-222.422-180.718-262.99C592.35 304.904 561.938 320 528 320c-37.782 0-71.195-18.708-91.48-47.367z`})]),zp=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-collapsed-icon":!0}},[U(`path`,{d:`M373.15678637 997.95124768l-104.13241023-104.1324102 381.81883749-381.81883748-381.81883749-381.81883748 104.13241023-104.1324102 485.95124773 485.95124768z`})]),VEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-error-icon":!0}},[U(`path`,{d:`M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64z m0 704c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m48-459.2L544 608c0 17.6-14.4 32-32 32s-32-14.4-32-32l-16-299.2V304c0-27.2 20.8-48 48-48s48 20.8 48 48v4.8z`})]);U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-content-loading-icon":!0}},[U(`path`,{fillRule:`evenodd`,d:`M621.2037824 0C1168.33181568 0 1148.103769856 748.7917952 621.2037824 682.56061184 343.25692288000005 647.62276864 136.18899583999996 761.4358976 0 1024 49.3838336 341.33333376 256.45176064 0 621.2037824 0Z`})]);var HEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-arrow-down-icon":!0}},[U(`path`,{d:`M810.666628 571.545259l-85.526922-83.200123-171.019311 166.469312-0.035467-554.735928H440.048409l0.0672 554.735928-171.121977-166.469312L183.466709 571.545259l313.59996 305.066494L810.666628 571.545259z`})]),UEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-full-screen-icon":!0}},[U(`path`,{d:`M85.333333 938.666667V768H0v213.333333c0 23.466667 19.2 42.666667 42.666667 42.666667H256v-85.333333H85.333333zM85.333333 85.333333h170.666667V0H42.666667C19.2 0 0 19.2 0 42.666667V256h85.333333V85.333333z m853.333334 853.333334H768v85.333333h213.333333c23.466667 0 42.666667-19.2 42.666667-42.666667V768h-85.333333v170.666667z m42.666666-938.666667H768v85.333333h170.666667v170.666667h85.333333V42.666667c0-23.466667-19.2-42.666667-42.666667-42.666667z`})]),WEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-un-full-screen-icon":!0}},[U(`path`,{d:`M170.666667 853.333333v170.666667h85.333333V810.666667c0-23.466667-19.2-42.666667-42.666667-42.666667H0v85.333333h170.666667z m0-682.666666H0v85.333333h213.333333c23.466667 0 42.666667-19.2 42.666667-42.666667V0H170.666667v170.666667z m682.666666 682.666666h170.666667V768H810.666667c-23.466667 0-42.666667 19.2-42.666667 42.666667V1024h85.333333v-170.666667z m-42.666666-597.333333H1024V170.666667h-170.666667V0H768v213.333333c0 23.466667 19.2 42.666667 42.666667 42.666667z`})]),Bp=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-close-icon":!0}},[U(`path`,{d:`M757.09004048 196.21090938L512 446.01421987l-245.09004048-249.80331049-70.69905014 70.69905014 249.80331049 245.09004048-249.80331049 245.09004048 70.69905014 70.69905014 245.09004048-249.80331049 245.09004048 249.80331049 70.69905014-70.69905014-249.80331049-245.09004048 249.80331049-245.09004048z`})]);U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-more-icon":!0}},[U(`path`,{fillRule:`evenodd`,d:`M512.5492576 319.99489568C547.8894304 319.70050624 576.292128 290.79913056 575.9977312 255.44678368 575.6905376 220.0944368 546.8014496 191.7050432 511.4484768 191.99943264 476.3130976 192.29382208 448 220.87520896 448 255.99716352L448 256.54754464C448.3071936 291.88709184 477.2090816 320.2892864 512.5492576 319.99489568M511.4484768 431.9994336C476.3130976 432.2938208 448 460.8752096 448 495.9971648L448 496.5475456C448.3071936 531.8870912 477.2090816 560.2892864 512.5492576 559.994896 547.8894304 559.7005056 576.292128 530.7991296 575.9977312 495.446784 575.6905376 460.0944352 546.8014496 431.7050432 511.4484768 431.9994336M511.4484768 671.9994336C476.3130976 672.2938208 448 700.8752096 448 735.9971648L448 736.5475456C448.3071936 771.8870912 477.2090816 800.2892864 512.5492576 799.994896 547.8894304 799.7005056 576.292128 770.7991296 575.9977312 735.446784 575.6905376 700.0944352 546.8014496 671.7050432 511.4484768 671.9994336`})]);var GEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-agent-icon":!0}},[U(`path`,{d:`M512 96c-16.123 0-71.894 216.944-144 287.93-72.106 70.985-272 111.597-272 128 0 16.402 195.757 35.541 272 112 76.243 76.458 127.616 304 144 304s62.134-220.233 144-304c81.866-83.768 272-95.31 272-112 0-16.69-200.746-56.427-272-128C584.746 312.356 528.123 96 512 96z`})]),KEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-more-agent-icon":!0}},[U(`path`,{d:`M176 560H416a48 48 0 0 1 48 48v240a48 48 0 0 1-48 48H176a48 48 0 0 1-48-48V608a48 48 0 0 1 48-48z m0-432H416a48 48 0 0 1 48 48V416a48 48 0 0 1-48 48H176A48 48 0 0 1 128 416V176A48 48 0 0 1 176 128zM608 560h240a48 48 0 0 1 48 48v240a48 48 0 0 1-48 48H608a48 48 0 0 1-48-48V608a48 48 0 0 1 48-48zM848 128H608a51.648 51.648 0 0 0-48 48V416a51.648 51.648 0 0 0 48 48h240A51.712 51.712 0 0 0 896 416V176a51.712 51.712 0 0 0-48-48z m0 264a22.72 22.72 0 0 1-24 24h-192a22.72 22.72 0 0 1-24-24v-192a22.72 22.72 0 0 1 24-24h192a22.72 22.72 0 0 1 24 24v192z`})]),qEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-copy-icon":!0}},[U(`path`,{d:`M672 704L672 832C672 867.346224 643.346224 896 608 896L192 896C156.653776 896 128 867.346224 128 832L128 384C128 348.653776 156.653776 320 192 320L352 320 352 216.88888896C352 168.2420416 389.7269152 128 437.3333344 128L810.6666656 128C858.2730848 128 896 168.2420416 896 216.88888896L896 615.1111104C896 663.7579584 858.2730848 704 810.6666656 704L672 704ZM608 384L192 384 192 832 608 832 608 384ZM672 640L810.6666656 640C821.9706208 640 832 629.3019968 832 615.1111104L832 216.88888896C832 202.69800448 821.9706208 192 810.6666656 192L437.3333344 192C426.0293792 192 416 202.69800448 416 216.88888896L416 320 608 320C643.346224 320 672 348.653776 672 384L672 640Z`})]),JEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-cite-icon":!0}},[U(`path`,{fillRule:`evenodd`,d:`M642.2717056 192L642.2717056 256 416 256C309.961328 256 224 341.961328 224 448 224 554.038672 309.961328 640 416 640L771.712 640 640 509.52 686 464 896 672 686 880 640 834.48 771.712 704 416 704C277.28274368 704 164.33462816 593.6691904 160.12181824 455.9737376L160 448C160 306.615104 274.615104 192 416 192L642.2717056 192Z`})]),YEe=U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-rebuild-icon":!0}},[U(`g`,null,[U(`path`,{d:`M844.0772288 379.89662848C860.4577216 421.55369728 869.3925312 467.67402368 869.3925312 512.3065977599999 869.3925312 710.17767424 708.56589312 869.3671872 512 869.3671872 427.1192736 869.3671872 345.21681792000004 839.6121408 281.18398848000004 784.5652992L352.66249536 784.5652992 352.66249536 725.05519936 184.39017791999999 725.05519936 184.39017791999999 891.6834752 243.9556 891.6834752 243.9556 830.6856256C419.67359552 977.97312 683.2505888 955.656832 830.675008 780.1020416 931.936224 659.59409088 955.7623936 494.453568 894.70784 350.14157952L844.0772288 379.89662848Z`}),U(`path`,{d:`M179.9227712 644.7165664C163.54227967999998 603.0594976 154.607466496 556.9391711999999 154.607466496 512.3065977599999 154.607466496 314.43552064 315.43410688 155.246007232 512 155.246007232 596.8807264 155.246007232 678.78318208 185.00105664 742.8160128 240.0478976L671.33750464 240.0478976 671.33750464 299.55799551999996 839.609824 299.55799551999996 839.609824 132.92972032 780.0444032 132.92972032 780.0444032 193.9275712C604.3264044800001 45.152325248 340.7494112 68.956364544 193.32499072000002 244.51115456 92.0637731136 365.019104 68.237604224 530.15962688 129.292162048 674.47161536L179.9227712 644.7165664Z`})])]),XEe={copy:qEe,cite:JEe,rebuild:YEe,share:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-share-icon":!0}},[U(`path`,{d:`M954.2973504 473.91614016L566.9315014399999 132.1331402944C556.1972671999999 122.695581056 539.74588608 130.46066144 539.74588608 144.915657216L539.74588608 345.37419392000004C539.74588608 354.33390208000003 532.8619750400001 361.86005696 524.11124032 362.21844544 299.85908159999997 370.46137664 111.309920448 537.11194816 71.639923584 765.6442368L64.28930653056 808.0535232C61.3723950016 824.5393856 81.207393408 834.813184 92.525010176 822.6279808L121.46077254400001 791.328736C226.1195584 677.95856 371.4984288 614.28490048 523.29450496 614.8822144000001 532.39526912 614.8822144000001 539.86256256 622.40836928 539.86256256 631.72646592L539.86256256 827.8843456C539.86256256 842.3393408 556.43062016 850.104416 567.04817792 840.6668608L954.4140288 499.48117376C961.8813248 492.67179584 961.8813248 480.60605568 954.2973504 473.91614016ZM157.39712256 678.9142624C222.73594112 524.92674496 371.61510528 421.233056 541.7293862399999 421.233056L581.39938304 421.233056C590.5001472 421.233056 597.85076416 413.70690112 597.85076416 404.38880512L597.85076416 237.97715904 879.624416 486.69865664 597.85076416 734.82284096 597.85076416 572.59239232C597.85076416 563.27429568 590.5001472 555.7481408 581.39938304 555.7481408L545.3463564799999 555.7481408C404.98457344 550.01392768 268.23976064 594.21515456 157.39712256 678.9142624Z`})]),like:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-like-icon":!0}},[U(`path`,{"fill-rule":`evenodd`,d:`M192 448.9971328L192 896 128 896 128 448.9971328 192 448.9971328ZM448 128C492.4018176 134.634696 524.4018176 145.30136288 544 160 586.6666656 192 608 234.66666656 608 288L608 384 843.5169184 384C849.3750016 384 855.2053472 384.8042912 860.8446368 386.3903392 894.8707136 395.9601728 914.6964128 431.3016416 905.1265792 465.3277184L797.1265792 849.3277184C789.3635424 876.9296288 764.1897344 896 735.5169184 896L288 896 288 448 448 128ZM483.008 201.024L352 463.04 352 832 735.5169184 832 843.5169184 448 544 448 544 288C544 254.81113408 532.1510912 231.11331968 505.6 211.2 501.3777696 208.03332736 494.5455392 204.77854912 485.19824 201.68239552L483.008 201.024Z`})]),unlike:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-un-like-icon":!0}},[U(`path`,{d:`M192 575.0028672000001L192 128 128 128 128 575.0028672000001 192 575.0028672000001ZM448 896C492.4018176 889.365304 524.4018176 878.6986371200001 544 864 586.6666656 832 608 789.3333334399999 608 736L608 640 843.5169184 640C849.3750016 640 855.2053472 639.1957087999999 860.8446368 637.6096608 894.8707136 628.0398272 914.6964128 592.6983584 905.1265792 558.6722816L797.1265792 174.67228160000002C789.3635424 147.07037119999995 764.1897344 128 735.5169184 128L288 128 288 576 448 896ZM483.008 822.976L352 560.96 352 192 735.5169184 192 843.5169184 576 608 576 544 576 544 736C544 769.18886592 532.1510912 792.88668032 505.6 812.8 501.3777696 815.9666726400001 494.5455392 819.22145088 485.19824 822.31760448L483.008 822.976Z`})]),delete:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-delete-icon":!0}},[U(`g`,null,[U(`path`,{d:`M659.2 246.4V185.6c0-32-25.6-57.6-57.6-57.6h-176c-32 0-57.6 25.6-57.6 57.6v57.6H128v57.6h102.4v531.2c0 32 25.6 57.6 57.6 57.6h441.6c32 0 57.6-25.6 57.6-57.6V304H896V246.4H659.2zM422.4 201.6c0-9.6 6.4-16 16-16h147.2c9.6 0 16 6.4 16 16v44.8h-176V201.6zM732.8 822.4c0 9.6-6.4 16-16 16H304c-9.6 0-16-6.4-16-16V304h441.6V822.4z`}),U(`path`,{d:`M576 384H640V704H576V384z`}),U(`path`,{d:`M384 384H448V704H384V384z`})])]),edit:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-edit-icon":!0}},[U(`path`,{d:`M160.07583932 763.37440051h703.84832136v100.54976017H160.07583932zM336.03791965 687.96208035h-100.5497602v-100.54976021l351.92416069-351.92416069 100.54976021 100.5497602zM613.25360852 210.60209379l49.77213129-49.77213128 99.5442626 99.54426259-49.77213131 49.77213129z`})]),activeLike:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-active-like-icon":!0}},[U(`path`,{"fill-rule":`evenodd`,d:`M192 448.9971328L192 896 128 896 128 448.9971328 192 448.9971328ZM288 448L288 896 759.7584608 896C774.0948672 896 786.6817696 886.464816 790.5632896 872.6638592L916.5632896 424.6638592C921.348208 407.6508192 911.4353568 389.9800864 894.4223168 385.1951712 891.6026752 384.402144 888.6875008 384 885.7584608 384L608 384 608 384 608 288C608 234.66666656 586.6666656 192 544 160 524.4018176 145.30136288 492.4018176 134.634696 448 128L288 448Z`})]),activeUnLike:U(`svg`,{...Fp,class:{[Fp.class]:!0,"ai-active-un-like-icon":!0}},[U(`path`,{"fill-rule":`evenodd`,d:`M192 575.0028672000001L192 128 128 128 128 575.0028672000001 192 575.0028672000001ZM448 896C492.4018176 889.365304 524.4018176 878.6986371200001 544 864 586.6666656 832 608 789.3333334399999 608 736L608 640 843.5169184 640C849.3750016 640 855.2053472 639.1957087999999 860.8446368 637.6096608 894.8707136 628.0398272 914.6964128 592.6983584 905.1265792 558.6722816L797.1265792 174.67228160000002C789.3635424 147.07037119999995 764.1897344 128 735.5169184 128L288 128 288 576 448 896Z`})])},ZEe=[{id:`ai-chat`,name:Dp(`问问小鲸`),icon:()=>rEe}],QEe=Qn({__name:`scroll-btn`,props:{disabled:{type:Boolean},loading:{type:Boolean},title:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=e=>{n.loading||n.disabled||r(`click`,e)};return(t,n)=>(B(),V(`div`,{class:xe([`ai-scroll-btn`,{"is-loading":e.loading,"is-disabled":e.disabled}]),onClick:i},[e.loading?(B(),Gr(z(Xl),{key:0,mode:`spin`,size:`mini`,theme:`primary`})):pr(t.$slots,`icon`,{key:1}),pr(t.$slots,`title`,{},()=>[Qr(ke(e.title),1)])],2))}}),$Ee={class:`ai-loading-ring`},eDe={fill:`none`,viewBox:`0 0 26 26`},tDe=[`fill`],nDe={class:`ai-loading-star`},rDe={fill:`none`,viewBox:`0 0 26 26`},iDe=[`fill`],Vp=Qn({name:`AiLoading`,__name:`ai-loading`,props:{size:{default:16},stopLoading:{type:Boolean,default:!1}},setup(e){let t=0,n=t++,r=`ai-loading-ring-${n}`,i=`ai-loading-star-${n}`;return(t,n)=>(B(),V(`div`,{class:xe([`ai-loading`,{"ai-loading-stopped":e.stopLoading}]),style:ge({width:e.size+`px`,height:e.size+`px`})},[H(`div`,$Ee,[(B(),V(`svg`,eDe,[H(`path`,{d:`M24.957 7.79785C25.6279 9.36608 26 11.0926 26 12.9062C26 19.5598 21.0013 25.0441 14.5547 25.8125L14.3154 23.8252C19.7702 23.175 24 18.5361 24 12.9062C24 11.3717 23.6848 9.91092 23.1172 8.58398L24.957 7.79785ZM11.6836 1.98633C6.2292 2.63694 2 7.27669 2 12.9062C2 14.4404 2.31452 15.9009 2.88184 17.2275L1.04199 18.0137C0.371448 16.4458 0 14.7194 0 12.9062C0 6.25306 4.99814 0.768818 11.4443 0L11.6836 1.98633Z`,fill:`url(#${r})`},null,8,tDe),H(`defs`,null,[H(`linearGradient`,{id:r,gradientUnits:`userSpaceOnUse`,x1:`6.50423`,x2:`25.6886`,y1:`2.96507`,y2:`19.2824`},[...n[0]||=[H(`stop`,{"stop-color":`#235DFA`},null,-1),H(`stop`,{offset:`0.538462`,"stop-color":`#8A77EC`},null,-1),H(`stop`,{offset:`1`,"stop-color":`#EB8CEC`},null,-1)]])])]))]),H(`div`,nDe,[(B(),V(`svg`,rDe,[H(`path`,{d:`M13 5.90625C13 5.90625 14.1206 8.77684 15.625 10.2812C17.1294 11.7857 20 12.9062 20 12.9062C20 12.9062 17.1294 14.0268 15.625 15.5312C14.1206 17.0357 13 19.9062 13 19.9062C13 19.9062 11.8794 17.0357 10.375 15.5312C8.87059 14.0268 6 12.9062 6 12.9062C6 12.9062 8.87059 11.7857 10.375 10.2812C11.8794 8.77684 13 5.90625 13 5.90625Z`,fill:`url(#${i})`},null,8,iDe),H(`defs`,null,[H(`linearGradient`,{id:i,gradientUnits:`userSpaceOnUse`,x1:`6`,x2:`20`,y1:`5.90625`,y2:`19.9062`},[...n[1]||=[H(`stop`,{"stop-color":`#235DFA`},null,-1),H(`stop`,{offset:`0.538462`,"stop-color":`#8A77EC`},null,-1),H(`stop`,{offset:`1`,"stop-color":`#EB8CEC`},null,-1)]])])]))])],6))}}),aDe=[`src`],Hp=Qn({__name:`shortcut-btn`,props:{mode:{},shortcut:{}},emits:[`click`],setup(e,{expose:t,emit:n}){let r=e,i=cn(!1),a=n;Ln(()=>r.shortcut?.icon,()=>{i.value=!1},{immediate:!0});let o=e=>{a(`click`,e)},s=$n(`el`);return t({get $el(){return s.value}}),(t,n)=>(B(),V(`button`,{ref_key:`el`,ref:s,class:xe([`ai-shortcut-btn`,{"is-menu-mode":e.mode===`menu`}]),onClick:n[1]||=t=>o(e.shortcut)},[pr(t.$slots,`default`,{},()=>[e.shortcut?.icon?(B(),V(Lr,{key:0},[typeof e.shortcut.icon==`string`?(B(),V(Lr,{key:0},[e.shortcut.icon.startsWith(`http`)?(B(),V(Lr,{key:0},[i.value?(B(),Gr(z(GEe),{key:1,class:`ai-shortcut-btn-icon`})):(B(),V(`img`,{key:0,class:`ai-common-icon ai-shortcut-btn-icon`,src:e.shortcut.icon,onError:n[0]||=e=>i.value=!0},null,40,aDe))],64)):(B(),V(`span`,{key:1,class:xe(e.shortcut.icon)},null,2))],64)):(B(),Gr(lr(typeof e.shortcut?.icon==`function`?e.shortcut.icon?.(U):e.shortcut.icon),{key:1,class:`ai-shortcut-btn-icon`}))],64)):e.shortcut&&!e.shortcut.components?.length?(B(),Gr(z(GEe),{key:1,class:`ai-shortcut-btn-icon`})):$r(`v-if`,!0),Qr(` `+ke(e.shortcut?.alias||e.shortcut?.name),1)]),pr(t.$slots,`append`)],2))}}),oDe={class:`ai-selection-popover-content`},sDe={key:0,class:`shortcut-menu`},cDe=Qn({__name:`ai-selection`,props:yr({excludeSelectors:{default:()=>[]},maxShortcutCount:{default:3},offset:{default:10},shortcuts:{default:()=>ZEe}},{visible:{type:Boolean,required:!0},visibleModifiers:{}}),emits:yr([`selectShortcut`,`selectionChange`],[`update:visible`]),setup(e,{emit:t}){let n=e,r=Dr(e,`visible`),i=t,a=$n(`popoverRef`),o=$n(`moreMenuRef`),s=cn({x:0,y:0}),l=cn(``),u=cn(null),d=cn(!1),f=e=>{if(e?.shadowRoot instanceof ShadowRoot){try{let t=e.shadowRoot;if(typeof t.getSelection==`function`){let e=t.getSelection();if(e&&!e.isCollapsed&&e.toString().trim())return e}}catch{m();return}try{let t=document.createTreeWalker(e.shadowRoot,NodeFilter.SHOW_ELEMENT,null),n=t.nextNode();for(;n;){if(n instanceof Element){let e=f(n);if(e)return e}n=t.nextNode()}}catch{m()}}},p=async()=>{if(u.value=window.getSelection(),!u.value){let e=document.activeElement;if(e){let t=f(e);t&&(u.value=t)}}let e=u.value?.toString()?.trim();if(!e){m();return}if(n.excludeSelectors.length>0&&u.value?.rangeCount)try{let e=u.value.getRangeAt(0).commonAncestorContainer,t=e.nodeType===Node.TEXT_NODE?e.parentNode:e;for(;t&&t!==document.body;){if(t instanceof Element){for(let e of n.excludeSelectors)if(t.closest(e)){m();return}}t=t.parentNode}}catch{}e!==l.value&&i(`selectionChange`,e),l.value=e;let t=null;try{if(u.value?.rangeCount){let e=u.value?.getRangeAt(0);(e?.getClientRects()).length>0&&(t=e.getBoundingClientRect())}}catch{m();return}let o=document.activeElement;if(!t||t.width===0&&t.height===0)if(o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement)t=o.getBoundingClientRect();else{m();return}r.value=!0,await En();let d=a.value.getBoundingClientRect(),p=window.innerWidth,h=window.innerHeight,g=t.left+t.width/2-d.width/2;g<8?g=8:g+d.width>p-8&&(g=p-d.width-8);let _,v=t.top,y=h-t.bottom,b=d.height+n.offset;_=v>=b?t.top-d.height-n.offset:y>=b?t.bottom+n.offset:v>=y?Math.max(8,t.top-d.height-n.offset):Math.min(h-d.height-8,t.bottom+n.offset),s.value={x:g,y:_}},m=()=>{r.value&&=(u.value?.removeAllRanges(),!1)},h=e=>{m(),i(`selectShortcut`,e,l.value)},g=null,_=e=>{g&&clearTimeout(g),g=window.setTimeout(()=>{p()},e)},v=()=>{_(200)},y=()=>{_(300)},b=e=>{r.value&&a.value?.contains(e.target)||m()},x=e=>{!u.value||!r.value||e.target instanceof HTMLElement&&e.target.contains(u.value?.anchorNode)&&m()},S=()=>{o.value?.show()};return or(()=>{document.addEventListener(`selectionchange`,y),document.addEventListener(`mouseup`,v),document.addEventListener(`mousedown`,b),document.addEventListener(`scroll`,x,!0),window.addEventListener(`resize`,m),window.addEventListener(`blur`,m)}),cr(()=>{document.removeEventListener(`selectionchange`,y),document.removeEventListener(`mouseup`,v),document.removeEventListener(`mousedown`,b),document.removeEventListener(`scroll`,x,!0),window.removeEventListener(`resize`,m),window.removeEventListener(`blur`,m)}),(t,n)=>(B(),Gr(Un,{to:`body`},[Yr(vi,{name:`ai-fade`},{default:jn(()=>[r.value?(B(),V(`div`,{key:0,ref_key:`popoverRef`,ref:a,class:`ai-selection-popover`,style:ge({left:`${s.value.x}px`,top:`${s.value.y}px`,zIndex:z(qTe),"--selection-z-index":z(qTe)}),onMousedown:n[2]||=Mi(()=>{},[`stop`])},[H(`div`,oDe,[pr(t.$slots,`default`,{shortcuts:e.shortcuts},()=>[(B(!0),V(Lr,null,dr(e.shortcuts.slice(0,e.maxShortcutCount),(t,n)=>(B(),V(Lr,{key:t.id},[n<e.maxShortcutCount?(B(),Gr(Hp,{key:0,shortcut:t,onClick:e=>h(t)},null,8,[`shortcut`,`onClick`])):$r(`v-if`,!0)],64))),128)),e.shortcuts.length>e.maxShortcutCount?(B(),V(Lr,{key:0},[n[3]||=H(`div`,{class:`ai-divider`,style:{margin:`0 4px`}},null,-1),Yr(z(bp),{ref_key:`moreMenuRef`,ref:o,arrow:!1,interactive:``,offset:[0,6],theme:`ai-chat-box-light light`,trigger:`manual`,onHidden:n[0]||=()=>{d.value=!1},onShow:n[1]||=()=>{d.value=!0}},{content:jn(()=>[d.value?(B(),V(`div`,sDe,[(B(!0),V(Lr,null,dr(e.shortcuts.slice(e.maxShortcutCount),e=>(B(),Gr(Hp,{key:e.id,mode:`menu`,shortcut:e,onClick:t=>h(e)},null,8,[`shortcut`,`onClick`]))),128))])):$r(`v-if`,!0)]),default:jn(()=>[Yr(Hp,{style:{width:`28px`},onClick:S},{default:jn(()=>[Yr(z(zp),{class:`shortcut-btn-more-icon`})]),_:1})]),_:1},512)],64)):$r(`v-if`,!0)])])],36)):$r(`v-if`,!0)]),_:3})]))}}),lDe=(e,t,n)=>{let r=cn([]),i=async()=>{if(!e.value||t.value.length===0)return;await En();let i=e.value.offsetWidth,a=new Set,o=0;for(let e=0;e<n.items.value.length;e++){let r=t.value[e];if(!r)continue;let s=r.offsetWidth,l=o+s+(a.size>0?n.gap:0),u=n.items.value[e],d=n.moreItemRef?.value?.$el?.offsetWidth??0;if(u&&l+n.gap+d<=i)a.add(u),o=l;else break}r.value=Array.from(a)},a=null;return Ln([t,n.moreItemRef],()=>{En(()=>{i()})}),or(()=>{e.value&&(a=new ResizeObserver(()=>{i()}),a.observe(e.value)),En(()=>{i()})}),Ie(()=>{a?.disconnect()}),{visibleItems:r,calculateVisibleMenuItems:i}},uDe={class:`shortcut-menu`},dDe=4,fDe=Qn({__name:`shortcut-btns`,props:{shortcuts:{}},emits:[`selectShortcut`],setup(e,{emit:t}){let n=()=>document.body,r=e,i=t,a=$n(`containerRef`),o=cn([]),s=$n(`moreMenuRef`),l=$n(`moreBtnRef`),{visibleItems:u}=lDe(a,o,{items:fi(()=>r.shortcuts),gap:dDe,moreItemRef:l}),d=fi(()=>r.shortcuts.filter(e=>!u.value.includes(e))),f=cn(!1),p=(e,t)=>{e&&`$el`in e?o.value[t]=e.$el:e&&e instanceof HTMLElement&&(o.value[t]=e)};Ln(()=>r.shortcuts,()=>{o.value=Array(r.shortcuts.length).fill(null)},{deep:!0});let m=()=>{f.value=!f.value},h=e=>{f.value=!1,i(`selectShortcut`,e)};return Ln(f,e=>{e?s.value?.show():s.value?.hide()}),(t,r)=>(B(),V(`div`,{ref_key:`containerRef`,ref:a,class:`shortcut-btns`},[(B(!0),V(Lr,null,dr(e.shortcuts,(e,t)=>(B(),Gr(Hp,{key:e.key||e.id,ref_for:!0,ref:e=>p(e,t),class:xe([`shortcut-btns-item`,{"shortcut-btns-item-hidden":!z(u).includes(e)}]),shortcut:e,onClick:t=>h(e)},null,8,[`class`,`shortcut`,`onClick`]))),128)),d.value.length>0?(B(),Gr(z(bp),{key:0,ref_key:`moreMenuRef`,ref:s,"append-to":n,arrow:!1,interactive:``,offset:[0,6],theme:`ai-chat-box-light light`,trigger:`manual`,"z-index":z(KTe),onHidden:r[0]||=()=>{f.value=!1}},{content:jn(()=>[H(`div`,uDe,[(B(!0),V(Lr,null,dr(d.value,e=>(B(),Gr(Hp,{key:e.id,mode:`menu`,shortcut:e,onClick:t=>h(e)},null,8,[`shortcut`,`onClick`]))),128))])]),default:jn(()=>[Yr(Hp,{ref_key:`moreBtnRef`,ref:l,class:`shortcut-btns-item shortcut-btns-more`,onClick:m},{default:jn(()=>[Yr(z(KEe),{class:`shortcut-btns-more-icon`}),H(`span`,null,ke(z(Dp)(`更多`)),1)]),_:1},512)]),_:1},8,[`z-index`])):$r(`v-if`,!0)],512))}}),pDe={class:`shortcut-render`},mDe={class:`shortcut-render-header`},hDe={class:`header-name`},gDe={class:`shortcut-render-content`},_De={class:`shortcut-render-form-label`},vDe={class:`shortcut-footer`},yDe=Qn({__name:`shortcut-render`,props:{alias:{},components:{},description:{},formModel:{},icon:{type:[Function,String,Object]},id:{},key:{},name:{}},emits:[`close`,`submit`],setup(e,{emit:t}){let n=e,r=t,i=$n(`formRef`),a=Jt({}),o=cn({});In(()=>{if(n.formModel)for(let e in n.formModel)a[e]=n.formModel[e];for(let e of n?.components??[])e.key&&(a[e.key]=e.default??e.props?.default??e.props?.modelValue)});let s=(e,t)=>{if(e.type===`textarea`)return`span 2`;let r=0;for(let e=0;e<t;e++)r+=n.components?.[e]?.type===`textarea`?2:1;return t===(n.components?.length??0)-1&&r%2==0?`span 2`:`auto`},l=e=>({...e.formItemProps,property:e.key,label:e.name??e.formItemProps?.label,required:e.fillBack??e.formItemProps?.required}),u=e=>{let{options:t,...n}=e?.props??{},{options:r,...i}=e??{},o=t??r,s={class:`shortcut-render-form-item_${e.type}`,...i,...n,modelValue:a[e.key],onChange:t=>{a[e.key]=t},"onUpdate:modelValue":t=>{a[e.key]=t}};switch(e.type){case`text`:case`input`:return U(hu,s);case`textarea`:return U(hu,{...s,type:`textarea`});case`number`:return U(hu,{...s,type:`number`});case`select`:return U(Rye,s,o?.map(e=>U(Rye.Option,{...e})));case`checkboxGroup`:return U(Su.Group,s,o?.map(e=>U(Su,{class:`shortcut-render-form-item_checkbox`,...e})));case`radioGroup`:return U(Wbe.Group,s,o?.map(e=>U(Wbe,{class:`shortcut-render-form-item_radio`,...e})));case`switcher`:return U(uxe,s);default:return null}},d=async()=>{await i.value?.validate?.().catch(()=>!1)&&r(`submit`,{...a})},f=()=>{r(`close`)},p=()=>{r(`close`)};return(t,n)=>(B(),V(`div`,pDe,[H(`div`,mDe,[Yr(z(BEe),{class:`header-icon`}),H(`span`,hDe,ke(e.alias||e.name),1),Yr(z(Bp),{class:`header-close`,onClick:p})]),H(`div`,gDe,[Yr(z(cd),{ref_key:`formRef`,ref:i,class:`shortcut-render-form`,"form-type":`vertical`,model:a,rules:o.value},{default:jn(()=>[(B(!0),V(Lr,null,dr(e.components,(e,t)=>(B(),Gr(z(cd).FormItem,ri({key:e.id,ref_for:!0},l(e),{class:`shortcut-render-form-item`,style:{gridColumn:s(e,t)}}),{label:jn(()=>[H(`span`,_De,ke(e.name??e.formItemProps?.label),1)]),default:jn(()=>[(B(),Gr(lr(u(e))))]),_:2},1040,[`style`]))),128)),Yr(z(cd).FormItem,{class:`shortcut-footer-item`},{default:jn(()=>[H(`div`,vDe,[Yr(z(iu),{theme:`primary`,onClick:d},{default:jn(()=>[Qr(ke(z(Dp)(`提交`)),1)]),_:1}),Yr(z(iu),{onClick:f},{default:jn(()=>[Qr(ke(z(Dp)(`取消`)),1)]),_:1})])]),_:1})]),_:1},8,[`model`,`rules`])])]))}}),bDe=typeof navigator<`u`&&`clipboard`in navigator,xDe=e=>{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`-9999px`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand(`copy`)}catch{return!1}finally{document.body.removeChild(t)}},Up=()=>({copy:async e=>{let t=!1;if(bDe)try{await navigator.clipboard.writeText(e),t=!0}catch{t=xDe(e)}else t=xDe(e);ud({message:Dp(t?`复制成功`:`复制失败`),theme:t?`success`:`error`})}}),SDe=()=>{let e=cn({column:0,line:0}),t=cn([]);return{commandSelection:e,docSnapshot:t,GetCursorPosition:(t,n)=>{let[,r]=n,[i,a]=r;e.value={column:a,line:i}},GetDocSnapshot:e=>{t.value=e}}},CDe=Symbol(`CONTAINER_SCROLL_TOKEN`),wDe=(e,t)=>{let n=cn(!1),r=null,i=cn(0),a=cn(!0),o=aee((e,t)=>{let n,r=!1;return{get(){return e(),r},set(e){if(e===!1){r=!1,n&&clearTimeout(n),t();return}n&&clearTimeout(n),n=setTimeout(()=>{r=e,t()},300)}}});Pn(CDe,fi(()=>({autoScrollEnabled:a.value,isScrollBottom:n,scrollBottomHeight:i,debouncedShowScrollBottomBtn:o,toScrollBottom:s,toScrollTop:l})));let s=()=>{a.value=!0,un(t)?.scrollIntoView({behavior:`smooth`,block:`end`})},l=()=>{un(e)?.scrollTo({top:0,behavior:`smooth`})},u=()=>{let t=un(e);if(!t)return;let{scrollHeight:r,scrollTop:a,clientHeight:s}=t,l=r-a-s;i.value=Math.max(0,l),o.value=!n.value&&i.value>100},d=e=>{e.deltaY<0&&(a.value=!1)};return or(()=>{In(()=>{let s=un(e),l=un(t);!s||!l||(r?.disconnect(),s.removeEventListener(`scroll`,u),s.removeEventListener(`wheel`,d),u(),r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(n.value=!0,i.value=0,a.value=!0,o.value=!1):(n.value=!1,u())})}),r.observe(l),s.addEventListener(`scroll`,u,{passive:!0}),s.addEventListener(`wheel`,d,{passive:!0}))})}),Ie(()=>{r?.disconnect();let t=un(e);t&&(t.removeEventListener(`scroll`,u),t.removeEventListener(`wheel`,d))}),{autoScrollEnabled:a,isScrollBottom:n,scrollBottomHeight:i,toScrollBottom:s,toScrollTop:l,debouncedShowScrollBottomBtn:o}},TDe=()=>Fn(CDe,void 0),EDe=Symbol(`CUSTOM_TAB_TOKEN`),DDe=`execution`;function ODe(e){let t={label:Dp(`执行情况`),name:DDe},n=cn([t]),r=sn(t),i=cn(!0),a=e=>{n.value.find(t=>t.name===e.name)||(n.value=[...n.value,e]),i.value=!1,En(()=>{s(e)})},o=e=>{n.value=n.value.filter(t=>t.name!==e)},s=n=>{r.value=n??t,e.onTabChange?.(n)},l=()=>{n.value=[t],r.value=t,i.value=!0};return Pn(EDe,{tabs:n,selectedTab:r,addCustomTab:a,removeCustomTab:o,selectCustomTab:s,resetCustomTab:l}),{tabs:n,selectedTab:r,isCollapse:i,addCustomTab:a,removeCustomTab:o,selectCustomTab:s,resetCustomTab:l}}var kDe=()=>Fn(EDe),Wp=(()=>{if(typeof document>`u`)return null;let e=document.documentElement;return typeof e.requestFullscreen==`function`?{request:`requestFullscreen`,exit:`exitFullscreen`,element:`fullscreenElement`,change:`fullscreenchange`}:typeof e.webkitRequestFullscreen==`function`?{request:`webkitRequestFullscreen`,exit:`webkitExitFullscreen`,element:`webkitFullscreenElement`,change:`webkitfullscreenchange`}:null})(),ADe=e=>{let t=!!Wp,n=cn(!1),r=()=>z(e)??(typeof document>`u`?null:document.documentElement),i=()=>Wp?document[Wp.element]??null:null,a=()=>{let t=i(),r=z(e);n.value=r?t===r:!!t},o=async()=>{if(!Wp||n.value)return;let e=r();try{await e?.[Wp.request]?.()}catch{}},s=async()=>{if(!(!Wp||!i()))try{await document[Wp.exit]?.()}catch{}};return Wp&&(document.addEventListener(Wp.change,a),Ie(()=>{document.removeEventListener(Wp.change,a)})),{isSupported:t,isFullScreen:Xt(n),enter:o,exit:s,toggle:()=>n.value?s():o()}},jDe=Symbol(`GLOBAL_CONFIG_TOKEN`),MDe=e=>(Pn(jDe,e),{size:e.size,supportUpload:e.supportUpload}),NDe=()=>Fn(jDe,void 0),Gp=e=>{let t=cn(0);or(()=>{window.addEventListener(`keydown`,i,!0)}),Ie(()=>{window.removeEventListener(`keydown`,i,!0)});let n=t=>{e.onSelect?.(t)},r=()=>{En(()=>{let t=e.menuRef.value?.querySelector(`.is-active`);t&&t.scrollIntoView({block:`nearest`})})},i=i=>{if(e.menuRef.value?.offsetParent&&e.items.value?.length){if(i.key===`ArrowUp`)i.preventDefault(),i.stopPropagation(),t.value=(t.value-1+e.items.value?.length)%e.items.value?.length,r();else if(i.key===`ArrowDown`)i.preventDefault(),i.stopPropagation(),t.value=(t.value+1)%e.items.value?.length,r();else if(i.key===`Enter`||i.key===`NumpadEnter`){i.preventDefault(),i.stopPropagation();let r=e.items.value?.[t.value];r&&n(r)}}};return{activeIndex:t}},PDe={toolCall(e){let{toolCalls:t}=e;return t?.length?t.flatMap(e=>[e.function.name,e.function.mcpName,e.function.description,e.function.arguments,e.id].filter(Boolean)):[]},[Ap.FlowAgent](e){let t=e.content;return t?t.flatMap(e=>[e.task_name,...Object.values(e.nodes??{}).map(e=>e.name)]).filter(Boolean):[]}},FDe=e=>{if(e.role===jp.Assistant&&e.toolCalls?.length)return`toolCall`;if(e.role===jp.Activity)return e.activityType},IDe=e=>e.role===jp.Assistant&&!!e.toolCalls?.length||e.role===jp.Activity&&e.activityType===Ap.FlowAgent,LDe=(e,t)=>{let n=FDe(e);if(!n)return!0;let r=PDe[n];return r?r(e).some(e=>e.toLowerCase().includes(t)):!0},RDe=new Set([Op.PENDING,Op.DRAFT]),zDe=e=>{for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.role!==jp.Interrupt)continue;let r=n.content;if(r?.outcome?.type!==`interrupt`)continue;let i=r.outcome.interrupts.find(e=>e.reason===kp.UserQuestion);if(i)return i}},BDe=e=>e.reduce((e,t)=>{if(t.role!==jp.Interrupt)return e;let n=t.content;return n?.outcome?.type===`interrupt`?e+n.outcome.interrupts.filter(e=>e.reason===kp.AIDevToolApproval&&RDe.has(e.metadata?.ticket?.status)).length:e},0),VDe=e=>{let t=sn([]),n=cn(!1);In(()=>{let n=[],r=[];for(let t of e.messages.value){if(t?.uid||(t.uid=Tp()),t.role===jp.User){n.length>0&&(r.push({messages:n,type:jp.Assistant,isHover:!1,checked:!1,uid:Tp(),pause:n?.some(e=>e.property?.extra?.pause)??!1}),n=[]),r.push({messages:[t],type:jp.User,isHover:!1,checked:!1,uid:Tp()});continue}if(t.role===jp.Tool){let n=e.messages.value.find(e=>e.role===jp.Assistant&&e.toolCalls?.some(e=>e.id===t.toolCallId));if(n){let e=n.toolCalls?.find(e=>e.id===t.toolCallId);e&&(e.toolMessage=t),n.status=t.error?Mp.Error:n.status||Mp.Complete;continue}}n.push(t)}n.length>0&&r.push({messages:n,type:jp.Assistant,isHover:!1,checked:!1,uid:Tp(),pause:n?.some(e=>e.property?.extra?.pause)??!1}),e.messages.value.at(-1)?.role===jp.User&&un(e.renderMode)!==Pp.Share&&r.push({messages:[{role:jp.Loading,content:``,status:Mp.Pending,messageId:``,id:$Te,uid:Tp()}],type:jp.Loading,isHover:!1,checked:!1,uid:Tp()}),t.value=r});let r=fi(()=>{let n=e.keyword?.value?.trim().toLowerCase(),r=e=>IDe(e)&&(!n||LDe(e,n));return t.value.filter((e,n)=>{if(e.messages.some(r)){let r=t.value.at(n-1);if(r){let t=r.messages.filter(e=>e.role===jp.User);if(t?.length)for(let n of t){let t=n.content;if(typeof t==`string`){e.userMessageTitle=t;break}else if(Array.isArray(t)&&t.some(e=>e.type===Ap.Text)){e.userMessageTitle=t.filter(e=>e.type===Ap.Text)?.join(`
255
255
  `);break}}}return e.userMessageTitle||=Date.now(),!0}return!1}).map(e=>({...e,isHover:!1,messages:e.messages.filter(r)}))}),i=fi(()=>zDe(e.messages.value)),a=fi(()=>BDe(e.messages.value)),o=fi(()=>a.value?Dp(`当前会话有 {count} 个待审批单,如需继续,请先取消审批`).replace(`{count}`,String(a.value)):``),s=fi(()=>t.value?.filter(e=>e.type===jp.User).every(e=>e.checked));return Ln(e.selectedUserMessages,e=>{if(t.value.length)for(let[n,r]of t.value.entries()){if(r.type===jp.Assistant)continue;let i=e?.some(e=>r.messages.some(t=>e.id===t.id))??!1;if(r.checked=i,r.type===jp.User){let e=t.value.at(n+1);e&&(e.checked=i)}}},{immediate:!0,flush:`post`}),{messageGroups:t,executionGroups:r,activeUserQuestionInterrupt:i,pendingApprovalCount:a,pendingApprovalTipText:o,isShareMode:n,isAllSelected:s,onToggleShareAll:n=>{e.selectedUserMessages.value=n?t.value?.filter(e=>e.type===jp.User).flatMap(e=>e.messages):[]},onCancelShare:()=>{e.selectedUserMessages.value=[],n.value=!1},onConfirmShare:()=>t.value?.filter(e=>e.checked&&e.type===jp.User).flatMap(e=>e.messages)??[]}},HDe=Symbol(`KEYWORD_TOKEN`),UDe=Symbol(`RENDER_MODE_TOKEN`),WDe=Symbol(`COMMON_TIPPY_OPTIONS_TOKEN`),GDe=()=>{let e=cn(``);return Pn(HDe,fi(()=>e.value)),{keyword:e}},KDe=({renderMode:e})=>(Pn(UDe,fi(()=>un(e))),{renderMode:e}),qDe=()=>Fn(UDe,fi(()=>Pp.Chat)),JDe=e=>{Pn(WDe,e.tippyOptions)},YDe=()=>Fn(HDe,void 0),Kp=()=>Fn(WDe,void 0),XDe=e=>{let t=YDe();return{keywordMatched:fi(()=>{let n=t?.value?.trim().toLowerCase();return n?e().filter(Boolean).some(e=>e?.toLowerCase().includes(n)):null}),keyword:t}},ZDe=300,qp={mounted(e,t){let n,r=!1,i=e=>e.scrollWidth>e.clientWidth,a=a=>{if(a?.stopPropagation(),!t.value?.disabled&&i(e)&&(r=!0,!n)){let a={...t.value??{}},o=a.text;delete a.text,delete a.disabled,n=yf(e,Object.assign({},{trigger:`mouseenter`,delay:[ZDe,0],content:o||a.content||e.innerText,placement:a.placement||`auto`,theme:a.theme||`ai-chat-box`,onShow:()=>{if(!i(e))return!1},onHidden:()=>{n?.hide(),n?.destroy(),n=void 0}},a)),setTimeout(()=>{n&&r&&i(e)&&!n.state.isShown&&(n.clearDelayTimeouts(),n.show())},ZDe+16)}},o=()=>{r=!1},s=new IntersectionObserver(t=>{for(let n of t){if(n.isIntersecting){e.addEventListener(`mouseenter`,a),e.addEventListener(`mouseleave`,o),e.mouseEnterFunc=a,e.mouseLeaveFunc=o;return}e.removeEventListener(`mouseenter`,a),e.removeEventListener(`mouseleave`,o)}},{threshold:.1});s.observe(e),e.unObserverFunc=()=>{s.unobserve(e)}},beforeUnmount(e){e.removeEventListener(`mouseenter`,e.mouseEnterFunc),e.removeEventListener(`mouseleave`,e.mouseLeaveFunc),e.unObserverFunc?.(),e.mouseEnterFunc=void 0,e.mouseLeaveFunc=void 0,e.unObserverFunc=void 0}},QDe={key:1},Jp=Qn({__name:`tool-btn`,props:{description:{},id:{},name:{},active:{type:Boolean},disabled:{type:Boolean},tippyOptions:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=fi(()=>({content:n.description,theme:`ai-chat-box`,...n.tippyOptions||{},onShow:()=>{if(n.disabled)return!1}})),a=e=>{n.disabled||r(`click`,n,e)};return(t,n)=>Mn((B(),V(`div`,{class:xe([`ai-tool-btn`,{"is-active":e.active,"is-disabled":e.disabled}]),style:ge({"--ai-tool-btn-active-color":e.id===`like`||e.id===`activeLike`?`#3a84ff`:`#E71818`}),onClick:a},[pr(t.$slots,`default`,{},()=>[e.id&&e.id in z(XEe)?(B(),Gr(lr(z(XEe)[e.id]),{key:0})):(B(),V(`div`,QDe,ke(e.name),1))])],6)),[[z(xp),i.value]])}});function Yp(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return im(e,t,r)}}function $De(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return am(e,n)}}function Xp(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lm;em&&em(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(nOe(t)||(t[r]=e),i=e)}e[i]=!0}return e}function eOe(e){for(let t=0;t<e.length;t++)pm(e,t)||(e[t]=null);return e}function Zp(e){let t=rm(null);for(let[n,r]of $p(e))pm(e,n)&&(Array.isArray(r)?t[n]=eOe(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=Zp(r):t[n]=r);return t}function Qp(e,t){for(;e!==null;){let n=iOe(e,t);if(n){if(n.get)return Yp(n.get);if(typeof n.value==`function`)return Yp(n.value)}e=rOe(e)}function n(){return null}return n}function tOe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yOe(),t=e=>tOe(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==Om.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:u,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:m}=e,h=l.prototype,g=Qp(h,`cloneNode`),_=Qp(h,`remove`),v=Qp(h,`nextSibling`),y=Qp(h,`childNodes`),b=Qp(h,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,{implementation:C,createNodeIterator:w,createDocumentFragment:T,getElementsByTagName:E}=n,{importNode:D}=r,O=km();t.isSupported=typeof $p==`function`&&typeof b==`function`&&C&&C.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:k,ERB_EXPR:A,TMPLIT_EXPR:j,DATA_ATTR:M,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:I}=Dm,{IS_ALLOWED_URI:L}=Dm,R=null,ee=Xp({},[...gm,..._m,...vm,...ym,...bm]),te=null,ne=Xp({},[...xm,...Sm,...Cm,...wm]),re=Object.seal(rm(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,ae=null,oe=Object.seal(rm(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),se=!0,ce=!0,le=!1,ue=!0,de=!1,fe=!0,pe=!1,me=!1,he=!1,ge=!1,_e=!1,ve=!1,ye=!0,be=!1,xe=!0,Se=!1,Ce={},we=null,Te=Xp({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ee=null,De=Xp({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Oe=null,ke=Xp({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ae=`http://www.w3.org/1998/Math/MathML`,je=`http://www.w3.org/2000/svg`,Me=`http://www.w3.org/1999/xhtml`,Ne=Me,Pe=!1,Fe=null,Ie=Xp({},[Ae,je,Me],um),Le=Xp({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Re=Xp({},[`annotation-xml`]),ze=Xp({},[`title`,`style`,`font`,`a`,`script`]),Be=null,Ve=[`application/xhtml+xml`,`text/html`],He=null,Ue=null,We=n.createElement(`form`),Ge=function(e){return e instanceof RegExp||e instanceof Function},Ke=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ue&&Ue===e)){if((!e||typeof e!=`object`)&&(e={}),e=Zp(e),Be=Ve.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,He=Be===`application/xhtml+xml`?um:lm,R=pm(e,`ALLOWED_TAGS`)?Xp({},e.ALLOWED_TAGS,He):ee,te=pm(e,`ALLOWED_ATTR`)?Xp({},e.ALLOWED_ATTR,He):ne,Fe=pm(e,`ALLOWED_NAMESPACES`)?Xp({},e.ALLOWED_NAMESPACES,um):Ie,Oe=pm(e,`ADD_URI_SAFE_ATTR`)?Xp(Zp(ke),e.ADD_URI_SAFE_ATTR,He):ke,Ee=pm(e,`ADD_DATA_URI_TAGS`)?Xp(Zp(De),e.ADD_DATA_URI_TAGS,He):De,we=pm(e,`FORBID_CONTENTS`)?Xp({},e.FORBID_CONTENTS,He):Te,ie=pm(e,`FORBID_TAGS`)?Xp({},e.FORBID_TAGS,He):Zp({}),ae=pm(e,`FORBID_ATTR`)?Xp({},e.FORBID_ATTR,He):Zp({}),Ce=pm(e,`USE_PROFILES`)?e.USE_PROFILES:!1,se=e.ALLOW_ARIA_ATTR!==!1,ce=e.ALLOW_DATA_ATTR!==!1,le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,de=e.SAFE_FOR_TEMPLATES||!1,fe=e.SAFE_FOR_XML!==!1,pe=e.WHOLE_DOCUMENT||!1,ge=e.RETURN_DOM||!1,_e=e.RETURN_DOM_FRAGMENT||!1,ve=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,ye=e.SANITIZE_DOM!==!1,be=e.SANITIZE_NAMED_PROPS||!1,xe=e.KEEP_CONTENT!==!1,Se=e.IN_PLACE||!1,L=e.ALLOWED_URI_REGEXP||Tm,Ne=e.NAMESPACE||Me,Le=e.MATHML_TEXT_INTEGRATION_POINTS||Le,Re=e.HTML_INTEGRATION_POINTS||Re,re=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ge(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(re.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ge(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(re.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(re.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),de&&(ce=!1),_e&&(ge=!0),Ce&&(R=Xp({},bm),te=rm(null),Ce.html===!0&&(Xp(R,gm),Xp(te,xm)),Ce.svg===!0&&(Xp(R,_m),Xp(te,Sm),Xp(te,wm)),Ce.svgFilters===!0&&(Xp(R,vm),Xp(te,Sm),Xp(te,wm)),Ce.mathMl===!0&&(Xp(R,ym),Xp(te,Cm),Xp(te,wm))),pm(e,`ADD_TAGS`)||(oe.tagCheck=null),pm(e,`ADD_ATTR`)||(oe.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?oe.tagCheck=e.ADD_TAGS:(R===ee&&(R=Zp(R)),Xp(R,e.ADD_TAGS,He))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?oe.attributeCheck=e.ADD_ATTR:(te===ne&&(te=Zp(te)),Xp(te,e.ADD_ATTR,He))),e.ADD_URI_SAFE_ATTR&&Xp(Oe,e.ADD_URI_SAFE_ATTR,He),e.FORBID_CONTENTS&&(we===Te&&(we=Zp(we)),Xp(we,e.FORBID_CONTENTS,He)),e.ADD_FORBID_CONTENTS&&(we===Te&&(we=Zp(we)),Xp(we,e.ADD_FORBID_CONTENTS,He)),xe&&(R[`#text`]=!0),pe&&Xp(R,[`html`,`head`,`body`]),R.table&&(Xp(R,[`tbody`]),delete ie.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw hm(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw hm(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);x=e.TRUSTED_TYPES_POLICY,S=x.createHTML(``)}else x===void 0&&(x=bOe(m,i)),x!==null&&typeof S==`string`&&(S=x.createHTML(``));tm&&tm(e),Ue=e}},qe=Xp({},[..._m,...vm,...lOe]),Je=Xp({},[...ym,...uOe]),Ye=function(e){let t=b(e);(!t||!t.tagName)&&(t={namespaceURI:Ne,tagName:`template`});let n=lm(e.tagName),r=lm(t.tagName);return Fe[e.namespaceURI]?e.namespaceURI===je?t.namespaceURI===Me?n===`svg`:t.namespaceURI===Ae?n===`svg`&&(r===`annotation-xml`||Le[r]):!!qe[n]:e.namespaceURI===Ae?t.namespaceURI===Me?n===`math`:t.namespaceURI===je?n===`math`&&Re[r]:!!Je[n]:e.namespaceURI===Me?t.namespaceURI===je&&!Re[r]||t.namespaceURI===Ae&&!Le[r]?!1:!Je[n]&&(ze[n]||!qe[n]):!!(Be===`application/xhtml+xml`&&Fe[e.namespaceURI]):!1},Xe=function(e){cm(t.removed,{element:e});try{b(e).removeChild(e)}catch{_(e)}},Ze=function(e,n){try{cm(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{cm(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(ge||_e)try{Xe(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Qe=function(e){let t=null,r=null;if(he)e=`<remove></remove>`+e;else{let t=dm(e,/^[\r\n\t ]+/);r=t&&t[0]}Be===`application/xhtml+xml`&&Ne===Me&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?x.createHTML(e):e;if(Ne===Me)try{t=new p().parseFromString(i,Be)}catch{}if(!t||!t.documentElement){t=C.createDocument(Ne,`template`,null);try{t.documentElement.innerHTML=Pe?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ne===Me?E.call(t,pe?`html`:`body`)[0]:pe?t.documentElement:a},$e=function(e){return w.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},et=function(e){return e instanceof f&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof d)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},tt=function(e){return typeof s==`function`&&e instanceof s};function nt(e,n,r){om(e,e=>{e.call(t,n,r,Ue)})}let rt=function(e){let n=null;if(nt(O.beforeSanitizeElements,e,null),et(e))return Xe(e),!0;let r=He(e.nodeName);if(nt(O.uponSanitizeElement,e,{tagName:r,allowedTags:R}),fe&&e.hasChildNodes()&&!tt(e.firstElementChild)&&mm(/<[/\w!]/g,e.innerHTML)&&mm(/<[/\w!]/g,e.textContent)||e.nodeType===Om.progressingInstruction||fe&&e.nodeType===Om.comment&&mm(/<[/\w]/g,e.data))return Xe(e),!0;if(!(oe.tagCheck instanceof Function&&oe.tagCheck(r))&&(!R[r]||ie[r])){if(!ie[r]&&at(r)&&(re.tagNameCheck instanceof RegExp&&mm(re.tagNameCheck,r)||re.tagNameCheck instanceof Function&&re.tagNameCheck(r)))return!1;if(xe&&!we[r]){let t=b(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=g(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,v(e))}}}return Xe(e),!0}return e instanceof l&&!Ye(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&mm(/<\/no(script|embed|frames)/i,e.innerHTML)?(Xe(e),!0):(de&&e.nodeType===Om.text&&(n=e.textContent,om([k,A,j],e=>{n=fm(n,e,` `)}),e.textContent!==n&&(cm(t.removed,{element:e.cloneNode()}),e.textContent=n)),nt(O.afterSanitizeElements,e,null),!1)},it=function(e,t,r){if(ae[t]||ye&&(t===`id`||t===`name`)&&(r in n||r in We))return!1;if(!(ce&&!ae[t]&&mm(M,t))&&!(se&&mm(N,t))&&!(oe.attributeCheck instanceof Function&&oe.attributeCheck(t,e))){if(!te[t]||ae[t]){if(!(at(e)&&(re.tagNameCheck instanceof RegExp&&mm(re.tagNameCheck,e)||re.tagNameCheck instanceof Function&&re.tagNameCheck(e))&&(re.attributeNameCheck instanceof RegExp&&mm(re.attributeNameCheck,t)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(t,e))||t===`is`&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&mm(re.tagNameCheck,r)||re.tagNameCheck instanceof Function&&re.tagNameCheck(r))))return!1}else if(!Oe[t]&&!mm(L,fm(r,F,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&sOe(r,`data:`)===0&&Ee[e])&&!(le&&!mm(P,fm(r,F,``)))&&r)return!1}return!0},at=function(e){return e!==`annotation-xml`&&dm(e,I)},ot=function(e){nt(O.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||et(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:te,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],l=He(a),u=s,d=a===`value`?u:cOe(u);if(r.attrName=l,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,nt(O.uponSanitizeAttribute,e,r),d=r.attrValue,be&&(l===`id`||l===`name`)&&(Ze(a,e),d=`user-content-`+d),fe&&mm(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Ze(a,e);continue}if(l===`attributename`&&dm(d,`href`)){Ze(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ze(a,e);continue}if(!ue&&mm(/\/>/i,d)){Ze(a,e);continue}de&&om([k,A,j],e=>{d=fm(d,e,` `)});let f=He(e.nodeName);if(!it(f,l,d)){Ze(a,e);continue}if(x&&typeof m==`object`&&typeof m.getAttributeType==`function`&&!o)switch(m.getAttributeType(f,l)){case`TrustedHTML`:d=x.createHTML(d);break;case`TrustedScriptURL`:d=x.createScriptURL(d);break}if(d!==u)try{o?e.setAttributeNS(o,a,d):e.setAttribute(a,d),et(e)?Xe(e):sm(t.removed)}catch{Ze(a,e)}}nt(O.afterSanitizeAttributes,e,null)},st=function e(t){let n=null,r=$e(t);for(nt(O.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)nt(O.uponSanitizeShadowNode,n,null),rt(n),ot(n),n.content instanceof a&&e(n.content);nt(O.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,l=null,u=null;if(Pe=!e,Pe&&(e=`<!-->`),typeof e!=`string`&&!tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw hm(`dirty is not a string, aborting`)}else throw hm(`toString is not a function`);if(!t.isSupported)return e;if(me||Ke(n),t.removed=[],typeof e==`string`&&(Se=!1),Se){if(e.nodeName){let t=He(e.nodeName);if(!R[t]||ie[t])throw hm(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=Qe(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===Om.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!ge&&!de&&!pe&&e.indexOf(`<`)===-1)return x&&ve?x.createHTML(e):e;if(i=Qe(e),!i)return ge?null:ve?S:``}i&&he&&Xe(i.firstChild);let d=$e(Se?e:i);for(;l=d.nextNode();)rt(l),ot(l),l.content instanceof a&&st(l.content);if(Se)return e;if(ge){if(_e)for(u=T.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(te.shadowroot||te.shadowrootmode)&&(u=D.call(r,u,!0)),u}let f=pe?i.outerHTML:i.innerHTML;return pe&&R[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&mm(Em,i.ownerDocument.doctype.name)&&(f=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
256
256
  `+f),de&&om([k,A,j],e=>{f=fm(f,e,` `)}),x&&ve?x.createHTML(f):f},t.setConfig=function(){Ke(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),me=!0},t.clearConfig=function(){Ue=null,me=!1},t.isValidAttribute=function(e,t,n){return Ue||Ke({}),it(He(e),He(t),n)},t.addHook=function(e,t){typeof t==`function`&&cm(O[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=aOe(O[e],t);return n===-1?void 0:oOe(O[e],n,1)[0]}return sm(O[e])},t.removeHooks=function(e){O[e]=[]},t.removeAllHooks=function(){O=km()},t}var $p,em,nOe,rOe,iOe,tm,nm,rm,im,am,om,aOe,sm,cm,oOe,lm,um,dm,fm,sOe,cOe,pm,mm,hm,gm,_m,vm,lOe,ym,uOe,bm,xm,Sm,Cm,wm,dOe,fOe,pOe,mOe,hOe,Tm,gOe,_Oe,Em,vOe,Dm,Om,yOe,bOe,km,Am,jm=s((()=>{({entries:$p,setPrototypeOf:em,isFrozen:nOe,getPrototypeOf:rOe,getOwnPropertyDescriptor:iOe}=Object),{freeze:tm,seal:nm,create:rm}=Object,{apply:im,construct:am}=typeof Reflect<`u`&&Reflect,tm||=function(e){return e},nm||=function(e){return e},im||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},am||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)},om=Yp(Array.prototype.forEach),aOe=Yp(Array.prototype.lastIndexOf),sm=Yp(Array.prototype.pop),cm=Yp(Array.prototype.push),oOe=Yp(Array.prototype.splice),lm=Yp(String.prototype.toLowerCase),um=Yp(String.prototype.toString),dm=Yp(String.prototype.match),fm=Yp(String.prototype.replace),sOe=Yp(String.prototype.indexOf),cOe=Yp(String.prototype.trim),pm=Yp(Object.prototype.hasOwnProperty),mm=Yp(RegExp.prototype.test),hm=$De(TypeError),gm=tm(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),_m=tm(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),vm=tm([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),lOe=tm([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),ym=tm(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),uOe=tm([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),bm=tm([`#text`]),xm=tm(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),Sm=tm(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Cm=tm(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),wm=tm([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),dOe=nm(/\{\{[\w\W]*|[\w\W]*\}\}/gm),fOe=nm(/<%[\w\W]*|[\w\W]*%>/gm),pOe=nm(/\$\{[\w\W]*/gm),mOe=nm(/^data-[\-\w.\u00B7-\uFFFF]+$/),hOe=nm(/^aria-[\-\w]+$/),Tm=nm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gOe=nm(/^(?:\w+script|data):/i),_Oe=nm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Em=nm(/^html$/i),vOe=nm(/^[a-z][.\w]*(-[.\w]+)+$/i),Dm=Object.freeze({__proto__:null,ARIA_ATTR:hOe,ATTR_WHITESPACE:_Oe,CUSTOM_ELEMENT:vOe,DATA_ATTR:mOe,DOCTYPE_NAME:Em,ERB_EXPR:fOe,IS_ALLOWED_URI:Tm,IS_SCRIPT_OR_DATA:gOe,MUSTACHE_EXPR:dOe,TMPLIT_EXPR:pOe}),Om={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},yOe=function(){return typeof window>`u`?null:window},bOe=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},km=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Am=tOe()})),Mm=l(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),xOe=l(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),SOe=l(((e,t)=>{var n=xOe(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),COe=l(((e,t)=>{var n=SOe();t.exports=function(){return n.Date.now()}})),wOe=l(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),TOe=l(((e,t)=>{var n=wOe(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),EOe=l(((e,t)=>{t.exports=SOe().Symbol})),DOe=l(((e,t)=>{var n=EOe(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),OOe=l(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),kOe=l(((e,t)=>{var n=EOe(),r=DOe(),i=OOe(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function l(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=l})),AOe=l(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),jOe=l(((e,t)=>{var n=kOe(),r=AOe(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),MOe=l(((e,t)=>{var n=TOe(),r=Mm(),i=jOe(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function d(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var d=s.test(e);return d||l.test(e)?u(e.slice(2),d?2:8):o.test(e)?a:+e}t.exports=d})),NOe=l(((e,t)=>{var n=Mm(),r=COe(),i=MOe(),a=`Expected a function`,o=Math.max,s=Math.min;function l(e,t,l){var u,d,f,p,m,h,g=0,_=!1,v=!1,y=!0;if(typeof e!=`function`)throw TypeError(a);t=i(t)||0,n(l)&&(_=!!l.leading,v=`maxWait`in l,f=v?o(i(l.maxWait)||0,t):f,y=`trailing`in l?!!l.trailing:y);function b(t){var n=u,r=d;return u=d=void 0,g=t,p=e.apply(r,n),p}function x(e){return g=e,m=setTimeout(w,t),_?b(e):p}function S(e){var n=e-h,r=e-g,i=t-n;return v?s(i,f-r):i}function C(e){var n=e-h,r=e-g;return h===void 0||n>=t||n<0||v&&r>=f}function w(){var e=r();if(C(e))return T(e);m=setTimeout(w,S(e))}function T(e){return m=void 0,y&&u?b(e):(u=d=void 0,p)}function E(){m!==void 0&&clearTimeout(m),g=0,u=h=d=m=void 0}function D(){return m===void 0?p:T(r())}function O(){var e=r(),n=C(e);if(u=arguments,d=this,h=e,n){if(m===void 0)return x(h);if(v)return clearTimeout(m),m=setTimeout(w,t),b(h)}return m===void 0&&(m=setTimeout(w,t)),p}return O.cancel=E,O.flush=D,O}t.exports=l})),POe=l(((e,t)=>{var n=NOe(),r=Mm(),i=`Expected a function`;function a(e,t,a){var o=!0,s=!0;if(typeof e!=`function`)throw TypeError(i);return r(a)&&(o=`leading`in a?!!a.leading:o,s=`trailing`in a?!!a.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}t.exports=a}));jm();var Nm=p(POe());function FOe(e,t,n,r){let i=Number(e[t].meta.id+1).toString(),a=``;return typeof r.docId==`string`&&(a=`-${r.docId}-`),a+i}function IOe(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function LOe(e,t,n,r,i){let a=i.rules.footnote_anchor_name(e,t,n,r,i),o=i.rules.footnote_caption(e,t,n,r,i),s=a;return e[t].meta.subId>0&&(s+=`:${e[t].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${a}" id="fnref${s}">${o}</a></sup>`}function ROe(e,t,n){return(n.xhtmlOut?`<hr class="footnotes-sep" />
257
257
  `:`<hr class="footnotes-sep">
@@ -3499,6 +3499,6 @@ Use Shift + Enter to enter a new line`:`输入 "/" 唤出 Skill
3499
3499
  :class="\`loading-status-\${i}\`"
3500
3500
  />
3501
3501
  </template> `),H(`span`,{class:xe([`ai-reasoning-message-title-icon collapsed-icon`,{"is-collapsed":n.value}])},[Yr(z(zp))],2)],2),Mn(H(`div`,xJt,[e.status===z(Mp).Error?(B(),Gr(GHt,{key:0,content:e.content?.join(`
3502
- `)||``},null,8,[`content`])):(B(!0),V(Lr,{key:1},dr(Array.isArray(e.content)?e.content:[e.content],e=>(B(),Gr(y9,{key:e,content:e},null,8,[`content`]))),128))],512),[[wi,!n.value]])]))}}),CJt={class:`ai-key-value-content`},wJt={key:0,class:`ai-key-value-title`},TJt={class:`ai-key-value-content`},EJt={class:`item-key`},DJt={class:`item-value`},OJt=Qn({__name:`key-value-content`,props:{content:{},title:{}},setup(e){return(t,n)=>(B(),V(`div`,CJt,[e.title?(B(),V(`div`,wJt,[Yr(z(BEe)),Qr(` `+ke(e.title),1)])):$r(`v-if`,!0),H(`div`,TJt,[(B(!0),V(Lr,null,dr(e.content,e=>(B(),V(`div`,{key:e.key,class:`key-value-item`},[H(`div`,EJt,ke(e.key),1),n[0]||=Qr(` : `,-1),H(`div`,DJt,ke(e.value),1)]))),128))])]))}}),kJt={class:`ai-user-message`},AJt={key:0,class:`ai-user-message-binary-files`},jJt={key:1,class:`ai-user-message-content`},MJt={class:`user-edit-footer`},NJt=Qn({__name:`user-message`,props:{content:{},id:{},messageId:{},name:{},role:{},status:{},uid:{},property:{},onAction:{type:Function},tippyOptions:{},messageToolsStatus:{},onInputConfirm:{type:Function},onShortcutConfirm:{type:Function}},setup(e){let t=e,n=NDe(),{copy:r}=Up(),i=cn(!1),a=cn(``),o=$n(`chatInputRef`),s=fi(()=>{let e=t.property?.extra?.cite;if(!(!e||typeof e==`string`))return e.title}),l=fi(()=>{let e=t.property?.extra?.cite;return!e||typeof e==`string`?e:e.data}),u=fi(()=>{if(!t.property?.extra)return null;let{extra:e}=t.property,{shortcut:n,cite:r,context:i}=e||{};if(n)return n;if(r&&typeof r==`object`&&r.data?.length){let e=[];for(let t of r.data){let n=i?.find(e=>e.__label===t.key);n?.__key&&e.push({formItemProps:{label:n.__label,required:!!n.fillBack},props:{default:n.__value},key:n.__key,type:`textarea`})}return{components:e,name:r.title}}return null}),d=e=>!!e.url||vTe(e.mimeType||e.file?.type),f=fi(()=>Array.isArray(t.content)?t.content?.filter(e=>e.type===Ap.Binary):[]),p=fi(()=>f.value.filter(e=>d(e))),m=fi(()=>f.value.filter(e=>!d(e))),h=fi(()=>t.content?typeof t.content==`string`?t.content:t.content?.filter(e=>e.type===Ap.Text&&!!e.text?.trim()):``),g=async e=>{if(e.id===`edit`){if(typeof t.content==`string`&&(a.value=t.content,i.value=!0),typeof h.value==`string`&&(a.value=h.value,i.value=!0),Array.isArray(h.value)){let e=h.value.at(0);a.value=typeof e==`string`?e:e?.text||``,i.value=!0}f.value.length&&(i.value=!0)}else e.id===`copy`&&r(typeof t.content==`string`?t.content:JSON.stringify(t.content||``));await t.onAction?.(e)},_=async()=>{await o.value?.triggerSendMessage?.(),i.value=!1},v=()=>{i.value=!1},y=()=>{i.value=!1},b=async e=>{t.onShortcutConfirm?.(e),i.value=!1},x=async(e,n)=>{t.onInputConfirm?.(e,n),i.value=!1};return(t,r)=>(B(),V(`div`,kJt,[l.value&&typeof l.value==`string`?(B(),Gr(bWt,{key:0,class:`ai-user-message-cite`,content:l.value},null,8,[`content`])):$r(`v-if`,!0),$r(` 非编辑状态 `),i.value?(B(),V(Lr,{key:2},[$r(` 编辑状态 `),u.value?(B(),Gr(yDe,ri({key:0},u.value,{class:`user-shortcut-render`,onClose:y,onSubmit:b}),null,16)):(B(),Gr(TGt,{key:1,ref_key:`chatInputRef`,ref:o,modelValue:a.value,"onUpdate:modelValue":r[0]||=e=>a.value=e,class:`user-edit-input`,"default-upload-files":f.value,"on-send-message":x,"support-upload":z(n)?.supportUpload.value??!1},{"send-icon":jn(()=>[H(`div`,MJt,[Yr(z(iu),{size:`small`,onClick:v},{default:jn(()=>[Qr(ke(z(Dp)(`取消`)),1)]),_:1}),Yr(z(iu),{size:`small`,theme:`primary`,onClick:_},{default:jn(()=>[Qr(ke(z(Dp)(`发送`)),1)]),_:1})])]),_:1},8,[`modelValue`,`default-upload-files`,`support-upload`]))],64)):(B(),V(Lr,{key:1},[f.value.length?(B(),V(Lr,{key:0},[p.value.length?(B(),V(`div`,AJt,[Yr(ZWt,{files:p.value,readonly:!0},null,8,[`files`])])):$r(`v-if`,!0),(B(!0),V(Lr,null,dr(m.value,(e,t)=>(B(),V(`div`,{key:e.url??t,class:`ai-user-message-binary-files`},[Yr(ZWt,{files:[e],readonly:!0},null,8,[`files`])]))),128))],64)):$r(`v-if`,!0),(l.value||h.value).length?(B(),V(`div`,jJt,[Array.isArray(l.value)?(B(),V(Lr,{key:0},[$r(` property.extra.cite 是数组时,显示结构化内容 `),Yr(OJt,{content:l.value,title:s.value},null,8,[`content`,`title`])],64)):e.content?(B(),V(Lr,{key:1},[$r(` agui user message content 显示`),(B(!0),V(Lr,null,dr(Array.isArray(h.value)?h.value:[h.value],(e,t)=>(B(),V(Lr,{key:t},[typeof e==`string`?(B(),Gr(y9,{key:0,content:e},null,8,[`content`])):e.type===z(Ap).Text?(B(),Gr(y9,{key:1,content:e.text},null,8,[`content`])):$r(`v-if`,!0)],64))),128))],64)):$r(`v-if`,!0)])):$r(`v-if`,!0),e.messageToolsStatus===z(z9).Hidden?$r(`v-if`,!0):(B(),Gr(xKt,{key:2,class:`ai-user-message-tools`,"message-tools":z(YTe),"message-tools-status":e.messageToolsStatus,"on-action":g,"tippy-options":e.tippyOptions,"update-tools":[]},null,8,[`message-tools`,`message-tools-status`,`tippy-options`]))],64))]))}}),PJt=Qn({__name:`message-render`,props:{messageToolsStatus:{},onInputConfirm:{type:Function},onShortcutConfirm:{type:Function},onAction:{type:Function},tippyOptions:{},message:{},onInterruptResume:{type:Function}},setup(e){let t=e,n=_r(),r=fi(()=>{switch(t.message.role){case jp.User:return U(NJt,{...t.message,onAction:t.onAction,onInputConfirm:t.onInputConfirm,onShortcutConfirm:t.onShortcutConfirm,messageToolsStatus:t.messageToolsStatus,tippyOptions:t.tippyOptions});case jp.Assistant:return U(Qqt,t.message,{default:e=>pr(n,`default`,e,()=>[U(sUt,{content:t.message.content||``,status:t.message.status},n.codeHeader?{codeHeader:e=>n.codeHeader?.(e)}:void 0)])});case jp.Info:return U(eJt,t.message);case jp.Reasoning:return U(SJt,t.message);case jp.Tool:return U(Uqt,t.message);case jp.Activity:return U(Fqt,{...t.message,onInterruptResume:t.onInterruptResume});case jp.Interrupt:return U(hJt,{...t.message,onInterruptResume:t.onInterruptResume},n.answeredQuestion?{answeredQuestion:e=>n.answeredQuestion?.(e)}:void 0);case jp.Loading:return U(_Jt,t.message);default:return null}});return(e,t)=>(B(),Gr(lr(r.value)))}}),FJt=[`id`,`onMouseenter`,`onMouseleave`],IJt={class:`ai-message-fixed-bottom`},LJt=Qn({__name:`message-container`,props:yr({enableSelection:{type:Boolean,default:!1},messageGroups:{},messages:{},messageStatus:{},messageToolsStatus:{},messageToolsTippyOptions:{},onAgentAction:{},onAgentFeedback:{},onInterruptResume:{},onUserAction:{},renderMode:{},onUserInputConfirm:{},onUserShortcutConfirm:{}},{selectedUserMessages:{required:!1},selectedUserMessagesModifiers:{}}),emits:yr([`stopStreaming`],[`update:selectedUserMessages`]),setup(e){let t=e,n=Dr(e,`selectedUserMessages`),r=$n(`messageContainerRef`),i=$n(`messageContainerBottomRef`),{toScrollBottom:a,debouncedShowScrollBottomBtn:o}=wDe(r,i),{copy:s}=Up(),l=fi(()=>JTe.filter(e=>t.renderMode!==Pp.Test||e.id!==`share`)),u=e=>{e.messages?.at(-1)?.role!==jp.Interrupt&&(e.isHover=!0)},d=(e,t)=>{let n=t.toElement??t.relatedTarget;n instanceof Element&&n.classList.contains(`ai-user-feedback`)||(e.isHover=!1)},f=(e,r)=>{let i=e.type===jp.User;t.messageGroups?.forEach((n,a)=>{if(n===e){n.checked=r;let e=i?t.messageGroups.at(a+1):t.messageGroups.at(a-1);e&&(e.checked=r)}}),n.value=t.messageGroups?.filter(e=>e.checked).map(e=>e.messages).flat()},p=async(e,n)=>(e.id===`copy`&&s(n.filter(e=>e.role!==jp.Reasoning).map(e=>typeof e.content==`string`?e.content:JSON.stringify(e.content||``)).join(`
3503
- `)),t.onAgentAction?.(e,n)),m=async(e,n)=>{t.onUserAction?.(e,n)},h=async(e,n,r)=>{t.onUserInputConfirm?.(e,n,r)},g=async(e,n)=>{t.onUserShortcutConfirm?.(e,n)};return(n,s)=>(B(),V(`div`,{ref_key:`messageContainerRef`,ref:r,class:`ai-message-container`},[(B(!0),V(Lr,null,dr(e.messageGroups,(r,i)=>(B(),V(`div`,{id:r.uid,key:i,class:`message-group`,style:ge({backgroundColor:r.checked?`#f5f7fa`:`transparent`}),onMouseenter:e=>u(r),onMouseleave:e=>d(r,e)},[pr(n.$slots,`group`,ri({ref_for:!0},{group:r}),()=>[e.enableSelection&&r.type!==z(jp).Loading?(B(),Gr(z(Su),{key:0,class:`message-group-checkbox`,"model-value":r.checked,"onUpdate:modelValue":e=>f(r,e)},null,8,[`model-value`,`onUpdate:modelValue`])):$r(`v-if`,!0),H(`div`,{class:xe([`message-group-messages`,{"message-group-enabled-selection":e.renderMode===z(Pp).Share||e.enableSelection&&r.type!==z(jp).Loading}]),style:ge({width:e.enableSelection&&r.type!==z(jp).Loading?`calc(100% - 16px)`:`100%`})},[(B(!0),V(Lr,null,dr(r.messages,(r,i)=>pr(n.$slots,`default`,ri({key:i,ref_for:!0},{message:r,messageToolsStatus:e.messageToolsStatus,onInterruptResume:t.onInterruptResume}),()=>[(B(),Gr(PJt,{key:i,message:r,"message-tools-status":e.messageToolsStatus,"on-action":e=>m(e,r),"on-input-confirm":(e,t)=>h(r,e,t),"on-interrupt-resume":t.onInterruptResume,"on-shortcut-confirm":e=>g(r,e),"tippy-options":e.messageToolsTippyOptions},fr({_:2},[n.$slots.answeredQuestion?{name:`answeredQuestion`,fn:jn(e=>[pr(n.$slots,`answeredQuestion`,ri({ref_for:!0},e))]),key:`0`}:void 0]),1032,[`message`,`message-tools-status`,`on-action`,`on-input-confirm`,`on-interrupt-resume`,`on-shortcut-confirm`,`tippy-options`]))])),128)),e.renderMode!==z(Pp).Share&&!(e.enableSelection&&r.type!==z(jp).Loading)&&!r.pause&&r.type===z(jp).Assistant&&e.messageToolsStatus!==z(z9).Hidden?(B(),Gr(xKt,{key:0,"message-tools":l.value,"message-tools-status":e.messageToolsStatus,"on-action":e=>p(e,r.messages),style:ge({visibility:r.isHover?`visible`:`hidden`}),"tippy-options":t.messageToolsTippyOptions,onFeedback:(e,n,i)=>t.onAgentFeedback?.(e,r.messages,n,i)},null,8,[`message-tools`,`message-tools-status`,`on-action`,`style`,`tippy-options`,`onFeedback`])):$r(`v-if`,!0)],6)])],44,FJt))),128)),H(`div`,{ref_key:`messageContainerBottomRef`,ref:i,class:`message-container-bottom`,tabindex:`0`},null,512),H(`div`,IJt,[Mn(Yr(QEe,{loading:e.messageStatus===z(Mp).StopLoading,title:e.messageStatus===z(Mp).StopLoading?z(Dp)(`正在停止`):z(Dp)(`停止生成`),onClick:s[0]||=e=>n.$emit(`stopStreaming`)},{icon:jn(()=>[Yr(z(EEe))]),_:1},8,[`loading`,`title`]),[[wi,e.messageStatus===z(Mp).Streaming||e.messageStatus===z(Mp).StopLoading||e.messageStatus===z(Mp).Fetching||e.messageStatus===z(Mp).Pending]]),Mn(Yr(QEe,{title:z(Dp)(`返回底部`),onClick:z(a)},{icon:jn(()=>[Yr(z(HEe))]),_:1},8,[`title`,`onClick`]),[[wi,z(o)]])])],512))}}),RJt={class:`execution-summary`},zJt={class:`execution-summary-header`},BJt={class:`execution-summary-content`},VJt=[`onMouseenter`],HJt={class:`content-item-header`},UJt={class:`content-item-title`},WJt={class:`content-item-messages`},GJt={key:0,class:`timeline-line`},KJt={key:1,class:`execution-summary-content-empty`},qJt={class:`execution-summary-content-empty-text`},JJt=Qn({__name:`execution-summary`,props:{messageGroups:{}},emits:[`locateMessageGroup`,`updateKeyword`],setup(e,{emit:t}){let n=t,r=Kp(),{keyword:i}=GDe(),a=cn(void 0),o=e=>{if(!e)return``;let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`},s=e=>{n(`locateMessageGroup`,e.uid,e)},l=()=>{i.value=``,n(`updateKeyword`,``)};return(t,u)=>(B(),V(`div`,RJt,[H(`div`,zJt,[Yr(z(hu),{modelValue:z(i),"onUpdate:modelValue":[u[0]||=e=>on(i)?i.value=e:null,u[1]||=e=>n(`updateKeyword`,e)],class:`execution-summary-header-input`,clearable:``,placeholder:z(Dp)(`搜索 关键字`)},null,8,[`modelValue`,`placeholder`])]),H(`div`,BJt,[e.messageGroups.length?(B(!0),V(Lr,{key:0},dr(e.messageGroups,(t,n)=>(B(),V(`div`,{key:t.uid,class:`execution-summary-content-item`,onMouseenter:e=>a.value=t.uid,onMouseleave:u[2]||=e=>a.value=void 0},[H(`div`,HJt,[u[3]||=H(`span`,{class:`timeline-dot`},null,-1),Mn((B(),V(`span`,UJt,[Qr(ke(typeof t.userMessageTitle==`number`?o(t.userMessageTitle):t.userMessageTitle),1)])),[[z(qp),{...z(r)}]]),Mn(Yr(z(iu),{class:`content-item-locate`,text:``,theme:`primary`,onClick:e=>s(t)},{default:jn(()=>[Qr(ke(z(Dp)(`在对话中定位`)),1)]),_:1},8,[`onClick`]),[[wi,a.value===t.uid]])]),H(`div`,WJt,[(B(!0),V(Lr,null,dr(t.messages,(e,t)=>(B(),Gr(PJt,{key:t,message:e},null,8,[`message`]))),128))]),n<e.messageGroups.length-1?(B(),V(`div`,GJt)):$r(`v-if`,!0)],40,VJt))),128)):(B(),V(`div`,KJt,[Yr(z(Zye),{class:`empty-exception`,type:`empty`}),H(`div`,qJt,[Qr(ke(z(i)?z(Dp)(`搜索结果为空`):z(Dp)(`暂无数据`))+` `,1),z(i)?(B(),Gr(z(iu),{key:0,text:``,theme:`primary`,onClick:l},{default:jn(()=>[Qr(ke(z(Dp)(`清空搜索`)),1)]),_:1})):$r(`v-if`,!0)])]))])]))}}),YJt={class:`ai-message-loading-row`},XJt={class:`ai-message-loading-icon-wrap`},ZJt={key:0,class:`ai-message-loading-text ai-message-loading-text-custom`},QJt={key:1,"aria-live":`polite`,class:`ai-message-loading-text`},$Jt=Qn({name:`MessageLoading`,inheritAttrs:!1,__name:`message-loading`,props:{duration:{default:1.8},gap:{default:8},iconSize:{default:32},stagger:{default:.135},text:{default:`加载中...`}},setup(e){let t=e,n=dte(),r=fi(()=>{let{class:e,style:t,...r}=n;return r}),i=fi(()=>({display:`block`,width:`${t.iconSize}px`,height:`${t.iconSize}px`})),a=fi(()=>[...t.text]),o=fi(()=>{let e=n.style,r={"--ai-message-loading-duration":`${t.duration}s`,"--ai-message-loading-stagger":`${t.stagger}s`,"--ai-message-loading-gap":`${t.gap}px`};return e&&typeof e==`object`&&!Array.isArray(e)?{...r,...e}:r});return(e,t)=>(B(),V(`div`,ri({class:[`ai-message-loading`,z(n).class],style:o.value},r.value),[H(`div`,YJt,[H(`span`,XJt,[pr(e.$slots,`icon`,{},()=>[Yr(z(rEe),{class:`ai-message-loading-icon-svg`,style:ge(i.value)},null,8,[`style`])])]),e.$slots.text?(B(),V(`span`,ZJt,[pr(e.$slots,`text`)])):(B(),V(`span`,QJt,[(B(!0),V(Lr,null,dr(a.value,(e,t)=>(B(),V(`span`,{key:`${t}-${e}`,class:`ai-message-loading-char`,style:ge({"--char-index":t})},ke(e),5))),128))]))])],16))}}),eYt={class:`ai-selection-footer`},tYt={class:`ai-selection-footer-left`},nYt={class:`select-all-text`},rYt={class:`ai-selection-footer-right`},iYt=Qn({__name:`selection-footer`,props:{isAllSelected:{type:Boolean},loading:{type:Boolean},selectedCount:{}},emits:[`cancel`,`confirm`,`toggle-all`],setup(e,{emit:t}){let n=t;return(t,r)=>(B(),V(`div`,eYt,[H(`div`,tYt,[Yr(z(Su),{"model-value":e.isAllSelected,"onUpdate:modelValue":r[0]||=e=>n(`toggle-all`,e)},null,8,[`model-value`]),H(`span`,nYt,ke(z(Dp)(`全选`)),1)]),H(`div`,rYt,[Yr(z(iu),{disabled:e.loading,onClick:r[1]||=e=>n(`cancel`)},{default:jn(()=>[Qr(ke(z(Dp)(`取消`)),1)]),_:1},8,[`disabled`]),Yr(z(iu),{disabled:e.selectedCount===0,loading:e.loading,theme:`primary`,onClick:r[2]||=e=>n(`confirm`)},{default:jn(()=>[Qr(ke(z(Dp)(`确定`)),1)]),_:1},8,[`disabled`,`loading`])])]))}}),aYt=[`data-ai-size`],oYt={key:0,class:`ai-chat-container-loading`},sYt={class:`screen-wrapper`},cYt={key:1,class:`ai-welcome-content`},lYt={class:`ai-welcome-title`},uYt={key:0,class:`ai-welcome-remark`},dYt=Qn({__name:`chat-container`,props:yr({chatLoading:{type:Boolean},commonTippyOptions:{},getSideRenderComponent:{},getSideTabRenderComponent:{},onCustomTabChange:{},openingRemark:{},placement:{default:`left`},resizeProps:{},size:{default:`small`},welcomeTitle:{},defaultUploadFiles:{},inputMaxHeight:{},messageStatus:{},modelValue:{},onSendMessage:{},onStopSending:{},onUpload:{},placeholder:{},prompts:{},resources:{},sendDisabledTip:{},shortcutId:{},shortcuts:{},skills:{},supportUpload:{type:Boolean},tippyOptions:{},messages:{},messageToolsStatus:{},onAgentAction:{},onAgentFeedback:{},onInterruptResume:{},onUserAction:{},renderMode:{},onUserInputConfirm:{},onUserShortcutConfirm:{}},{renderMode:{required:!1,default:Pp.Chat},renderModeModifiers:{},selectedShortcut:{required:!1},selectedShortcutModifiers:{},cite:{required:!1,default:``},citeModifiers:{}}),emits:yr([`selectShortcut`,`deleteShortcut`,`update:modelValue`,`stopStreaming`,`shortcutClose`,`shortcutSubmit`,`confirmShare`,`collapseChange`],[`update:renderMode`,`update:selectedShortcut`,`update:cite`]),setup(e,{expose:t,emit:n}){let r=pxe.TabPanel,i=e,a=Dr(e,`renderMode`),o=$n(`fullScreenRef`),{isFullScreen:s,enter:l,exit:u}=ADe(o);KDe({renderMode:a});let d=fi(()=>({collapsible:!1,immediate:!0,min:400,...i.resizeProps,placement:i.placement})),f=fi(()=>i.getSideRenderComponent?.(U,_.value.data?.props??{})??_.value.data?.component);MDe({size:fi(()=>i.size??`small`),supportUpload:fi(()=>i.supportUpload??!1)}),Ln(()=>i.size??`small`,e=>{typeof document<`u`&&(document.body.dataset.aiSize=e)},{immediate:!0});let p=Dr(e,`selectedShortcut`),m=Dr(e,`cite`),h=n;JDe({tippyOptions:fi(()=>i.commonTippyOptions??{})});let{tabs:g,selectedTab:_,isCollapse:v,addCustomTab:y,removeCustomTab:b,selectCustomTab:x,resetCustomTab:S}=ODe({onTabChange:async e=>{let t=_.value.data?.props||{loading:!0,data:{}};_.value.data={..._.value.data,props:t};let n=await i.onCustomTabChange?.(e);_.value.data={..._.value.data,props:{...t,loading:!1,data:n}}}}),C=cn(``),w=sn([]),T=cn(400),E=fi(()=>`calc(100% - ${T.value}px)`),{messageGroups:D,executionGroups:O,isShareMode:k,isAllSelected:A,onToggleShareAll:j,onCancelShare:M,onConfirmShare:N,pendingApprovalTipText:P,activeUserQuestionInterrupt:F}=VDe({keyword:C,messages:fi(()=>i.messages),selectedUserMessages:w});Ln(v,e=>{e&&(C.value=``,T.value=0),h(`collapseChange`,e,T.value)}),Ln(()=>O.value,e=>{!e.length&&!C.value&&S()},{immediate:!0,deep:!1});let I=fi(()=>i.messageStatus===Mp.StopLoading?Mp.StopLoading:D.value?.some(e=>e.messages.some(e=>e.id===`__loading__`))?Mp.Fetching:i.messageStatus),L=()=>{p.value=null,h(`shortcutClose`)},R=e=>{h(`shortcutSubmit`,e)},ee=()=>{h(`deleteShortcut`)},te=e=>{h(`selectShortcut`,e)},ne=(e,t)=>{h(`update:modelValue`,e,t)},re=async(e,t)=>{let n=F.value;return i.onSendMessage?.(e,t,n?{payload:MGt(n),interrupt:n}:void 0)},ie=()=>{v.value=!v.value},ae=e=>{if(!e)return;let t=document.getElementById(e);if(!t){let t=D.value.find(t=>t.messages.some(t=>t.uid===e));t&&document.getElementById(t.uid)?.scrollIntoView({behavior:`smooth`});return}t.scrollIntoView({behavior:`smooth`})},oe=e=>{x(g.value.find(t=>t.name===e))},se=e=>{C.value=e},ce=async(e,t)=>{if(e.id===`share`){k.value=!0;return}return i.onAgentAction?.(e,t)},le=()=>{h(`confirmShare`,N()),En(()=>{k.value=!1,w.value=[]})},ue=e=>{T.value=e};return cr(()=>{S(),typeof document<`u`&&delete document.body.dataset.aiSize}),t({selectedTab:_,addCustomTab:y,removeCustomTab:b,selectCustomTab:x,enterShareMode:()=>{k.value=!0},exitShareMode:()=>{M()}}),(t,n)=>(B(),V(`div`,{class:`ai-chat-container`,"data-ai-size":e.size,style:ge({"--resize-main-width":E.value,borderTopColor:z(v)?`transparent`:`#eaebf0`})},[e.chatLoading?(B(),V(`div`,oYt,[Yr($Jt)])):(B(),Gr(z(Qbe),ri({key:1,class:[`ai-chat-container-resize-layout`,{"ai-is-collapse":z(v)||!C.value?.length&&z(O)?.length<1||a.value===z(Pp).Share}]},d.value,{onResizing:ue}),{aside:jn(()=>[!z(v)&&(z(O)?.length||C.value?.length)&&a.value!==z(Pp).Share?(B(),V(`div`,{key:0,ref_key:`fullScreenRef`,ref:o,class:`ai-full-screen-wrapper`},[Yr(z(pxe),{active:z(_).name,class:`ai-chat-container-tab`,"label-height":40,type:`unborder-card`,onChange:oe},{setting:jn(()=>[H(`div`,sYt,[Yr(Jp,{class:`screen-btn`,"tippy-options":{...e.commonTippyOptions,appendTo:z(s)?o.value:e.commonTippyOptions?.appendTo,content:z(s)?z(Dp)(`退出全屏`):z(Dp)(`全屏`)}},{default:jn(()=>[z(s)?(B(),Gr(z(WEe),{key:1,onClick:z(u)},null,8,[`onClick`])):(B(),Gr(z(UEe),{key:0,onClick:z(l)},null,8,[`onClick`]))]),_:1},8,[`tippy-options`])])]),default:jn(()=>[(B(!0),V(Lr,null,dr(z(g),t=>(B(),Gr(z(r),{key:t.name,class:`ai-chat-container-tab-panel`,label:()=>U(`div`,{class:`ai-execution-summary-label`,onVnodeMounted:e=>{z(_).name===t.name&&e.el?.scrollIntoView({behavior:`smooth`})}},e.getSideTabRenderComponent?.(U,t,{removeCustomTab:z(b)})??[U(t.name===z(`execution`)?z(mEe):z(hEe),{class:`ai-execution-summary-icon`}),Mn(U(`span`,{class:`ai-execution-summary-label-text`},t.label??``),[[z(qp),{...e.commonTippyOptions,text:t.label??``}]]),t.name===z(`execution`)?null:U(z(Bp),{class:`ai-execution-close-icon`,onClick:()=>{z(b)(t.name)}})]),name:t.name},null,8,[`label`,`name`]))),128))]),_:1},8,[`active`]),z(_)?.name===z(`execution`)?(B(),V(Lr,{key:0},[z(v)?$r(`v-if`,!0):(B(),Gr(JJt,{key:0,"message-groups":z(O),style:{height:`calc(100% - 40px)`},onLocateMessageGroup:ae,onUpdateKeyword:se},null,8,[`message-groups`]))],64)):$r(`v-if`,!0),z(_)?(B(),V(`div`,{key:z(_).name,class:`ai-chat-container-message-slot`},[(B(),Gr(lr(f.value),ri({key:z(_).name},z(_)?.data?.props),{locateButton:jn(()=>[Yr(z(iu),{class:`ai-locate-button`,size:`small`,text:``,theme:`primary`,onClick:n[0]||=e=>ae(z(_)?.data?.messageUid)},{default:jn(()=>[Qr(ke(z(Dp)(`在对话中定位`)),1)]),_:1})]),_:1},16))])):$r(`v-if`,!0)],512)):$r(`v-if`,!0),z(O)?.length&&a.value!==z(Pp).Share?(B(),V(`div`,{key:1,class:xe([`collapse-button`,{"is-right":e.placement===`right`,"is-collapsed":z(v)}]),onClick:ie},[Yr(z(zp))],2)):$r(`v-if`,!0)]),main:jn(()=>[e.messages?.length?pr(t.$slots,`default`,Se(ri({key:0},{messages:e.messages,messageStatus:e.messageStatus,messageGroups:z(D),selectedUserMessages:w.value,messageToolsStatus:e.messageToolsStatus,isShareMode:z(k),commonTippyOptions:e.commonTippyOptions,handleAgentAction:ce,onAgentFeedback:e.onAgentFeedback,onInterruptResume:e.onInterruptResume,onUserAction:e.onUserAction,onUserInputConfirm:e.onUserInputConfirm,onUserShortcutConfirm:e.onUserShortcutConfirm})),()=>[e.messages?.length?(B(),Gr(LJt,{key:0,"selected-user-messages":w.value,"onUpdate:selectedUserMessages":n[1]||=e=>w.value=e,"enable-selection":z(k),"message-groups":z(D),"message-status":I.value,"message-tools-status":e.messageToolsStatus,"message-tools-tippy-options":e.commonTippyOptions,messages:e.messages,"on-agent-action":ce,"on-agent-feedback":e.onAgentFeedback,"on-interrupt-resume":e.onInterruptResume,"on-user-action":e.onUserAction,"on-user-input-confirm":e.onUserInputConfirm,"on-user-shortcut-confirm":e.onUserShortcutConfirm,"render-mode":a.value,onStopStreaming:n[2]||=e=>h(`stopStreaming`)},{group:jn(({group:e})=>[pr(t.$slots,`group`,Se(Xr({group:e})))]),default:jn(({message:e,messageToolsStatus:n,onInterruptResume:r})=>[pr(t.$slots,`message`,Se(Xr({message:e,messageToolsStatus:n,onInterruptResume:r})))]),_:3},8,[`selected-user-messages`,`enable-selection`,`message-groups`,`message-status`,`message-tools-status`,`message-tools-tippy-options`,`messages`,`on-agent-feedback`,`on-interrupt-resume`,`on-user-action`,`on-user-input-confirm`,`on-user-shortcut-confirm`,`render-mode`])):$r(`v-if`,!0)]):(B(),V(`div`,cYt,[pr(t.$slots,`welcome`,Se(Xr({openingRemark:e.openingRemark,welcomeTitle:e.welcomeTitle})),()=>[Yr(z(iEe)),H(`h2`,lYt,ke(e.welcomeTitle??z(Dp)(`你好,我是小鲸`)),1),e.openingRemark?(B(),V(`div`,uYt,[Yr(sUt,{content:e.openingRemark},null,8,[`content`])])):$r(`v-if`,!0)])])),a.value===z(Pp).Share?$r(`v-if`,!0):(B(),V(Lr,{key:2},[z(k)?(B(),Gr(iYt,{key:0,"is-all-selected":z(A),loading:!1,"selected-count":w.value.length,onCancel:z(M),onConfirm:le,onToggleAll:z(j)},null,8,[`is-all-selected`,`selected-count`,`onCancel`,`onToggleAll`])):p.value?.components?.length?(B(),Gr(yDe,ri({key:1},p.value,{onClose:L,onSubmit:R}),null,16)):(B(),Gr(TGt,{key:2,cite:m.value,"onUpdate:cite":n[3]||=e=>m.value=e,"message-status":I.value,"model-value":e.modelValue,"on-send-message":re,"on-stop-sending":e.onStopSending,"on-upload":e.onUpload,placeholder:e.placeholder,prompts:e.prompts,resources:e.resources,"send-disabled-tip":z(P),"shortcut-id":p.value?.id,shortcuts:e.shortcuts,skills:e.skills,"support-upload":e.supportUpload,"tippy-options":e.commonTippyOptions,onDeleteShortcut:ee,onSelectShortcut:te,"onUpdate:modelValue":ne},{interrupt:jn(()=>[z(F)?(B(),Gr(z(aKt),{key:0,interrupt:z(F),"on-resume":e.onInterruptResume},{question:jn(({question:e,qIndex:n,answer:r,setAnswer:i,confirm:a})=>[pr(t.$slots,`interruptQuestion`,Se(Xr({question:e,qIndex:n,answer:r,setAnswer:i,confirm:a})))]),_:3},8,[`interrupt`,`on-resume`])):$r(`v-if`,!0),z(P)?(B(),Gr(OGt,{key:1,content:z(P)},null,8,[`content`])):$r(`v-if`,!0)]),_:3},8,[`cite`,`message-status`,`model-value`,`on-stop-sending`,`on-upload`,`placeholder`,`prompts`,`resources`,`send-disabled-tip`,`shortcut-id`,`shortcuts`,`skills`,`support-upload`,`tippy-options`]))],64))]),_:3},16,[`class`]))],12,aYt))}}),fYt=`data:image/png;base64,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`,pYt={class:`left-section`},mYt={class:`logo`},hYt=[`src`],gYt={key:0,class:`rename-tooltip`},_Yt={class:`rename-content`},vYt={key:0,class:`tippy-dropdown-menu`},yYt={key:1,class:`bkai-icon bkai-auto-refresh-line`},bYt={class:`right-section`},xYt=Fi(Qn({__name:`index`,props:{title:{default:``},agentName:{default:``},sessionName:{default:``},isCompressionHeight:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},showHistoryIcon:{type:Boolean,default:!0},showNewChatIcon:{type:Boolean,default:!0},showCompressionIcon:{type:Boolean,default:!0},showMoreIcon:{type:Boolean,default:!0},enableChatSession:{type:Boolean,default:!0},hasPermission:{type:Boolean,default:!0},chatGroup:{default:()=>({enabled:!1,staff:[],username:``})},hasSessionContents:{type:Boolean},autoGenerateLoading:{type:Boolean},dropdownMenuConfig:{default:()=>({showRename:!0,showAutoGenerate:!0,showShare:!1})},sessionBusinessManager:{default:void 0},renderMode:{default:Pp.Chat}},emits:[`close`,`toggle-compression`,`new-chat`,`history-click`,`auto-generate-name`,`help-click`,`rename`,`share`,`history-session-switch`,`history-session-delete`,`history-session-rename`,`new-chat-created`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=gxe,o=sn(null),s=sn(null),l=$n(`moreMenuTippyRef`),u=sn(!1),d=sn(``),f=sn(null),p=sn(!1),m=()=>document.querySelector(`.ai-blueking-panel`)||document.body,h=null,g=()=>{!s.value||!r.sessionBusinessManager||(h=rCe({triggerRef:s,sessionBusinessManager:r.sessionBusinessManager,onSessionSwitch:e=>i(`history-session-switch`,e),onSessionDelete:e=>i(`history-session-delete`,e),onSessionRename:(e,t)=>i(`history-session-rename`,e,t)}))},_=fi(()=>r.hasPermission?r.enableChatSession?r.title||`${r.agentName||``}-${r.sessionName||``}`:r.agentName:nf(`无智能体使用权限`)),v=fi(()=>r.isCompressionHeight?`bkai-morenchicun`:`bkai-yasuo`),y=fi(()=>r.isCompressionHeight?nf(`恢复默认尺寸`):nf(`缩小高度`)),b=fi(()=>r.hasPermission),x=e=>b.value?e:nf(`暂无使用权限`),S=()=>({cursor:b.value?`pointer`:`not-allowed`}),C=sn(!1),w=async()=>{if(!C.value){C.value=!0;try{if(r.sessionBusinessManager)try{let e=await r.sessionBusinessManager.createNewSession();e&&i(`new-chat-created`,{sessionCode:e.sessionCode,sessionName:e.sessionName,createdAt:e.createdAt})}catch(e){console.error(`Failed to create new session:`,e),ud({theme:`error`,message:nf(`创建会话失败`)})}i(`new-chat`)}finally{C.value=!1}}},T=e=>{e.stopPropagation(),r.sessionBusinessManager?(h||g(),h&&h.handleTriggerClick(e)):i(`history-click`,e)},E=()=>{i(`help-click`)},D=e=>{e.stopPropagation(),h&&h.isVisible()&&h.hide(),l.value&&(p.value?l.value.hide():l.value.show())},O=()=>{l.value?.hide(),j()},k=()=>{!r.hasSessionContents||r.autoGenerateLoading||i(`auto-generate-name`)},A=()=>{r.hasSessionContents&&(l.value?.hide(),i(`share`))},j=()=>{document.removeEventListener(`click`,F),d.value=r.sessionName||``,u.value=!0,setTimeout(()=>{document.addEventListener(`click`,F)},100),setTimeout(()=>{if(f.value)try{let e=f.value;e&&typeof e.focus==`function`&&e.focus();let t=e.$el?.querySelector(`input`);t&&typeof t.select==`function`&&t.select()}catch(e){console.warn(`Failed to focus rename input:`,e)}},100)},M=()=>{let e=d.value.trim();if(!e){N();return}i(`rename`,e),u.value=!1,d.value=``},N=()=>{u.value=!1,d.value=``},P=(e,t)=>{d.value=e,t.key===`Enter`?M():t.key===`Escape`&&N()},F=e=>{if(!u.value)return;let t=e.target,n=document.querySelector(`.rename-tooltip`);n&&!n.contains(t)&&N()};return Ln(()=>r.autoGenerateLoading,(e,t)=>{t&&!e&&p.value&&l.value?.hide()}),or(()=>{r.sessionBusinessManager&&g(),document.addEventListener(`click`,F)}),sr(()=>{h&&=(h.destroy(),null),document.removeEventListener(`click`,F)}),t({headerRef:o,historyIconRef:s}),(t,n)=>(B(),V(`div`,{ref_key:`headerRef`,ref:o,class:xe([`ai-header drag-handle`,{draggable:r.draggable}])},[H(`div`,pYt,[H(`div`,mYt,[H(`img`,{alt:`logo`,src:z(fYt)},null,8,hYt)]),H(`div`,{class:xe([`title`,{"title-with-tooltip":u.value}])},[Qr(ke(_.value)+` `,1),$r(` 重命名 tooltip 直接绑定在 title 上 `),u.value?(B(),V(`div`,gYt,[H(`div`,_Yt,[Yr(z(hu),{ref_key:`renameInputRef`,ref:f,modelValue:d.value,"onUpdate:modelValue":n[0]||=e=>d.value=e,class:`rename-input`,placeholder:z(nf)(`请输入新的会话名称`),onKeyup:P},null,8,[`modelValue`,`placeholder`]),H(`div`,{class:`rename-buttons`},[H(`i`,{class:`bkai-icon bkai-check-1 rename-btn confirm-btn`,onClick:M}),H(`i`,{class:`bkai-icon bkai-close rename-btn cancel-btn`,onClick:N})])])])):$r(`v-if`,!0)],2),$r(` 更多图标下拉菜单 - 使用 vue-tippy `),r.showMoreIcon&&b.value?(B(),Gr(z(bp),{key:0,ref_key:`moreMenuTippyRef`,ref:l,arrow:!1,"append-to":m,offset:[0,4],interactive:``,placement:`bottom-start`,theme:`ai-blueking-light more-menu-light light`,trigger:`manual`,onHidden:n[1]||=e=>p.value=!1,onShown:n[2]||=e=>p.value=!0},{content:jn(()=>[p.value?(B(),V(`div`,vYt,[r.dropdownMenuConfig?.showRename?(B(),V(`div`,{key:0,class:`tippy-menu-item`,onClick:O},[n[7]||=H(`i`,{class:`bkai-icon bkai-bianji`},null,-1),H(`span`,null,ke(z(nf)(`重命名`)),1)])):$r(`v-if`,!0),r.dropdownMenuConfig?.showAutoGenerate?Mn((B(),V(`div`,{key:1,class:xe([`tippy-menu-item`,{disabled:!r.hasSessionContents||r.autoGenerateLoading}]),onClick:k},[r.autoGenerateLoading?(B(),Gr(z(Xl),{key:0,mode:`spin`,size:`mini`,theme:`primary`})):(B(),V(`i`,yYt)),H(`span`,null,ke(z(nf)(`自动生成命名`)),1)],2)),[[z(xp),{content:r.hasSessionContents?``:z(nf)(`请先发起会话`),theme:`ai-blueking-tooltip`,arrow:!0,delay:[300,0],appendTo:m}]]):$r(`v-if`,!0),r.dropdownMenuConfig?.showShare&&r.renderMode!==z(Pp).Test?Mn((B(),V(`div`,{key:2,class:xe([`tippy-menu-item`,{disabled:!r.hasSessionContents}]),onClick:A},[n[8]||=H(`i`,{class:`bkai-icon bkai-fenxiang`},null,-1),H(`span`,null,ke(z(nf)(`分享会话`)),1)],2)),[[z(xp),{content:r.hasSessionContents?``:z(nf)(`请先发起会话`),theme:`ai-blueking-tooltip`,arrow:!0,delay:[300,0],appendTo:m}]]):$r(`v-if`,!0)])):$r(`v-if`,!0)]),default:jn(()=>[H(`span`,{class:`bkai-icon bkai-more`,onClick:D})]),_:1},512)):$r(`v-if`,!0)]),pr(t.$slots,`headerLeft`,{},void 0,!0),H(`div`,bYt,[$r(` 新增会话按钮 `),r.showNewChatIcon&&e.enableChatSession!==!1?Mn((B(),V(`i`,{key:0,class:xe([`bkai-icon`,`bkai-xinzengliaotian`,{disabled:!b.value||C.value}]),style:ge(S()),onClick:n[3]||=e=>b.value&&!C.value?w():void 0},null,6)),[[z(a),{content:C.value?z(nf)(`正在创建会话...`):x(z(nf)(`新增会话`)),boundary:`parent`}]]):$r(`v-if`,!0),$r(` 历史会话按钮 `),r.showHistoryIcon&&e.enableChatSession!==!1?Mn((B(),V(`i`,{key:1,ref_key:`historyIconRef`,ref:s,class:xe([`bkai-icon`,`bkai-history`,{disabled:!b.value}]),style:ge(S()),onClick:n[4]||=e=>b.value?T(e):void 0},null,6)),[[z(a),{content:x(z(nf)(`历史会话`)),boundary:`parent`}]]):$r(`v-if`,!0),e.chatGroup?.enabled?Mn((B(),V(`i`,{key:2,class:`bkai-icon bkai-zhushou`,onClick:E},null,512)),[[z(a),{content:z(nf)(`转人工`),boundary:`parent`}]]):$r(`v-if`,!0),r.showCompressionIcon?Mn((B(),V(`i`,{key:3,class:xe([`bkai-icon`,v.value]),onClick:n[5]||=e=>i(`toggle-compression`)},null,2)),[[z(a),{content:y.value,boundary:`parent`}]]):$r(`v-if`,!0),Mn(H(`i`,{class:`bkai-icon bkai-close-line-2`,onClick:n[6]||=e=>i(`close`)},null,512),[[z(a),{content:z(nf)(`关闭`),boundary:`parent`}]])])],2))}}),[[`__scopeId`,`data-v-de3b1a3b`]]),SYt=class{_isGenerating;_isStopLoading;agentModule;config;eventEmitter;messageModule;sessionModule;autoRenameSessionIfNeeded(e){let t=this.sessionModule;if(!t||this.messageModule.list.value.length!==1)return;let n=t.renameSession(e);n&&n.catch(e=>{console.error(`[ChatBusinessManager] Auto rename session failed:`,e)})}emit(e,t){this.eventEmitter?.emit(e,t)}constructor(e,t,n=null,r=null,i={}){this.agentModule=e,this.messageModule=t,this.sessionModule=n,this.eventEmitter=r,this.config=i,this._isGenerating=sn(!1),this._isStopLoading=sn(!1)}get isGenerating(){return this._isGenerating}get isStopLoading(){return this._isStopLoading}get isMessagesLoading(){return this.messageModule.isListLoading}get messages(){return this.messageModule.list}get openingRemark(){return this.config.openingRemark||``}get predefinedQuestions(){return this.config.predefinedQuestions||[]}async batchDeleteMessages(e){try{await this.messageModule.deleteMessages(e);let t=e.map(e=>e.id).filter(Boolean);this.emit(`messages-batch-deleted`,{messageIds:t})}catch(e){throw console.error(`Failed to batch delete messages:`,e),this.emit(`chat-error`,{action:`batch-delete-messages`,error:e}),e}}async deleteMessage(e){try{await this.messageModule.deleteMessages([e]),this.emit(`message-deleted`,{messageId:e.id})}catch(e){throw console.error(`Failed to delete message:`,e),this.emit(`chat-error`,{action:`delete-message`,error:e}),e}}handleStreamEnd(){this._isGenerating.value=!1,this.emit(`receive-end`,{})}handleStreamError(e){this._isGenerating.value=!1,this.emit(`receive-error`,{error:e})}handleStreamStart(){this._isGenerating.value=!0,this.emit(`receive-start`,{})}async regenerateFromAIMessages(e,t){try{if(!e||e.length===0)throw Error(`No AI messages provided`);let n=this.messages.value,r=tf(n,e[0]);if(!r)throw Error(`No user message found before AI messages`);let i=r.id;if(i===void 0)throw Error(`User message has no id`);await this.regenerateMessage(String(i),t)}catch(e){throw console.error(`Failed to regenerate from AI messages:`,e),this.emit(`chat-error`,{action:`regenerate`,error:e}),e}}async regenerateMessage(e,t){try{let n=this.messages.value,r=n.findIndex(t=>String(t.id)===e);if(r===-1)throw Error(`Message not found: ${e}`);let i=n[r];if(i.role!==zd.User)throw Error(`Can only regenerate from user messages`);let a=n.slice(r),o=typeof i.content==`string`?i.content:JSON.stringify(i.content),s=i.property;this._isGenerating.value=!0;let l=this.messageModule.deleteMessages(a);this.agentModule.chat(o,t,void 0,void 0,s),this.emit(`chat-regenerate`,{messageId:e}),l.catch(e=>{console.error(`[regenerateMessage] Delete API error:`,e)})}catch(e){throw console.error(`Failed to regenerate message:`,e),this._isGenerating.value=!1,this.emit(`chat-error`,{action:`regenerate`,error:e}),e}}async resendMessageWithProperty(e,t,n,r){try{let i=this.messages.value,a=i.findIndex(t=>String(t.id)===e);if(a===-1)throw Error(`Message not found: ${e}`);if(i[a].role!==zd.User)throw Error(`Can only resend user messages`);let o=i.slice(a);this._isGenerating.value=!0;let s=this.messageModule.deleteMessages(o);this.agentModule.chat(n,t,void 0,void 0,r),this.emit(`chat-resend`,{messageId:e}),s.catch(e=>{console.error(`[resendMessageWithProperty] Delete API error:`,e)})}catch(e){throw console.error(`Failed to resend message with property:`,e),this._isGenerating.value=!1,this.emit(`chat-error`,{action:`resend`,error:e}),e}}async retryMessage(e){try{console.warn(`retryMessage not implemented yet`),this.emit(`chat-retry`,{messageId:e})}catch(e){throw console.error(`Failed to retry message:`,e),this.emit(`chat-error`,{action:`retry`,error:e}),e}}async sendMessage(e,t,n={}){try{if(!t)throw Error(`No active session. Please create or select a session first.`);this._isGenerating.value=!0,this.emit(`send-message`,{content:e}),await this.agentModule.chat(e,t,void 0,void 0,n.property),this.autoRenameSessionIfNeeded(t)}catch(e){throw console.error(`Failed to send message:`,e),this._isGenerating.value=!1,this.emit(`chat-error`,{action:`send`,error:e}),e}}async stopGeneration(){let e=this.sessionModule?.current?.value?.sessionCode??``;this._isStopLoading.value=!0;try{await this.agentModule.stopChat(e),this._isGenerating.value=!1,this.emit(`stop`,{})}catch(e){console.error(`Failed to stop generation:`,e),this.emit(`chat-error`,{action:`stop`,error:e})}finally{this._isStopLoading.value=!1}}},CYt=class{agentModule;config;eventEmitter;sessionModule;emit(e,t){this.eventEmitter?.emit(e,t)}constructor(e,t=null,n=null,r={}){this.sessionModule=e,this.agentModule=t,this.eventEmitter=n,this.config=r}get currentSession(){return this.sessionModule.current}get isCreateLoading(){return this.sessionModule.isCreateLoading}get isCurrentLoading(){return this.sessionModule.isCurrentLoading}get isDeleteLoading(){return this.sessionModule.isDeleteLoading}get isListLoading(){return this.sessionModule.isListLoading}get isUpdateLoading(){return this.sessionModule.isUpdateLoading}get sessionList(){return this.sessionModule.list}async createNewSession(){return await this.createSession({name:`新会话`,sessionCode:`new_session_${Date.now()}`}),this.sessionModule.current.value}async createSession(e={}){if(this.config.enableChatSession===!1)throw Error(`Chat session is disabled`);try{let t={sessionName:e.name||`新会话`,sessionCode:e.sessionCode||`session_${Date.now()}`,isTemporary:e.isTemporary||!1,sessionProperty:{labels:e.labels}};await this.sessionModule.createSession(t);let n=this.agentModule?.info.value;n&&this.agentModule?.handleRole(n,t.sessionCode),this.emit(`session-created`,{session:this.sessionModule.current.value})}catch(e){throw console.error(`Failed to create session:`,e),this.emit(`session-error`,{action:`create`,error:e}),e}}async deleteSession(e){try{await this.sessionModule.deleteSession(e),this.emit(`session-deleted`,{sessionCode:e})}catch(e){throw console.error(`Failed to delete session:`,e),this.emit(`session-error`,{action:`delete`,error:e}),e}}async getSession(e){try{await this.sessionModule.getSession(e)}catch(e){throw console.error(`Failed to get session:`,e),this.emit(`session-error`,{action:`get`,error:e}),e}}async loadRecentSession(e){try{e?.skipLoadSessions||await this.loadSessions();let t=this.sessionList.value;if(this.config.initialSessionCode){await this.switchSession(this.config.initialSessionCode);return}if(t.length>0){let n=t[0],r=(n.sessionContentCount??0)>0,i=e?.alwaysCreateNewSession??this.config.alwaysCreateNewSession??!1;r||i?await this.createNewSession():await this.switchSession(n.sessionCode,{loadMessages:!1});return}await this.createNewSession()}catch(e){throw console.error(`Failed to load recent session:`,e),e}}async loadSessions(){try{await this.sessionModule.getSessions(),this.emit(`sessions-loaded`,{sessions:this.sessionList.value})}catch(e){throw console.error(`Failed to load sessions:`,e),this.emit(`session-error`,{action:`load`,error:e}),e}}async switchSession(e,t){try{await this.sessionModule.chooseSession(e,t),this.emit(`session-switched`,{session:this.sessionModule.current.value})}catch(e){throw console.error(`Failed to switch session:`,e),this.emit(`session-error`,{action:`switch`,error:e}),e}}async updateSessionName(e,t){try{let n=this.sessionList.value.find(t=>t.sessionCode===e);if(!n)throw Error(`Session not found: ${e}`);await this.sessionModule.updateSession({...n,sessionName:t}),this.emit(`session-updated`,{session:this.sessionModule.current.value})}catch(e){throw console.error(`Failed to update session name:`,e),this.emit(`session-error`,{action:`update`,error:e}),e}}},wYt=class{messageModule;sessionModule;constructor(e,t){this.messageModule=e,this.sessionModule=t}async shareMessages(e){if(e.length===0)throw Error(`No messages to share`);let t=this.sessionModule.current?.value?.sessionCode;if(!t)throw Error(`No active session`);let n=await this.messageModule.shareMessages(t,e);if(!n)throw Error(`Share failed: no result returned`);return{shareUrl:`${n.share_page}share-page/${n.share_token}`,userMessageIds:e.map(e=>String(e.id))}}},TYt=class{_agentShortcuts;_effectiveShortcuts;_propsShortcuts;eventEmitter;emit(e,t){this.eventEmitter?.emit(e,t)}constructor(e=null,t=[]){this._propsShortcuts=sn(t),this._agentShortcuts=sn([]),this.eventEmitter=e,this._effectiveShortcuts=fi(()=>this._propsShortcuts.value.length>0?this._propsShortcuts.value:this._agentShortcuts.value.length>0?this._agentShortcuts.value:[])}get count(){return this._effectiveShortcuts.value.length}get effectiveShortcuts(){return this._effectiveShortcuts}get hasShortcuts(){return this._effectiveShortcuts.value.length>0}get shortcuts(){return this._effectiveShortcuts}addShortcut(e){this._propsShortcuts.value.push(e)}clear(){this._propsShortcuts.value=[],this._agentShortcuts.value=[]}filterByTextLength(e,t){return!e||e.length>t?[]:this._effectiveShortcuts.value}filterShortcuts(e,t){return t?this._effectiveShortcuts.value.filter(n=>t(n,e)):this._effectiveShortcuts.value}getShortcutById(e){return this._effectiveShortcuts.value.find(t=>t.id===e)}handleShortcutClick(e,t,n=`main`){this.emit(`shortcut-click`,{shortcut:e,selectedText:t,source:n})}limitShortcuts(e){return this._effectiveShortcuts.value.slice(0,e)}removeShortcut(e){this._propsShortcuts.value=this._propsShortcuts.value.filter(t=>t.id!==e)}setAgentShortcuts(e){this._agentShortcuts.value=e}setShortcuts(e){this._propsShortcuts.value=e}},EYt=class{_isCompressed;_isDraggingOrResizing;_nimbusMinimized;_panelVisible;_positionAndSize;cleanupFunctions;config;containerRef=null;debugMode;listeners;onceListeners;constructor(e={}){this.config=e,this.listeners=new Map,this.onceListeners=new Map,this.debugMode=e.debug??!1,this.cleanupFunctions=[],this._panelVisible=sn(e.initialPanelVisible??!1),this._nimbusMinimized=sn(e.initialNimbusMinimized??!1),this._isDraggingOrResizing=sn(!1),this._isCompressed=sn(!1),this._positionAndSize=sn({x:0,y:0,width:400,height:window.innerHeight})}get container(){return{updatePosition:this.updatePosition.bind(this),updateSize:this.updateSize.bind(this),updatePositionAndSize:this.updatePositionAndSize.bind(this),toggleCompression:this.toggleCompression.bind(this),expandForSidePanel:this.expandForSidePanel.bind(this),collapseSidePanel:this.collapseSidePanel.bind(this),positionAndSize:fi(()=>this.containerRef?.positionAndSize?.value??this._positionAndSize.value),isCompressed:fi(()=>this._isCompressed.value),isSidePanelExpanded:fi(()=>this.containerRef?.isSidePanelExpanded?.value??!1)}}get isCompressed(){return this._isCompressed}get isDraggingOrResizing(){return this._isDraggingOrResizing}get nimbus(){return{minimize:this.minimizeNimbus.bind(this),restore:this.restoreNimbus.bind(this),toggle:this.toggleNimbus.bind(this),isMinimized:fi(()=>this._nimbusMinimized.value)}}get nimbusMinimized(){return this._nimbusMinimized}get panel(){return{show:this.showPanel.bind(this),hide:this.hidePanel.bind(this),toggle:this.togglePanel.bind(this),isVisible:fi(()=>this._panelVisible.value)}}get panelVisible(){return this._panelVisible}get state(){return{panelVisible:this._panelVisible,nimbusMinimized:this._nimbusMinimized,isDraggingOrResizing:this._isDraggingOrResizing,positionAndSize:this._positionAndSize}}collapseSidePanel(){this.containerRef?.collapseSidePanel&&this.containerRef.collapseSidePanel()}destroy(){this.listeners.clear(),this.onceListeners.clear(),this.cleanupFunctions.forEach(e=>e()),this.cleanupFunctions=[],this.debugMode&&console.debug(`[ComponentManager] Destroyed`)}emit(e,t){this.debugMode&&console.debug(`[ComponentManager] Emitting "${e}"`,t);let n=this.listeners.get(e);n&&n.forEach(n=>{try{n(t)}catch(t){console.error(`[ComponentManager] Error in listener for "${e}":`,t)}});let r=this.onceListeners.get(e);if(r&&r.size>0){let n=Array.from(r);this.onceListeners.delete(e),n.forEach(n=>{try{n(t)}catch(t){console.error(`[ComponentManager] Error in once listener for "${e}":`,t)}})}}emitInternal(e,t){this.emit(e,t)}expandForSidePanel(e){this.containerRef?.expandForSidePanel&&this.containerRef.expandForSidePanel(e)}getConfig(){return this.config}getRegisteredEvents(){let e=new Set;return this.listeners.forEach((t,n)=>e.add(n)),this.onceListeners.forEach((t,n)=>e.add(n)),Array.from(e)}handleDragging(e){this._isDraggingOrResizing.value=!0,this._positionAndSize.value=e,this.emit(`dragging`,e)}handleDragStop(e){this._isDraggingOrResizing.value=!1,this._positionAndSize.value=e,this.emit(`drag-stop`,e)}handleNimbusClick(){this.emit(`nimbus-click`,{}),this.showPanel()}handlePopupClick(){this.emit(`popup-click`,{}),this.showPanel()}handlePopupShortcutClick(e){this.emit(`popup-shortcut-click`,{shortcut:e}),this.emit(`shortcut-click`,{shortcut:e,source:`popup`})}handleResizeStop(e){this._isDraggingOrResizing.value=!1,this._positionAndSize.value=e,this.emit(`resize-stop`,e)}handleResizing(e){this._isDraggingOrResizing.value=!0,this._positionAndSize.value=e,this.emit(`resizing`,e)}handleShortcutClick(e,t){this.emit(`shortcut-click`,{shortcut:e,source:t})}hasListeners(e){return this.listenerCount(e)>0}hidePanel(){this._panelVisible.value=!1,this.emit(`panel-hide`,{})}listenerCount(e){return(this.listeners.get(e)?.size??0)+(this.onceListeners.get(e)?.size??0)}minimizeNimbus(){this._nimbusMinimized.value=!0,this.emit(`nimbus-minimize`,{})}off(e,t){t?(this.listeners.get(e)?.delete(t),this.onceListeners.get(e)?.delete(t),this.debugMode&&console.debug(`[ComponentManager] Unsubscribed from "${e}", remaining: ${this.listenerCount(e)}`)):(this.listeners.delete(e),this.onceListeners.delete(e),this.debugMode&&console.debug(`[ComponentManager] Removed all listeners for "${e}"`))}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),this.debugMode&&console.debug(`[ComponentManager] Subscribed to "${e}", total: ${this.listenerCount(e)}`),()=>{this.off(e,t)}}once(e,t){return this.onceListeners.has(e)||this.onceListeners.set(e,new Set),this.onceListeners.get(e).add(t),this.debugMode&&console.debug(`[ComponentManager] Subscribed once to "${e}"`),()=>{this.onceListeners.get(e)?.delete(t)}}restoreNimbus(){this._nimbusMinimized.value=!1,this.emit(`nimbus-restore`,{})}setCompressed(e){this._isCompressed.value=e}setContainerRef(e){this.containerRef=e,e?.isCompressed&&(this._isCompressed.value=e.isCompressed.value)}setDebugMode(e){this.debugMode=e}setDraggingOrResizing(e){this._isDraggingOrResizing.value=e}showPanel(e){this._panelVisible.value=!0,this.emit(`panel-show`,{sessionCode:e})}toggleCompression(){this.containerRef?this.containerRef.toggleCompression():this._isCompressed.value=!this._isCompressed.value}toggleNimbus(){this._nimbusMinimized.value?this.restoreNimbus():this.minimizeNimbus()}togglePanel(){this._panelVisible.value?this.hidePanel():this.showPanel()}updatePosition(e,t){this._positionAndSize.value={...this._positionAndSize.value,x:e,y:t}}updatePositionAndSize(e,t,n,r){this._positionAndSize.value={x:e,y:t,width:n,height:r}}updateSize(e,t){this._positionAndSize.value={...this._positionAndSize.value,width:e,height:t}}};function DYt(e){return new EYt(e)}var OYt={"panel-show":`show`,"panel-hide":`close`,"panel-toggle":null,"nimbus-click":null,"nimbus-minimize":null,"nimbus-restore":null,"popup-click":null,"popup-shortcut-click":null,dragging:`dragging`,resizing:`resizing`,"drag-stop":`drag-stop`,"resize-stop":`resize-stop`,"compression-toggle":null,"side-panel-expand":null,"side-panel-collapse":null,"send-message":`send-message`,"receive-start":`receive-start`,"receive-text":`receive-text`,"receive-end":`receive-end`,"receive-error":null,stop:`stop`,"chat-regenerate":null,"chat-retry":null,"message-deleted":null,"messages-batch-deleted":null,"session-created":null,"session-switched":null,"session-deleted":null,"session-updated":null,"sessions-loaded":null,"session-initialized":`session-initialized`,"session-error":null,"shortcut-click":`shortcut-click`,"chat-error":null,"sdk-error":`sdk-error`,"new-chat":`new-chat`,"new-chat-created":`new-chat-created`,"history-click":`history-click`,"auto-generate-name":`auto-generate-name`,"help-click":`help-click`,rename:`rename`,share:`share`,close:`close`,"toggle-compression":null,"transfer-messages":`transfer-messages`,"share-messages":`share-messages`,"agent-info-loaded":null,error:null};function kYt(e,t){switch(e){case`send-message`:return[t.content];case`rename`:return[t.newName];case`history-click`:return[t.event];case`dragging`:case`resizing`:case`drag-stop`:case`resize-stop`:case`shortcut-click`:case`session-initialized`:case`sdk-error`:case`transfer-messages`:case`share-messages`:case`new-chat-created`:return[t];case`panel-show`:case`panel-hide`:case`receive-start`:case`receive-text`:case`receive-end`:case`stop`:case`new-chat`:case`auto-generate-name`:case`help-click`:case`share`:case`close`:return[];default:return[t]}}var AYt=class extends Error{constructor(){super(`[ChatBot] Initialization was superseded by a newer init`),this.name=`ChatBotInitStaleError`}};function jYt(e){let{props:t,emit:n,scrollToBottom:r}=e,i=cn(null),a=cn(null),o=cn(null),s=cn(null),l=sn(!1),u=sn(!t.chatHelper),d=sn(null),f=fi(()=>l.value),p=()=>t.chatHelper?!t.chatHelper.agent||!t.chatHelper.session||!t.chatHelper.message?{valid:!1,error:`[ChatBot] Invalid chatHelper: missing required modules (agent, session, message)`}:{valid:!0}:t.url?{valid:!0}:{valid:!1,error:`[ChatBot] Neither chatHelper nor url provided. Component requires at least one.`},m=()=>{let e=p();if(!e.valid)return console.error(e.error),d.value=Error(e.error),null;if(t.chatHelper)return t.chatHelper;let i=new Yd({onStart:()=>{n(`receive-start`)},onMessage:e=>{n(`receive-text`)},onDone:()=>{n(`receive-end`),r()},onError:e=>{n(`error`,e)}}),a=Gxe({requestData:qxe($xe(t.url),()=>un(t.requestOptions)),protocol:i});return i.injectMessageModule(a.message),a},h=async(e,t)=>{if(e)try{let n=e.session.current?.value?.sessionCode??``;await e.agent.stopChat(n),t&&e.agent.abortChat()}catch{}},g=0,_=null,v=null,y=null,b=e=>{y&&=(e?y.reject(e):y.resolve(),null),_=null},x=e=>{if(e!==g)throw new AYt},S=async e=>{let r=i.value,f=u.value;l.value=!1,d.value=null,u.value=!t.chatHelper,await h(r,f),x(e),i.value=null,a.value=null,o.value=null,s.value=null;let p=m();if(!p)throw d.value??Error(`[ChatBot] Failed to create chatHelper`);let g=new CYt(p.session,p.agent,null,{enableChatSession:!0,autoSwitchToInitialSession:!!t.sessionCode,loadRecentSessionOnMount:t.autoLoad,initialSessionCode:t.sessionCode,alwaysCreateNewSession:t.alwaysCreateNewSession}),_=new SYt(p.agent,p.message,p.session,null,{openingRemark:t.helloText,predefinedQuestions:t.prompts,placeholder:t.placeholder}),v=new TYt(null,t.shortcuts||[]);i.value=p,a.value=g,o.value=_,s.value=v;try{u.value&&(await Promise.all([p.agent.getAgentInfo(),p.session.getSessions()]),x(e),await g.loadRecentSession({skipLoadSessions:!0}),x(e)),x(e),l.value=!0,n(`agent-info-loaded`,p)}catch(t){throw x(e),console.error(`Failed to initialize ChatBot:`,t),d.value=t,n(`error`,t),t}},C=()=>{b(new AYt),v=null;let e=++g;_=new Promise((t,n)=>{y={resolve:t,reject:n},S(e).then(()=>{y&&=(v=Promise.resolve(),y.resolve(),null)}).catch(e=>{if(y){let t=e instanceof Error?e:Error(String(e));y.reject(t),y=null}}).finally(()=>{e===g&&(_=null)})}),_.catch(()=>{})};return Ln([()=>t.url,()=>t.chatHelper],()=>C(),{immediate:!0}),sr(()=>{b(),h(i.value,u.value)}),{chatHelper:i,isStandaloneMode:u,isInitialized:l,isReady:f,initError:d,whenReady:()=>l.value?(v||=Promise.resolve(),v):d.value?Promise.reject(d.value):_||Promise.resolve(),chatBusinessManager:o,sessionBusinessManager:a,shortcutManager:s}}function MYt(e){let{props:t,chatHelper:n,chatBusinessManager:r,sessionBusinessManager:i,shortcutManager:a,isStandaloneMode:o,isInitialized:s,selectedShortcut:l}=e,u=fi(()=>r.value?.isStopLoading.value?Mp.StopLoading:((t.chatHelper||n.value)?.agent)?.isChatting?.value?Mp.Streaming:Mp.Complete),d=fi(()=>u.value===Mp.Streaming?z9.Disabled:void 0),f=fi(()=>r.value?.messages.value??[]),p=fi(()=>r.value?.isMessagesLoading.value??!1);return{messageStatus:u,messageToolsStatus:d,messages:f,isMessagesLoading:p,isGenerating:fi(()=>r.value?.isGenerating.value??!1),currentSession:fi(()=>i.value?.currentSession.value??null),isWelcomeState:fi(()=>o.value&&!s.value?!1:!p.value&&f.value.length===0),openingRemark:fi(()=>n.value?.agent.info.value?.conversationSettings?.openingRemark||``),effectiveResources:fi(()=>t.resources?.length?t.resources:n.value?.agent.info.value?.resources??[]),effectivePrompts:fi(()=>t.prompts?.length?t.prompts:n.value?.agent.info.value?.conversationSettings?.predefinedQuestions??[]),effectiveSkills:fi(()=>t.skills?.length?t.skills:(n.value?.agent.info.value?.relatedSkills??[]).map(e=>({skill_name:e.skill_name,skill_code:e.skill_code,description:e.description,icon:e.icon}))),effectiveSupportUpload:fi(()=>l.value?.supportUpload?l.value.supportUpload.vision===!0:n.value?.agent.info.value?.promptSetting?.supportUpload?.vision===!0),chatbotStyle:fi(()=>({height:typeof t.height==`number`?`${t.height}px`:t.height,maxWidth:typeof t.maxWidth==`number`?`${t.maxWidth}px`:t.maxWidth})),filteredShortcuts:fi(()=>a.value?.shortcuts.value??[])}}var NYt=`others`,PYt={[Np.ApprovalCancel]:Hd.ApprovalCancel,[Np.FlowNodeRetry]:Hd.FlowNodeRetry,[Np.FlowNodeSkip]:Hd.FlowNodeSkip};function FYt(e){return`operation`in e}function IYt(e){return`interruptId`in e&&`reason`in e&&e.reason===kp.UserQuestion}function LYt(e){return e===`cancelled`?Jd.Cancelled:Jd.Resolved}function RYt(e){let t=e?.session.current?.value?.sessionCode;if(!t)throw Error(`[ChatBot] Cannot resume interrupt: no active session`);return t}function zYt(e){return{interruptId:e.interruptId,status:LYt(e.status),payload:e.payload}}function BYt(e,t,n){let r=e?.metadata?.questions?.[0]?.question??``;return{interruptId:n.interruptId,reason:kp.UserQuestion,status:`resolved`,payload:{answers:[{question:r,multiSelect:!1,answer:[{label:NYt,description:t}]}]}}}function VYt(e){let{chatHelper:t,emit:n}=e,r=async e=>{let n=t.value;if(!n)throw Error(`[ChatBot] Cannot resume interrupt: chatHelper not initialized`);if(!FYt(e))throw Error(`[ChatBot] Unsupported interrupt resume payload`);let r=RYt(n),i=PYt[e.operation],a=n.agent;if(e.operation===Np.ApprovalCancel){await a.userOperationStreamRequest(r,i,{interrupt_id:e.payload.interrupt_id});return}await a.userOperationStreamRequest(r,i,{node_id:e.payload.node_id,task_id:String(e.payload.task_id)})},i=async(e,n)=>{let r=t.value;if(!r)throw Error(`[ChatBot] Cannot resume interrupt: chatHelper not initialized`);let i=RYt(r);await r.agent.streamRequest({sessionCode:i,resume:zYt(e),...n?{input:n}:{}})};return{handleInterruptResume:async(e,t)=>{try{if(FYt(e)){await r(e);return}if(IYt(e)){await i(e);return}throw Error(`[ChatBot] Unsupported interrupt resume payload`)}catch(e){console.error(`[ChatBot] Failed to handle interrupt resume:`,e),n(`error`,e instanceof Error?e:Error(String(e)))}},resumeUserQuestionWithInput:async(e,t)=>{try{if(!t.payload||!IYt(t.payload))throw Error(`[ChatBot] Invalid user question resume options`);let n=typeof e==`string`?e.trim():``;if(!n)throw Error(`[ChatBot] User question free text input is empty`);await i(BYt(t.interrupt,n,t.payload),n)}catch(e){console.error(`[ChatBot] Failed to resume user question with input:`,e),n(`error`,e instanceof Error?e:Error(String(e)))}}}}function HYt(e){let{emit:t,chatHelper:n,chatBusinessManager:r,getRequestOptions:i,resumeUserQuestionWithInput:a,selectedShortcut:o,selectedResources:s}=e,l=cn([[]]),u=cn(``),d=(e,t)=>{l.value=e,s.value=t},f=async(e,a={})=>{if(!r.value||!n.value)throw Error(`[ChatBot] Cannot send message: chatBusinessManager not initialized`);let o=n.value.session.current?.value?.sessionCode;if(!o)throw Error(`[ChatBot] Cannot send message: no active session`);l.value=[[]],u.value=``,s.value=[],t(`send-message`,typeof e==`string`?e:``);let d=ef(a.property,i);await r.value.sendMessage(e,o,{...a,...d?{property:d}:{}})},p=async e=>{let t=n.value?.session.current?.value?.sessionCode;if(!t)throw Error(`[ChatBot] Cannot upload: no active session`);let r=await n.value.session.uploadFile(t,e);if(!r?.download_url)throw Error(`[ChatBot] Upload failed: no download URL returned`);return r},m=async(e,n,r)=>{try{if(r?.payload&&a){l.value=[[]],u.value=``,s.value=[],await a(e,r);return}let t={};u.value&&(t.cite=u.value),o.value&&(t.command=o.value.id),s.value.length&&(t.resources=s.value),await f(e,Object.keys(t).length?{property:{extra:t}}:{})}catch(e){console.error(`Failed to send message:`,e),t(`error`,e)}},h=async()=>{await g()},g=async()=>{if(!r.value){console.error(`[ChatBot] Cannot stop generation: chatBusinessManager not initialized`);return}await r.value.stopGeneration(),t(`stop`)};return{userInput:l,cite:u,handleUpdateModelValue:d,doSendMessage:f,handleSendMessage:m,handleUpload:p,handleStopSending:h,stopGeneration:g}}function UYt(e){let{emit:t,chatHelper:n,isStandaloneMode:r}=e,i=async e=>{if(!(!n.value||e.length===0))try{await eSe((await new wYt(n.value.message,n.value.session).shareMessages(e)).shareUrl),ud({message:`分享链接已复制到剪贴板`,theme:`success`})}catch(e){console.error(`[ChatBot] Failed to share messages:`,e),ud({message:`分享失败,请重试`,theme:`error`})}};return{handleConfirmShare:async e=>{r.value&&await i(e),t(`confirm-share`,e)}}}function WYt(e){let{props:t,emit:n,shortcutManager:r,doSendMessage:i,selectedShortcut:a}=e,o=fi(()=>r.value?.effectiveShortcuts.value??[]),s=(e,t)=>{let n=e,r;if(r=n.enable_fill_back&&n.fill_back_component_key?n.fill_back_component_key:n.components?.find(e=>e.fillBack)?.key,r&&t){let e=n.components?.map(e=>e.key===r?{...e,default:t}:{...e,default:e.default??void 0});a.value={...n,components:e,formModel:{...n.formModel,[r]:t}}}else a.value={...n,formModel:{...n.formModel}}},l=(e,t)=>{let n=e.components||[];return{extra:{cite:{type:`structured`,title:e.alias||e.name,data:n.map(e=>({key:e.name||e.key,value:String(t[e.key]??``)}))},command:e.id,context:n.map(e=>({[e.key]:t[e.key],context_type:e.type,__label:e.name||e.key,__key:e.key,__value:t[e.key]}))}}},u=e=>{let t=e.property?.extra;return t?.shortcut?t.shortcut:t?.command?o.value.find(e=>e.id===t.command)??null:null},d=(e,t)=>{s(e,t),n(`shortcut-click`,{shortcut:e,source:`main`})},f=()=>{a.value=null};return Ln(()=>t.shortcuts,e=>{r.value?.setShortcuts(e||[])},{immediate:!0}),Ln(()=>e.chatHelper.value?.agent.info.value?.conversationSettings?.commands,e=>{e&&r.value?.setAgentShortcuts(e)},{immediate:!0}),{effectiveShortcuts:o,selectShortcutWithText:s,buildShortcutProperty:l,getShortcutFromMessage:u,handleSelectShortcut:d,handleCloseShortcut:f,handleShortcutSubmit:async e=>{if(!a.value){console.error(`[ChatBot] No selected shortcut`);return}let t=l(a.value,e),r=a.value.name,o=a.value;f();try{await i(r,{property:t})}catch(e){a.value=o,console.error(`[ChatBot] Failed to submit shortcut:`,e),n(`error`,e)}},sendShortcutDirectly:async(e,t)=>{let r=e,a={...r.formModel},o=r.components||[];for(let e of o)e.key in a||(a[e.key]=e.default??``);let s;s=r.enable_fill_back&&r.fill_back_component_key?r.fill_back_component_key:o.find(e=>e.fillBack)?.key,s&&t&&(a[s]=t);let u=l(r,a),d=r.name;try{await i(d,{property:u})}catch(e){console.error(`[ChatBot] Failed to send shortcut directly:`,e),n(`error`,e)}}}}function GYt(e){let{emit:t,chatHelper:n,chatBusinessManager:r,cite:i,focusInput:a,scrollToBottom:o,getShortcutFromMessage:s,buildShortcutProperty:l,getRequestOptions:u}=e,d=async e=>{if(!r.value||!n.value){console.error(`[ChatBot] Cannot delete messages: chatBusinessManager not initialized`);return}try{let t=r.value.messages.value,i=tf(t,e[0]);if(!i){console.error(`[ChatBot] No user message found before AI messages`);return}let a=[i,...e];await n.value.message.deleteMessages(a)}catch(e){console.error(`[ChatBot] Failed to delete messages:`,e),t(`error`,e)}},f=async e=>{if(!r.value||!n.value){console.error(`[ChatBot] Cannot regenerate: chatBusinessManager not initialized`);return}let i=n.value.session.current?.value?.sessionCode;if(!i){console.error(`[ChatBot] Cannot regenerate: no active session`);return}try{await r.value.regenerateFromAIMessages(e,i),o()}catch(e){console.error(`[ChatBot] Failed to regenerate:`,e),t(`error`,e)}},p=async e=>{if(!r.value||!n.value){console.error(`[ChatBot] Cannot delete message: chatHelper not initialized`);return}try{let t=r.value.messages.value,i=t.findIndex(t=>t===e);if(i===-1){console.error(`[ChatBot] User message not found in messages list`);return}let a=[];for(let e=i+1;e<t.length;e++){let n=t[e];if(n.role===jp.User)break;a.push(n)}let o=[e,...a];await n.value.message.deleteMessages(o)}catch(e){console.error(`[ChatBot] Failed to delete user message:`,e),t(`error`,e)}};return{handleAgentAction:async(e,t)=>{if(e.id===`cite`){i.value=t.filter(e=>e.role!==jp.Reasoning).map(e=>typeof e.content==`string`?e.content:JSON.stringify(e.content||``)).join(`
3502
+ `)||``},null,8,[`content`])):(B(!0),V(Lr,{key:1},dr(Array.isArray(e.content)?e.content:[e.content],e=>(B(),Gr(y9,{key:e,content:e},null,8,[`content`]))),128))],512),[[wi,!n.value]])]))}}),CJt={class:`ai-key-value-content`},wJt={key:0,class:`ai-key-value-title`},TJt={class:`ai-key-value-content`},EJt={class:`item-key`},DJt={class:`item-value`},OJt=Qn({__name:`key-value-content`,props:{content:{},title:{}},setup(e){return(t,n)=>(B(),V(`div`,CJt,[e.title?(B(),V(`div`,wJt,[Yr(z(BEe)),Qr(` `+ke(e.title),1)])):$r(`v-if`,!0),H(`div`,TJt,[(B(!0),V(Lr,null,dr(e.content,e=>(B(),V(`div`,{key:e.key,class:`key-value-item`},[H(`div`,EJt,ke(e.key),1),n[0]||=Qr(` : `,-1),H(`div`,DJt,ke(e.value),1)]))),128))])]))}}),kJt={class:`ai-user-message`},AJt={key:0,class:`ai-user-message-binary-files`},jJt={key:1,class:`ai-user-message-content`},MJt={class:`user-edit-footer`},NJt=Qn({__name:`user-message`,props:{content:{},id:{},messageId:{},name:{},role:{},status:{},uid:{},property:{},onAction:{type:Function},tippyOptions:{},messageToolsStatus:{},onInputConfirm:{type:Function},onShortcutConfirm:{type:Function}},setup(e){let t=e,n=NDe(),{copy:r}=Up(),i=cn(!1),a=cn(``),o=$n(`chatInputRef`),s=fi(()=>{let e=t.property?.extra?.cite;if(!(!e||typeof e==`string`))return e.title}),l=fi(()=>{let e=t.property?.extra?.cite;return!e||typeof e==`string`?e:e.data}),u=fi(()=>{if(!t.property?.extra)return null;let{extra:e}=t.property,{shortcut:n,cite:r,context:i}=e||{};if(n)return n;if(r&&typeof r==`object`&&r.data?.length){let e=[];for(let t of r.data){let n=i?.find(e=>e.__label===t.key);n?.__key&&e.push({formItemProps:{label:n.__label,required:!!n.fillBack},props:{default:n.__value},key:n.__key,type:`textarea`})}return{components:e,name:r.title}}return null}),d=e=>!!e.url||vTe(e.mimeType||e.file?.type),f=fi(()=>Array.isArray(t.content)?t.content?.filter(e=>e.type===Ap.Binary):[]),p=fi(()=>f.value.filter(e=>d(e))),m=fi(()=>f.value.filter(e=>!d(e))),h=fi(()=>t.content?typeof t.content==`string`?t.content:t.content?.filter(e=>e.type===Ap.Text&&!!e.text?.trim()):``),g=async e=>{if(e.id===`edit`){if(typeof t.content==`string`&&(a.value=t.content,i.value=!0),typeof h.value==`string`&&(a.value=h.value,i.value=!0),Array.isArray(h.value)){let e=h.value.at(0);a.value=typeof e==`string`?e:e?.text||``,i.value=!0}f.value.length&&(i.value=!0)}else e.id===`copy`&&r(typeof t.content==`string`?t.content:JSON.stringify(t.content||``));await t.onAction?.(e)},_=async()=>{await o.value?.triggerSendMessage?.(),i.value=!1},v=()=>{i.value=!1},y=()=>{i.value=!1},b=async e=>{t.onShortcutConfirm?.(e),i.value=!1},x=async(e,n)=>{t.onInputConfirm?.(e,n),i.value=!1};return(t,r)=>(B(),V(`div`,kJt,[l.value&&typeof l.value==`string`?(B(),Gr(bWt,{key:0,class:`ai-user-message-cite`,content:l.value},null,8,[`content`])):$r(`v-if`,!0),$r(` 非编辑状态 `),i.value?(B(),V(Lr,{key:2},[$r(` 编辑状态 `),u.value?(B(),Gr(yDe,ri({key:0},u.value,{class:`user-shortcut-render`,onClose:y,onSubmit:b}),null,16)):(B(),Gr(TGt,{key:1,ref_key:`chatInputRef`,ref:o,modelValue:a.value,"onUpdate:modelValue":r[0]||=e=>a.value=e,class:`user-edit-input`,"default-upload-files":f.value,"on-send-message":x,"support-upload":z(n)?.supportUpload.value??!1},{"send-icon":jn(()=>[H(`div`,MJt,[Yr(z(iu),{size:`small`,onClick:v},{default:jn(()=>[Qr(ke(z(Dp)(`取消`)),1)]),_:1}),Yr(z(iu),{size:`small`,theme:`primary`,onClick:_},{default:jn(()=>[Qr(ke(z(Dp)(`发送`)),1)]),_:1})])]),_:1},8,[`modelValue`,`default-upload-files`,`support-upload`]))],64)):(B(),V(Lr,{key:1},[f.value.length?(B(),V(Lr,{key:0},[p.value.length?(B(),V(`div`,AJt,[Yr(ZWt,{files:p.value,readonly:!0},null,8,[`files`])])):$r(`v-if`,!0),(B(!0),V(Lr,null,dr(m.value,(e,t)=>(B(),V(`div`,{key:e.url??t,class:`ai-user-message-binary-files`},[Yr(ZWt,{files:[e],readonly:!0},null,8,[`files`])]))),128))],64)):$r(`v-if`,!0),(l.value||h.value).length?(B(),V(`div`,jJt,[Array.isArray(l.value)?(B(),V(Lr,{key:0},[$r(` property.extra.cite 是数组时,显示结构化内容 `),Yr(OJt,{content:l.value,title:s.value},null,8,[`content`,`title`])],64)):e.content?(B(),V(Lr,{key:1},[$r(` agui user message content 显示`),(B(!0),V(Lr,null,dr(Array.isArray(h.value)?h.value:[h.value],(e,t)=>(B(),V(Lr,{key:t},[typeof e==`string`?(B(),Gr(y9,{key:0,content:e},null,8,[`content`])):e.type===z(Ap).Text?(B(),Gr(y9,{key:1,content:e.text},null,8,[`content`])):$r(`v-if`,!0)],64))),128))],64)):$r(`v-if`,!0)])):$r(`v-if`,!0),e.messageToolsStatus===z(z9).Hidden?$r(`v-if`,!0):(B(),Gr(xKt,{key:2,class:`ai-user-message-tools`,"message-tools":z(YTe),"message-tools-status":e.messageToolsStatus,"on-action":g,"tippy-options":e.tippyOptions,"update-tools":[]},null,8,[`message-tools`,`message-tools-status`,`tippy-options`]))],64))]))}}),PJt=Qn({__name:`message-render`,props:{messageToolsStatus:{},onInputConfirm:{type:Function},onShortcutConfirm:{type:Function},onAction:{type:Function},tippyOptions:{},message:{},onInterruptResume:{type:Function}},setup(e){let t=e,n=_r(),r=fi(()=>{switch(t.message.role){case jp.User:return U(NJt,{...t.message,onAction:t.onAction,onInputConfirm:t.onInputConfirm,onShortcutConfirm:t.onShortcutConfirm,messageToolsStatus:t.messageToolsStatus,tippyOptions:t.tippyOptions});case jp.Assistant:return U(Qqt,t.message,{default:e=>pr(n,`default`,e,()=>[U(sUt,{content:t.message.content||``,status:t.message.status},n.codeHeader?{codeHeader:e=>n.codeHeader?.(e)}:void 0)])});case jp.Info:return U(eJt,t.message);case jp.Reasoning:return U(SJt,t.message);case jp.Tool:return U(Uqt,t.message);case jp.Activity:return U(Fqt,{...t.message,onInterruptResume:t.onInterruptResume});case jp.Interrupt:return U(hJt,{...t.message,onInterruptResume:t.onInterruptResume},n.answeredQuestion?{answeredQuestion:e=>n.answeredQuestion?.(e)}:void 0);case jp.Loading:return U(_Jt,t.message);default:return null}});return(e,t)=>(B(),Gr(lr(r.value)))}}),FJt=[`id`,`onMouseenter`,`onMouseleave`],IJt={class:`ai-message-fixed-bottom`},LJt=Qn({__name:`message-container`,props:yr({enableSelection:{type:Boolean,default:!1},messageGroups:{},messages:{},messageStatus:{},messageToolsStatus:{},messageToolsTippyOptions:{},onAgentAction:{},onAgentFeedback:{},onInterruptResume:{},onUserAction:{},renderMode:{},onUserInputConfirm:{},onUserShortcutConfirm:{}},{selectedUserMessages:{required:!1},selectedUserMessagesModifiers:{}}),emits:yr([`stopStreaming`],[`update:selectedUserMessages`]),setup(e){let t=e,n=Dr(e,`selectedUserMessages`),r=$n(`messageContainerRef`),i=$n(`messageContainerBottomRef`),{toScrollBottom:a,debouncedShowScrollBottomBtn:o}=wDe(r,i),{copy:s}=Up(),l=fi(()=>JTe.filter(e=>t.renderMode!==Pp.Test||e.id!==`share`)),u=fi(()=>t.renderMode===Pp.Share?t.messageGroups.filter(e=>e.type!==jp.Loading):t.messageGroups),d=e=>{e.messages?.at(-1)?.role!==jp.Interrupt&&(e.isHover=!0)},f=(e,t)=>{let n=t.toElement??t.relatedTarget;n instanceof Element&&n.classList.contains(`ai-user-feedback`)||(e.isHover=!1)},p=(e,r)=>{let i=e.type===jp.User;t.messageGroups?.forEach((n,a)=>{if(n===e){n.checked=r;let e=i?t.messageGroups.at(a+1):t.messageGroups.at(a-1);e&&(e.checked=r)}}),n.value=t.messageGroups?.filter(e=>e.checked).map(e=>e.messages).flat()},m=async(e,n)=>(e.id===`copy`&&s(n.filter(e=>e.role!==jp.Reasoning).map(e=>typeof e.content==`string`?e.content:JSON.stringify(e.content||``)).join(`
3503
+ `)),t.onAgentAction?.(e,n)),h=async(e,n)=>{t.onUserAction?.(e,n)},g=async(e,n,r)=>{t.onUserInputConfirm?.(e,n,r)},_=async(e,n)=>{t.onUserShortcutConfirm?.(e,n)};return(n,s)=>(B(),V(`div`,{ref_key:`messageContainerRef`,ref:r,class:`ai-message-container`},[(B(!0),V(Lr,null,dr(u.value,(r,i)=>(B(),V(`div`,{id:r.uid,key:i,class:`message-group`,style:ge({backgroundColor:r.checked?`#f5f7fa`:`transparent`}),onMouseenter:e=>d(r),onMouseleave:e=>f(r,e)},[pr(n.$slots,`group`,ri({ref_for:!0},{group:r}),()=>[e.enableSelection&&r.type!==z(jp).Loading?(B(),Gr(z(Su),{key:0,class:`message-group-checkbox`,"model-value":r.checked,"onUpdate:modelValue":e=>p(r,e)},null,8,[`model-value`,`onUpdate:modelValue`])):$r(`v-if`,!0),H(`div`,{class:xe([`message-group-messages`,{"message-group-enabled-selection":e.renderMode===z(Pp).Share||e.enableSelection&&r.type!==z(jp).Loading}]),style:ge({width:e.enableSelection&&r.type!==z(jp).Loading?`calc(100% - 16px)`:`100%`})},[(B(!0),V(Lr,null,dr(r.messages,(r,i)=>pr(n.$slots,`default`,ri({key:i,ref_for:!0},{message:r,messageToolsStatus:e.messageToolsStatus,onInterruptResume:t.onInterruptResume}),()=>[(B(),Gr(PJt,{key:i,message:r,"message-tools-status":e.messageToolsStatus,"on-action":e=>h(e,r),"on-input-confirm":(e,t)=>g(r,e,t),"on-interrupt-resume":t.onInterruptResume,"on-shortcut-confirm":e=>_(r,e),"tippy-options":e.messageToolsTippyOptions},fr({_:2},[n.$slots.answeredQuestion?{name:`answeredQuestion`,fn:jn(e=>[pr(n.$slots,`answeredQuestion`,ri({ref_for:!0},e))]),key:`0`}:void 0]),1032,[`message`,`message-tools-status`,`on-action`,`on-input-confirm`,`on-interrupt-resume`,`on-shortcut-confirm`,`tippy-options`]))])),128)),e.renderMode!==z(Pp).Share&&!(e.enableSelection&&r.type!==z(jp).Loading)&&!r.pause&&r.type===z(jp).Assistant&&e.messageToolsStatus!==z(z9).Hidden?(B(),Gr(xKt,{key:0,"message-tools":l.value,"message-tools-status":e.messageToolsStatus,"on-action":e=>m(e,r.messages),style:ge({visibility:r.isHover?`visible`:`hidden`}),"tippy-options":t.messageToolsTippyOptions,onFeedback:(e,n,i)=>t.onAgentFeedback?.(e,r.messages,n,i)},null,8,[`message-tools`,`message-tools-status`,`on-action`,`style`,`tippy-options`,`onFeedback`])):$r(`v-if`,!0)],6)])],44,FJt))),128)),H(`div`,{ref_key:`messageContainerBottomRef`,ref:i,class:`message-container-bottom`,tabindex:`0`},null,512),H(`div`,IJt,[Mn(Yr(QEe,{loading:e.messageStatus===z(Mp).StopLoading,title:e.messageStatus===z(Mp).StopLoading?z(Dp)(`正在停止`):z(Dp)(`停止生成`),onClick:s[0]||=e=>n.$emit(`stopStreaming`)},{icon:jn(()=>[Yr(z(EEe))]),_:1},8,[`loading`,`title`]),[[wi,e.renderMode!==z(Pp).Share&&(e.messageStatus===z(Mp).Streaming||e.messageStatus===z(Mp).StopLoading||e.messageStatus===z(Mp).Fetching||e.messageStatus===z(Mp).Pending)]]),Mn(Yr(QEe,{title:z(Dp)(`返回底部`),onClick:z(a)},{icon:jn(()=>[Yr(z(HEe))]),_:1},8,[`title`,`onClick`]),[[wi,z(o)]])])],512))}}),RJt={class:`execution-summary`},zJt={class:`execution-summary-header`},BJt={class:`execution-summary-content`},VJt=[`onMouseenter`],HJt={class:`content-item-header`},UJt={class:`content-item-title`},WJt={class:`content-item-messages`},GJt={key:0,class:`timeline-line`},KJt={key:1,class:`execution-summary-content-empty`},qJt={class:`execution-summary-content-empty-text`},JJt=Qn({__name:`execution-summary`,props:{messageGroups:{}},emits:[`locateMessageGroup`,`updateKeyword`],setup(e,{emit:t}){let n=t,r=Kp(),{keyword:i}=GDe(),a=cn(void 0),o=e=>{if(!e)return``;let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`},s=e=>{n(`locateMessageGroup`,e.uid,e)},l=()=>{i.value=``,n(`updateKeyword`,``)};return(t,u)=>(B(),V(`div`,RJt,[H(`div`,zJt,[Yr(z(hu),{modelValue:z(i),"onUpdate:modelValue":[u[0]||=e=>on(i)?i.value=e:null,u[1]||=e=>n(`updateKeyword`,e)],class:`execution-summary-header-input`,clearable:``,placeholder:z(Dp)(`搜索 关键字`)},null,8,[`modelValue`,`placeholder`])]),H(`div`,BJt,[e.messageGroups.length?(B(!0),V(Lr,{key:0},dr(e.messageGroups,(t,n)=>(B(),V(`div`,{key:t.uid,class:`execution-summary-content-item`,onMouseenter:e=>a.value=t.uid,onMouseleave:u[2]||=e=>a.value=void 0},[H(`div`,HJt,[u[3]||=H(`span`,{class:`timeline-dot`},null,-1),Mn((B(),V(`span`,UJt,[Qr(ke(typeof t.userMessageTitle==`number`?o(t.userMessageTitle):t.userMessageTitle),1)])),[[z(qp),{...z(r)}]]),Mn(Yr(z(iu),{class:`content-item-locate`,text:``,theme:`primary`,onClick:e=>s(t)},{default:jn(()=>[Qr(ke(z(Dp)(`在对话中定位`)),1)]),_:1},8,[`onClick`]),[[wi,a.value===t.uid]])]),H(`div`,WJt,[(B(!0),V(Lr,null,dr(t.messages,(e,t)=>(B(),Gr(PJt,{key:t,message:e},null,8,[`message`]))),128))]),n<e.messageGroups.length-1?(B(),V(`div`,GJt)):$r(`v-if`,!0)],40,VJt))),128)):(B(),V(`div`,KJt,[Yr(z(Zye),{class:`empty-exception`,type:`empty`}),H(`div`,qJt,[Qr(ke(z(i)?z(Dp)(`搜索结果为空`):z(Dp)(`暂无数据`))+` `,1),z(i)?(B(),Gr(z(iu),{key:0,text:``,theme:`primary`,onClick:l},{default:jn(()=>[Qr(ke(z(Dp)(`清空搜索`)),1)]),_:1})):$r(`v-if`,!0)])]))])]))}}),YJt={class:`ai-message-loading-row`},XJt={class:`ai-message-loading-icon-wrap`},ZJt={key:0,class:`ai-message-loading-text ai-message-loading-text-custom`},QJt={key:1,"aria-live":`polite`,class:`ai-message-loading-text`},$Jt=Qn({name:`MessageLoading`,inheritAttrs:!1,__name:`message-loading`,props:{duration:{default:1.8},gap:{default:8},iconSize:{default:32},stagger:{default:.135},text:{default:`加载中...`}},setup(e){let t=e,n=dte(),r=fi(()=>{let{class:e,style:t,...r}=n;return r}),i=fi(()=>({display:`block`,width:`${t.iconSize}px`,height:`${t.iconSize}px`})),a=fi(()=>[...t.text]),o=fi(()=>{let e=n.style,r={"--ai-message-loading-duration":`${t.duration}s`,"--ai-message-loading-stagger":`${t.stagger}s`,"--ai-message-loading-gap":`${t.gap}px`};return e&&typeof e==`object`&&!Array.isArray(e)?{...r,...e}:r});return(e,t)=>(B(),V(`div`,ri({class:[`ai-message-loading`,z(n).class],style:o.value},r.value),[H(`div`,YJt,[H(`span`,XJt,[pr(e.$slots,`icon`,{},()=>[Yr(z(rEe),{class:`ai-message-loading-icon-svg`,style:ge(i.value)},null,8,[`style`])])]),e.$slots.text?(B(),V(`span`,ZJt,[pr(e.$slots,`text`)])):(B(),V(`span`,QJt,[(B(!0),V(Lr,null,dr(a.value,(e,t)=>(B(),V(`span`,{key:`${t}-${e}`,class:`ai-message-loading-char`,style:ge({"--char-index":t})},ke(e),5))),128))]))])],16))}}),eYt={class:`ai-selection-footer`},tYt={class:`ai-selection-footer-left`},nYt={class:`select-all-text`},rYt={class:`ai-selection-footer-right`},iYt=Qn({__name:`selection-footer`,props:{isAllSelected:{type:Boolean},loading:{type:Boolean},selectedCount:{}},emits:[`cancel`,`confirm`,`toggle-all`],setup(e,{emit:t}){let n=t;return(t,r)=>(B(),V(`div`,eYt,[H(`div`,tYt,[Yr(z(Su),{"model-value":e.isAllSelected,"onUpdate:modelValue":r[0]||=e=>n(`toggle-all`,e)},null,8,[`model-value`]),H(`span`,nYt,ke(z(Dp)(`全选`)),1)]),H(`div`,rYt,[Yr(z(iu),{disabled:e.loading,onClick:r[1]||=e=>n(`cancel`)},{default:jn(()=>[Qr(ke(z(Dp)(`取消`)),1)]),_:1},8,[`disabled`]),Yr(z(iu),{disabled:e.selectedCount===0,loading:e.loading,theme:`primary`,onClick:r[2]||=e=>n(`confirm`)},{default:jn(()=>[Qr(ke(z(Dp)(`确定`)),1)]),_:1},8,[`disabled`,`loading`])])]))}}),aYt=[`data-ai-size`],oYt={key:0,class:`ai-chat-container-loading`},sYt={class:`screen-wrapper`},cYt={key:1,class:`ai-welcome-content`},lYt={class:`ai-welcome-title`},uYt={key:0,class:`ai-welcome-remark`},dYt=Qn({__name:`chat-container`,props:yr({chatLoading:{type:Boolean},commonTippyOptions:{},getSideRenderComponent:{},getSideTabRenderComponent:{},onCustomTabChange:{},openingRemark:{},placement:{default:`left`},resizeProps:{},size:{default:`small`},welcomeTitle:{},defaultUploadFiles:{},inputMaxHeight:{},messageStatus:{},modelValue:{},onSendMessage:{},onStopSending:{},onUpload:{},placeholder:{},prompts:{},resources:{},sendDisabledTip:{},shortcutId:{},shortcuts:{},skills:{},supportUpload:{type:Boolean},tippyOptions:{},messages:{},messageToolsStatus:{},onAgentAction:{},onAgentFeedback:{},onInterruptResume:{},onUserAction:{},renderMode:{},onUserInputConfirm:{},onUserShortcutConfirm:{}},{renderMode:{required:!1,default:Pp.Chat},renderModeModifiers:{},selectedShortcut:{required:!1},selectedShortcutModifiers:{},cite:{required:!1,default:``},citeModifiers:{}}),emits:yr([`selectShortcut`,`deleteShortcut`,`update:modelValue`,`stopStreaming`,`shortcutClose`,`shortcutSubmit`,`confirmShare`,`collapseChange`],[`update:renderMode`,`update:selectedShortcut`,`update:cite`]),setup(e,{expose:t,emit:n}){let r=pxe.TabPanel,i=e,a=Dr(e,`renderMode`),o=$n(`fullScreenRef`),{isFullScreen:s,enter:l,exit:u}=ADe(o);KDe({renderMode:a});let d=fi(()=>({collapsible:!1,immediate:!0,min:400,...i.resizeProps,placement:i.placement})),f=fi(()=>i.getSideRenderComponent?.(U,_.value.data?.props??{})??_.value.data?.component);MDe({size:fi(()=>i.size??`small`),supportUpload:fi(()=>i.supportUpload??!1)}),Ln(()=>i.size??`small`,e=>{typeof document<`u`&&(document.body.dataset.aiSize=e)},{immediate:!0});let p=Dr(e,`selectedShortcut`),m=Dr(e,`cite`),h=n;JDe({tippyOptions:fi(()=>i.commonTippyOptions??{})});let{tabs:g,selectedTab:_,isCollapse:v,addCustomTab:y,removeCustomTab:b,selectCustomTab:x,resetCustomTab:S}=ODe({onTabChange:async e=>{let t=_.value.data?.props||{loading:!0,data:{}};_.value.data={..._.value.data,props:t};let n=await i.onCustomTabChange?.(e);_.value.data={..._.value.data,props:{...t,loading:!1,data:n}}}}),C=cn(``),w=sn([]),T=cn(400),E=fi(()=>`calc(100% - ${T.value}px)`),{messageGroups:D,executionGroups:O,isShareMode:k,isAllSelected:A,onToggleShareAll:j,onCancelShare:M,onConfirmShare:N,pendingApprovalTipText:P,activeUserQuestionInterrupt:F}=VDe({keyword:C,messages:fi(()=>i.messages),renderMode:fi(()=>a.value),selectedUserMessages:w});Ln(v,e=>{e&&(C.value=``,T.value=0),h(`collapseChange`,e,T.value)}),Ln(()=>O.value,e=>{!e.length&&!C.value&&S()},{immediate:!0,deep:!1});let I=fi(()=>i.messageStatus===Mp.StopLoading?Mp.StopLoading:D.value?.some(e=>e.messages.some(e=>e.id===`__loading__`))?Mp.Fetching:i.messageStatus),L=()=>{p.value=null,h(`shortcutClose`)},R=e=>{h(`shortcutSubmit`,e)},ee=()=>{h(`deleteShortcut`)},te=e=>{h(`selectShortcut`,e)},ne=(e,t)=>{h(`update:modelValue`,e,t)},re=async(e,t)=>{let n=F.value;return i.onSendMessage?.(e,t,n?{payload:MGt(n),interrupt:n}:void 0)},ie=()=>{v.value=!v.value},ae=e=>{if(!e)return;let t=document.getElementById(e);if(!t){let t=D.value.find(t=>t.messages.some(t=>t.uid===e));t&&document.getElementById(t.uid)?.scrollIntoView({behavior:`smooth`});return}t.scrollIntoView({behavior:`smooth`})},oe=e=>{x(g.value.find(t=>t.name===e))},se=e=>{C.value=e},ce=async(e,t)=>{if(e.id===`share`){k.value=!0;return}return i.onAgentAction?.(e,t)},le=()=>{h(`confirmShare`,N()),En(()=>{k.value=!1,w.value=[]})},ue=e=>{T.value=e};return cr(()=>{S(),typeof document<`u`&&delete document.body.dataset.aiSize}),t({selectedTab:_,addCustomTab:y,removeCustomTab:b,selectCustomTab:x,enterShareMode:()=>{k.value=!0},exitShareMode:()=>{M()}}),(t,n)=>(B(),V(`div`,{class:`ai-chat-container`,"data-ai-size":e.size,style:ge({"--resize-main-width":E.value,borderTopColor:z(v)?`transparent`:`#eaebf0`})},[e.chatLoading?(B(),V(`div`,oYt,[Yr($Jt)])):(B(),Gr(z(Qbe),ri({key:1,class:[`ai-chat-container-resize-layout`,{"ai-is-collapse":z(v)||!C.value?.length&&z(O)?.length<1||a.value===z(Pp).Share}]},d.value,{onResizing:ue}),{aside:jn(()=>[!z(v)&&(z(O)?.length||C.value?.length)&&a.value!==z(Pp).Share?(B(),V(`div`,{key:0,ref_key:`fullScreenRef`,ref:o,class:`ai-full-screen-wrapper`},[Yr(z(pxe),{active:z(_).name,class:`ai-chat-container-tab`,"label-height":40,type:`unborder-card`,onChange:oe},{setting:jn(()=>[H(`div`,sYt,[Yr(Jp,{class:`screen-btn`,"tippy-options":{...e.commonTippyOptions,appendTo:z(s)?o.value:e.commonTippyOptions?.appendTo,content:z(s)?z(Dp)(`退出全屏`):z(Dp)(`全屏`)}},{default:jn(()=>[z(s)?(B(),Gr(z(WEe),{key:1,onClick:z(u)},null,8,[`onClick`])):(B(),Gr(z(UEe),{key:0,onClick:z(l)},null,8,[`onClick`]))]),_:1},8,[`tippy-options`])])]),default:jn(()=>[(B(!0),V(Lr,null,dr(z(g),t=>(B(),Gr(z(r),{key:t.name,class:`ai-chat-container-tab-panel`,label:()=>U(`div`,{class:`ai-execution-summary-label`,onVnodeMounted:e=>{z(_).name===t.name&&e.el?.scrollIntoView({behavior:`smooth`})}},e.getSideTabRenderComponent?.(U,t,{removeCustomTab:z(b)})??[U(t.name===z(`execution`)?z(mEe):z(hEe),{class:`ai-execution-summary-icon`}),Mn(U(`span`,{class:`ai-execution-summary-label-text`},t.label??``),[[z(qp),{...e.commonTippyOptions,text:t.label??``}]]),t.name===z(`execution`)?null:U(z(Bp),{class:`ai-execution-close-icon`,onClick:()=>{z(b)(t.name)}})]),name:t.name},null,8,[`label`,`name`]))),128))]),_:1},8,[`active`]),z(_)?.name===z(`execution`)?(B(),V(Lr,{key:0},[z(v)?$r(`v-if`,!0):(B(),Gr(JJt,{key:0,"message-groups":z(O),style:{height:`calc(100% - 40px)`},onLocateMessageGroup:ae,onUpdateKeyword:se},null,8,[`message-groups`]))],64)):$r(`v-if`,!0),z(_)?(B(),V(`div`,{key:z(_).name,class:`ai-chat-container-message-slot`},[(B(),Gr(lr(f.value),ri({key:z(_).name},z(_)?.data?.props),{locateButton:jn(()=>[Yr(z(iu),{class:`ai-locate-button`,size:`small`,text:``,theme:`primary`,onClick:n[0]||=e=>ae(z(_)?.data?.messageUid)},{default:jn(()=>[Qr(ke(z(Dp)(`在对话中定位`)),1)]),_:1})]),_:1},16))])):$r(`v-if`,!0)],512)):$r(`v-if`,!0),z(O)?.length&&a.value!==z(Pp).Share?(B(),V(`div`,{key:1,class:xe([`collapse-button`,{"is-right":e.placement===`right`,"is-collapsed":z(v)}]),onClick:ie},[Yr(z(zp))],2)):$r(`v-if`,!0)]),main:jn(()=>[e.messages?.length?pr(t.$slots,`default`,Se(ri({key:0},{messages:e.messages,messageStatus:e.messageStatus,messageGroups:z(D),selectedUserMessages:w.value,messageToolsStatus:e.messageToolsStatus,isShareMode:z(k),commonTippyOptions:e.commonTippyOptions,handleAgentAction:ce,onAgentFeedback:e.onAgentFeedback,onInterruptResume:e.onInterruptResume,onUserAction:e.onUserAction,onUserInputConfirm:e.onUserInputConfirm,onUserShortcutConfirm:e.onUserShortcutConfirm})),()=>[e.messages?.length?(B(),Gr(LJt,{key:0,"selected-user-messages":w.value,"onUpdate:selectedUserMessages":n[1]||=e=>w.value=e,"enable-selection":z(k),"message-groups":z(D),"message-status":I.value,"message-tools-status":e.messageToolsStatus,"message-tools-tippy-options":e.commonTippyOptions,messages:e.messages,"on-agent-action":ce,"on-agent-feedback":e.onAgentFeedback,"on-interrupt-resume":e.onInterruptResume,"on-user-action":e.onUserAction,"on-user-input-confirm":e.onUserInputConfirm,"on-user-shortcut-confirm":e.onUserShortcutConfirm,"render-mode":a.value,onStopStreaming:n[2]||=e=>h(`stopStreaming`)},{group:jn(({group:e})=>[pr(t.$slots,`group`,Se(Xr({group:e})))]),default:jn(({message:e,messageToolsStatus:n,onInterruptResume:r})=>[pr(t.$slots,`message`,Se(Xr({message:e,messageToolsStatus:n,onInterruptResume:r})))]),_:3},8,[`selected-user-messages`,`enable-selection`,`message-groups`,`message-status`,`message-tools-status`,`message-tools-tippy-options`,`messages`,`on-agent-feedback`,`on-interrupt-resume`,`on-user-action`,`on-user-input-confirm`,`on-user-shortcut-confirm`,`render-mode`])):$r(`v-if`,!0)]):(B(),V(`div`,cYt,[pr(t.$slots,`welcome`,Se(Xr({openingRemark:e.openingRemark,welcomeTitle:e.welcomeTitle})),()=>[Yr(z(iEe)),H(`h2`,lYt,ke(e.welcomeTitle??z(Dp)(`你好,我是小鲸`)),1),e.openingRemark?(B(),V(`div`,uYt,[Yr(sUt,{content:e.openingRemark},null,8,[`content`])])):$r(`v-if`,!0)])])),a.value===z(Pp).Share?$r(`v-if`,!0):(B(),V(Lr,{key:2},[z(k)?(B(),Gr(iYt,{key:0,"is-all-selected":z(A),loading:!1,"selected-count":w.value.length,onCancel:z(M),onConfirm:le,onToggleAll:z(j)},null,8,[`is-all-selected`,`selected-count`,`onCancel`,`onToggleAll`])):p.value?.components?.length?(B(),Gr(yDe,ri({key:1},p.value,{onClose:L,onSubmit:R}),null,16)):(B(),Gr(TGt,{key:2,cite:m.value,"onUpdate:cite":n[3]||=e=>m.value=e,"message-status":I.value,"model-value":e.modelValue,"on-send-message":re,"on-stop-sending":e.onStopSending,"on-upload":e.onUpload,placeholder:e.placeholder,prompts:e.prompts,resources:e.resources,"send-disabled-tip":z(P),"shortcut-id":p.value?.id,shortcuts:e.shortcuts,skills:e.skills,"support-upload":e.supportUpload,"tippy-options":e.commonTippyOptions,onDeleteShortcut:ee,onSelectShortcut:te,"onUpdate:modelValue":ne},{interrupt:jn(()=>[z(F)?(B(),Gr(z(aKt),{key:0,interrupt:z(F),"on-resume":e.onInterruptResume},{question:jn(({question:e,qIndex:n,answer:r,setAnswer:i,confirm:a})=>[pr(t.$slots,`interruptQuestion`,Se(Xr({question:e,qIndex:n,answer:r,setAnswer:i,confirm:a})))]),_:3},8,[`interrupt`,`on-resume`])):$r(`v-if`,!0),z(P)?(B(),Gr(OGt,{key:1,content:z(P)},null,8,[`content`])):$r(`v-if`,!0)]),_:3},8,[`cite`,`message-status`,`model-value`,`on-stop-sending`,`on-upload`,`placeholder`,`prompts`,`resources`,`send-disabled-tip`,`shortcut-id`,`shortcuts`,`skills`,`support-upload`,`tippy-options`]))],64))]),_:3},16,[`class`]))],12,aYt))}}),fYt=`data:image/png;base64,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`,pYt={class:`left-section`},mYt={class:`logo`},hYt=[`src`],gYt={key:0,class:`rename-tooltip`},_Yt={class:`rename-content`},vYt={key:0,class:`tippy-dropdown-menu`},yYt={key:1,class:`bkai-icon bkai-auto-refresh-line`},bYt={class:`right-section`},xYt=Fi(Qn({__name:`index`,props:{title:{default:``},agentName:{default:``},sessionName:{default:``},isCompressionHeight:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},showHistoryIcon:{type:Boolean,default:!0},showNewChatIcon:{type:Boolean,default:!0},showCompressionIcon:{type:Boolean,default:!0},showMoreIcon:{type:Boolean,default:!0},enableChatSession:{type:Boolean,default:!0},hasPermission:{type:Boolean,default:!0},chatGroup:{default:()=>({enabled:!1,staff:[],username:``})},hasSessionContents:{type:Boolean},autoGenerateLoading:{type:Boolean},dropdownMenuConfig:{default:()=>({showRename:!0,showAutoGenerate:!0,showShare:!1})},sessionBusinessManager:{default:void 0},renderMode:{default:Pp.Chat}},emits:[`close`,`toggle-compression`,`new-chat`,`history-click`,`auto-generate-name`,`help-click`,`rename`,`share`,`history-session-switch`,`history-session-delete`,`history-session-rename`,`new-chat-created`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=gxe,o=sn(null),s=sn(null),l=$n(`moreMenuTippyRef`),u=sn(!1),d=sn(``),f=sn(null),p=sn(!1),m=()=>document.querySelector(`.ai-blueking-panel`)||document.body,h=null,g=()=>{!s.value||!r.sessionBusinessManager||(h=rCe({triggerRef:s,sessionBusinessManager:r.sessionBusinessManager,onSessionSwitch:e=>i(`history-session-switch`,e),onSessionDelete:e=>i(`history-session-delete`,e),onSessionRename:(e,t)=>i(`history-session-rename`,e,t)}))},_=fi(()=>r.hasPermission?r.enableChatSession?r.title||`${r.agentName||``}-${r.sessionName||``}`:r.agentName:nf(`无智能体使用权限`)),v=fi(()=>r.isCompressionHeight?`bkai-morenchicun`:`bkai-yasuo`),y=fi(()=>r.isCompressionHeight?nf(`恢复默认尺寸`):nf(`缩小高度`)),b=fi(()=>r.hasPermission),x=e=>b.value?e:nf(`暂无使用权限`),S=()=>({cursor:b.value?`pointer`:`not-allowed`}),C=sn(!1),w=async()=>{if(!C.value){C.value=!0;try{if(r.sessionBusinessManager)try{let e=await r.sessionBusinessManager.createNewSession();e&&i(`new-chat-created`,{sessionCode:e.sessionCode,sessionName:e.sessionName,createdAt:e.createdAt})}catch(e){console.error(`Failed to create new session:`,e),ud({theme:`error`,message:nf(`创建会话失败`)})}i(`new-chat`)}finally{C.value=!1}}},T=e=>{e.stopPropagation(),r.sessionBusinessManager?(h||g(),h&&h.handleTriggerClick(e)):i(`history-click`,e)},E=()=>{i(`help-click`)},D=e=>{e.stopPropagation(),h&&h.isVisible()&&h.hide(),l.value&&(p.value?l.value.hide():l.value.show())},O=()=>{l.value?.hide(),j()},k=()=>{!r.hasSessionContents||r.autoGenerateLoading||i(`auto-generate-name`)},A=()=>{r.hasSessionContents&&(l.value?.hide(),i(`share`))},j=()=>{document.removeEventListener(`click`,F),d.value=r.sessionName||``,u.value=!0,setTimeout(()=>{document.addEventListener(`click`,F)},100),setTimeout(()=>{if(f.value)try{let e=f.value;e&&typeof e.focus==`function`&&e.focus();let t=e.$el?.querySelector(`input`);t&&typeof t.select==`function`&&t.select()}catch(e){console.warn(`Failed to focus rename input:`,e)}},100)},M=()=>{let e=d.value.trim();if(!e){N();return}i(`rename`,e),u.value=!1,d.value=``},N=()=>{u.value=!1,d.value=``},P=(e,t)=>{d.value=e,t.key===`Enter`?M():t.key===`Escape`&&N()},F=e=>{if(!u.value)return;let t=e.target,n=document.querySelector(`.rename-tooltip`);n&&!n.contains(t)&&N()};return Ln(()=>r.autoGenerateLoading,(e,t)=>{t&&!e&&p.value&&l.value?.hide()}),or(()=>{r.sessionBusinessManager&&g(),document.addEventListener(`click`,F)}),sr(()=>{h&&=(h.destroy(),null),document.removeEventListener(`click`,F)}),t({headerRef:o,historyIconRef:s}),(t,n)=>(B(),V(`div`,{ref_key:`headerRef`,ref:o,class:xe([`ai-header drag-handle`,{draggable:r.draggable}])},[H(`div`,pYt,[H(`div`,mYt,[H(`img`,{alt:`logo`,src:z(fYt)},null,8,hYt)]),H(`div`,{class:xe([`title`,{"title-with-tooltip":u.value}])},[Qr(ke(_.value)+` `,1),$r(` 重命名 tooltip 直接绑定在 title 上 `),u.value?(B(),V(`div`,gYt,[H(`div`,_Yt,[Yr(z(hu),{ref_key:`renameInputRef`,ref:f,modelValue:d.value,"onUpdate:modelValue":n[0]||=e=>d.value=e,class:`rename-input`,placeholder:z(nf)(`请输入新的会话名称`),onKeyup:P},null,8,[`modelValue`,`placeholder`]),H(`div`,{class:`rename-buttons`},[H(`i`,{class:`bkai-icon bkai-check-1 rename-btn confirm-btn`,onClick:M}),H(`i`,{class:`bkai-icon bkai-close rename-btn cancel-btn`,onClick:N})])])])):$r(`v-if`,!0)],2),$r(` 更多图标下拉菜单 - 使用 vue-tippy `),r.showMoreIcon&&b.value?(B(),Gr(z(bp),{key:0,ref_key:`moreMenuTippyRef`,ref:l,arrow:!1,"append-to":m,offset:[0,4],interactive:``,placement:`bottom-start`,theme:`ai-blueking-light more-menu-light light`,trigger:`manual`,onHidden:n[1]||=e=>p.value=!1,onShown:n[2]||=e=>p.value=!0},{content:jn(()=>[p.value?(B(),V(`div`,vYt,[r.dropdownMenuConfig?.showRename?(B(),V(`div`,{key:0,class:`tippy-menu-item`,onClick:O},[n[7]||=H(`i`,{class:`bkai-icon bkai-bianji`},null,-1),H(`span`,null,ke(z(nf)(`重命名`)),1)])):$r(`v-if`,!0),r.dropdownMenuConfig?.showAutoGenerate?Mn((B(),V(`div`,{key:1,class:xe([`tippy-menu-item`,{disabled:!r.hasSessionContents||r.autoGenerateLoading}]),onClick:k},[r.autoGenerateLoading?(B(),Gr(z(Xl),{key:0,mode:`spin`,size:`mini`,theme:`primary`})):(B(),V(`i`,yYt)),H(`span`,null,ke(z(nf)(`自动生成命名`)),1)],2)),[[z(xp),{content:r.hasSessionContents?``:z(nf)(`请先发起会话`),theme:`ai-blueking-tooltip`,arrow:!0,delay:[300,0],appendTo:m}]]):$r(`v-if`,!0),r.dropdownMenuConfig?.showShare&&r.renderMode!==z(Pp).Test?Mn((B(),V(`div`,{key:2,class:xe([`tippy-menu-item`,{disabled:!r.hasSessionContents}]),onClick:A},[n[8]||=H(`i`,{class:`bkai-icon bkai-fenxiang`},null,-1),H(`span`,null,ke(z(nf)(`分享会话`)),1)],2)),[[z(xp),{content:r.hasSessionContents?``:z(nf)(`请先发起会话`),theme:`ai-blueking-tooltip`,arrow:!0,delay:[300,0],appendTo:m}]]):$r(`v-if`,!0)])):$r(`v-if`,!0)]),default:jn(()=>[H(`span`,{class:`bkai-icon bkai-more`,onClick:D})]),_:1},512)):$r(`v-if`,!0)]),pr(t.$slots,`headerLeft`,{},void 0,!0),H(`div`,bYt,[$r(` 新增会话按钮 `),r.showNewChatIcon&&e.enableChatSession!==!1?Mn((B(),V(`i`,{key:0,class:xe([`bkai-icon`,`bkai-xinzengliaotian`,{disabled:!b.value||C.value}]),style:ge(S()),onClick:n[3]||=e=>b.value&&!C.value?w():void 0},null,6)),[[z(a),{content:C.value?z(nf)(`正在创建会话...`):x(z(nf)(`新增会话`)),boundary:`parent`}]]):$r(`v-if`,!0),$r(` 历史会话按钮 `),r.showHistoryIcon&&e.enableChatSession!==!1?Mn((B(),V(`i`,{key:1,ref_key:`historyIconRef`,ref:s,class:xe([`bkai-icon`,`bkai-history`,{disabled:!b.value}]),style:ge(S()),onClick:n[4]||=e=>b.value?T(e):void 0},null,6)),[[z(a),{content:x(z(nf)(`历史会话`)),boundary:`parent`}]]):$r(`v-if`,!0),e.chatGroup?.enabled?Mn((B(),V(`i`,{key:2,class:`bkai-icon bkai-zhushou`,onClick:E},null,512)),[[z(a),{content:z(nf)(`转人工`),boundary:`parent`}]]):$r(`v-if`,!0),r.showCompressionIcon?Mn((B(),V(`i`,{key:3,class:xe([`bkai-icon`,v.value]),onClick:n[5]||=e=>i(`toggle-compression`)},null,2)),[[z(a),{content:y.value,boundary:`parent`}]]):$r(`v-if`,!0),Mn(H(`i`,{class:`bkai-icon bkai-close-line-2`,onClick:n[6]||=e=>i(`close`)},null,512),[[z(a),{content:z(nf)(`关闭`),boundary:`parent`}]])])],2))}}),[[`__scopeId`,`data-v-de3b1a3b`]]),SYt=class{_isGenerating;_isStopLoading;agentModule;config;eventEmitter;messageModule;sessionModule;autoRenameSessionIfNeeded(e){let t=this.sessionModule;if(!t||this.messageModule.list.value.length!==1)return;let n=t.renameSession(e);n&&n.catch(e=>{console.error(`[ChatBusinessManager] Auto rename session failed:`,e)})}emit(e,t){this.eventEmitter?.emit(e,t)}constructor(e,t,n=null,r=null,i={}){this.agentModule=e,this.messageModule=t,this.sessionModule=n,this.eventEmitter=r,this.config=i,this._isGenerating=sn(!1),this._isStopLoading=sn(!1)}get isGenerating(){return this._isGenerating}get isStopLoading(){return this._isStopLoading}get isMessagesLoading(){return this.messageModule.isListLoading}get messages(){return this.messageModule.list}get openingRemark(){return this.config.openingRemark||``}get predefinedQuestions(){return this.config.predefinedQuestions||[]}async batchDeleteMessages(e){try{await this.messageModule.deleteMessages(e);let t=e.map(e=>e.id).filter(Boolean);this.emit(`messages-batch-deleted`,{messageIds:t})}catch(e){throw console.error(`Failed to batch delete messages:`,e),this.emit(`chat-error`,{action:`batch-delete-messages`,error:e}),e}}async deleteMessage(e){try{await this.messageModule.deleteMessages([e]),this.emit(`message-deleted`,{messageId:e.id})}catch(e){throw console.error(`Failed to delete message:`,e),this.emit(`chat-error`,{action:`delete-message`,error:e}),e}}handleStreamEnd(){this._isGenerating.value=!1,this.emit(`receive-end`,{})}handleStreamError(e){this._isGenerating.value=!1,this.emit(`receive-error`,{error:e})}handleStreamStart(){this._isGenerating.value=!0,this.emit(`receive-start`,{})}async regenerateFromAIMessages(e,t){try{if(!e||e.length===0)throw Error(`No AI messages provided`);let n=this.messages.value,r=tf(n,e[0]);if(!r)throw Error(`No user message found before AI messages`);let i=r.id;if(i===void 0)throw Error(`User message has no id`);await this.regenerateMessage(String(i),t)}catch(e){throw console.error(`Failed to regenerate from AI messages:`,e),this.emit(`chat-error`,{action:`regenerate`,error:e}),e}}async regenerateMessage(e,t){try{let n=this.messages.value,r=n.findIndex(t=>String(t.id)===e);if(r===-1)throw Error(`Message not found: ${e}`);let i=n[r];if(i.role!==zd.User)throw Error(`Can only regenerate from user messages`);let a=n.slice(r),o=typeof i.content==`string`?i.content:JSON.stringify(i.content),s=i.property;this._isGenerating.value=!0;let l=this.messageModule.deleteMessages(a);this.agentModule.chat(o,t,void 0,void 0,s),this.emit(`chat-regenerate`,{messageId:e}),l.catch(e=>{console.error(`[regenerateMessage] Delete API error:`,e)})}catch(e){throw console.error(`Failed to regenerate message:`,e),this._isGenerating.value=!1,this.emit(`chat-error`,{action:`regenerate`,error:e}),e}}async resendMessageWithProperty(e,t,n,r){try{let i=this.messages.value,a=i.findIndex(t=>String(t.id)===e);if(a===-1)throw Error(`Message not found: ${e}`);if(i[a].role!==zd.User)throw Error(`Can only resend user messages`);let o=i.slice(a);this._isGenerating.value=!0;let s=this.messageModule.deleteMessages(o);this.agentModule.chat(n,t,void 0,void 0,r),this.emit(`chat-resend`,{messageId:e}),s.catch(e=>{console.error(`[resendMessageWithProperty] Delete API error:`,e)})}catch(e){throw console.error(`Failed to resend message with property:`,e),this._isGenerating.value=!1,this.emit(`chat-error`,{action:`resend`,error:e}),e}}async retryMessage(e){try{console.warn(`retryMessage not implemented yet`),this.emit(`chat-retry`,{messageId:e})}catch(e){throw console.error(`Failed to retry message:`,e),this.emit(`chat-error`,{action:`retry`,error:e}),e}}async sendMessage(e,t,n={}){try{if(!t)throw Error(`No active session. Please create or select a session first.`);this._isGenerating.value=!0,this.emit(`send-message`,{content:e}),await this.agentModule.chat(e,t,void 0,void 0,n.property),this.autoRenameSessionIfNeeded(t)}catch(e){throw console.error(`Failed to send message:`,e),this._isGenerating.value=!1,this.emit(`chat-error`,{action:`send`,error:e}),e}}async stopGeneration(){let e=this.sessionModule?.current?.value?.sessionCode??``;this._isStopLoading.value=!0;try{await this.agentModule.stopChat(e),this._isGenerating.value=!1,this.emit(`stop`,{})}catch(e){console.error(`Failed to stop generation:`,e),this.emit(`chat-error`,{action:`stop`,error:e})}finally{this._isStopLoading.value=!1}}},CYt=class{agentModule;config;eventEmitter;sessionModule;emit(e,t){this.eventEmitter?.emit(e,t)}constructor(e,t=null,n=null,r={}){this.sessionModule=e,this.agentModule=t,this.eventEmitter=n,this.config=r}get currentSession(){return this.sessionModule.current}get isCreateLoading(){return this.sessionModule.isCreateLoading}get isCurrentLoading(){return this.sessionModule.isCurrentLoading}get isDeleteLoading(){return this.sessionModule.isDeleteLoading}get isListLoading(){return this.sessionModule.isListLoading}get isUpdateLoading(){return this.sessionModule.isUpdateLoading}get sessionList(){return this.sessionModule.list}async createNewSession(){return await this.createSession({name:`新会话`,sessionCode:`new_session_${Date.now()}`}),this.sessionModule.current.value}async createSession(e={}){if(this.config.enableChatSession===!1)throw Error(`Chat session is disabled`);try{let t={sessionName:e.name||`新会话`,sessionCode:e.sessionCode||`session_${Date.now()}`,isTemporary:e.isTemporary||!1,sessionProperty:{labels:e.labels}};await this.sessionModule.createSession(t);let n=this.agentModule?.info.value;n&&this.agentModule?.handleRole(n,t.sessionCode),this.emit(`session-created`,{session:this.sessionModule.current.value})}catch(e){throw console.error(`Failed to create session:`,e),this.emit(`session-error`,{action:`create`,error:e}),e}}async deleteSession(e){try{await this.sessionModule.deleteSession(e),this.emit(`session-deleted`,{sessionCode:e})}catch(e){throw console.error(`Failed to delete session:`,e),this.emit(`session-error`,{action:`delete`,error:e}),e}}async getSession(e){try{await this.sessionModule.getSession(e)}catch(e){throw console.error(`Failed to get session:`,e),this.emit(`session-error`,{action:`get`,error:e}),e}}async loadRecentSession(e){try{e?.skipLoadSessions||await this.loadSessions();let t=this.sessionList.value;if(this.config.initialSessionCode){await this.switchSession(this.config.initialSessionCode);return}if(t.length>0){let n=t[0],r=(n.sessionContentCount??0)>0,i=e?.alwaysCreateNewSession??this.config.alwaysCreateNewSession??!1;r||i?await this.createNewSession():await this.switchSession(n.sessionCode,{loadMessages:!1});return}await this.createNewSession()}catch(e){throw console.error(`Failed to load recent session:`,e),e}}async loadSessions(){try{await this.sessionModule.getSessions(),this.emit(`sessions-loaded`,{sessions:this.sessionList.value})}catch(e){throw console.error(`Failed to load sessions:`,e),this.emit(`session-error`,{action:`load`,error:e}),e}}async switchSession(e,t){try{await this.sessionModule.chooseSession(e,t),this.emit(`session-switched`,{session:this.sessionModule.current.value})}catch(e){throw console.error(`Failed to switch session:`,e),this.emit(`session-error`,{action:`switch`,error:e}),e}}async updateSessionName(e,t){try{let n=this.sessionList.value.find(t=>t.sessionCode===e);if(!n)throw Error(`Session not found: ${e}`);await this.sessionModule.updateSession({...n,sessionName:t}),this.emit(`session-updated`,{session:this.sessionModule.current.value})}catch(e){throw console.error(`Failed to update session name:`,e),this.emit(`session-error`,{action:`update`,error:e}),e}}},wYt=class{messageModule;sessionModule;constructor(e,t){this.messageModule=e,this.sessionModule=t}async shareMessages(e){if(e.length===0)throw Error(`No messages to share`);let t=this.sessionModule.current?.value?.sessionCode;if(!t)throw Error(`No active session`);let n=await this.messageModule.shareMessages(t,e);if(!n)throw Error(`Share failed: no result returned`);return{shareUrl:`${n.share_page}share-page/${n.share_token}`,userMessageIds:e.map(e=>String(e.id))}}},TYt=class{_agentShortcuts;_effectiveShortcuts;_propsShortcuts;eventEmitter;emit(e,t){this.eventEmitter?.emit(e,t)}constructor(e=null,t=[]){this._propsShortcuts=sn(t),this._agentShortcuts=sn([]),this.eventEmitter=e,this._effectiveShortcuts=fi(()=>this._propsShortcuts.value.length>0?this._propsShortcuts.value:this._agentShortcuts.value.length>0?this._agentShortcuts.value:[])}get count(){return this._effectiveShortcuts.value.length}get effectiveShortcuts(){return this._effectiveShortcuts}get hasShortcuts(){return this._effectiveShortcuts.value.length>0}get shortcuts(){return this._effectiveShortcuts}addShortcut(e){this._propsShortcuts.value.push(e)}clear(){this._propsShortcuts.value=[],this._agentShortcuts.value=[]}filterByTextLength(e,t){return!e||e.length>t?[]:this._effectiveShortcuts.value}filterShortcuts(e,t){return t?this._effectiveShortcuts.value.filter(n=>t(n,e)):this._effectiveShortcuts.value}getShortcutById(e){return this._effectiveShortcuts.value.find(t=>t.id===e)}handleShortcutClick(e,t,n=`main`){this.emit(`shortcut-click`,{shortcut:e,selectedText:t,source:n})}limitShortcuts(e){return this._effectiveShortcuts.value.slice(0,e)}removeShortcut(e){this._propsShortcuts.value=this._propsShortcuts.value.filter(t=>t.id!==e)}setAgentShortcuts(e){this._agentShortcuts.value=e}setShortcuts(e){this._propsShortcuts.value=e}},EYt=class{_isCompressed;_isDraggingOrResizing;_nimbusMinimized;_panelVisible;_positionAndSize;cleanupFunctions;config;containerRef=null;debugMode;listeners;onceListeners;constructor(e={}){this.config=e,this.listeners=new Map,this.onceListeners=new Map,this.debugMode=e.debug??!1,this.cleanupFunctions=[],this._panelVisible=sn(e.initialPanelVisible??!1),this._nimbusMinimized=sn(e.initialNimbusMinimized??!1),this._isDraggingOrResizing=sn(!1),this._isCompressed=sn(!1),this._positionAndSize=sn({x:0,y:0,width:400,height:window.innerHeight})}get container(){return{updatePosition:this.updatePosition.bind(this),updateSize:this.updateSize.bind(this),updatePositionAndSize:this.updatePositionAndSize.bind(this),toggleCompression:this.toggleCompression.bind(this),expandForSidePanel:this.expandForSidePanel.bind(this),collapseSidePanel:this.collapseSidePanel.bind(this),positionAndSize:fi(()=>this.containerRef?.positionAndSize?.value??this._positionAndSize.value),isCompressed:fi(()=>this._isCompressed.value),isSidePanelExpanded:fi(()=>this.containerRef?.isSidePanelExpanded?.value??!1)}}get isCompressed(){return this._isCompressed}get isDraggingOrResizing(){return this._isDraggingOrResizing}get nimbus(){return{minimize:this.minimizeNimbus.bind(this),restore:this.restoreNimbus.bind(this),toggle:this.toggleNimbus.bind(this),isMinimized:fi(()=>this._nimbusMinimized.value)}}get nimbusMinimized(){return this._nimbusMinimized}get panel(){return{show:this.showPanel.bind(this),hide:this.hidePanel.bind(this),toggle:this.togglePanel.bind(this),isVisible:fi(()=>this._panelVisible.value)}}get panelVisible(){return this._panelVisible}get state(){return{panelVisible:this._panelVisible,nimbusMinimized:this._nimbusMinimized,isDraggingOrResizing:this._isDraggingOrResizing,positionAndSize:this._positionAndSize}}collapseSidePanel(){this.containerRef?.collapseSidePanel&&this.containerRef.collapseSidePanel()}destroy(){this.listeners.clear(),this.onceListeners.clear(),this.cleanupFunctions.forEach(e=>e()),this.cleanupFunctions=[],this.debugMode&&console.debug(`[ComponentManager] Destroyed`)}emit(e,t){this.debugMode&&console.debug(`[ComponentManager] Emitting "${e}"`,t);let n=this.listeners.get(e);n&&n.forEach(n=>{try{n(t)}catch(t){console.error(`[ComponentManager] Error in listener for "${e}":`,t)}});let r=this.onceListeners.get(e);if(r&&r.size>0){let n=Array.from(r);this.onceListeners.delete(e),n.forEach(n=>{try{n(t)}catch(t){console.error(`[ComponentManager] Error in once listener for "${e}":`,t)}})}}emitInternal(e,t){this.emit(e,t)}expandForSidePanel(e){this.containerRef?.expandForSidePanel&&this.containerRef.expandForSidePanel(e)}getConfig(){return this.config}getRegisteredEvents(){let e=new Set;return this.listeners.forEach((t,n)=>e.add(n)),this.onceListeners.forEach((t,n)=>e.add(n)),Array.from(e)}handleDragging(e){this._isDraggingOrResizing.value=!0,this._positionAndSize.value=e,this.emit(`dragging`,e)}handleDragStop(e){this._isDraggingOrResizing.value=!1,this._positionAndSize.value=e,this.emit(`drag-stop`,e)}handleNimbusClick(){this.emit(`nimbus-click`,{}),this.showPanel()}handlePopupClick(){this.emit(`popup-click`,{}),this.showPanel()}handlePopupShortcutClick(e){this.emit(`popup-shortcut-click`,{shortcut:e}),this.emit(`shortcut-click`,{shortcut:e,source:`popup`})}handleResizeStop(e){this._isDraggingOrResizing.value=!1,this._positionAndSize.value=e,this.emit(`resize-stop`,e)}handleResizing(e){this._isDraggingOrResizing.value=!0,this._positionAndSize.value=e,this.emit(`resizing`,e)}handleShortcutClick(e,t){this.emit(`shortcut-click`,{shortcut:e,source:t})}hasListeners(e){return this.listenerCount(e)>0}hidePanel(){this._panelVisible.value=!1,this.emit(`panel-hide`,{})}listenerCount(e){return(this.listeners.get(e)?.size??0)+(this.onceListeners.get(e)?.size??0)}minimizeNimbus(){this._nimbusMinimized.value=!0,this.emit(`nimbus-minimize`,{})}off(e,t){t?(this.listeners.get(e)?.delete(t),this.onceListeners.get(e)?.delete(t),this.debugMode&&console.debug(`[ComponentManager] Unsubscribed from "${e}", remaining: ${this.listenerCount(e)}`)):(this.listeners.delete(e),this.onceListeners.delete(e),this.debugMode&&console.debug(`[ComponentManager] Removed all listeners for "${e}"`))}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),this.debugMode&&console.debug(`[ComponentManager] Subscribed to "${e}", total: ${this.listenerCount(e)}`),()=>{this.off(e,t)}}once(e,t){return this.onceListeners.has(e)||this.onceListeners.set(e,new Set),this.onceListeners.get(e).add(t),this.debugMode&&console.debug(`[ComponentManager] Subscribed once to "${e}"`),()=>{this.onceListeners.get(e)?.delete(t)}}restoreNimbus(){this._nimbusMinimized.value=!1,this.emit(`nimbus-restore`,{})}setCompressed(e){this._isCompressed.value=e}setContainerRef(e){this.containerRef=e,e?.isCompressed&&(this._isCompressed.value=e.isCompressed.value)}setDebugMode(e){this.debugMode=e}setDraggingOrResizing(e){this._isDraggingOrResizing.value=e}showPanel(e){this._panelVisible.value=!0,this.emit(`panel-show`,{sessionCode:e})}toggleCompression(){this.containerRef?this.containerRef.toggleCompression():this._isCompressed.value=!this._isCompressed.value}toggleNimbus(){this._nimbusMinimized.value?this.restoreNimbus():this.minimizeNimbus()}togglePanel(){this._panelVisible.value?this.hidePanel():this.showPanel()}updatePosition(e,t){this._positionAndSize.value={...this._positionAndSize.value,x:e,y:t}}updatePositionAndSize(e,t,n,r){this._positionAndSize.value={x:e,y:t,width:n,height:r}}updateSize(e,t){this._positionAndSize.value={...this._positionAndSize.value,width:e,height:t}}};function DYt(e){return new EYt(e)}var OYt={"panel-show":`show`,"panel-hide":`close`,"panel-toggle":null,"nimbus-click":null,"nimbus-minimize":null,"nimbus-restore":null,"popup-click":null,"popup-shortcut-click":null,dragging:`dragging`,resizing:`resizing`,"drag-stop":`drag-stop`,"resize-stop":`resize-stop`,"compression-toggle":null,"side-panel-expand":null,"side-panel-collapse":null,"send-message":`send-message`,"receive-start":`receive-start`,"receive-text":`receive-text`,"receive-end":`receive-end`,"receive-error":null,stop:`stop`,"chat-regenerate":null,"chat-retry":null,"message-deleted":null,"messages-batch-deleted":null,"session-created":null,"session-switched":null,"session-deleted":null,"session-updated":null,"sessions-loaded":null,"session-initialized":`session-initialized`,"session-error":null,"shortcut-click":`shortcut-click`,"chat-error":null,"sdk-error":`sdk-error`,"new-chat":`new-chat`,"new-chat-created":`new-chat-created`,"history-click":`history-click`,"auto-generate-name":`auto-generate-name`,"help-click":`help-click`,rename:`rename`,share:`share`,close:`close`,"toggle-compression":null,"transfer-messages":`transfer-messages`,"share-messages":`share-messages`,"agent-info-loaded":null,error:null};function kYt(e,t){switch(e){case`send-message`:return[t.content];case`rename`:return[t.newName];case`history-click`:return[t.event];case`dragging`:case`resizing`:case`drag-stop`:case`resize-stop`:case`shortcut-click`:case`session-initialized`:case`sdk-error`:case`transfer-messages`:case`share-messages`:case`new-chat-created`:return[t];case`panel-show`:case`panel-hide`:case`receive-start`:case`receive-text`:case`receive-end`:case`stop`:case`new-chat`:case`auto-generate-name`:case`help-click`:case`share`:case`close`:return[];default:return[t]}}var AYt=class extends Error{constructor(){super(`[ChatBot] Initialization was superseded by a newer init`),this.name=`ChatBotInitStaleError`}};function jYt(e){let{props:t,emit:n,scrollToBottom:r}=e,i=cn(null),a=cn(null),o=cn(null),s=cn(null),l=sn(!1),u=sn(!t.chatHelper),d=sn(null),f=fi(()=>l.value),p=()=>t.chatHelper?!t.chatHelper.agent||!t.chatHelper.session||!t.chatHelper.message?{valid:!1,error:`[ChatBot] Invalid chatHelper: missing required modules (agent, session, message)`}:{valid:!0}:t.url?{valid:!0}:{valid:!1,error:`[ChatBot] Neither chatHelper nor url provided. Component requires at least one.`},m=()=>{let e=p();if(!e.valid)return console.error(e.error),d.value=Error(e.error),null;if(t.chatHelper)return t.chatHelper;let i=new Yd({onStart:()=>{n(`receive-start`)},onMessage:e=>{n(`receive-text`)},onDone:()=>{n(`receive-end`),r()},onError:e=>{n(`error`,e)}}),a=Gxe({requestData:qxe($xe(t.url),()=>un(t.requestOptions)),protocol:i});return i.injectMessageModule(a.message),a},h=async(e,t)=>{if(e)try{let n=e.session.current?.value?.sessionCode??``;await e.agent.stopChat(n),t&&e.agent.abortChat()}catch{}},g=0,_=null,v=null,y=null,b=e=>{y&&=(e?y.reject(e):y.resolve(),null),_=null},x=e=>{if(e!==g)throw new AYt},S=async e=>{let r=i.value,f=u.value;l.value=!1,d.value=null,u.value=!t.chatHelper,await h(r,f),x(e),i.value=null,a.value=null,o.value=null,s.value=null;let p=m();if(!p)throw d.value??Error(`[ChatBot] Failed to create chatHelper`);let g=new CYt(p.session,p.agent,null,{enableChatSession:!0,autoSwitchToInitialSession:!!t.sessionCode,loadRecentSessionOnMount:t.autoLoad,initialSessionCode:t.sessionCode,alwaysCreateNewSession:t.alwaysCreateNewSession}),_=new SYt(p.agent,p.message,p.session,null,{openingRemark:t.helloText,predefinedQuestions:t.prompts,placeholder:t.placeholder}),v=new TYt(null,t.shortcuts||[]);i.value=p,a.value=g,o.value=_,s.value=v;try{u.value&&(await Promise.all([p.agent.getAgentInfo(),p.session.getSessions()]),x(e),await g.loadRecentSession({skipLoadSessions:!0}),x(e)),x(e),l.value=!0,n(`agent-info-loaded`,p)}catch(t){throw x(e),console.error(`Failed to initialize ChatBot:`,t),d.value=t,n(`error`,t),t}},C=()=>{b(new AYt),v=null;let e=++g;_=new Promise((t,n)=>{y={resolve:t,reject:n},S(e).then(()=>{y&&=(v=Promise.resolve(),y.resolve(),null)}).catch(e=>{if(y){let t=e instanceof Error?e:Error(String(e));y.reject(t),y=null}}).finally(()=>{e===g&&(_=null)})}),_.catch(()=>{})};return Ln([()=>t.url,()=>t.chatHelper],()=>C(),{immediate:!0}),sr(()=>{b(),h(i.value,u.value)}),{chatHelper:i,isStandaloneMode:u,isInitialized:l,isReady:f,initError:d,whenReady:()=>l.value?(v||=Promise.resolve(),v):d.value?Promise.reject(d.value):_||Promise.resolve(),chatBusinessManager:o,sessionBusinessManager:a,shortcutManager:s}}function MYt(e){let{props:t,chatHelper:n,chatBusinessManager:r,sessionBusinessManager:i,shortcutManager:a,isStandaloneMode:o,isInitialized:s,selectedShortcut:l}=e,u=fi(()=>r.value?.isStopLoading.value?Mp.StopLoading:((t.chatHelper||n.value)?.agent)?.isChatting?.value?Mp.Streaming:Mp.Complete),d=fi(()=>u.value===Mp.Streaming?z9.Disabled:void 0),f=fi(()=>r.value?.messages.value??[]),p=fi(()=>r.value?.isMessagesLoading.value??!1);return{messageStatus:u,messageToolsStatus:d,messages:f,isMessagesLoading:p,isGenerating:fi(()=>r.value?.isGenerating.value??!1),currentSession:fi(()=>i.value?.currentSession.value??null),isWelcomeState:fi(()=>o.value&&!s.value?!1:!p.value&&f.value.length===0),openingRemark:fi(()=>n.value?.agent.info.value?.conversationSettings?.openingRemark||``),effectiveResources:fi(()=>t.resources?.length?t.resources:n.value?.agent.info.value?.resources??[]),effectivePrompts:fi(()=>t.prompts?.length?t.prompts:n.value?.agent.info.value?.conversationSettings?.predefinedQuestions??[]),effectiveSkills:fi(()=>t.skills?.length?t.skills:(n.value?.agent.info.value?.relatedSkills??[]).map(e=>({skill_name:e.skill_name,skill_code:e.skill_code,description:e.description,icon:e.icon}))),effectiveSupportUpload:fi(()=>l.value?.supportUpload?l.value.supportUpload.vision===!0:n.value?.agent.info.value?.promptSetting?.supportUpload?.vision===!0),chatbotStyle:fi(()=>({height:typeof t.height==`number`?`${t.height}px`:t.height,maxWidth:typeof t.maxWidth==`number`?`${t.maxWidth}px`:t.maxWidth})),filteredShortcuts:fi(()=>a.value?.shortcuts.value??[])}}var NYt=`others`,PYt={[Np.ApprovalCancel]:Hd.ApprovalCancel,[Np.FlowNodeRetry]:Hd.FlowNodeRetry,[Np.FlowNodeSkip]:Hd.FlowNodeSkip};function FYt(e){return`operation`in e}function IYt(e){return`interruptId`in e&&`reason`in e&&e.reason===kp.UserQuestion}function LYt(e){return e===`cancelled`?Jd.Cancelled:Jd.Resolved}function RYt(e){let t=e?.session.current?.value?.sessionCode;if(!t)throw Error(`[ChatBot] Cannot resume interrupt: no active session`);return t}function zYt(e){return{interruptId:e.interruptId,status:LYt(e.status),payload:e.payload}}function BYt(e,t,n){let r=e?.metadata?.questions?.[0]?.question??``;return{interruptId:n.interruptId,reason:kp.UserQuestion,status:`resolved`,payload:{answers:[{question:r,multiSelect:!1,answer:[{label:NYt,description:t}]}]}}}function VYt(e){let{chatHelper:t,emit:n}=e,r=async e=>{let n=t.value;if(!n)throw Error(`[ChatBot] Cannot resume interrupt: chatHelper not initialized`);if(!FYt(e))throw Error(`[ChatBot] Unsupported interrupt resume payload`);let r=RYt(n),i=PYt[e.operation],a=n.agent;if(e.operation===Np.ApprovalCancel){await a.userOperationStreamRequest(r,i,{interrupt_id:e.payload.interrupt_id});return}await a.userOperationStreamRequest(r,i,{node_id:e.payload.node_id,task_id:String(e.payload.task_id)})},i=async(e,n)=>{let r=t.value;if(!r)throw Error(`[ChatBot] Cannot resume interrupt: chatHelper not initialized`);let i=RYt(r);await r.agent.streamRequest({sessionCode:i,resume:zYt(e),...n?{input:n}:{}})};return{handleInterruptResume:async(e,t)=>{try{if(FYt(e)){await r(e);return}if(IYt(e)){await i(e);return}throw Error(`[ChatBot] Unsupported interrupt resume payload`)}catch(e){console.error(`[ChatBot] Failed to handle interrupt resume:`,e),n(`error`,e instanceof Error?e:Error(String(e)))}},resumeUserQuestionWithInput:async(e,t)=>{try{if(!t.payload||!IYt(t.payload))throw Error(`[ChatBot] Invalid user question resume options`);let n=typeof e==`string`?e.trim():``;if(!n)throw Error(`[ChatBot] User question free text input is empty`);await i(BYt(t.interrupt,n,t.payload),n)}catch(e){console.error(`[ChatBot] Failed to resume user question with input:`,e),n(`error`,e instanceof Error?e:Error(String(e)))}}}}function HYt(e){let{emit:t,chatHelper:n,chatBusinessManager:r,getRequestOptions:i,resumeUserQuestionWithInput:a,selectedShortcut:o,selectedResources:s}=e,l=cn([[]]),u=cn(``),d=(e,t)=>{l.value=e,s.value=t},f=async(e,a={})=>{if(!r.value||!n.value)throw Error(`[ChatBot] Cannot send message: chatBusinessManager not initialized`);let o=n.value.session.current?.value?.sessionCode;if(!o)throw Error(`[ChatBot] Cannot send message: no active session`);l.value=[[]],u.value=``,s.value=[],t(`send-message`,typeof e==`string`?e:``);let d=ef(a.property,i);await r.value.sendMessage(e,o,{...a,...d?{property:d}:{}})},p=async e=>{let t=n.value?.session.current?.value?.sessionCode;if(!t)throw Error(`[ChatBot] Cannot upload: no active session`);let r=await n.value.session.uploadFile(t,e);if(!r?.download_url)throw Error(`[ChatBot] Upload failed: no download URL returned`);return r},m=async(e,n,r)=>{try{if(r?.payload&&a){l.value=[[]],u.value=``,s.value=[],await a(e,r);return}let t={};u.value&&(t.cite=u.value),o.value&&(t.command=o.value.id),s.value.length&&(t.resources=s.value),await f(e,Object.keys(t).length?{property:{extra:t}}:{})}catch(e){console.error(`Failed to send message:`,e),t(`error`,e)}},h=async()=>{await g()},g=async()=>{if(!r.value){console.error(`[ChatBot] Cannot stop generation: chatBusinessManager not initialized`);return}await r.value.stopGeneration(),t(`stop`)};return{userInput:l,cite:u,handleUpdateModelValue:d,doSendMessage:f,handleSendMessage:m,handleUpload:p,handleStopSending:h,stopGeneration:g}}function UYt(e){let{emit:t,chatHelper:n,isStandaloneMode:r}=e,i=async e=>{if(!(!n.value||e.length===0))try{await eSe((await new wYt(n.value.message,n.value.session).shareMessages(e)).shareUrl),ud({message:`分享链接已复制到剪贴板`,theme:`success`})}catch(e){console.error(`[ChatBot] Failed to share messages:`,e),ud({message:`分享失败,请重试`,theme:`error`})}};return{handleConfirmShare:async e=>{r.value&&await i(e),t(`confirm-share`,e)}}}function WYt(e){let{props:t,emit:n,shortcutManager:r,doSendMessage:i,selectedShortcut:a}=e,o=fi(()=>r.value?.effectiveShortcuts.value??[]),s=(e,t)=>{let n=e,r;if(r=n.enable_fill_back&&n.fill_back_component_key?n.fill_back_component_key:n.components?.find(e=>e.fillBack)?.key,r&&t){let e=n.components?.map(e=>e.key===r?{...e,default:t}:{...e,default:e.default??void 0});a.value={...n,components:e,formModel:{...n.formModel,[r]:t}}}else a.value={...n,formModel:{...n.formModel}}},l=(e,t)=>{let n=e.components||[];return{extra:{cite:{type:`structured`,title:e.alias||e.name,data:n.map(e=>({key:e.name||e.key,value:String(t[e.key]??``)}))},command:e.id,context:n.map(e=>({[e.key]:t[e.key],context_type:e.type,__label:e.name||e.key,__key:e.key,__value:t[e.key]}))}}},u=e=>{let t=e.property?.extra;return t?.shortcut?t.shortcut:t?.command?o.value.find(e=>e.id===t.command)??null:null},d=(e,t)=>{s(e,t),n(`shortcut-click`,{shortcut:e,source:`main`})},f=()=>{a.value=null};return Ln(()=>t.shortcuts,e=>{r.value?.setShortcuts(e||[])},{immediate:!0}),Ln(()=>e.chatHelper.value?.agent.info.value?.conversationSettings?.commands,e=>{e&&r.value?.setAgentShortcuts(e)},{immediate:!0}),{effectiveShortcuts:o,selectShortcutWithText:s,buildShortcutProperty:l,getShortcutFromMessage:u,handleSelectShortcut:d,handleCloseShortcut:f,handleShortcutSubmit:async e=>{if(!a.value){console.error(`[ChatBot] No selected shortcut`);return}let t=l(a.value,e),r=a.value.name,o=a.value;f();try{await i(r,{property:t})}catch(e){a.value=o,console.error(`[ChatBot] Failed to submit shortcut:`,e),n(`error`,e)}},sendShortcutDirectly:async(e,t)=>{let r=e,a={...r.formModel},o=r.components||[];for(let e of o)e.key in a||(a[e.key]=e.default??``);let s;s=r.enable_fill_back&&r.fill_back_component_key?r.fill_back_component_key:o.find(e=>e.fillBack)?.key,s&&t&&(a[s]=t);let u=l(r,a),d=r.name;try{await i(d,{property:u})}catch(e){console.error(`[ChatBot] Failed to send shortcut directly:`,e),n(`error`,e)}}}}function GYt(e){let{emit:t,chatHelper:n,chatBusinessManager:r,cite:i,focusInput:a,scrollToBottom:o,getShortcutFromMessage:s,buildShortcutProperty:l,getRequestOptions:u}=e,d=async e=>{if(!r.value||!n.value){console.error(`[ChatBot] Cannot delete messages: chatBusinessManager not initialized`);return}try{let t=r.value.messages.value,i=tf(t,e[0]);if(!i){console.error(`[ChatBot] No user message found before AI messages`);return}let a=[i,...e];await n.value.message.deleteMessages(a)}catch(e){console.error(`[ChatBot] Failed to delete messages:`,e),t(`error`,e)}},f=async e=>{if(!r.value||!n.value){console.error(`[ChatBot] Cannot regenerate: chatBusinessManager not initialized`);return}let i=n.value.session.current?.value?.sessionCode;if(!i){console.error(`[ChatBot] Cannot regenerate: no active session`);return}try{await r.value.regenerateFromAIMessages(e,i),o()}catch(e){console.error(`[ChatBot] Failed to regenerate:`,e),t(`error`,e)}},p=async e=>{if(!r.value||!n.value){console.error(`[ChatBot] Cannot delete message: chatHelper not initialized`);return}try{let t=r.value.messages.value,i=t.findIndex(t=>t===e);if(i===-1){console.error(`[ChatBot] User message not found in messages list`);return}let a=[];for(let e=i+1;e<t.length;e++){let n=t[e];if(n.role===jp.User)break;a.push(n)}let o=[e,...a];await n.value.message.deleteMessages(o)}catch(e){console.error(`[ChatBot] Failed to delete user message:`,e),t(`error`,e)}};return{handleAgentAction:async(e,t)=>{if(e.id===`cite`){i.value=t.filter(e=>e.role!==jp.Reasoning).map(e=>typeof e.content==`string`?e.content:JSON.stringify(e.content||``)).join(`
3504
3504
  `),a();return}if(e.id===`rebuild`){await f(t);return}if(e.id===`delete`){await d(t);return}if(e.id===`like`||e.id===`unlike`){let t=e.id===`like`?5:0;try{return await n.value?.session.getSessionFeedbackReasons(t)||[]}catch(e){return console.error(`[ChatBot] Failed to get feedback reasons:`,e),[]}}console.log(`handleAgentAction`,e,t)},handleAgentFeedback:async(e,i,a,o)=>{if(!n.value){console.error(`[ChatBot] Cannot submit feedback: chatHelper not initialized`);return}let s=n.value.session.current?.value?.sessionCode;if(!s){console.error(`[ChatBot] Cannot submit feedback: no active session`);return}let l=Xxe(r.value?.messages.value||[],i[0]);if(l===void 0){console.error(`[ChatBot] Cannot submit feedback: no user message found`);return}let u=e.id===`like`?5:0;try{await n.value.session.postSessionFeedback({sessionCode:s,sessionContentIds:[l],rate:u,labels:a,comment:o}),t(`feedback`,e,i[0],a,o)}catch(e){console.error(`[ChatBot] Failed to submit feedback:`,e),t(`error`,e)}},handleUserAction:async(e,t)=>{if(e.id===`delete`){await p(t);return}if(e.id===`cite`){i.value=typeof t.content==`string`?t.content:JSON.stringify(t.content||``),a();return}console.log(`handleUserAction`,e,t)},handleUserInputConfirm:async(e,i,a)=>{if(!n.value){console.error(`[ChatBot] Cannot edit message: chatHelper not initialized`);return}let s=n.value.session.current?.value?.sessionCode;if(!s){console.error(`[ChatBot] Cannot edit message: no active session`);return}let l=e.id;if(l===void 0){console.error(`[ChatBot] Cannot edit message: message has no id`);return}try{let t=e.property,n=ef(t,u);await r.value?.resendMessageWithProperty(String(l),s,typeof i==`string`?i:``,n),o()}catch(e){console.error(`[ChatBot] Failed to edit and resend message:`,e),t(`error`,e)}},handleUserShortcutConfirm:async(e,i)=>{if(!r.value||!n.value){console.error(`[ChatBot] Cannot edit shortcut message: chatHelper not initialized`);return}let a=n.value.session.current?.value?.sessionCode;if(!a){console.error(`[ChatBot] Cannot edit shortcut message: no active session`);return}let d=e.id;if(d===void 0){console.error(`[ChatBot] Cannot edit shortcut message: message has no id`);return}try{let t=s(e);if(!t){console.error(`[ChatBot] Cannot edit shortcut message: shortcut not found`);return}let n=ef(l(t,i),u),f=String(i.input??``);await r.value.resendMessageWithProperty(String(d),a,f,n),o()}catch(e){console.error(`[ChatBot] Failed to edit shortcut message:`,e),t(`error`,e)}},handleStopStreaming:async()=>{if(!r.value){console.error(`[ChatBot] Cannot stop generation: chatBusinessManager not initialized`);return}await r.value.stopGeneration(),t(`stop`)}}}var KYt=Qn({__name:`chat-bot`,props:{autoLoad:{type:Boolean,default:!0},alwaysCreateNewSession:{type:Boolean},chatHelper:{default:void 0},enableSelection:{type:Boolean,default:!1},renderMode:{default:Pp.Chat},extCls:{},height:{},helloText:{},useAgentName:{type:Boolean,default:!1},maxWidth:{},messageToolsTippyOptions:{},placeholder:{},prompts:{},requestOptions:{},resources:{default:()=>[]},sessionCode:{},shareLoading:{type:Boolean,default:!1},shortcuts:{default:()=>[]},skills:{},url:{default:``},placement:{default:`left`},resizeProps:{},getSideRenderComponent:{},getSideTabRenderComponent:{},onCustomTabChange:{}},emits:[`agent-info-loaded`,`cancel-share`,`confirm-share`,`error`,`execution-panel-change`,`feedback`,`receive-end`,`receive-start`,`receive-text`,`request-share`,`send-message`,`session-switched`,`shortcut-click`,`stop`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=_r(),o=sn(),s=sn(),l=sn(),u=cn([]),d=sn(null),f=fi({get:()=>r.renderMode??Pp.Chat,set:()=>{}}),p=async()=>{await En(),o.value&&(o.value.scrollTop=o.value.scrollHeight)},m=()=>{l.value?.focus?.()},{chatHelper:h,isStandaloneMode:g,isInitialized:_,isReady:v,initError:y,whenReady:b,chatBusinessManager:x,sessionBusinessManager:S,shortcutManager:C}=jYt({props:r,emit:i,scrollToBottom:p}),{handleInterruptResume:w,resumeUserQuestionWithInput:T}=VYt({chatHelper:h,emit:i}),{userInput:E,cite:D,handleUpdateModelValue:O,doSendMessage:k,handleSendMessage:A,handleUpload:j,handleStopSending:M,stopGeneration:N}=HYt({emit:i,chatHelper:h,chatBusinessManager:x,getRequestOptions:()=>r.requestOptions,resumeUserQuestionWithInput:T,selectedShortcut:d,selectedResources:u}),{handleSelectShortcut:P,handleCloseShortcut:F,handleShortcutSubmit:I,selectShortcutWithText:L,getShortcutFromMessage:R,buildShortcutProperty:ee,sendShortcutDirectly:te}=WYt({props:r,emit:i,chatHelper:h,shortcutManager:C,doSendMessage:k,selectedShortcut:d}),{messageStatus:ne,messageToolsStatus:re,messages:ie,isMessagesLoading:ae,isGenerating:oe,currentSession:se,isWelcomeState:ce,openingRemark:le,effectiveResources:ue,effectivePrompts:de,effectiveSkills:fe,effectiveSupportUpload:pe,chatbotStyle:me,filteredShortcuts:he}=MYt({props:r,chatHelper:h,chatBusinessManager:x,sessionBusinessManager:S,shortcutManager:C,isStandaloneMode:g,isInitialized:_,selectedShortcut:d}),{handleAgentAction:_e,handleAgentFeedback:ve,handleUserAction:ye,handleUserInputConfirm:be,handleUserShortcutConfirm:Ce,handleStopStreaming:we}=GYt({emit:i,chatHelper:h,chatBusinessManager:x,cite:D,focusInput:m,scrollToBottom:p,getShortcutFromMessage:R,buildShortcutProperty:ee,getRequestOptions:()=>r.requestOptions}),Te=fi(()=>!_.value||ae.value),Ee=fi(()=>{if(r.useAgentName)return h.value?.agent.info.value?.agentName||void 0}),{handleConfirmShare:De}=UYt({emit:i,chatHelper:h,isStandaloneMode:g}),Oe=e=>{i(`execution-panel-change`,e)},ke=async e=>{if(r.onCustomTabChange)return r.onCustomTabChange(e);let t=e.data?.props;if(t?.task_id!=null&&t?.node_id)return h.value?.message.getFlowAgentTaskNodeInfo(t.task_id,t.node_id)};return t({sendMessage:e=>A(e,[[]]),stopGeneration:N,switchSession:async e=>{if(!S.value){console.error(`[ChatBot] Cannot switch session: sessionBusinessManager not initialized`);return}try{await S.value.switchSession(e),i(`session-switched`,S.value.currentSession.value)}catch(e){console.error(`Failed to switch session:`,e),i(`error`,e)}},messages:ie,currentSession:se,isGenerating:oe,get isReady(){return v.value},whenReady:b,getChatHelper:()=>h.value,setCiteText:e=>{D.value=e},focusInput:m,enterShareMode:()=>s.value?.enterShareMode(),exitShareMode:()=>s.value?.exitShareMode(),selectShortcut:(e,t)=>{L(e,t)},sendShortcut:(e,t)=>te(e,t),updateAgentInfo:async()=>{let e=h.value;if(!e)return null;try{await e.agent.getAgentInfo();let t=e.agent.info.value??null;return t?.conversationSettings?.commands&&C.value?.setAgentShortcuts(t.conversationSettings.commands),t}catch(e){return console.error(`[ChatBot] Failed to update agentInfo:`,e),i(`error`,e instanceof Error?e:Error(String(e))),null}}}),(t,n)=>(B(),V(`div`,{class:xe([`ai-chatbot`,r.extCls,{"welcome-state":z(ce)}]),style:ge(z(me))},[Yr(z(dYt),{ref_key:`chatContainerRef`,ref:s,cite:z(D),"onUpdate:cite":n[0]||=e=>on(D)?D.value=e:null,"selected-shortcut":d.value,"onUpdate:selectedShortcut":n[1]||=e=>d.value=e,"render-mode":f.value,"onUpdate:renderMode":n[2]||=e=>f.value=e,"chat-loading":Te.value,"common-tippy-options":e.messageToolsTippyOptions,"message-status":z(ne),"message-tools-status":z(re),messages:z(ie),"model-value":z(E),"on-agent-action":z(_e),"on-agent-feedback":z(ve),"on-interrupt-resume":z(w),"get-side-render-component":r.getSideRenderComponent,"get-side-tab-render-component":r.getSideTabRenderComponent,"on-custom-tab-change":ke,"on-send-message":z(A),"on-stop-sending":z(M),"on-upload":z(j),"on-user-action":z(ye),"on-user-input-confirm":z(be),"on-user-shortcut-confirm":z(Ce),"opening-remark":z(le),placeholder:r.placeholder,placement:r.placement,"welcome-title":Ee.value,prompts:z(de),"resize-props":r.resizeProps,resources:z(ue),"shortcut-id":d.value?.id,shortcuts:z(he),skills:z(fe),"support-upload":z(pe),onCollapseChange:Oe,onConfirmShare:z(De),onDeleteShortcut:z(F),onSelectShortcut:z(P),onShortcutClose:z(F),onShortcutSubmit:z(I),onStopStreaming:z(we),"onUpdate:modelValue":z(O)},{message:jn(({message:n,messageToolsStatus:r,onInterruptResume:i})=>[$r(` 消费方提供了 #message slot 时,优先使用消费方的渲染 `),z(a).message?pr(t.$slots,`message`,{key:0,message:n,messageToolsStatus:r,onInterruptResume:i}):(B(),V(Lr,{key:1},[$r(` 否则使用默认的 MessageRender `),Yr(z(PJt),{message:n,"message-tools-status":r,"on-action":e=>z(ye)(e,n),"on-input-confirm":(e,t)=>z(be)(n,e,t),"on-interrupt-resume":i,"on-shortcut-confirm":e=>z(Ce)(n,e),"tippy-options":e.messageToolsTippyOptions},fr({_:2},[t.$slots.codeHeader?{name:`codeHeader`,fn:jn(e=>[pr(t.$slots,`codeHeader`,Se(Xr(e)))]),key:`0`}:void 0]),1032,[`message`,`message-tools-status`,`on-action`,`on-input-confirm`,`on-interrupt-resume`,`on-shortcut-confirm`,`tippy-options`])],2112))]),_:3},8,`cite.selected-shortcut.render-mode.chat-loading.common-tippy-options.message-status.message-tools-status.messages.model-value.on-agent-action.on-agent-feedback.on-interrupt-resume.get-side-render-component.get-side-tab-render-component.on-send-message.on-stop-sending.on-upload.on-user-action.on-user-input-confirm.on-user-shortcut-confirm.opening-remark.placeholder.placement.welcome-title.prompts.resize-props.resources.shortcut-id.shortcuts.skills.support-upload.onConfirmShare.onDeleteShortcut.onSelectShortcut.onShortcutClose.onShortcutSubmit.onStopStreaming.onUpdate:modelValue`.split(`.`))],6))}});function qYt(e,t){let{name:n,props:r,emitNames:i,exposeKeys:a,slots:o=[],deepWatchProps:s=[],methods:l={}}=t,u=Object.keys(r);return{name:n,render(e){return e(`div`,{style:{width:`100%`,height:`100%`}})},props:r,data(){return{app:null,componentInstance:null,unWatchStack:[]}},created(){let t=this.$emit.bind(this),n=this;n.app=Pi({setup(){return()=>{let r={};for(let e of u)r[e]=n[e];let a={};for(let e of o){let t=n.$scopedSlots?.[e];t!==void 0&&(a[e]=e=>t(e))}let s=Object.keys(a).length>0?a:void 0;return U(Cle,{prefix:XYt()},{default:()=>U(e,{...n.$attrs,...r,...YYt(t,i),ref:e=>{n.componentInstance=e}},s)})}}});for(let e of s)n.unWatchStack.push(n.$watch(e,()=>{n.app&&(n.app.unmount(),n.app.mount(n.$el))},{deep:!0}))},mounted(){let e=this;e.app?.mount(e.$el),e.$nextTick(()=>{let t=e.componentInstance;if(t)for(let n of a){let r=t[n];typeof r==`function`?e[n]=r.bind(t):e[n]=r}})},beforeDestroy(){let e=this;e.unWatchStack.forEach(e=>e?.()),e.unWatchStack=[],e.app&&=(e.app.unmount(),null),e.componentInstance=null},methods:l}}function JYt(e){return`on`+e.split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}function YYt(e,t){let n={};for(let r of t)n[JYt(r)]=(...t)=>{e(r,...t)};return n}function XYt(){return`ai-bk`}var K9=function(e){return e.ERROR=`error`,e.IDLE=`idle`,e.LOADING_AGENT=`loading_agent`,e.READY=`ready`,e}({});function ZYt(e){let{url:t,requestOptions:n,autoInit:r=!0,protocolCallbacks:i}=e,a=un(t);if(!a)throw Error(`[useChatBootstrap] url is required`);let o=sn(K9.IDLE),s=sn(null),l=sn(!1),u=new Map,d=new Yd({onStart:()=>{i?.onStart?.()},onMessage:e=>{i?.onMessage?.(e)},onDone:()=>{i?.onDone?.()},onError:e=>{i?.onError?.(e)}}),f=Gxe({requestData:qxe(a,n),protocol:d});d.injectMessageModule(f.message);let p=fi(()=>o.value===K9.LOADING_AGENT),m=fi(()=>o.value===K9.READY),h=fi(()=>f.agent.info.value??null),g=fi(()=>h.value?.agentName??``),_=fi(()=>f.session.current.value??null),v=fi(()=>f.session.list.value??[]),y=null,b=0,x=async e=>{s.value=null;try{if(o.value=K9.LOADING_AGENT,await Promise.all([f.agent.getAgentInfo(),f.session.getSessions()]),e!==b)return;o.value=K9.READY,l.value=!0}catch(t){if(e!==b)return;throw console.error(`[useChatBootstrap] Initialization failed:`,t),s.value=t,o.value=K9.ERROR,t}},S=async()=>{if(l.value)return;if(y)return y;let e=b;return y=x(e).finally(()=>{e===b&&(y=null)}),y},C=()=>{b+=1,o.value=K9.IDLE,s.value=null,l.value=!1,y=null},w=async()=>{C(),await S()},T=async e=>{C();let t=f.http;t?.updateConfig?t.updateConfig({urlPrefix:e}):console.warn(`[useChatBootstrap] chatHelper.http.updateConfig is not implemented yet, URL change may not take effect`),await S()};return Ln(()=>un(t),(e,t)=>{e&&e!==t&&t&&T(e).catch(()=>{})}),r&&Promise.resolve().then(()=>{S().catch(()=>{})}),{chatHelper:f,protocol:d,phase:o,isInitializing:p,isReady:m,error:s,agentInfo:h,agentName:g,currentSession:_,sessionList:v,initialize:S,retry:w,updateConfig:T,registerExtension:(e,t)=>{u.set(e,t)},getExtension:e=>u.get(e)}}function QYt(e){return{sendMessage:t=>e(`send-message`,{content:t}),receiveStart:()=>e(`receive-start`,{}),receiveText:()=>e(`receive-text`,{}),receiveEnd:()=>e(`receive-end`,{}),stop:()=>e(`stop`,{}),newChat:()=>e(`new-chat`,{}),newChatCreated:t=>e(`new-chat-created`,{session:t}),historyClick:t=>e(`history-click`,{event:t}),autoGenerateName:()=>e(`auto-generate-name`,{}),helpClick:()=>e(`help-click`,{}),rename:t=>e(`rename`,{newName:t}),share:()=>e(`share`,{}),transferMessages:t=>e(`transfer-messages`,{messageIds:t}),shareMessages:t=>e(`share-messages`,{messageIds:t})}}function $Yt(e){let{componentManager:t,emit:n,debug:r=!1}=e,i=[],a=()=>{for(let[e,a]of Object.entries(OYt)){if(a===null)continue;let o=t.on(e,t=>{let i=kYt(e,t);r&&console.debug(`[useEventBridge] ${e} -> ${a}`,i),n(a,...i)});i.push(o)}},o=(e,n)=>{r&&console.debug(`[useEventBridge] Forwarding to manager: ${e}`,n),t.emit(e,n)},s=(e,...t)=>{r&&console.debug(`[useEventBridge] Direct emit: ${e}`,t),n(e,...t)},l=()=>{i.forEach(e=>e()),i.length=0};return a(),cr(()=>{l()}),{forwardToManager:o,emitDirect:s,cleanup:l}}function eXt(e){let{props:t,emit:n}=e,r=sn(),i=sn(),a=fi(()=>$xe(t.url??``)),o=DYt({initialPanelVisible:!1,initialNimbusMinimized:t.defaultMinimize,enablePopup:t.enablePopup,enableNimbus:!t.hideNimbus,enableDraggable:t.draggable}),s=o.panelVisible,l=o.nimbusMinimized,{forwardToManager:u}=$Yt({componentManager:o,emit:n}),d=QYt(u),f=(e,t)=>{let n=t instanceof Error?t.message:String(t);console.error(`[AIBlueking] ${e} error:`,t),o.emitInternal(`sdk-error`,{apiName:e,code:-1,message:n,data:t})},p=e=>{f(`chat`,e)},{chatHelper:m,isReady:h,error:g,agentInfo:_,agentName:v,currentSession:y,initialize:b}=ZYt({url:a,requestOptions:()=>un(t.requestOptions),autoInit:!0,protocolCallbacks:{onStart:()=>{d.receiveStart()},onMessage:()=>{d.receiveText()},onDone:()=>{d.receiveEnd()},onError:e=>{f(`chat`,e)}}}),x=m,S=new CYt(x.session,x.agent,null,{enableChatSession:t.enableChatSession,initialSessionCode:t.initialSessionCode,alwaysCreateNewSession:t.alwaysCreateNewSession}),C=new wYt(x.message,x.session),w=new TYt(null,t.shortcuts||[]),T=null,E=()=>t.loadRecentSessionOnMount?(T||=S.loadRecentSession({skipLoadSessions:!0}).finally(()=>{T=null}),T):Promise.resolve(),D=async()=>{await b(),await E()},O={appendTo:e=>{let t=e.closest(`.draggable-container-content`);return console.log(`[ai-blueking] appendTo called, ref:`,e),console.log(`[ai-blueking] appendTo closest result:`,t),t??document.body}},k=fi(()=>o.isCompressed.value),A=fi(()=>v.value),j=fi(()=>x.message.list.value.length===0),M=fi(()=>t.resources?.length?t.resources:_.value?.resources??[]),N=fi(()=>t.prompts?.length?t.prompts:_.value?.conversationSettings?.predefinedQuestions??[]),P=fi(()=>(_.value?.relatedSkills??[]).map(e=>({skill_name:e.skill_name,skill_code:e.skill_code,description:e.description,icon:e.icon})));Ln(()=>g.value,e=>{e&&f(`init`,e)});let F=e=>{e.saasUrl&&fetch(e.saasUrl,{method:`GET`,credentials:`include`}).catch(()=>{}),e.conversationSettings?.commands&&w.setAgentShortcuts(e.conversationSettings.commands)},I=async()=>{try{await x.agent.getAgentInfo();let e=_.value;return e&&F(e),e}catch(e){return f(`getAgentInfo`,e),null}};Ln(()=>h.value,async e=>{if(e&&_.value&&(F(_.value),_.value.conversationSettings&&u(`session-initialized`,{openingRemark:_.value.conversationSettings.openingRemark||``,predefinedQuestions:_.value.conversationSettings.predefinedQuestions||[]}),t.loadRecentSessionOnMount))try{await E()}catch(e){console.error(`[AIBlueking] Failed to load recent session:`,e)}},{immediate:!0}),Ln(()=>t.shortcuts,e=>{w.setShortcuts(e||[])},{immediate:!0});let L=e=>{iSe(e)&&(e.preventDefault(),s.value?o.hidePanel():o.showPanel())};return or(async()=>{r.value&&o.setContainerRef(r.value),window.addEventListener(`keydown`,L)}),sr(()=>{window.removeEventListener(`keydown`,L),o.destroy()}),{chatHelper:x,componentManager:o,sessionBusinessManager:S,shareBusinessManager:C,shortcutManager:w,forwarders:d,forwardToManager:u,chatBotRef:i,draggableContainerRef:r,panelVisible:s,nimbusMinimized:l,normalizedUrl:a,agentInfo:_,agentName:A,currentSession:y,isCompressed:k,isWelcomeState:j,messageToolsTippyOptions:O,agentResources:M,agentPrompts:N,agentSkills:P,handleError:p,ensureSessionReady:D,updateAgentInfo:I}}function tXt(e){let{shortcutManager:t,chatBotRef:n,forwardToManager:r,show:i,props:a}=e,o=sn(!1),s=sn(``);return{aiSelectionVisible:o,selectedText:s,filteredPopupShortcuts:fi(()=>{let e=t.effectiveShortcuts.value;return typeof a.shortcutFilter==`function`&&s.value?e.filter(e=>a.shortcutFilter?.(e,s.value)):e}),handleSelectionChange:e=>{s.value=e},handleAiSelectionShortcut:async(e,t)=>{o.value=!1,await i(),n.value&&(e.components?.length?n.value.selectShortcut(e,t):(n.value.selectShortcut(e),n.value.setCiteText(t),n.value.focusInput())),r(`shortcut-click`,{shortcut:e,source:`popup`})}}}function nXt(e,t=!1){let n=window.innerHeight-48-40,r=window.innerWidth-48-16,i=sn(r),a=sn(n),o=sn(0),s=sn(t),l=sn(!1),u=sn(!1),d=0,f=e=>{e?i.value=window.innerWidth-12:i.value=r},p=(e,t)=>{a.value=t,o.value=t-n},m=()=>{En(()=>{a.value=window.innerHeight-48-40+o.value,s.value?i.value=window.innerWidth-12:i.value=window.innerWidth-48-16})};return or(()=>{window.addEventListener(`resize`,m),m()}),cr(()=>{window.removeEventListener(`resize`,m)}),{nimbusWidth:48,nimbusHeight:48,nimbusLeft:i,nimbusTop:a,isMinimize:s,isHovering:l,isDragging:u,handleNimbusDragging:p,handleNimbusMinimize:f,handleClick:()=>{if(u.value){u.value=!1;return}e(`click`)},handleMinimize:()=>{s.value=!s.value,e(`minimize`,s.value),s.value?i.value=window.innerWidth-12:i.value=window.innerWidth-60},handleDragging:(e,t)=>{i.value=e,a.value=t},handleMouseEnter:()=>{l.value=!0},handleMouseLeave:()=>{l.value=!1},handleMouseDown:()=>{d=Date.now(),u.value=!1},handleMouseUp:()=>{Date.now()-d>200&&(u.value=!0)}}}var rXt=420;function iXt(e){let{componentManager:t,chatBotRef:n,forwarders:r,forwardToManager:i,beforeNimbusClick:a,ensureSessionReady:o}=e,s=async e=>{t.showPanel(e),o&&await o(),e&&n.value&&await n.value.switchSession(e)},l=async e=>{await s(e)},u=()=>{t.hidePanel()};return{show:s,handleShow:l,hide:u,handleClose:()=>{u()},handleNimbusClick:async()=>{if(a&&await a()===!1){t.emit(`nimbus-click`,{});return}t.handleNimbusClick()},handleDragging:e=>{t.handleDragging(e)},handleResizing:e=>{t.handleResizing(e)},handleDragStop:e=>{t.handleDragStop(e)},handleResizeStop:e=>{t.handleResizeStop(e)},handleToggleCompression:()=>{t.container.toggleCompression()},handleCompressionChange:e=>{t.setCompressed(e)},handleExecutionPanelChange:e=>{e?t.collapseSidePanel():t.expandForSidePanel(rXt)},sendMessage:async e=>{n.value&&await n.value.sendMessage(e)},handleReceiveStart:()=>{r.receiveStart()},handleReceiveText:()=>{r.receiveText()},handleReceiveEnd:()=>{r.receiveEnd()},handleStop:()=>{r.stop()},stopGeneration:()=>{n.value&&n.value.stopGeneration()},updatePosition:(e,n)=>{t.container.updatePosition(e,n)},updateSize:(e,n)=>{t.container.updateSize(e,n)},updatePositionAndSize:(e,n,r,i)=>{t.container.updatePositionAndSize(e,n,r,i)},setCiteText:e=>{n.value&&n.value.setCiteText(e)},focusInput:()=>{n.value&&n.value.focusInput()},selectShortcut:(e,t)=>{n.value&&n.value.selectShortcut(e,t)},sendShortcut:(e,t)=>n.value?n.value.sendShortcut(e,t):Promise.resolve(),getChatHelper:()=>n.value?n.value.getChatHelper():null,handleShortcutClick:e=>{i(`shortcut-click`,e)}}}function aXt(e){let{chatHelper:t,sessionBusinessManager:n,chatBotRef:r,forwarders:i,handleError:a,currentSession:o}=e,s=sn(``),l=sn(!0),u=sn(!1),d=sn(!1),f=()=>t.message.list.value.some(e=>{if(!(`property`in e))return!0;let{property:t}=e;return!t?.extra?.pause});return Ln(()=>o.value,e=>{e&&(s.value=e.sessionName||``,u.value=(e.sessionContentCount??0)>0||f())},{immediate:!0}),Ln(()=>t.message.list.value.length,()=>{u.value=f()}),{sessionName:s,hasPermission:l,hasSessionContents:u,autoGenerateLoading:d,handleNewChat:async()=>{r.value?.exitShareMode(),i.newChat()},handleNewChatCreated:e=>{i.newChatCreated(e)},handleHistoryClick:e=>{i.historyClick(e)},handleHistorySessionSwitch:async e=>{r.value?.exitShareMode(),await n.switchSession(e)},handleHistorySessionDelete:async e=>{await n.deleteSession(e)},handleHistorySessionRename:async(e,t)=>{await n.updateSessionName(e,t)},handleAutoGenerateName:async()=>{let e=t.session.current?.value?.sessionCode;if(!e){console.error(`[AIBlueking] Cannot auto-generate name: no active session`);return}d.value=!0;try{await t.session.renameSession(e);let n=t.session.list.value.find(t=>t.sessionCode===e);n&&(s.value=n.sessionName||``)}catch(e){console.error(`[AIBlueking] Failed to auto-generate session name:`,e),a(e)}finally{d.value=!1}i.autoGenerateName()},handleHelpClick:()=>{i.helpClick()},handleRename:async e=>{let n=t.session.current?.value;if(!n){console.error(`[AIBlueking] Cannot rename: no active session`);return}try{await t.session.updateSession({...n,sessionName:e}),s.value=e}catch(e){console.error(`[AIBlueking] Failed to rename session:`,e),a(e)}i.rename(e)},handleSessionSwitched:e=>{e&&(s.value=e.sessionName||``,u.value=(e.sessionContentCount??0)>0||f())},addNewSession:async e=>{e?await n.createSession(e):await n.createNewSession()},switchToSession:async e=>{r.value&&await r.value.switchSession(e)},updateSessionName:async(e,t)=>{try{await n.updateSessionName(e,t),s.value=t}catch(e){console.error(`[AIBlueking] Failed to update session name:`,e),a(e)}}}}function oXt(e){let{shareBusinessManager:t,chatBotRef:n,forwarders:r,handleError:i}=e,a=sn(!1);return{isShareLoading:a,handleShare:()=>{n.value?.enterShareMode(),r.share()},handleCancelShare:()=>{n.value?.exitShareMode()},handleConfirmShare:async e=>{a.value=!0;try{let{shareUrl:i,userMessageIds:a}=await t.shareMessages(e);await eSe(i),ud({message:nf(`分享链接已复制到剪贴板`),theme:`success`}),n.value?.exitShareMode(),r.shareMessages(a)}catch(e){console.error(`[AIBlueking] Failed to share messages:`,e),i(e)}finally{a.value=!1}}}}function sXt(e={}){let t=sn([]),n=(n,r,i={})=>{try{let a=typeof n==`string`?document.querySelector(n):n;if(!a)return console.warn(`Tooltip target not found: ${n}`),null;let o=yf(a,{content:r,placement:`top`,arrow:!0,delay:[300,0],theme:`ai-blueking-tooltip`,...e,...i});return t.value.push(o),o}catch(e){return console.error(`Failed to create tooltip:`,e),null}},r=(e,t,r={})=>{let i=document.querySelectorAll(e),a=[];return i.forEach(e=>{let i=n(e,t,r);i&&a.push(i)}),a},i=e=>{let t=[];return e.forEach(({element:e,content:r,options:i})=>{let a=n(e,r,i);a&&t.push(a)}),t},a=()=>{t.value.forEach(e=>{e.destroy()}),t.value=[]};return sr(()=>{a()}),{instances:t,createTooltip:n,createTooltipsForSelector:r,createMultipleTooltips:i,destroyAll:a,updateContent:(e,t)=>{e.setContent(t)},destroyInstance:e=>{e.destroy()}}}var cXt={url:``,title:``,extCls:``,hideNimbus:!1,hideHeader:!1,enablePopup:!0,draggable:!0,enableChatSession:!0,renderMode:Pp.Chat,defaultWidth:400,defaultHeight:void 0,defaultTop:0,defaultLeft:void 0,maxWidth:1e3,miniPadding:0,nimbusSize:`normal`,defaultMinimize:!1,shortcuts:()=>[],shortcutLimit:3,shortcutFilter:void 0,hideDefaultTrigger:!1,requestOptions:()=>({}),teleportTo:`body`,placeholder:void 0,helloText:nf(`你好,我是小鲸`),useAgentName:!1,disabledInput:!1,showHistoryIcon:!0,showNewChatIcon:!0,showCompressionIcon:!0,showMoreIcon:!0,initialSessionCode:``,autoSwitchToInitialSession:!1,alwaysCreateNewSession:!1,loadRecentSessionOnMount:!0,prompts:()=>[],dropdownMenuConfig:()=>({showRename:!0,showAutoGenerate:!0,showShare:!0}),defaultChatInputPosition:void 0};function lXt(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Function]`}function q9(e,t,n,r=1){let[i,a]=typeof r==`number`?[r,r]:r;return[Math.round(t/i/e[0])*e[0],Math.round(n/a/e[1])*e[1]]}function uXt(e,t,n){return e-t-n}function dXt(e,t,n){return e-t-n}function J9(e,t,n){return t!==null&&e<t?t:n!==null&&n<e?n:e}function fXt(e,t,n){let r=e,i=[`matches`,`webkitMatchesSelector`,`mozMatchesSelector`,`msMatchesSelector`,`oMatchesSelector`].find(e=>lXt(r[e]));if(!lXt(r[i]))return!1;do{if(r[i](t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function pXt(e){let t=window.getComputedStyle(e);return[parseFloat(t.getPropertyValue(`width`),10),parseFloat(t.getPropertyValue(`height`),10)]}function Y9(e,t,n){e&&(e.attachEvent?e.attachEvent(`on`+t,n):e.addEventListener?e.addEventListener(t,n,!0):e[`on`+t]=n)}function X9(e,t,n){e&&(e.detachEvent?e.detachEvent(`on`+t,n):e.removeEventListener?e.removeEventListener(t,n,!0):e[`on`+t]=null)}var mXt=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Z9={mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`},touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`}},hXt={userSelect:`none`,MozUserSelect:`none`,WebkitUserSelect:`none`,MsUserSelect:`none`},gXt={userSelect:`auto`,MozUserSelect:`auto`,WebkitUserSelect:`auto`,MsUserSelect:`auto`},Q9=Z9.mouse,_Xt={replace:!0,name:`vue-draggable-resizable`,props:{className:{type:String,default:`vdr`},classNameDraggable:{type:String,default:`draggable`},classNameResizable:{type:String,default:`resizable`},classNameDragging:{type:String,default:`dragging`},classNameResizing:{type:String,default:`resizing`},classNameActive:{type:String,default:`active`},classNameHandle:{type:String,default:`handle`},disableUserSelect:{type:Boolean,default:!0},enableNativeDrag:{type:Boolean,default:!1},preventDeactivation:{type:Boolean,default:!1},active:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},lockAspectRatio:{type:Boolean,default:!1},w:{type:[Number,String],default:200,validator:e=>typeof e==`number`?e>0:e===`auto`},h:{type:[Number,String],default:200,validator:e=>typeof e==`number`?e>0:e===`auto`},minWidth:{type:Number,default:0,validator:e=>e>=0},minHeight:{type:Number,default:0,validator:e=>e>=0},maxWidth:{type:Number,default:null,validator:e=>e>=0},maxHeight:{type:Number,default:null,validator:e=>e>=0},x:{type:Number,default:0},y:{type:Number,default:0},z:{type:[String,Number],default:`auto`,validator:e=>typeof e==`string`?e===`auto`:e>=0},handles:{type:Array,default:()=>[`tl`,`tm`,`tr`,`mr`,`br`,`bm`,`bl`,`ml`],validator:e=>{let t=new Set([`tl`,`tm`,`tr`,`mr`,`br`,`bm`,`bl`,`ml`]);return new Set(e.filter(e=>t.has(e))).size===e.length}},dragHandle:{type:String,default:null},dragCancel:{type:String,default:null},axis:{type:String,default:`both`,validator:e=>[`x`,`y`,`both`].includes(e)},grid:{type:Array,default:()=>[1,1]},parent:{type:Boolean,default:!1},scale:{type:[Number,Array],default:1,validator:e=>typeof e==`number`?e>0:e.length===2&&e[0]>0&&e[1]>0},onDragStart:{type:Function,default:()=>!0},onDrag:{type:Function,default:()=>!0},onResizeStart:{type:Function,default:()=>!0},onResize:{type:Function,default:()=>!0}},data:function(){return{left:this.x,top:this.y,right:null,bottom:null,width:null,height:null,widthTouched:!1,heightTouched:!1,aspectFactor:null,parentWidth:null,parentHeight:null,handle:null,enabled:this.active,resizing:!1,dragging:!1,dragEnable:!1,resizeEnable:!1,zIndex:this.z}},created:function(){this.maxWidth&&this.minWidth>this.maxWidth&&console.warn(`[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth`),this.maxHeight&&this.minHeight>this.maxHeight&&console.warn(`[Vdr warn]: Invalid prop: minHeight cannot be greater than maxHeight`),this.resetBoundsAndMouseState()},mounted:function(){this.enableNativeDrag||(this.$el.ondragstart=()=>!1);let[e,t]=this.getParentSize();this.parentWidth=e,this.parentHeight=t;let[n,r]=pXt(this.$el);this.aspectFactor=(this.w===`auto`?n:this.w)/(this.h===`auto`?r:this.h),this.width=this.w===`auto`?n:this.w,this.height=this.h===`auto`?r:this.h,this.right=this.parentWidth-this.width-this.left,this.bottom=this.parentHeight-this.height-this.top,this.active&&this.$emit(`activated`),Y9(document.documentElement,`mousedown`,this.deselect),Y9(document.documentElement,`touchend touchcancel`,this.deselect),Y9(window,`resize`,this.checkParentSize)},beforeUnmount:function(){X9(document.documentElement,`mousedown`,this.deselect),X9(document.documentElement,`touchstart`,this.handleUp),X9(document.documentElement,`mousemove`,this.move),X9(document.documentElement,`touchmove`,this.move),X9(document.documentElement,`mouseup`,this.handleUp),X9(document.documentElement,`touchend touchcancel`,this.deselect),X9(window,`resize`,this.checkParentSize)},methods:{resetBoundsAndMouseState(){this.mouseClickPosition={mouseX:0,mouseY:0,x:0,y:0,w:0,h:0},this.bounds={minLeft:null,maxLeft:null,minRight:null,maxRight:null,minTop:null,maxTop:null,minBottom:null,maxBottom:null}},checkParentSize(){if(this.parent){let[e,t]=this.getParentSize();this.parentWidth=e,this.parentHeight=t,this.right=this.parentWidth-this.width-this.left,this.bottom=this.parentHeight-this.height-this.top}},getParentSize(){if(this.parent){let e=window.getComputedStyle(this.$el.parentNode,null);return[parseInt(e.getPropertyValue(`width`),10),parseInt(e.getPropertyValue(`height`),10)]}return[null,null]},elementTouchDown(e){Q9=Z9.touch,this.elementDown(e)},elementMouseDown(e){Q9=Z9.mouse,this.elementDown(e)},elementDown(e){if(e instanceof MouseEvent&&e.button!==0)return;let t=e.target||e.srcElement;if(this.$el.contains(t)){if(this.onDragStart(e)===!1)return;if(this.dragHandle&&!fXt(t,this.dragHandle,this.$el)||this.dragCancel&&fXt(t,this.dragCancel,this.$el)){this.dragging=!1;return}this.enabled||(this.enabled=!0,this.$emit(`activated`),this.$emit(`update:active`,!0)),this.draggable&&(this.dragEnable=!0),this.mouseClickPosition.mouseX=e.touches?e.touches[0].pageX:e.pageX,this.mouseClickPosition.mouseY=e.touches?e.touches[0].pageY:e.pageY,this.mouseClickPosition.left=this.left,this.mouseClickPosition.right=this.right,this.mouseClickPosition.top=this.top,this.mouseClickPosition.bottom=this.bottom,this.parent&&(this.bounds=this.calcDragLimits()),Y9(document.documentElement,Q9.move,this.move),Y9(document.documentElement,Q9.stop,this.handleUp)}},calcDragLimits(){return{minLeft:this.left%this.grid[0],maxLeft:Math.floor((this.parentWidth-this.width-this.left)/this.grid[0])*this.grid[0]+this.left,minRight:this.right%this.grid[0],maxRight:Math.floor((this.parentWidth-this.width-this.right)/this.grid[0])*this.grid[0]+this.right,minTop:this.top%this.grid[1],maxTop:Math.floor((this.parentHeight-this.height-this.top)/this.grid[1])*this.grid[1]+this.top,minBottom:this.bottom%this.grid[1],maxBottom:Math.floor((this.parentHeight-this.height-this.bottom)/this.grid[1])*this.grid[1]+this.bottom}},deselect(e){let t=e.target||e.srcElement,n=RegExp(this.className+`-([trmbl]{2})`,``);!this.$el.contains(t)&&!n.test(t.className)&&(this.enabled&&!this.preventDeactivation&&(this.enabled=!1,this.$emit(`deactivated`),this.$emit(`update:active`,!1)),X9(document.documentElement,Q9.move,this.handleResize)),this.resetBoundsAndMouseState()},handleTouchDown(e,t){Q9=Z9.touch,this.handleDown(e,t)},handleDown(e,t){t instanceof MouseEvent&&t.which!==1||this.onResizeStart(e,t)!==!1&&(t.stopPropagation&&t.stopPropagation(),this.lockAspectRatio&&!e.includes(`m`)?this.handle=`m`+e.substring(1):this.handle=e,this.resizeEnable=!0,this.mouseClickPosition.mouseX=t.touches?t.touches[0].pageX:t.pageX,this.mouseClickPosition.mouseY=t.touches?t.touches[0].pageY:t.pageY,this.mouseClickPosition.left=this.left,this.mouseClickPosition.right=this.right,this.mouseClickPosition.top=this.top,this.mouseClickPosition.bottom=this.bottom,this.bounds=this.calcResizeLimits(),Y9(document.documentElement,Q9.move,this.handleResize),Y9(document.documentElement,Q9.stop,this.handleUp))},calcResizeLimits(){let e=this.minW,t=this.minH,n=this.maxW,r=this.maxH,i=this.aspectFactor,[a,o]=this.grid,s=this.width,l=this.height,u=this.left,d=this.top,f=this.right,p=this.bottom;this.lockAspectRatio&&(e/t>i?t=e/i:e=i*t,n&&r?(n=Math.min(n,i*r),r=Math.min(r,n/i)):n?r=n/i:r&&(n=i*r)),n-=n%a,r-=r%o;let m={minLeft:null,maxLeft:null,minTop:null,maxTop:null,minRight:null,maxRight:null,minBottom:null,maxBottom:null};return this.parent?(m.minLeft=u%a,m.maxLeft=u+Math.floor((s-e)/a)*a,m.minTop=d%o,m.maxTop=d+Math.floor((l-t)/o)*o,m.minRight=f%a,m.maxRight=f+Math.floor((s-e)/a)*a,m.minBottom=p%o,m.maxBottom=p+Math.floor((l-t)/o)*o,n&&(m.minLeft=Math.max(m.minLeft,this.parentWidth-f-n),m.minRight=Math.max(m.minRight,this.parentWidth-u-n)),r&&(m.minTop=Math.max(m.minTop,this.parentHeight-p-r),m.minBottom=Math.max(m.minBottom,this.parentHeight-d-r)),this.lockAspectRatio&&(m.minLeft=Math.max(m.minLeft,u-d*i),m.minTop=Math.max(m.minTop,d-u/i),m.minRight=Math.max(m.minRight,f-p*i),m.minBottom=Math.max(m.minBottom,p-f/i))):(m.minLeft=null,m.maxLeft=u+Math.floor((s-e)/a)*a,m.minTop=null,m.maxTop=d+Math.floor((l-t)/o)*o,m.minRight=null,m.maxRight=f+Math.floor((s-e)/a)*a,m.minBottom=null,m.maxBottom=p+Math.floor((l-t)/o)*o,n&&(m.minLeft=-(f+n),m.minRight=-(u+n)),r&&(m.minTop=-(p+r),m.minBottom=-(d+r)),this.lockAspectRatio&&n&&r&&(m.minLeft=Math.min(m.minLeft,-(f+n)),m.minTop=Math.min(m.minTop,-(r+p)),m.minRight=Math.min(m.minRight,-u-n),m.minBottom=Math.min(m.minBottom,-d-r))),m},move(e){this.resizing?this.handleResize(e):this.dragEnable&&this.handleDrag(e)},handleDrag(e){let t=this.axis,n=this.grid,r=this.bounds,i=this.mouseClickPosition,[a,o]=q9(n,t&&t!==`y`?i.mouseX-(e.touches?e.touches[0].pageX:e.pageX):0,t&&t!==`x`?i.mouseY-(e.touches?e.touches[0].pageY:e.pageY):0,this.scale),s=J9(i.left-a,r.minLeft,r.maxLeft),l=J9(i.top-o,r.minTop,r.maxTop);if(this.onDrag(s,l)===!1)return;let u=J9(i.right+a,r.minRight,r.maxRight),d=J9(i.bottom+o,r.minBottom,r.maxBottom);this.left=s,this.top=l,this.right=u,this.bottom=d,this.$emit(`dragging`,this.left,this.top),this.dragging=!0},moveHorizontally(e){let[t,n]=q9(this.grid,e,this.top,1),r=J9(t,this.bounds.minLeft,this.bounds.maxLeft);this.left=r,this.right=this.parentWidth-this.width-r},moveVertically(e){let[t,n]=q9(this.grid,this.left,e,1),r=J9(n,this.bounds.minTop,this.bounds.maxTop);this.top=r,this.bottom=this.parentHeight-this.height-r},handleResize(e){let t=this.left,n=this.top,r=this.right,i=this.bottom,a=this.mouseClickPosition,o=this.aspectFactor,s=a.mouseX-(e.touches?e.touches[0].pageX:e.pageX),l=a.mouseY-(e.touches?e.touches[0].pageY:e.pageY);!this.widthTouched&&s&&(this.widthTouched=!0),!this.heightTouched&&l&&(this.heightTouched=!0);let[u,d]=q9(this.grid,s,l,this.scale);this.handle.includes(`b`)?(i=J9(a.bottom+d,this.bounds.minBottom,this.bounds.maxBottom),this.lockAspectRatio&&this.resizingOnY&&(r=this.right-(this.bottom-i)*o)):this.handle.includes(`t`)&&(n=J9(a.top-d,this.bounds.minTop,this.bounds.maxTop),this.lockAspectRatio&&this.resizingOnY&&(t=this.left-(this.top-n)*o)),this.handle.includes(`r`)?(r=J9(a.right+u,this.bounds.minRight,this.bounds.maxRight),this.lockAspectRatio&&this.resizingOnX&&(i=this.bottom-(this.right-r)/o)):this.handle.includes(`l`)&&(t=J9(a.left-u,this.bounds.minLeft,this.bounds.maxLeft),this.lockAspectRatio&&this.resizingOnX&&(n=this.top-(this.left-t)/o));let f=uXt(this.parentWidth,t,r),p=dXt(this.parentHeight,n,i);this.onResize(this.handle,t,n,f,p)!==!1&&(this.left=t,this.top=n,this.right=r,this.bottom=i,this.width=f,this.height=p,this.$emit(`resizing`,this.left,this.top,this.width,this.height),this.resizing=!0)},changeWidth(e){let[t,n]=q9(this.grid,e,0,1),r=J9(this.parentWidth-t-this.left,this.bounds.minRight,this.bounds.maxRight),i=this.bottom;this.lockAspectRatio&&(i=this.bottom-(this.right-r)/this.aspectFactor);let a=uXt(this.parentWidth,this.left,r),o=dXt(this.parentHeight,this.top,i);this.right=r,this.bottom=i,this.width=a,this.height=o},changeHeight(e){let[t,n]=q9(this.grid,0,e,1),r=J9(this.parentHeight-n-this.top,this.bounds.minBottom,this.bounds.maxBottom),i=this.right;this.lockAspectRatio&&(i=this.right-(this.bottom-r)*this.aspectFactor);let a=uXt(this.parentWidth,this.left,i),o=dXt(this.parentHeight,this.top,r);this.right=i,this.bottom=r,this.width=a,this.height=o},handleUp(e){this.handle=null,this.resetBoundsAndMouseState(),this.dragEnable=!1,this.resizeEnable=!1,this.resizing&&(this.resizing=!1,this.$emit(`resizeStop`,this.left,this.top,this.width,this.height)),this.dragging&&(this.dragging=!1,this.$emit(`dragStop`,this.left,this.top)),X9(document.documentElement,Q9.move,this.handleResize)}},computed:{style(){return{transform:`translate(${this.left}px, ${this.top}px)`,width:this.computedWidth,height:this.computedHeight,zIndex:this.zIndex,...this.dragging&&this.disableUserSelect?hXt:gXt}},actualHandles(){return this.resizable?this.handles:[]},computedWidth(){return this.w===`auto`&&!this.widthTouched?`auto`:this.width+`px`},computedHeight(){return this.h===`auto`&&!this.heightTouched?`auto`:this.height+`px`},minW(){return this.minWidth},minH(){return this.minHeight},maxW(){return this.maxWidth},maxH(){return this.maxHeight},resizingOnX(){return!!this.handle&&(this.handle.includes(`l`)||this.handle.includes(`r`))},resizingOnY(){return!!this.handle&&(this.handle.includes(`t`)||this.handle.includes(`b`))},isCornerHandle(){return!!this.handle&&[`tl`,`tr`,`br`,`bl`].includes(this.handle)}},watch:{active(e){this.enabled=e,e?this.$emit(`activated`):this.$emit(`deactivated`)},z(e){(e>=0||e===`auto`)&&(this.zIndex=e)},x(e){this.resizing||this.dragging||(this.parent&&(this.bounds=this.calcDragLimits()),this.moveHorizontally(e))},y(e){this.resizing||this.dragging||(this.parent&&(this.bounds=this.calcDragLimits()),this.moveVertically(e))},lockAspectRatio(e){e?this.aspectFactor=this.width/this.height:this.aspectFactor=void 0},w(e){this.resizing||this.dragging||(this.parent&&(this.bounds=this.calcResizeLimits()),this.changeWidth(e))},h(e){this.resizing||this.dragging||(this.parent&&(this.bounds=this.calcResizeLimits()),this.changeHeight(e))}}},vXt=[`onMousedown`,`onTouchstart`];function yXt(e,t,n,r,i,a){return B(),V(`div`,{style:ge(a.style),class:xe([{[n.classNameActive]:e.enabled,[n.classNameDragging]:e.dragging,[n.classNameResizing]:e.resizing,[n.classNameDraggable]:n.draggable,[n.classNameResizable]:n.resizable},n.className]),onMousedown:t[0]||=(...e)=>a.elementMouseDown&&a.elementMouseDown(...e),onTouchstart:t[1]||=(...e)=>a.elementTouchDown&&a.elementTouchDown(...e)},[(B(!0),V(Lr,null,dr(a.actualHandles,t=>(B(),V(`div`,{key:t,class:xe([n.classNameHandle,n.classNameHandle+`-`+t]),style:ge({display:e.enabled?`block`:`none`}),onMousedown:Mi(e=>a.handleDown(t,e),[`stop`,`prevent`]),onTouchstart:Mi(e=>a.handleTouchDown(t,e),[`stop`,`prevent`])},[pr(e.$slots,t)],46,vXt))),128)),pr(e.$slots,`default`)],38)}var bXt=mXt(_Xt,[[`render`,yXt]]);function xXt(e){xXt.installed||(xXt.installed=!0,e.component(`VueDraggableResizable`,bXt))}var SXt={install:xXt},$9=null;typeof window<`u`?$9=window.Vue:typeof global<`u`&&($9=global.Vue),$9&&$9.use(SXt);function CXt(e={},t){let n=e.initWidth||400,r=e.minWidth||400,i=e.minHeight||400,a=e.maxWidthPercent||40,o=e.compressedHeight||800,s=e.compressedPadding===void 0?0:e.compressedPadding,l=sn(e.defaultLeft===void 0?window.innerWidth-n:e.defaultLeft),u=sn(e.defaultTop===void 0?0:e.defaultTop),d=sn(e.defaultHeight===void 0?window.innerHeight-(e.defaultTop===void 0?0:e.defaultTop):e.defaultHeight),f=sn(n),p=sn(u.value),m=sn(l.value),h=sn(f.value),g=sn(d.value),_=sn(Math.max(window.innerWidth*(a/100),h.value)),v=sn(!1),y=sn(0),b=null,x=null,S=sn(!1),C=e=>{let t=window.innerWidth,n={...e};return n.width>t&&(n.width=t),n.x+n.width>t&&(n.x=t-n.width),n.x<0&&(n.x=0),n},w=()=>({x:m.value,y:p.value,width:h.value,height:g.value}),T=(e,n)=>{m.value=e,p.value=n,y.value=e-(window.innerWidth-h.value),t?.onDragging?.(w())},E=(e,n,r,i)=>{m.value=e,p.value=n,h.value=Math.min(r,_.value),g.value=i,t?.onResizing?.(w())},D=(e,n)=>{m.value=e,p.value=n,y.value=e-(window.innerWidth-h.value),S.value&&(x=w()),t?.onDragStop?.(w())},O=(e,n,r,i)=>{m.value=e,p.value=n,h.value=Math.min(r,_.value),g.value=i,S.value&&(x=w()),t?.onResizeStop?.(w())},k=()=>{_.value=Math.max(window.innerWidth*(a/100),h.value),En(()=>{if(v.value)m.value=window.innerWidth-h.value-s,p.value=window.innerHeight-o-s;else{let e=window.innerWidth-h.value-y.value;m.value=Math.max(0,e),setTimeout(()=>{g.value=window.innerHeight-p.value},0)}h.value>_.value&&(h.value=_.value)})},A=()=>{v.value?(p.value=u.value,En(()=>{g.value=d.value,m.value=l.value,h.value=f.value})):(p.value=window.innerHeight-o-s,m.value=l.value-s,h.value=n,g.value=o),v.value=!v.value},j=(e,t)=>{m.value=e,p.value=t,y.value=e-(window.innerWidth-h.value)},M=(e,t)=>{h.value=Math.max(r,Math.min(e,_.value)),g.value=Math.max(i,t)};return or(()=>{window.addEventListener(`resize`,k)}),sr(()=>{window.removeEventListener(`resize`,k)}),{minWidth:r,minHeight:i,maxWidth:_,top:p,left:m,width:h,height:g,isCompressed:v,isSidePanelExpanded:S,handleDragging:T,handleResizing:E,handleDragStop:D,handleResizeStop:O,toggleCompression:A,updatePosition:j,updateSize:M,updatePositionAndSize:(e,t,n,r)=>{j(e,t),M(n,r)},expandForSidePanel:e=>{if(S.value)return;let t=w();b={...t},S.value=!0;let n=t.x+t.width,r=x?.width??t.width+e,i=C({x:n-r,y:t.y,width:r,height:t.height});j(i.x,i.y),En(()=>{M(i.width,i.height)})},collapseSidePanel:()=>{if(!S.value)return;let e=w();x={...e},S.value=!1;let t=e.x+e.width,n=b?.width??e.width,r=C({x:t-n,y:e.y,width:n,height:e.height});M(r.width,r.height),En(()=>{j(r.x,r.y)})}}}var wXt={class:`draggable-container-content`},TXt=Fi(Qn({__name:`draggable-container`,props:{className:{default:``},compressedHeight:{default:800},compressedPadding:{default:0},defaultHeight:{default:void 0},defaultWidth:{default:400},defaultX:{default:void 0},defaultY:{default:0},draggable:{type:Boolean,default:!0},dragHandle:{default:`.drag-handle`},maxWidth:{default:void 0},maxWidthPercent:{default:80},minHeight:{default:400},minWidth:{default:400},resizable:{type:Boolean,default:!0},teleportTo:{default:`body`},visible:{type:Boolean,default:!1}},emits:[`dragging`,`resizing`,`drag-stop`,`resize-stop`,`compression-change`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=sn(!1),{minWidth:o,minHeight:s,maxWidth:l,top:u,left:d,width:f,height:p,isCompressed:m,isSidePanelExpanded:h,handleDragging:g,handleResizing:_,handleDragStop:v,handleResizeStop:y,toggleCompression:b,updatePosition:x,updateSize:S,updatePositionAndSize:C,expandForSidePanel:w,collapseSidePanel:T}=CXt({initWidth:r.defaultWidth,minWidth:r.minWidth,minHeight:r.minHeight,maxWidthPercent:r.maxWidthPercent,compressedHeight:r.compressedHeight,defaultHeight:r.defaultHeight,defaultTop:r.defaultY,defaultLeft:r.defaultX,compressedPadding:r.compressedPadding},{onDragStop:e=>i(`drag-stop`,e),onResizeStop:e=>i(`resize-stop`,e),onDragging:e=>i(`dragging`,e),onResizing:e=>i(`resizing`,e)}),E=fi(()=>({"--draggable-max-width":typeof r.maxWidth==`number`?`${r.maxWidth}px`:r.maxWidth??`${l.value}px`})),D=fi(()=>({x:d.value,y:u.value,width:f.value,height:p.value})),O=()=>{document.querySelectorAll(`iframe`).forEach(e=>{e.style.pointerEvents=`none`})},k=()=>{document.querySelectorAll(`iframe`).forEach(e=>{e.style.pointerEvents=``})},A=(e,t)=>{a.value||(a.value=!0,O()),g(e,t)},j=(e,t,n,r)=>{a.value||(a.value=!0,O()),_(e,t,n,r)},M=(e,t)=>{v(e,t),a.value=!1,k()},N=(e,t,n,r)=>{y(e,t,n,r),a.value=!1,k()};return Ln(m,e=>{i(`compression-change`,e)}),t({updatePosition:x,updateSize:S,updatePositionAndSize:C,toggleCompression:b,expandForSidePanel:w,collapseSidePanel:T,positionAndSize:D,isCompressed:m,isSidePanelExpanded:h}),(e,t)=>Mn((B(),Gr(z(bXt),{ref:`draggableRef`,active:r.visible,class:xe([`draggable-container-wrapper`,r.className]),"class-name":`draggable-container-inner`,"drag-handle":r.dragHandle,draggable:r.draggable,h:z(p),"max-width":z(l),"min-height":z(s),"min-width":z(o),parent:!0,"prevent-deactivation":!0,resizable:r.resizable,style:ge(E.value),w:z(f),x:z(d),y:z(u),onDragStop:M,onDragging:A,onResizeStop:N,onResizing:j},{default:jn(()=>[H(`div`,wXt,[pr(e.$slots,`default`,{},void 0,!0)])]),_:3},8,[`active`,`class`,`drag-handle`,`draggable`,`h`,`max-width`,`min-height`,`min-width`,`resizable`,`style`,`w`,`x`,`y`])),[[wi,r.visible]])}}),[[`__scopeId`,`data-v-1118456b`]]),EXt={class:`nimbus-bkai-wrapper`},DXt=[`width`,`height`,`src`],OXt=Fi(Qn({name:`NimbusButton`,__name:`nimbus`,props:{isPanelShow:{type:Boolean},isMinimize:{type:Boolean},size:{default:`normal`}},emits:[`click`,`minimize`,`update:isMinimize`],setup(e,{emit:t}){qne(e=>({v05a8b16e:`${a.value.container}px`,v4e1cf4ca:`${a.value.wrapper}px`,v5ab0c513:`${a.value.mini.right}px`,v40c13a80:`${a.value.mini.size}px`,v0d35a9ef:`${a.value.mini.fontSize}px`}));let n=e,r=t,i={small:{container:40,wrapper:32,img:24,mini:{size:14,fontSize:10,right:-4}},normal:{container:48,wrapper:40,img:32,mini:{size:16,fontSize:12,right:-6}},large:{container:56,wrapper:48,img:40,mini:{size:18,fontSize:14,right:-6}}},a=fi(()=>i[n.size]),o=sn(null),s=sn(null),{nimbusLeft:l,nimbusTop:u,isMinimize:d,handleClick:f,handleMinimize:p,handleDragging:m,handleMouseEnter:h,handleMouseLeave:g,handleMouseDown:_,handleMouseUp:v}=nXt(r,n.isMinimize);Ln(d,e=>{r(`update:isMinimize`,e)});let y=fi(()=>d.value?nf(`恢复默认大小`):nf(`最小化,将缩成锚点`)),{createTooltip:b,destroyAll:x}=sXt({theme:`ai-blueking`,delay:[0,0]}),S=()=>{En(()=>{C()})},C=()=>{x(),o.value&&!d.value&&b(o.value,nSe(),{placement:`left`}),s.value&&b(s.value,y.value,{placement:`top`})};return Ln(()=>d.value,()=>{En(()=>{C()})}),or(()=>{En(()=>{C()}),window.addEventListener(`resize`,S)}),sr(()=>{window.removeEventListener(`resize`,S)}),(t,n)=>(B(),Gr(z(bXt),{active:!e.isPanelShow,axis:`y`,draggable:!0,h:a.value.container,parent:!0,"prevent-deactivation":!0,resizable:!1,w:a.value.container,x:z(l),y:z(u),onDragging:z(m)},{default:jn(()=>[H(`div`,{ref_key:`nimbusContainerRef`,ref:o,class:xe([`nimbus-container`,{"is-minimize":z(d)}]),onClick:n[1]||=(...e)=>z(f)&&z(f)(...e),onMousedown:n[2]||=(...e)=>z(_)&&z(_)(...e),onMouseenter:n[3]||=(...e)=>z(h)&&z(h)(...e),onMouseleave:n[4]||=(...e)=>z(g)&&z(g)(...e),onMouseup:n[5]||=(...e)=>z(v)&&z(v)(...e)},[H(`div`,EXt,[H(`img`,{width:a.value.img,height:a.value.img,src:z(fYt),alt:`nimbus`},null,8,DXt)]),H(`i`,{ref_key:`minimizeButtonRef`,ref:s,class:xe([`nimbus-mini bkai-icon`,z(d)?`bkai-yinyong`:`bkai-minus-line`]),onClick:n[0]||=Mi((...e)=>z(p)&&z(p)(...e),[`stop`])},null,2)],34)]),_:1},8,[`active`,`h`,`w`,`x`,`y`,`onDragging`]))}}),[[`__scopeId`,`data-v-26b6f3ea`]]),kXt=Fi(Qn({__name:`ai-blueking`,props:pte({autoSwitchToInitialSession:{type:Boolean},alwaysCreateNewSession:{type:Boolean},beforeNimbusClick:{type:Function},defaultChatInputPosition:{},defaultHeight:{},defaultLeft:{},defaultMinimize:{type:Boolean},defaultTop:{},defaultWidth:{},disabledInput:{type:Boolean},draggable:{type:Boolean},dropdownMenuConfig:{},enableChatSession:{type:Boolean},enablePopup:{type:Boolean},extCls:{},helloText:{},useAgentName:{type:Boolean},hideDefaultTrigger:{type:Boolean},hideHeader:{type:Boolean},hideNimbus:{type:Boolean},initialSessionCode:{},loadRecentSessionOnMount:{type:Boolean},maxWidth:{},miniPadding:{},nimbusSize:{},placeholder:{},prompts:{},requestOptions:{},resources:{},shortcutLimit:{},shortcuts:{},showCompressionIcon:{type:Boolean},showHistoryIcon:{type:Boolean},showMoreIcon:{type:Boolean},showNewChatIcon:{type:Boolean},teleportTo:{},title:{},url:{},renderMode:{},shortcutFilter:{type:Function},resizeProps:{},getSideRenderComponent:{type:Function},getSideTabRenderComponent:{type:Function},onCustomTabChange:{type:Function}},cXt),emits:[`show`,`close`,`dragging`,`resizing`,`drag-stop`,`resize-stop`,`send-message`,`receive-start`,`receive-text`,`receive-end`,`stop`,`shortcut-click`,`session-initialized`,`sdk-error`,`transfer-messages`,`share-messages`,`new-chat`,`new-chat-created`,`history-click`,`auto-generate-name`,`help-click`,`rename`,`share`],setup(e,{expose:t,emit:n}){let r=e,{chatHelper:i,componentManager:a,sessionBusinessManager:o,shareBusinessManager:s,shortcutManager:l,forwarders:u,forwardToManager:d,chatBotRef:f,draggableContainerRef:p,panelVisible:m,nimbusMinimized:h,normalizedUrl:g,agentName:_,currentSession:v,isCompressed:y,isWelcomeState:b,messageToolsTippyOptions:x,agentResources:S,agentPrompts:C,agentSkills:w,handleError:T,ensureSessionReady:E,updateAgentInfo:D}=eXt({props:r,emit:n}),{show:O,hide:k,handleShow:A,handleClose:j,handleNimbusClick:M,handleDragging:N,handleResizing:P,handleDragStop:F,handleResizeStop:I,handleToggleCompression:L,handleCompressionChange:R,handleExecutionPanelChange:ee,sendMessage:te,handleReceiveStart:ne,handleReceiveText:re,handleReceiveEnd:ie,handleStop:ae,stopGeneration:oe,setCiteText:se,focusInput:ce,selectShortcut:le,sendShortcut:ue,getChatHelper:de,updatePosition:fe,updateSize:pe,updatePositionAndSize:me,handleShortcutClick:he}=iXt({componentManager:a,chatBotRef:f,forwarders:u,forwardToManager:d,beforeNimbusClick:r.beforeNimbusClick,ensureSessionReady:E}),{sessionName:_e,hasPermission:ve,hasSessionContents:ye,autoGenerateLoading:be,handleNewChat:Ce,handleNewChatCreated:we,handleHistoryClick:Te,handleHistorySessionSwitch:Ee,handleHistorySessionDelete:De,handleHistorySessionRename:Oe,handleAutoGenerateName:ke,handleHelpClick:Ae,handleRename:je,handleSessionSwitched:Me,addNewSession:Ne,switchToSession:Pe,updateSessionName:Fe}=aXt({chatHelper:i,sessionBusinessManager:o,chatBotRef:f,forwarders:u,handleError:T,currentSession:v}),{isShareLoading:Ie,handleShare:Le,handleCancelShare:Re,handleConfirmShare:ze}=oXt({shareBusinessManager:s,chatBotRef:f,forwarders:u,handleError:T}),{aiSelectionVisible:Be,filteredPopupShortcuts:Ve,handleSelectionChange:He,handleAiSelectionShortcut:Ue}=tXt({shortcutManager:l,chatBotRef:f,forwardToManager:d,show:O,props:r}),We=e=>{ye.value=!0,u.sendMessage(e)};return t({show:O,handleShow:A,handleClose:j,hide:k,sendMessage:te,selectShortcut:le,sendShortcut:ue,getChatHelper:de,stopGeneration:oe,addNewSession:Ne,switchToSession:Pe,updateSessionName:Fe,updatePosition:fe,updateSize:pe,updatePositionAndSize:me,setCiteText:se,focusInput:ce,updateAgentInfo:D}),(e,t)=>(B(),Gr(Un,{to:r.teleportTo},[H(`div`,{class:xe([`ai-blueking-v2`,r.extCls])},[$r(` 可拖拽容器 `),Yr(z(TXt),{ref_key:`draggableContainerRef`,ref:p,"compressed-padding":r.miniPadding,"default-height":r.defaultHeight,"default-width":r.defaultWidth,"default-x":r.defaultLeft,"default-y":r.defaultTop,"drag-handle":`.drag-handle`,draggable:r.draggable,"max-width":r.maxWidth,"max-width-percent":80,visible:z(m),onCompressionChange:z(R),onDragStop:z(F),onDragging:z(N),onResizeStop:z(I),onResizing:z(P)},{default:jn(()=>[H(`div`,{class:xe([`ai-blueking-panel`,{"has-messages":!z(b)}])},[$r(` 独立的 Header 组件 `),r.hideHeader?$r(`v-if`,!0):(B(),Gr(xYt,{key:0,"agent-name":z(_),"chat-helper":z(i),draggable:r.draggable,"dropdown-menu-config":r.dropdownMenuConfig,"enable-chat-session":r.enableChatSession,"has-permission":z(ve),"has-session-contents":z(ye),"auto-generate-loading":z(be),"is-compression-height":z(y),"render-mode":r.renderMode,"session-business-manager":z(o),"session-name":z(_e),"show-compression-icon":r.showCompressionIcon,"show-history-icon":r.showHistoryIcon,"show-more-icon":r.showMoreIcon,"show-new-chat-icon":r.showNewChatIcon,title:r.title,onAutoGenerateName:z(ke),onClose:z(j),onHelpClick:z(Ae),onHistoryClick:z(Te),onHistorySessionDelete:z(De),onHistorySessionRename:z(Oe),onHistorySessionSwitch:z(Ee),onNewChat:z(Ce),onNewChatCreated:z(we),onRename:z(je),onShare:z(Le),onToggleCompression:z(L)},fr({_:2},[e.$slots.headerLeft?{name:`headerLeft`,fn:jn(()=>[pr(e.$slots,`headerLeft`,{},void 0,!0)]),key:`0`}:void 0]),1032,`agent-name.chat-helper.draggable.dropdown-menu-config.enable-chat-session.has-permission.has-session-contents.auto-generate-loading.is-compression-height.render-mode.session-business-manager.session-name.show-compression-icon.show-history-icon.show-more-icon.show-new-chat-icon.title.onAutoGenerateName.onClose.onHelpClick.onHistoryClick.onHistorySessionDelete.onHistorySessionRename.onHistorySessionSwitch.onNewChat.onNewChatCreated.onRename.onShare.onToggleCompression`.split(`.`))),$r(` ChatBot 核心组件(仅聊天区域) `),Yr(KYt,{ref_key:`chatBotRef`,ref:f,"always-create-new-session":r.alwaysCreateNewSession,"auto-load":r.loadRecentSessionOnMount,"chat-helper":z(i),"hello-text":r.helloText,"message-tools-tippy-options":z(x),placeholder:r.placeholder,prompts:z(C),"render-mode":r.renderMode,"request-options":r.requestOptions,"use-agent-name":r.useAgentName,"get-side-render-component":r.getSideRenderComponent,"get-side-tab-render-component":r.getSideTabRenderComponent,"on-custom-tab-change":r.onCustomTabChange,"resize-props":r.resizeProps,resources:z(S),"session-code":r.initialSessionCode,"share-loading":z(Ie),shortcuts:r.shortcuts,skills:z(w),style:ge({height:r.hideHeader?`100%`:`calc(100% - 48px)`}),url:z(g),onCancelShare:z(Re),onConfirmShare:t[0]||=e=>z(ze)(e),onError:t[1]||=e=>z(T)(e),onExecutionPanelChange:z(ee),onReceiveEnd:z(ie),onReceiveStart:z(ne),onReceiveText:z(re),onRequestShare:z(Le),onSendMessage:t[2]||=e=>We(e),onSessionSwitched:t[3]||=e=>z(Me)(e),onShortcutClick:z(he),onStop:z(ae)},fr({_:2},[e.$slots.codeHeader?{name:`codeHeader`,fn:jn(t=>[pr(e.$slots,`codeHeader`,Se(Xr(t)),void 0,!0)]),key:`0`}:void 0,e.$slots.message?{name:`message`,fn:jn(({message:t,messageToolsStatus:n,onInterruptResume:r})=>[pr(e.$slots,`message`,{message:t,messageToolsStatus:n,onInterruptResume:r},void 0,!0)]),key:`1`}:void 0]),1032,`always-create-new-session.auto-load.chat-helper.hello-text.message-tools-tippy-options.placeholder.prompts.render-mode.request-options.use-agent-name.get-side-render-component.get-side-tab-render-component.on-custom-tab-change.resize-props.resources.session-code.share-loading.shortcuts.skills.style.url.onCancelShare.onExecutionPanelChange.onReceiveEnd.onReceiveStart.onReceiveText.onRequestShare.onShortcutClick.onStop`.split(`.`))],2)]),_:3},8,[`compressed-padding`,`default-height`,`default-width`,`default-x`,`default-y`,`draggable`,`max-width`,`visible`,`onCompressionChange`,`onDragStop`,`onDragging`,`onResizeStop`,`onResizing`]),$r(` Nimbus 悬浮球 `),r.hideNimbus?$r(`v-if`,!0):(B(),Gr(OXt,{key:0,"is-minimize":z(h),"onUpdate:isMinimize":t[4]||=e=>on(h)?h.value=e:null,"is-panel-show":z(m),"onUpdate:isPanelShow":t[5]||=e=>on(m)?m.value=e:null,"default-minimize":r.defaultMinimize,size:r.nimbusSize,onClick:z(M)},null,8,[`is-minimize`,`is-panel-show`,`default-minimize`,`size`,`onClick`])),$r(` 划词选择弹窗(使用 chat-x 的 AiSelection 组件) `),r.enablePopup?(B(),Gr(z(cDe),{key:1,visible:z(Be),"onUpdate:visible":t[6]||=e=>on(Be)?Be.value=e:null,"exclude-selectors":[`.draggable-container-wrapper`],"max-shortcut-count":r.shortcutLimit,shortcuts:z(Ve),onSelectShortcut:z(Ue),onSelectionChange:z(He)},null,8,[`visible`,`max-shortcut-count`,`shortcuts`,`onSelectShortcut`,`onSelectionChange`])):$r(`v-if`,!0)],2)],8,[`to`]))}}),[[`__scopeId`,`data-v-bc46f959`]]),AXt=[`close`,`show`,`stop`,`shortcut-click`,`send-message`,`receive-start`,`receive-end`,`receive-text`,`session-initialized`,`drag-stop`,`resize-stop`,`dragging`,`resizing`,`transfer-messages`,`share-messages`,`sdk-error`,`new-chat`,`new-chat-created`,`history-click`,`auto-generate-name`,`help-click`,`rename`,`share`],jXt=[`show`,`handleShow`,`handleClose`,`hide`,`sendMessage`,`stopGeneration`,`addNewSession`,`switchToSession`,`updateSessionName`,`updatePosition`,`updateSize`,`updatePositionAndSize`,`setCiteText`,`focusInput`,`getChatHelper`,`selectShortcut`,`sendShortcut`],MXt=qYt(kXt,{name:`AIBluekingV2`,props:{extCls:{type:String,default:``},shortcuts:{type:Array,default:()=>[]},enablePopup:{type:Boolean,default:!0},url:{type:String,default:``},prompts:{type:Array,default:()=>[]},teleportTo:{type:String,default:`body`},title:{type:String,default:``},helloText:{type:String,default:()=>nf(`你好,我是小鲸`)},useAgentName:{type:Boolean,default:!1},requestOptions:{type:Object,default:()=>({})},defaultMinimize:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},hideNimbus:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},defaultWidth:{type:Number,default:400},defaultHeight:{type:Number,default:void 0},defaultLeft:{type:Number,default:void 0},defaultTop:{type:Number,default:0},disabledInput:{type:Boolean,default:!1},showCompressionIcon:{type:Boolean,default:!0},showMoreIcon:{type:Boolean,default:!0},showHistoryIcon:{type:Boolean,default:!0},showNewChatIcon:{type:Boolean,default:!0},defaultChatInputPosition:{type:String,default:void 0},maxWidth:{type:[Number,String],default:1e3},initialSessionCode:{type:String,default:``},autoSwitchToInitialSession:{type:Boolean,default:!1},alwaysCreateNewSession:{type:Boolean,default:!1},loadRecentSessionOnMount:{type:Boolean,default:!0},shortcutLimit:{type:Number,default:3},shortcutFilter:{type:Function,default:void 0},placeholder:{type:String,default:void 0},enableChatSession:{type:Boolean,default:!0},nimbusSize:{type:String,default:`normal`},miniPadding:{type:Number,default:0},dropdownMenuConfig:{type:Object,default:()=>({showRename:!0,showAutoGenerate:!0,showShare:!0})},resources:{type:Array,default:void 0},hideDefaultTrigger:{type:Boolean,default:!1},beforeNimbusClick:{type:Function,default:void 0},getSideRenderComponent:{type:Function,default:void 0},getSideTabRenderComponent:{type:Function,default:void 0},onCustomTabChange:{type:Function,default:void 0}},emitNames:[...AXt],exposeKeys:[...jXt],slots:[`codeHeader`,`headerLeft`],deepWatchProps:[`requestOptions`,`shortcuts`,`beforeNimbusClick`],methods:{show(){return console.warn(`AIBluekingV2: show method not ready`),Promise.resolve()},handleShow(){return console.warn(`AIBluekingV2: handleShow method not ready`),Promise.resolve()},handleClose(){console.warn(`AIBluekingV2: handleClose method not ready`)},hide(){console.warn(`AIBluekingV2: hide method not ready`)},sendMessage(){return console.warn(`AIBluekingV2: sendMessage method not ready`),Promise.resolve()},stopGeneration(){console.warn(`AIBluekingV2: stopGeneration method not ready`)},addNewSession(){return console.warn(`AIBluekingV2: addNewSession method not ready`),Promise.resolve()},switchToSession(){return console.warn(`AIBluekingV2: switchToSession method not ready`),Promise.resolve()},updateSessionName(){return console.warn(`AIBluekingV2: updateSessionName method not ready`),Promise.resolve()},updatePosition(){console.warn(`AIBluekingV2: updatePosition method not ready`)},updateSize(){console.warn(`AIBluekingV2: updateSize method not ready`)},updatePositionAndSize(){console.warn(`AIBluekingV2: updatePositionAndSize method not ready`)},setCiteText(){console.warn(`AIBluekingV2: setCiteText method not ready`)},focusInput(){console.warn(`AIBluekingV2: focusInput method not ready`)},getChatHelper(){return console.warn(`AIBluekingV2: getChatHelper method not ready`),null},selectShortcut(){console.warn(`AIBluekingV2: selectShortcut method not ready`)},sendShortcut(){return console.warn(`AIBluekingV2: sendShortcut method not ready`),Promise.resolve()}}}),NXt=[`send-message`,`error`,`stop`,`receive-start`,`receive-end`,`receive-text`,`shortcut-click`,`session-switched`,`agent-info-loaded`,`request-share`,`confirm-share`,`cancel-share`,`execution-panel-change`,`feedback`],PXt=[`sendMessage`,`stopGeneration`,`focusInput`,`setCiteText`,`switchSession`,`selectShortcut`,`sendShortcut`,`enterShareMode`,`exitShareMode`,`getChatHelper`,`currentSession`,`isGenerating`,`messages`,`isReady`,`whenReady`];return e.ChatBotV2=qYt(KYt,{name:`ChatBotV2`,props:{chatHelper:{type:Object,default:void 0},url:{type:String,default:``},height:{type:[Number,String],default:void 0},maxWidth:{type:[Number,String],default:void 0},extCls:{type:String,default:``},helloText:{type:String,default:void 0},useAgentName:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},shortcuts:{type:Array,default:()=>[]},prompts:{type:Array,default:()=>[]},resources:{type:Array,default:()=>[]},requestOptions:{type:Object,default:()=>({})},messageToolsTippyOptions:{type:Object,default:void 0},enableSelection:{type:Boolean,default:!1},shareLoading:{type:Boolean,default:!1},autoLoad:{type:Boolean,default:!0},alwaysCreateNewSession:{type:Boolean,default:!1},sessionCode:{type:String,default:void 0},resizeProps:{type:Object,default:void 0},getSideRenderComponent:{type:Function,default:void 0},getSideTabRenderComponent:{type:Function,default:void 0},onCustomTabChange:{type:Function,default:void 0}},emitNames:[...NXt],exposeKeys:[...PXt],slots:[`codeHeader`],deepWatchProps:[`requestOptions`,`shortcuts`,`beforeNimbusClick`]}),e.default=MXt,e.h=U,e})({});