@apform-ui/core 1.10.37 → 1.10.38

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.
Files changed (36) hide show
  1. package/dist/apform-ui.css +1 -1
  2. package/dist/apform-ui.js +443 -442
  3. package/dist/apform-ui.umd.cjs +2 -2
  4. package/dist/chat.css +1 -0
  5. package/dist/chat.d.ts +78 -0
  6. package/dist/chat.js +9801 -0
  7. package/dist/chat.umd.cjs +68 -0
  8. package/dist/components/AppDialog/AppDialog.vue.d.ts +6 -6
  9. package/dist/components/CardGridSkeleton/CardGridSkeleton.vue.d.ts +1 -1
  10. package/dist/components/Chat/AssistantPicker/AssistantPicker.vue.d.ts +2 -2
  11. package/dist/components/Chat/ConversationSearchBar/ConversationSearchBar.vue.d.ts +5 -5
  12. package/dist/components/Chat/EditableArtifactCard/EditableArtifactCard.vue.d.ts +1 -1
  13. package/dist/components/Chat/MessageBubble/MessageBubble.vue.d.ts +4 -4
  14. package/dist/components/Chat/MessageList/MessageList.vue.d.ts +4 -4
  15. package/dist/components/Chat/PendingAttachmentChip/PendingAttachmentChip.vue.d.ts +2 -2
  16. package/dist/components/Chat/RagContextPanel/RagContextPanel.vue.d.ts +4 -4
  17. package/dist/components/Chat/ThinkingBlock/ThinkingBlock.vue.d.ts +1 -1
  18. package/dist/components/Chat/WorkflowRunTimeline/WorkflowRunTimeline.vue.d.ts +1 -1
  19. package/dist/components/ConfirmDialog/ConfirmDialog.vue.d.ts +1 -1
  20. package/dist/components/DocumentPreview/DocumentPreviewDrawer.vue.d.ts +2 -2
  21. package/dist/components/DocumentPreview/DocumentPreviewPanel.vue.d.ts +2 -2
  22. package/dist/components/ExcelPreviewCard/ExcelPreviewCard.vue.d.ts +2 -2
  23. package/dist/components/ExecutionArtifactPanel/ExecutionArtifactPanel.vue.d.ts +1 -1
  24. package/dist/components/FormDialog/FormDialog.vue.d.ts +3 -3
  25. package/dist/components/ImagePreviewCard/ImagePreviewCard.vue.d.ts +1 -1
  26. package/dist/components/LogStream/LogStream.vue.d.ts +3 -3
  27. package/dist/components/MetricChart/MetricChart.vue.d.ts +1 -1
  28. package/dist/components/PropertyField/PropertyField.vue.d.ts +1 -1
  29. package/dist/components/PropertyPanel/editors/NumberArrayEditor.vue.d.ts +1 -1
  30. package/dist/components/SearchForm/SearchForm.vue.d.ts +3 -3
  31. package/dist/components/Skeleton/Skeleton.vue.d.ts +2 -2
  32. package/dist/components/StatusTag/StatusTag.vue.d.ts +1 -1
  33. package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts +1 -1
  34. package/dist/components/UserAvatar/UserAvatar.vue.d.ts +2 -2
  35. package/dist/index.d.ts +3 -72
  36. package/package.json +8 -3
@@ -69,7 +69,7 @@ ${C}</tr>
69
69
  Please report this to https://github.com/markedjs/marked.`,C){let A="<p>An error occurred:</p><pre>"+VA(g.message+"",!0)+"</pre>";return I?Promise.resolve(A):A}if(I)return Promise.reject(g);throw g}}},Gl=new s3;function II(C,I){return Gl.parse(C,I)}II.options=II.setOptions=function(C){return Gl.setOptions(C),II.defaults=Gl.defaults,nW(II.defaults),II},II.getDefaults=fZ,II.defaults=ml;function Z3(...C){return Gl.use(...C),II.defaults=Gl.defaults,nW(II.defaults),II}II.use=Z3,II.walkTokens=function(C,I){return Gl.walkTokens(C,I)},II.parseInline=Gl.parseInline,II.Parser=eA,II.parser=eA.parse,II.Renderer=_d,II.TextRenderer=qZ,II.Lexer=lA,II.lexer=lA.lex,II.Tokenizer=Pd,II.Hooks=Wa,II.parse=II,II.options,II.setOptions,II.walkTokens,II.parseInline,eA.parse,lA.lex;/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function XW(C,I){(I==null||I>C.length)&&(I=C.length);for(var g=0,A=Array(I);g<I;g++)A[g]=C[g];return A}function m3(C){if(Array.isArray(C))return C}function b3(C,I){var g=C==null?null:typeof Symbol<"u"&&C[Symbol.iterator]||C["@@iterator"];if(g!=null){var A,i,l,e,t=[],a=!0,d=!1;try{if(l=(g=g.call(C)).next,I!==0)for(;!(a=(A=l.call(g)).done)&&(t.push(A.value),t.length!==I);a=!0);}catch(o){d=!0,i=o}finally{try{if(!a&&g.return!=null&&(e=g.return(),Object(e)!==e))return}finally{if(d)throw i}}return t}}function G3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
70
70
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r3(C,I){return m3(C)||b3(C,I)||h3(C,I)||G3()}function h3(C,I){if(C){if(typeof C=="string")return XW(C,I);var g={}.toString.call(C).slice(8,-1);return g==="Object"&&C.constructor&&(g=C.constructor.name),g==="Map"||g==="Set"?Array.from(C):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?XW(C,I):void 0}}const RW=Object.entries,HW=Object.setPrototypeOf,u3=Object.isFrozen,B3=Object.getPrototypeOf,W3=Object.getOwnPropertyDescriptor;let yI=Object.freeze,DI=Object.seal,Te=Object.create,SW=typeof Reflect<"u"&&Reflect,$Z=SW.apply,gm=SW.construct;yI||(yI=function(I){return I}),DI||(DI=function(I){return I}),$Z||($Z=function(I,g){for(var A=arguments.length,i=new Array(A>2?A-2:0),l=2;l<A;l++)i[l-2]=arguments[l];return I.apply(g,i)}),gm||(gm=function(I){for(var g=arguments.length,A=new Array(g>1?g-1:0),i=1;i<g;i++)A[i-1]=arguments[i];return new I(...A)});const rl=wI(Array.prototype.forEach),w3=wI(Array.prototype.lastIndexOf),MW=wI(Array.prototype.pop),wa=wI(Array.prototype.push),Y3=wI(Array.prototype.splice),xe=Array.isArray,Ya=wI(String.prototype.toLowerCase),Im=wI(String.prototype.toString),DW=wI(String.prototype.match),Va=wI(String.prototype.replace),KW=wI(String.prototype.indexOf),V3=wI(String.prototype.trim),p3=wI(Number.prototype.toString),y3=wI(Boolean.prototype.toString),FW=typeof BigInt>"u"?null:wI(BigInt.prototype.toString),zW=typeof Symbol>"u"?null:wI(Symbol.prototype.toString),sC=wI(Object.prototype.hasOwnProperty),pa=wI(Object.prototype.toString),fI=wI(RegExp.prototype.test),hl=N3(TypeError);function wI(C){return function(I){I instanceof RegExp&&(I.lastIndex=0);for(var g=arguments.length,A=new Array(g>1?g-1:0),i=1;i<g;i++)A[i-1]=arguments[i];return $Z(C,I,A)}}function N3(C){return function(){for(var I=arguments.length,g=new Array(I),A=0;A<I;A++)g[A]=arguments[A];return gm(C,g)}}function Ug(C,I){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ya;if(HW&&HW(C,null),!xe(I))return C;let A=I.length;for(;A--;){let i=I[A];if(typeof i=="string"){const l=g(i);l!==i&&(u3(I)||(I[A]=l),i=l)}C[i]=!0}return C}function X3(C){for(let I=0;I<C.length;I++)sC(C,I)||(C[I]=null);return C}function wC(C){const I=Te(null);for(const A of RW(C)){var g=r3(A,2);const i=g[0],l=g[1];sC(C,i)&&(xe(l)?I[i]=X3(l):l&&typeof l=="object"&&l.constructor===Object?I[i]=wC(l):I[i]=l)}return I}function R3(C){switch(typeof C){case"string":return C;case"number":return p3(C);case"boolean":return y3(C);case"bigint":return FW?FW(C):"0";case"symbol":return zW?zW(C):"Symbol()";case"undefined":return pa(C);case"function":case"object":{if(C===null)return pa(C);const I=C,g=tA(I,"toString");if(typeof g=="function"){const A=g(I);return typeof A=="string"?A:pa(A)}return pa(C)}default:return pa(C)}}function tA(C,I){for(;C!==null;){const A=W3(C,I);if(A){if(A.get)return wI(A.get);if(typeof A.value=="function")return wI(A.value)}C=B3(C)}function g(){return null}return g}function H3(C){try{return fI(C,""),!0}catch{return!1}}const JW=yI(["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"]),Cm=yI(["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"]),Am=yI(["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"]),S3=yI(["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"]),im=yI(["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"]),M3=yI(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vW=yI(["#text"]),kW=yI(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),lm=yI(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),LW=yI(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),qd=yI(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),D3=DI(/{{[\w\W]*|^[\w\W]*}}/g),K3=DI(/<%[\w\W]*|^[\w\W]*%>/g),F3=DI(/\${[\w\W]*/g),z3=DI(/^data-[\-\w.\u00B7-\uFFFF]+$/),J3=DI(/^aria-[\-\w]+$/),TW=DI(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),v3=DI(/^(?:\w+script|data):/i),k3=DI(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L3=DI(/^html$/i),T3=DI(/^[a-z][.\w]*(-[.\w]+)+$/i),xW=DI(/<[/\w!]/g),fW=DI(/<[/\w]/g),x3=DI(/<\/no(script|embed|frames)/i),f3=DI(/\/>/i),YC={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},jW=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],j3=yI(Ug({},jW)),Q3=(function(){const C={};return rl(jW,I=>{C[I]=DI(new RegExp("</"+I+"(?=[\\t\\n\\f\\r />])","i"))}),yI(C)})(),U3=function(){return typeof window>"u"?null:window},O3=function(I,g){if(typeof I!="object"||typeof I.createPolicy!="function")return null;let A=null;const i="data-tt-policy-suffix";g&&g.hasAttribute(i)&&(A=g.getAttribute(i));const l="dompurify"+(A?"#"+A:"");try{return I.createPolicy(l,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},QW=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Vi=function(I,g,A,i){return sC(I,g)&&xe(I[g])?Ug(i.base?wC(i.base):{},I[g],i.transform):A},em=function(I,g,A){const i=sC(I,g)?I[g]:void 0;return i&&typeof i=="object"?wC(i):A()};function UW(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:U3();const I=Cg=>UW(Cg);if(I.version="3.4.14",I.removed=[],!C||!C.document||C.document.nodeType!==YC.document||!C.Element)return I.isSupported=!1,I;let g=C.document;const A=g,i=A.currentScript;C.DocumentFragment;const l=C.HTMLTemplateElement,e=C.Node,t=C.Element,a=C.NodeFilter,d=C.NamedNodeMap;d===void 0&&(C.NamedNodeMap||C.MozNamedAttrMap),C.HTMLFormElement;const o=C.DOMParser,n=C.trustedTypes,s=t.prototype,Z=tA(s,"cloneNode"),m=tA(s,"remove"),b=tA(s,"nextSibling"),G=tA(s,"childNodes"),r=tA(s,"parentNode"),h=tA(s,"shadowRoot"),u=tA(s,"attributes"),B=e&&e.prototype?tA(e.prototype,"nodeType"):null,W=e&&e.prototype?tA(e.prototype,"nodeName"):null,w=e&&e.prototype?tA(e.prototype,"ownerDocument"):null,Y=function(K){return B?B(K):K.nodeType},p=function(K){return W?W(K):K.nodeName};if(typeof l=="function"){const Cg=g.createElement("template");Cg.content&&Cg.content.ownerDocument&&(g=Cg.content.ownerDocument)}let V,y="",N,H=!1,R=0;const S=function(){if(R>0)throw hl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},M=function(K){S(),R++;try{return V.createHTML(K)}finally{R--}},D=function(K){S(),R++;try{return V.createScriptURL(K)}finally{R--}},F=function(){return H||(N=O3(n,i),H=!0),N},z=g,k=z.implementation,f=z.createNodeIterator,Q=z.createDocumentFragment,E=z.getElementsByTagName,gg=A.importNode;let q=QW();I.isSupported=typeof RW=="function"&&typeof r=="function"&&k&&k.createHTMLDocument!==void 0;const bg=D3,jg=K3,aI=F3,Yg=z3,og=J3,pg=v3,lg=k3,Gg=T3;let Pg=TW,hg=null;const Qg=Ug({},[...JW,...Cm,...Am,...im,...vW]);let yg=null;const sI=Ug({},[...kW,...lm,...LW,...qd]);let dI=Object.seal(Te(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}})),pI=null,PA=null;const TI=Object.seal(Te(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Sd=!0,De=!0,I9=!1,C9=!0,ol=!1,Ke=!0,Fe=!1,Uu=!1,mZ=null,bZ=null,Ou=!1,ca=!1,GZ=!1,rZ=!1,A9=!0,i9=!1;const l9="user-content-";let Eu=!0,Pu=!1,da={},oa=null;const e9=Ug({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let t9=null;const a9=Ug({},["audio","video","img","source","image","track"]);let c9=null;const d9=Ug({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hZ="http://www.w3.org/1998/Math/MathML",uZ="http://www.w3.org/2000/svg",_A="http://www.w3.org/1999/xhtml";let na=_A,_u=!1,qu=null;const dng=Ug({},[hZ,uZ,_A],Im),o9=yI(["mi","mo","mn","ms","mtext"]);let $u=Ug({},o9);const n9=yI(["annotation-xml"]);let gB=Ug({},n9);const ong=Ug({},["title","style","font","a","script"]);let Md=null;const nng=["application/xhtml+xml","text/html"],sng="text/html";let WI=null,sa=null;const Zng=g.createElement("form"),s9=function(K){return K instanceof RegExp||K instanceof Function},IB=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(sa&&sa===K)return;(!K||typeof K!="object")&&(K={}),K=wC(K),Md=nng.indexOf(K.PARSER_MEDIA_TYPE)===-1?sng:K.PARSER_MEDIA_TYPE,WI=Md==="application/xhtml+xml"?Im:Ya,hg=Vi(K,"ALLOWED_TAGS",Qg,{transform:WI}),yg=Vi(K,"ALLOWED_ATTR",sI,{transform:WI}),qu=Vi(K,"ALLOWED_NAMESPACES",dng,{transform:Im}),c9=Vi(K,"ADD_URI_SAFE_ATTR",d9,{transform:WI,base:d9}),t9=Vi(K,"ADD_DATA_URI_TAGS",a9,{transform:WI,base:a9}),oa=Vi(K,"FORBID_CONTENTS",e9,{transform:WI}),pI=Vi(K,"FORBID_TAGS",wC({}),{transform:WI}),PA=Vi(K,"FORBID_ATTR",wC({}),{transform:WI}),da=sC(K,"USE_PROFILES")?K.USE_PROFILES&&typeof K.USE_PROFILES=="object"?wC(K.USE_PROFILES):K.USE_PROFILES:!1,Sd=K.ALLOW_ARIA_ATTR!==!1,De=K.ALLOW_DATA_ATTR!==!1,I9=K.ALLOW_UNKNOWN_PROTOCOLS||!1,C9=K.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ol=K.SAFE_FOR_TEMPLATES||!1,Ke=K.SAFE_FOR_XML!==!1,Fe=K.WHOLE_DOCUMENT||!1,ca=K.RETURN_DOM||!1,GZ=K.RETURN_DOM_FRAGMENT||!1,rZ=K.RETURN_TRUSTED_TYPE||!1,Ou=K.FORCE_BODY||!1,A9=K.SANITIZE_DOM!==!1,i9=K.SANITIZE_NAMED_PROPS||!1,Eu=K.KEEP_CONTENT!==!1,Pu=K.IN_PLACE||!1,Pg=H3(K.ALLOWED_URI_REGEXP)?K.ALLOWED_URI_REGEXP:TW,na=typeof K.NAMESPACE=="string"?K.NAMESPACE:_A,$u=em(K,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ug({},o9)),gB=em(K,"HTML_INTEGRATION_POINTS",()=>Ug({},n9));const L=em(K,"CUSTOM_ELEMENT_HANDLING",()=>Te(null));if(dI=Te(null),sC(L,"tagNameCheck")&&s9(L.tagNameCheck)&&(dI.tagNameCheck=L.tagNameCheck),sC(L,"attributeNameCheck")&&s9(L.attributeNameCheck)&&(dI.attributeNameCheck=L.attributeNameCheck),sC(L,"allowCustomizedBuiltInElements")&&typeof L.allowCustomizedBuiltInElements=="boolean"&&(dI.allowCustomizedBuiltInElements=L.allowCustomizedBuiltInElements),DI(dI),ol&&(De=!1),GZ&&(ca=!0),da&&(hg=Ug({},vW),yg=Te(null),da.html===!0&&(Ug(hg,JW),Ug(yg,kW)),da.svg===!0&&(Ug(hg,Cm),Ug(yg,lm),Ug(yg,qd)),da.svgFilters===!0&&(Ug(hg,Am),Ug(yg,lm),Ug(yg,qd)),da.mathMl===!0&&(Ug(hg,im),Ug(yg,LW),Ug(yg,qd))),TI.tagCheck=null,TI.attributeCheck=null,sC(K,"ADD_TAGS")&&(typeof K.ADD_TAGS=="function"?TI.tagCheck=K.ADD_TAGS:xe(K.ADD_TAGS)&&(hg===Qg&&(hg=wC(hg)),Ug(hg,K.ADD_TAGS,WI))),sC(K,"ADD_ATTR")&&(typeof K.ADD_ATTR=="function"?TI.attributeCheck=K.ADD_ATTR:xe(K.ADD_ATTR)&&(yg===sI&&(yg=wC(yg)),Ug(yg,K.ADD_ATTR,WI))),sC(K,"ADD_FORBID_CONTENTS")&&xe(K.ADD_FORBID_CONTENTS)&&(oa===e9&&(oa=wC(oa)),Ug(oa,K.ADD_FORBID_CONTENTS,WI)),Eu&&(hg["#text"]=!0),Fe&&Ug(hg,["html","head","body"]),hg.table&&(Ug(hg,["tbody"]),delete pI.tbody),K.TRUSTED_TYPES_POLICY){if(typeof K.TRUSTED_TYPES_POLICY.createHTML!="function")throw hl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof K.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw hl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=V;V=K.TRUSTED_TYPES_POLICY;try{y=M("")}catch(dg){throw V=U,dg}}else K.TRUSTED_TYPES_POLICY===null?(V=void 0,y=""):(V===void 0&&(V=F()),V&&typeof y=="string"&&(y=M("")));yI&&yI(K),sa=K},Z9=Ug({},[...Cm,...Am,...S3]),m9=Ug({},[...im,...M3]),mng=function(K,L,U){return L.namespaceURI===_A?K==="svg":L.namespaceURI===hZ?K==="svg"&&(U==="annotation-xml"||$u[U]):!!Z9[K]},bng=function(K,L,U){return L.namespaceURI===_A?K==="math":L.namespaceURI===uZ?K==="math"&&gB[U]:!!m9[K]},Gng=function(K,L,U){return L.namespaceURI===uZ&&!gB[U]||L.namespaceURI===hZ&&!$u[U]?!1:!m9[K]&&(ong[K]||!Z9[K])},rng=function(K){let L=r(K);(!L||!L.tagName)&&(L={namespaceURI:na,tagName:"template"});const U=Ya(K.tagName),dg=Ya(L.tagName);return qu[K.namespaceURI]?K.namespaceURI===uZ?mng(U,L,dg):K.namespaceURI===hZ?bng(U,L,dg):K.namespaceURI===_A?Gng(U,L,dg):!!(Md==="application/xhtml+xml"&&qu[K.namespaceURI]):!1},nl=function(K){wa(I.removed,{element:K});try{r(K).removeChild(K)}catch{if(m(K),!r(K))throw hl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},b9=function(K,L,U){try{K.removeAttributeNode(L)}catch{try{K.removeAttribute(U)}catch{}}},BZ=function(K){WZ(K);const L=G(K);if(L){const dg=[];rl(L,ug=>{wa(dg,ug)}),rl(dg,ug=>{try{m(ug)}catch{}})}const U=u(K);if(U)for(let dg=U.length-1;dg>=0;--dg){const ug=U[dg],Mg=ug&&ug.name;typeof Mg=="string"&&b9(K,ug,Mg)}},ze=function(K,L,U){if(!U)try{U=L.getAttributeNode(K)}catch{U=null}wa(I.removed,{attribute:U||null,from:L});try{U?L.removeAttributeNode(U):L.removeAttribute(K)}catch{try{L.removeAttribute(K)}catch{}}if(K==="is")if(ca||GZ)try{nl(L)}catch{}else try{L.setAttribute(K,"")}catch{}},hng=function(K){const L=u(K);if(L)for(let U=L.length-1;U>=0;--U){const dg=L[U],ug=dg&&dg.name;typeof ug!="string"||yg[WI(ug)]||b9(K,dg,ug)}},WZ=function(K){const L=[K];for(;L.length>0;){const U=L.pop();Y(U)===YC.element&&hng(U);const ug=G(U);if(ug)for(let Mg=ug.length-1;Mg>=0;--Mg)L.push(ug[Mg])}},G9=function(K,L){return Ke?K==="patchsrc"?!0:K==="for"&&L!=="label"&&L!=="output":!1},ung=function(K){if(!Ke)return;const L=[K];for(;L.length>0;){const U=L.pop(),dg=Y(U);if(dg===YC.processingInstruction||dg===YC.comment&&fI(fW,U.data)){try{m(U)}catch{}continue}if(dg===YC.element){const Mg=U,iI=WI(p(U));try{Mg.hasAttribute&&Mg.hasAttribute("patchsrc")&&Mg.removeAttribute("patchsrc"),Mg.hasAttribute&&Mg.hasAttribute("for")&&G9("for",iI)&&Mg.removeAttribute("for")}catch{}}const ug=G(U);if(ug)for(let Mg=ug.length-1;Mg>=0;--Mg)L.push(ug[Mg])}},r9=function(K){let L=null,U=null;if(Ou)K="<remove></remove>"+K;else{const Mg=DW(K,/^[\r\n\t ]+/);U=Mg&&Mg[0]}Md==="application/xhtml+xml"&&na===_A&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");const dg=V?M(K):K;if(na===_A)try{L=new o().parseFromString(dg,Md)}catch{}if(!L||!L.documentElement){L=k.createDocument(na,"template",null);try{L.documentElement.innerHTML=_u?y:dg}catch{}}const ug=L.body||L.documentElement;return K&&U&&ug.insertBefore(g.createTextNode(U),ug.childNodes[0]||null),na===_A?E.call(L,Fe?"html":"body")[0]:Fe?L.documentElement:ug},h9=function(K){const L=w?w(K):K.ownerDocument;return f.call(L||K,K,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT|a.SHOW_PROCESSING_INSTRUCTION|a.SHOW_CDATA_SECTION,null)},wZ=function(K){return K=Va(K,bg," "),K=Va(K,jg," "),K=Va(K,aI," "),K},CB=function(K){var L;K.normalize();const U=w?w(K):K.ownerDocument,dg=f.call(U||K,K,a.SHOW_TEXT|a.SHOW_COMMENT|a.SHOW_CDATA_SECTION|a.SHOW_PROCESSING_INSTRUCTION,null);let ug=dg.nextNode();for(;ug;)ug.data=wZ(ug.data),ug=dg.nextNode();const Mg=(L=K.querySelectorAll)===null||L===void 0?void 0:L.call(K,"template");Mg&&rl(Mg,iI=>{Za(iI.content)&&CB(iI.content)})},YZ=function(K){const L=W?W(K):null;return typeof L!="string"||WI(L)!=="form"?!1:typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||K.attributes!==u(K)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function"||K.nodeType!==B(K)||K.childNodes!==G(K)},Za=function(K){if(!B||typeof K!="object"||K===null)return!1;try{return B(K)===YC.documentFragment}catch{return!1}},Dd=function(K){if(!B||typeof K!="object"||K===null)return!1;try{return typeof B(K)=="number"}catch{return!1}};function qA(Cg,K,L){Cg.length!==0&&rl(Cg,U=>{U.call(I,K,L,sa)})}const Bng=function(K,L){return!!(Ke&&K.hasChildNodes()&&!Dd(K.firstElementChild)&&fI(xW,K.textContent)&&fI(xW,K.innerHTML)||Ke&&K.namespaceURI===_A&&j3[L]&&(Dd(K.firstElementChild)||typeof K.textContent=="string"&&fI(Q3[L],K.textContent))||K.nodeType===YC.processingInstruction||Ke&&K.nodeType===YC.comment&&fI(fW,K.data))},VZ=function(K,L){if(K instanceof RegExp)return fI(K,L);if(K instanceof Function){for(var U=arguments.length,dg=new Array(U>2?U-2:0),ug=2;ug<U;ug++)dg[ug-2]=arguments[ug];return!!K(L,...dg)}return!1},Wng=function(K,L,U){if(!pI[L]&&Y9(L)&&VZ(dI.tagNameCheck,L))return!1;if(Eu&&!oa[L]){const dg=r(K),ug=G(K);if(ug&&dg){const Mg=ug.length;for(let iI=Mg-1;iI>=0;--iI){const ZI=K===U?Z(ug[iI],!0):ug[iI];dg.insertBefore(ZI,b(K))}}}return nl(K),!0},u9=function(K,L,U,dg){return K.length===0?L:L===U||L===dg?wC(L):L},B9=function(K,L){return K===L||r(K)!==null?!1:(Pu&&WZ(K),!0)},W9=function(K,L){if(qA(q.beforeSanitizeElements,K,null),B9(K,L))return!0;if(YZ(K))return nl(K),!0;const U=WI(p(K));if(hg=u9(q.uponSanitizeElement,hg,Qg,mZ),qA(q.uponSanitizeElement,K,{tagName:U,allowedTags:hg}),B9(K,L))return!0;if(Bng(K,U))return nl(K),!0;if(pI[U]||!(TI.tagCheck instanceof Function&&TI.tagCheck(U))&&!hg[U]){const ug=Wng(K,U,L);return ug===!1&&qA(q.afterSanitizeElements,K,null),ug}if(Y(K)===YC.element&&!rng(K)||(U==="noscript"||U==="noembed"||U==="noframes")&&fI(x3,K.innerHTML))return nl(K),!0;if(ol&&K.nodeType===YC.text){const ug=wZ(K.textContent);K.textContent!==ug&&(wa(I.removed,{element:K.cloneNode()}),K.textContent=ug)}return qA(q.afterSanitizeElements,K,null),!1},w9=function(K,L,U){if(PA[L]||G9(L,K)||A9&&(L==="id"||L==="name")&&(U in g||U in Zng))return!1;const dg=yg[L]||TI.attributeCheck instanceof Function&&TI.attributeCheck(L,K);return De&&fI(Yg,L)||Sd&&fI(og,L)?!0:dg?c9[L]||fI(Pg,Va(U,lg,""))||(L==="src"||L==="xlink:href"||L==="href")&&K!=="script"&&KW(U,"data:")===0&&t9[K]||I9&&!fI(pg,Va(U,lg,""))?!0:!U:Y9(K)&&VZ(dI.tagNameCheck,K)&&VZ(dI.attributeNameCheck,L,K)||L==="is"&&dI.allowCustomizedBuiltInElements&&VZ(dI.tagNameCheck,U)},wng=Ug({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Y9=function(K){return!wng[Ya(K)]&&fI(Gg,K)},Yng=function(K,L,U,dg){if(V&&typeof n=="object"&&typeof n.getAttributeType=="function"&&!U)switch(n.getAttributeType(K,L)){case"TrustedHTML":return M(dg);case"TrustedScriptURL":return D(dg)}return dg},Vng=function(K,L,U,dg){try{U?K.setAttributeNS(U,L,dg):K.setAttribute(L,dg),YZ(K)?nl(K):MW(I.removed)}catch{ze(L,K)}},V9=function(K){qA(q.beforeSanitizeAttributes,K,null);const L=K.attributes;if(!L||YZ(K))return;yg=u9(q.uponSanitizeAttribute,yg,sI,bZ);const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:yg,forceKeepAttr:void 0};let dg=L.length;const ug=WI(K.nodeName);for(;dg--;){const Mg=L[dg],iI=Mg.name,ZI=Mg.namespaceURI,uC=Mg.value,BC=WI(iI),iB=uC;let nC=iI==="value"?iB:V3(iB);if(U.attrName=BC,U.attrValue=nC,U.keepAttr=!0,U.forceKeepAttr=void 0,qA(q.uponSanitizeAttribute,K,U),nC=U.attrValue,i9&&(BC==="id"||BC==="name")&&KW(nC,l9)!==0&&(ze(iI,K,Mg),nC=l9+nC),Ke&&fI(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,nC)){ze(iI,K,Mg);continue}if(BC==="attributename"&&DW(nC,"href")){ze(iI,K,Mg);continue}if(!U.forceKeepAttr){if(!U.keepAttr){ze(iI,K,Mg);continue}if(!C9&&fI(f3,nC)){ze(iI,K,Mg);continue}if(ol&&(nC=wZ(nC)),!w9(ug,BC,nC)){ze(iI,K,Mg);continue}nC=Yng(ug,BC,ZI,nC),nC!==iB&&Vng(K,iI,ZI,nC)}}qA(q.afterSanitizeAttributes,K,null)},pZ=function(K){let L=null;const U=h9(K);for(qA(q.beforeSanitizeShadowDOM,K,null);L=U.nextNode();)if(qA(q.uponSanitizeShadowNode,L,null),W9(L,K),V9(L),Za(L.content)&&pZ(L.content),Y(L)===YC.element){const dg=h(L);Za(dg)&&(AB(dg),pZ(dg))}qA(q.afterSanitizeShadowDOM,K,null)},AB=function(K){const L=[{node:K,shadow:null}];for(;L.length>0;){const U=L.pop();if(U.shadow){pZ(U.shadow);continue}const dg=U.node,Mg=Y(dg)===YC.element,iI=G(dg);if(iI)for(let ZI=iI.length-1;ZI>=0;--ZI)L.push({node:iI[ZI],shadow:null});if(Mg){const ZI=W?W(dg):null;if(typeof ZI=="string"&&WI(ZI)==="template"){const uC=dg.content;Za(uC)&&L.push({node:uC,shadow:null})}}if(Mg){const ZI=h(dg);Za(ZI)&&L.push({node:null,shadow:ZI},{node:ZI,shadow:null})}}};return I.sanitize=function(Cg){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=null,U=null,dg=null,ug=null;if(_u=!Cg,_u&&(Cg="<!-->"),typeof Cg!="string"&&!Dd(Cg)&&(Cg=R3(Cg),typeof Cg!="string"))throw hl("dirty is not a string, aborting");if(!I.isSupported)return Cg;Uu?(hg=mZ,yg=bZ):IB(K),(q.uponSanitizeElement.length>0||q.uponSanitizeAttribute.length>0)&&(hg=wC(hg)),q.uponSanitizeAttribute.length>0&&(yg=wC(yg)),I.removed=[];const Mg=Pu&&typeof Cg!="string"&&Dd(Cg);if(Mg){ung(Cg);const uC=p(Cg);if(typeof uC=="string"){const BC=WI(uC);if(!hg[BC]||pI[BC])throw BZ(Cg),hl("root node is forbidden and cannot be sanitized in-place")}if(YZ(Cg))throw BZ(Cg),hl("root node is clobbered and cannot be sanitized in-place");try{AB(Cg)}catch(BC){throw BZ(Cg),BC}}else if(Dd(Cg))L=r9("<!---->"),U=L.ownerDocument.importNode(Cg,!0),U.nodeType===YC.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?L=U:L.appendChild(U),AB(U);else{if(!ca&&!ol&&!Fe&&Cg.indexOf("<")===-1)return V&&rZ?M(Cg):Cg;if(L=r9(Cg),!L)return ca?null:rZ?y:""}L&&Ou&&nl(L.firstChild);const iI=Mg?Cg:L;try{const uC=h9(iI);for(;dg=uC.nextNode();)W9(dg,iI),V9(dg),Za(dg.content)&&pZ(dg.content)}catch(uC){throw Mg&&(BZ(Cg),rl(I.removed,BC=>{BC.element&&WZ(BC.element)})),uC}if(Mg)return rl(I.removed,uC=>{uC.element&&WZ(uC.element)}),ol&&CB(Cg),Cg;if(ca){if(ol&&CB(L),GZ)for(ug=Q.call(L.ownerDocument);L.firstChild;)ug.appendChild(L.firstChild);else ug=L;return(yg.shadowroot||yg.shadowrootmode)&&(ug=gg.call(A,ug,!0)),ug}let ZI=Fe?L.outerHTML:L.innerHTML;return Fe&&hg["!doctype"]&&L.ownerDocument&&L.ownerDocument.doctype&&L.ownerDocument.doctype.name&&fI(L3,L.ownerDocument.doctype.name)&&(ZI="<!DOCTYPE "+L.ownerDocument.doctype.name+`>
71
71
  `+ZI),ol&&(ZI=wZ(ZI)),V&&rZ?M(ZI):ZI},I.setConfig=function(){let Cg=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};IB(Cg),Uu=!0,mZ=hg,bZ=yg},I.clearConfig=function(){sa=null,Uu=!1,mZ=null,bZ=null,V=N,y=""},I.isValidAttribute=function(Cg,K,L){sa||IB({});const U=WI(Cg),dg=WI(K);return w9(U,dg,L)},I.addHook=function(Cg,K){typeof K=="function"&&sC(q,Cg)&&wa(q[Cg],K)},I.removeHook=function(Cg,K){if(sC(q,Cg)){if(K!==void 0){const L=w3(q[Cg],K);return L===-1?void 0:Y3(q[Cg],L,1)[0]}return MW(q[Cg])}},I.removeHooks=function(Cg){sC(q,Cg)&&(q[Cg]=[])},I.removeAllHooks=function(){q=QW()},I}var tm=UW();const $d=typeof tm.sanitize=="function"?tm:tm.default;function E3(C){const I=C.trim();if(!I)return!1;const g=[/^(好的|已|我|现在|以上|这就是|这是|根据|基于)/,/^(表单|流程|Schema|JSON|数据)\s*(已|已经|已生成|已创建|已更新)/,/已(生成|创建|更新|完成|应用)(好|了)?/,/以上(就是|是)/,/请(查看|确认|检查|参考)/,/希望(这|这个)/];return I.length<100&&g.some(A=>A.test(I))}function OW(C){if(!C)return[{type:"text",content:""}];const I=[],g=/```([\w:+#.-]*)\r?\n([\s\S]*?)```|```([^\n`]*?)```|<schema>([\s\S]*?)<\/schema>/g;let A=0,i,l=!1;for(;(i=g.exec(C))!==null;){const a=C.slice(A,i.index);if(a.trim()&&I.push({type:"text",content:a}),i[0].startsWith("<schema>"))I.push({type:"code",content:(i[4]||"").trim(),language:"json"}),l=!0;else if(i[1]!==void 0){const d=(i[1]||"text").trim()||"text",o=(i[2]||"").replace(/^\n/,"").replace(/\n$/,"");EW(I,d,o)}else EW(I,"text",(i[3]||"").trim());A=i.index+i[0].length}const e=C.slice(A);e.trim()&&(l&&E3(e)||I.push({type:"text",content:e}));const t=I.filter((a,d)=>a.type!=="text"||a.content.trim()?!0:d>0&&d<I.length-1);return t.length?t:[{type:"text",content:C}]}function EW(C,I,g){if(I.startsWith("artifact:")){const A=I.slice(9);C.push({type:"artifact",content:g,language:A,artifactType:A});return}C.push({type:"code",content:g,language:I})}function am(C){if(!C)return"";const g=II.parse(C,{breaks:!0,gfm:!0}).replace(/<table>/g,'<div class="table-scroll"><table>').replace(/<\/table>/g,"</table></div>");return typeof window>"u"||typeof($d==null?void 0:$d.sanitize)!="function"?g:$d.sanitize(g,{ADD_ATTR:["class"]})}const P3={class:"apf-message-parts"},_3=["innerHTML"],q3={class:"apf-artifact-head"},$3={class:"apf-artifact-badge"},gL={class:"apf-part-actions"},IL=["onClick"],CL=["onClick"],AL={class:"apf-code-block"},iL={class:"apf-code-head"},lL={class:"apf-code-lang"},eL={class:"apf-part-actions"},tL=["onClick"],aL=["onClick"],cL={class:"apf-code-block"},PW=O(c.defineComponent({__name:"MessageParts",props:{content:{}},setup(C){const I=C,g=c.computed(()=>OW(I.content||"").map(A));function A(a){if(!((a.language||"").toLowerCase()==="json"||a.artifactType==="json"||i(a.content)))return{...a,display:a.content,isJson:!1};try{const n=JSON.parse(a.content);return{...a,language:a.language||"json",display:JSON.stringify(n,null,2),isJson:!0}}catch{return{...a,display:a.content,isJson:!1}}}function i(a){const d=a.trim();return d.startsWith("{")&&d.endsWith("}")||d.startsWith("[")&&d.endsWith("]")}function l(a){return a.type==="artifact"?a.artifactType||"artifact":a.isJson?"json":a.language&&a.language!=="text"?a.language:"code"}function e(a){var d;a&&((d=navigator.clipboard)==null||d.writeText(a))}function t(a){const d=a.isJson||a.language==="json"?"json":a.language&&a.language!=="text"?a.language.replace(/[^a-z0-9]+/gi,""):"txt",o=new Blob([a.display],{type:"text/plain;charset=utf-8"}),n=URL.createObjectURL(o),s=document.createElement("a");s.href=n,s.download=`result.${d||"txt"}`,s.click(),URL.revokeObjectURL(n)}return(a,d)=>(c.openBlock(),c.createElementBlock("div",P3,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(g.value,(o,n)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:n},[o.type==="text"?(c.openBlock(),c.createElementBlock("div",{key:0,class:"apf-md-block",innerHTML:c.unref(am)(o.content)},null,8,_3)):o.type==="artifact"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(["apf-artifact-card",{"apf-json":o.isJson}])},[c.createElementVNode("div",q3,[c.createElementVNode("span",$3,"工件 · "+c.toDisplayString(l(o)),1),c.createElementVNode("div",gL,[c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"复制",onClick:s=>e(o.display)},[...d[0]||(d[0]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"13",height:"13"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])],8,IL),c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"下载",onClick:s=>t(o)},[...d[1]||(d[1]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"13",height:"13"},[c.createElementVNode("path",{d:"M8 2.5v7.2M5.2 7.5 8 10.3l2.8-2.8M3.5 13h9",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,CL)])]),c.createElementVNode("pre",AL,[c.createElementVNode("code",null,c.toDisplayString(o.display),1)])],2)):(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(["apf-code-wrap",{"apf-json":o.isJson}])},[c.createElementVNode("div",iL,[c.createElementVNode("span",lL,c.toDisplayString(l(o)),1),c.createElementVNode("div",eL,[c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"复制",onClick:s=>e(o.display)},[...d[2]||(d[2]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"13",height:"13"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])],8,tL),c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"下载",onClick:s=>t(o)},[...d[3]||(d[3]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"13",height:"13"},[c.createElementVNode("path",{d:"M8 2.5v7.2M5.2 7.5 8 10.3l2.8-2.8M3.5 13h9",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,aL)])]),c.createElementVNode("pre",cL,[c.createElementVNode("code",null,c.toDisplayString(o.display),1)])],2))],64))),128))]))}}),[["__scopeId","data-v-ed1039e3"]]),dL={key:0,class:"apf-att-list"},oL=["aria-label","onClick"],nL=["src","alt"],sL=["aria-label","onClick"],ZL={class:"apf-att-badge","aria-hidden":"true"},mL={class:"apf-att-meta"},bL={key:0},_W=O(c.defineComponent({__name:"MessageAttachmentList",props:{attachments:{}},emits:["preview"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>g.attachments.filter(Zl)),l=c.computed(()=>g.attachments.filter(t=>!Zl(t)));function e(t){A("preview",t)}return(t,a)=>{var d;return(d=C.attachments)!=null&&d.length?(c.openBlock(),c.createElementBlock("div",dL,[i.value.length?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["apf-image-grid",{"apf-multi":i.value.length>1}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,o=>(c.openBlock(),c.createElementBlock("button",{key:o.id,type:"button",class:"apf-att-image","aria-label":`预览图片 ${o.filename}`,onClick:n=>e(o)},[c.createElementVNode("img",{src:o.url,alt:o.filename,loading:"lazy"},null,8,nL)],8,oL))),128))],2)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,o=>(c.openBlock(),c.createElementBlock("button",{key:o.id,type:"button",class:"apf-att-file","aria-label":`${c.unref(ve)(o)?"预览":c.unref(TZ)(o)?"查看":"打开"} ${o.filename}`,onClick:n=>e(o)},[c.createElementVNode("span",ZL,c.toDisplayString(c.unref(fd)(o)),1),c.createElementVNode("span",mL,[c.createElementVNode("strong",null,c.toDisplayString(o.filename),1),c.createElementVNode("small",null,[o.size?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(c.unref(jd)(o.size)),1)],64)):c.createCommentVNode("",!0),c.unref(ve)(o)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(" · 点击预览")],64)):c.unref(TZ)(o)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[c.createTextVNode(" · 点击查看")],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:3},[c.createTextVNode(" · 点击打开")],64))]),o.excerpt?(c.openBlock(),c.createElementBlock("em",bL,c.toDisplayString(o.excerpt),1)):c.createCommentVNode("",!0)])],8,sL))),128))])):c.createCommentVNode("",!0)}}}),[["__scopeId","data-v-a604161c"]]),GL={key:0,class:"apf-doc-list"},rL=["role","tabindex","aria-label","onClick","onKeydown"],hL={class:"apf-doc-body"},uL={class:"apf-doc-name"},BL={class:"apf-doc-summary"},WL={key:0,class:"apf-doc-meta"},wL={key:1,class:"apf-doc-hint"},qW=O(c.defineComponent({__name:"DocumentSummaryList",props:{summaries:{},attachments:{}},emits:["preview"],setup(C,{emit:I}){const g=C,A=I;function i(t){var d;if(!((d=g.attachments)!=null&&d.length))return null;if(t.attachmentId){const o=g.attachments.find(n=>n.id===t.attachmentId);if(o)return o}const a=(t.filename||"").toLowerCase();return g.attachments.find(o=>(o.filename||"").toLowerCase()===a)||null}function l(t){const a=i(t);a&&A("preview",a)}function e(t){return i(t)!==null}return(t,a)=>{var d;return(d=C.summaries)!=null&&d.length?(c.openBlock(),c.createElementBlock("div",GL,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.summaries,o=>(c.openBlock(),c.createElementBlock("article",{key:o.documentId,class:c.normalizeClass(["apf-doc-card",{"apf-clickable":e(o)}]),role:e(o)?"button":void 0,tabindex:e(o)?0:void 0,"aria-label":e(o)?`预览 ${o.filename}`:void 0,onClick:n=>l(o),onKeydown:[c.withKeys(n=>l(o),["enter"]),c.withKeys(c.withModifiers(n=>l(o),["prevent"]),["space"])]},[a[0]||(a[0]=c.createElementVNode("div",{class:"apf-doc-icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("path",{d:"M4 2.5h5.2L12 5.3V13.5H4V2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"}),c.createElementVNode("path",{d:"M9.2 2.5V5.3H12",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})])],-1)),c.createElementVNode("div",hL,[c.createElementVNode("strong",uL,c.toDisplayString(o.filename),1),c.createElementVNode("p",BL,c.toDisplayString(o.summary),1),o.pageCount?(c.openBlock(),c.createElementBlock("span",WL,c.toDisplayString(o.pageCount)+" 页",1)):c.createCommentVNode("",!0),e(o)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",wL,"无对应附件,请从附件列表打开"))])],42,rL))),128))])):c.createCommentVNode("",!0)}}}),[["__scopeId","data-v-f22e939c"]]),YL=["aria-label"],VL={class:"apf-preview-head"},pL={class:"apf-preview-title"},yL={class:"apf-preview-actions"},NL=["href"],XL=["src","alt"],RL={key:3,class:"apf-gallery-counter"},HL={key:1,class:"apf-preview-body apf-preview-body-pdf"},SL={key:2,class:"apf-preview-body apf-preview-body-degraded"},ML={class:"apf-degraded-content"},DL={class:"apf-degraded-badge"},KL={class:"apf-degraded-filename"},FL={key:0,class:"apf-degraded-size"},zL={class:"apf-degraded-actions"},JL=["href"],vL=.5,kL=3,$W=.25,gw=O(c.defineComponent({__name:"AttachmentPreviewModal",props:{modelValue:{type:Boolean},attachment:{},gallery:{}},emits:["update:modelValue","update:attachment"],setup(C,{emit:I}){const g=C,A=I,i=c.computed({get:()=>g.modelValue,set:N=>A("update:modelValue",N)});function l(N){return N.url||""}const e=c.computed(()=>g.attachment?Zl(g.attachment):!1),t=c.computed(()=>g.attachment?ve(g.attachment):!1),a=c.computed(()=>{var H;return((H=g.gallery)!=null&&H.length?g.gallery:g.attachment?[g.attachment]:[]).filter(Zl)}),d=c.computed(()=>!a.value.length||!g.attachment?-1:a.value.findIndex(N=>{var H;return N.id===((H=g.attachment)==null?void 0:H.id)})),o=c.computed(()=>d.value>0),n=c.computed(()=>d.value>=0&&d.value<a.value.length-1),s=c.ref(1),Z=c.ref(null),m=c.ref(null),b=c.ref(null);function G(){i.value=!1}function r(){if(!o.value)return;const N=a.value[d.value-1];N&&A("update:attachment",N)}function h(){if(!n.value)return;const N=a.value[d.value+1];N&&A("update:attachment",N)}function u(){s.value=Math.min(kL,+(s.value+$W).toFixed(2))}function B(){s.value=Math.max(vL,+(s.value-$W).toFixed(2))}function W(){s.value=1}async function w(N){const H=l(N);if(H)try{const S=await(await fetch(H)).blob(),M=URL.createObjectURL(S),D=document.createElement("a");D.href=M,D.download=N.filename||"download",D.rel="noopener",document.body.appendChild(D),D.click(),D.remove(),URL.revokeObjectURL(M)}catch{const R=document.createElement("a");R.href=H,R.download=N.filename||"download",R.target="_blank",R.rel="noopener",document.body.appendChild(R),R.click(),R.remove()}}function Y(N){if(i.value){if(N.key==="Escape"){N.preventDefault(),G();return}if(N.key==="ArrowLeft"&&o.value){N.preventDefault(),r();return}if(N.key==="ArrowRight"&&n.value){N.preventDefault(),h();return}if(N.key==="+"||N.key==="="){e.value&&(N.preventDefault(),u());return}if(N.key==="-"){e.value&&(N.preventDefault(),B());return}if(N.key==="0"&&e.value){N.preventDefault(),W();return}if(N.key==="Tab"&&Z.value){const H=Z.value.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(H.length===0)return;const R=H[0],S=H[H.length-1];N.shiftKey&&document.activeElement===R?(N.preventDefault(),S.focus()):!N.shiftKey&&document.activeElement===S&&(N.preventDefault(),R.focus())}}}c.watch(i,N=>{N?(b.value=document.activeElement,requestAnimationFrame(()=>{var H;return(H=m.value)==null?void 0:H.focus()}),document.addEventListener("keydown",Y)):(document.removeEventListener("keydown",Y),s.value=1,b.value&&(b.value.focus(),b.value=null))},{immediate:!0}),c.watch(()=>{var N;return(N=g.attachment)==null?void 0:N.id},()=>{s.value=1}),c.onUnmounted(()=>document.removeEventListener("keydown",Y));function p(N){N.target===N.currentTarget&&G()}function V(N){N.stopPropagation()}function y(N){e.value&&(N.preventDefault(),N.deltaY<0?u():B())}return(N,H)=>(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[i.value&&C.attachment?(c.openBlock(),c.createElementBlock("div",{key:0,class:"apf-preview-mask",role:"dialog","aria-modal":"true","aria-label":`预览 ${C.attachment.filename}`,onClick:p},[c.createElementVNode("div",{ref_key:"panelRef",ref:Z,class:c.normalizeClass(["apf-preview-panel",{"apf-preview-image":e.value,"apf-preview-pdf":t.value,"apf-preview-degraded":!e.value&&!t.value}]),onClick:V},[c.createElementVNode("header",VL,[c.createElementVNode("strong",pL,c.toDisplayString(C.attachment.filename),1),c.createElementVNode("div",yL,[e.value?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("button",{type:"button",class:"apf-preview-action-btn","aria-label":"缩小",onClick:B},"−"),c.createElementVNode("button",{type:"button",class:"apf-preview-action-btn","aria-label":"重置缩放",onClick:W},c.toDisplayString(Math.round(s.value*100))+"% ",1),c.createElementVNode("button",{type:"button",class:"apf-preview-action-btn","aria-label":"放大",onClick:u},"+")],64)):c.createCommentVNode("",!0),l(C.attachment)?(c.openBlock(),c.createElementBlock("a",{key:1,href:l(C.attachment),target:"_blank",rel:"noopener",class:"apf-preview-action-btn"},c.toDisplayString(t.value?"新窗口打开":e.value?"打开原图":"打开原文件"),9,NL)):c.createCommentVNode("",!0),l(C.attachment)?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:"apf-preview-action-btn",onClick:H[0]||(H[0]=R=>w(C.attachment))}," 下载 ")):c.createCommentVNode("",!0),c.createElementVNode("button",{ref_key:"closeBtnRef",ref:m,type:"button",class:"apf-preview-action-btn","aria-label":"关闭预览",onClick:G}," 关闭 ",512)])]),e.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:"apf-preview-body apf-preview-body-image",onWheel:c.withModifiers(y,["prevent"])},[o.value?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-gallery-btn apf-gallery-prev","aria-label":"上一张图片",onClick:r}," ‹ ")):c.createCommentVNode("",!0),l(C.attachment)?(c.openBlock(),c.createElementBlock("img",{key:1,src:l(C.attachment),alt:C.attachment.filename,class:"apf-preview-img",style:c.normalizeStyle({transform:`scale(${s.value})`})},null,12,XL)):c.createCommentVNode("",!0),n.value?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:"apf-gallery-btn apf-gallery-next","aria-label":"下一张图片",onClick:h}," › ")):c.createCommentVNode("",!0),a.value.length>1?(c.openBlock(),c.createElementBlock("div",RL,c.toDisplayString(d.value+1)+" / "+c.toDisplayString(a.value.length),1)):c.createCommentVNode("",!0)],32)):t.value?(c.openBlock(),c.createElementBlock("div",HL,[l(C.attachment)?(c.openBlock(),c.createBlock(xZ,{key:0,url:l(C.attachment),title:C.attachment.filename,"min-height":"70vh"},null,8,["url","title"])):c.createCommentVNode("",!0)])):(c.openBlock(),c.createElementBlock("div",SL,[c.createElementVNode("div",ML,[c.createElementVNode("span",DL,c.toDisplayString(c.unref(fd)(C.attachment)),1),c.createElementVNode("strong",KL,c.toDisplayString(C.attachment.filename),1),C.attachment.size?(c.openBlock(),c.createElementBlock("p",FL,c.toDisplayString(c.unref(jd)(C.attachment.size)),1)):c.createCommentVNode("",!0),H[2]||(H[2]=c.createElementVNode("p",{class:"apf-degraded-hint"},"此格式暂不支持应用内预览",-1)),c.createElementVNode("div",zL,[l(C.attachment)?(c.openBlock(),c.createElementBlock("a",{key:0,href:l(C.attachment),target:"_blank",rel:"noopener",class:"apf-preview-action-btn apf-preview-action-primary"}," 打开原文件 ",8,JL)):c.createCommentVNode("",!0),l(C.attachment)?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-preview-action-btn apf-preview-action-primary",onClick:H[1]||(H[1]=R=>w(C.attachment))}," 下载 ")):c.createCommentVNode("",!0)])])]))],2)],8,YL)):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-13cf1e3e"]]),LL={class:"apf-bubble-wrap"},TL={key:0,class:"apf-tip"},xL={key:1,class:"apf-typing"},fL={key:2,class:"apf-result-wrap"},jL={key:2,class:"apf-inline-progress"},QL={key:0,class:"apf-result-actions"},UL={key:1,class:"apf-fail-actions"},OL={key:3,class:"apf-bubble apf-waiting-hint"},EL={key:4,class:"apf-bubble apf-failed-hint"},PL={key:5,class:"apf-bubble apf-cancelled-hint"},_L=["aria-expanded"],qL={key:0,class:"apf-live-dot"},$L={class:"apf-detail-collapse"},gT={class:"apf-detail-collapse-inner"},IT=["aria-expanded"],CT={class:"apf-detail-collapse"},AT={class:"apf-detail-collapse-inner"},iT={key:1,class:"apf-chip apf-chip-success"},lT={class:"apf-approval-head"},eT={key:0,class:"apf-approval-danger-tag"},tT={class:"apf-approval-prompt"},aT={class:"apf-approval-actions"},cT=["disabled","onClick"],Iw=O(c.defineComponent({__name:"MessageBubble",props:{message:{},run:{},sending:{type:Boolean},brandMark:{},sessionMessages:{}},emits:["resume","cancel","retry","open-process","preview"],setup(C,{emit:I}){const g=C,A=I,i=c.useSlots(),l=c.computed(()=>!!(i.content||i.default)),e=c.ref(!1),t=c.ref(null),a=c.computed(()=>{var z,k;const D=[...g.message.attachments||[]];if(!((z=g.sessionMessages)!=null&&z.length))return D;const F=g.sessionMessages.findIndex(f=>f.id===g.message.id);if(F<=0)return D;for(let f=F-1;f>=0;f--){const Q=g.sessionMessages[f];if(Q.role==="user"&&((k=Q.attachments)!=null&&k.length)){for(const E of Q.attachments)D.some(gg=>gg.id===E.id)||D.push(E);break}}return D}),d=c.computed(()=>a.value.filter(Zl));function o(D){t.value=D,e.value=!0,A("preview",D)}const n=c.computed(()=>g.message.role==="user"),s=c.computed(()=>g.message.role==="assistant");function Z(D){return{PENDING:"排队中",RUNNING:"正在处理",WAITING_INPUT:"等待你的确认",COMPLETED:"已完成",FAILED:"处理失败",CANCELLED:"已取消"}[D]||D}function m(D){return{RUNNING:"apf-chip-running",WAITING_INPUT:"apf-chip-waiting",COMPLETED:"apf-chip-success",FAILED:"apf-chip-failed",CANCELLED:"apf-chip-cancelled"}[D]||"apf-chip-cancelled"}const b=[{action:"approve",label:"确认继续",style:"primary"},{action:"reject",label:"需要修改",style:"danger"}],G=c.computed(()=>{var F,z;if(g.message.status!=="WAITING_INPUT")return null;const D=(F=g.run)==null?void 0:F.waiting;if(D){const k=(z=D.actions)!=null&&z.length?D.actions:b;return{prompt:D.prompt||"请确认后继续。",fields:D.fields||[],actions:k,dangerous:!!D.dangerous}}return{prompt:"请确认后继续。",fields:[],actions:b,dangerous:!1}}),r=c.computed(()=>g.message.content||""),h=c.computed(()=>{var D;return!l.value&&s.value&&g.message.status==="RUNNING"&&!r.value&&!((D=g.message.attachments)!=null&&D.length)}),u=c.computed(()=>{var D,F;return l.value||!!r.value||!!((D=g.message.documentSummaries)!=null&&D.length)||!!((F=g.message.attachments)!=null&&F.length)}),B=c.computed(()=>n.value?"apf-user":g.message.status==="WAITING_INPUT"?"apf-waiting":g.message.status==="FAILED"?"apf-failed":""),W=c.ref("");function w(D){A("resume",D,W.value||void 0),W.value=""}function Y(){var F;const D=r.value||g.message.content;D&&((F=navigator.clipboard)==null||F.writeText(D))}function p(){const D=r.value||g.message.content;if(!D)return;const F=new Blob([D],{type:"text/markdown;charset=utf-8"}),z=URL.createObjectURL(F),k=document.createElement("a");k.href=z,k.download="reply.md",k.click(),URL.revokeObjectURL(z)}function V(D){return D.error?"失败":D.result!==void 0?"已完成":"处理中"}const y=c.ref(!1),N=c.ref(!1),H=c.ref(!1),R=c.computed(()=>s.value&&g.message.status==="RUNNING"&&!!g.message.thinking);c.watch(()=>{var D;return[g.message.status,!!((D=g.message.thinking)!=null&&D.trim())]},([D,F])=>{if(!F){y.value=!1,N.value=!1;return}if(D==="RUNNING"){y.value=!0,N.value=!1;return}N.value||(y.value=!1)},{immediate:!0});function S(){y.value=!y.value,N.value=!0}function M(){H.value=!H.value}return(D,F)=>{var z,k,f,Q,E;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-message",[C.message.role,C.message.status&&s.value?`apf-st-${C.message.status}`:""]])},[s.value&&C.brandMark?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(C.brandMark),{key:0,variant:"ai",size:"sm"})):c.createCommentVNode("",!0),c.createElementVNode("div",LL,[s.value&&C.message.tip?(c.openBlock(),c.createElementBlock("p",TL,c.toDisplayString(C.message.tip),1)):c.createCommentVNode("",!0),h.value?(c.openBlock(),c.createElementBlock("div",xL,[...F[4]||(F[4]=[c.createElementVNode("span",{class:"apf-status-text"},"正在处理",-1),c.createElementVNode("span",{class:"apf-dots"},[c.createElementVNode("i"),c.createElementVNode("i"),c.createElementVNode("i")],-1)])])):u.value?(c.openBlock(),c.createElementBlock("div",fL,[c.createElementVNode("div",{class:c.normalizeClass(["apf-bubble apf-message-content",B.value])},[!l.value&&((z=C.message.attachments)!=null&&z.length)?(c.openBlock(),c.createBlock(_W,{key:0,attachments:C.message.attachments,onPreview:o},null,8,["attachments"])):c.createCommentVNode("",!0),c.renderSlot(D.$slots,"content",{},()=>[c.renderSlot(D.$slots,"default",{},()=>[r.value?(c.openBlock(),c.createBlock(PW,{key:0,content:r.value},null,8,["content"])):c.createCommentVNode("",!0)],!0)],!0),!l.value&&((k=C.message.documentSummaries)!=null&&k.length)?(c.openBlock(),c.createBlock(qW,{key:1,summaries:C.message.documentSummaries,attachments:a.value,onPreview:o},null,8,["summaries","attachments"])):c.createCommentVNode("",!0),!l.value&&s.value&&C.message.status==="RUNNING"&&r.value?(c.openBlock(),c.createElementBlock("p",jL,"仍在处理…")):c.createCommentVNode("",!0)],2),!l.value&&s.value&&C.message.status==="COMPLETED"?(c.openBlock(),c.createElementBlock("div",QL,[c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"复制",onClick:Y},[...F[5]||(F[5]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])]),c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"下载",onClick:p},[...F[6]||(F[6]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("path",{d:"M8 2.5v7.2M5.2 7.5 8 10.3l2.8-2.8M3.5 13h9",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),C.message.thinking||(f=C.message.toolCalls)!=null&&f.length?(c.openBlock(),c.createElementBlock("button",{key:0,class:"apf-text-link",type:"button",onClick:F[0]||(F[0]=gg=>A("open-process"))},"处理信息")):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),!l.value&&s.value&&C.message.status==="FAILED"?(c.openBlock(),c.createElementBlock("div",UL,[c.createElementVNode("button",{class:"apf-icon-btn",type:"button","aria-label":"重试",onClick:F[1]||(F[1]=gg=>A("retry"))},[...F[7]||(F[7]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("path",{d:"M3.2 8a4.8 4.8 0 0 1 8.3-3.2",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"}),c.createElementVNode("path",{d:"M12.8 8a4.8 4.8 0 0 1-8.3 3.2",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"}),c.createElementVNode("path",{d:"M11.2 2.6v2.6h-2.6M4.8 13.4v-2.6h2.6",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])):c.createCommentVNode("",!0)])):!l.value&&s.value&&C.message.status==="WAITING_INPUT"&&!u.value?(c.openBlock(),c.createElementBlock("div",OL,"请在下方确认后继续。")):!l.value&&s.value&&C.message.status==="FAILED"&&!u.value?(c.openBlock(),c.createElementBlock("div",EL,"处理失败")):!l.value&&s.value&&C.message.status==="CANCELLED"&&!u.value?(c.openBlock(),c.createElementBlock("div",PL,"已取消")):c.createCommentVNode("",!0),l.value?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(gw,{key:6,modelValue:e.value,"onUpdate:modelValue":F[2]||(F[2]=gg=>e.value=gg),attachment:t.value,"onUpdate:attachment":F[3]||(F[3]=gg=>t.value=gg),gallery:d.value},null,8,["modelValue","attachment","gallery"])),!l.value&&s.value&&((Q=C.message.thinking)!=null&&Q.trim())?(c.openBlock(),c.createElementBlock("div",{key:7,class:c.normalizeClass(["apf-detail-block",{open:y.value,streaming:R.value}])},[c.createElementVNode("button",{type:"button",class:"apf-detail-summary","aria-expanded":y.value,onClick:S},[F[8]||(F[8]=c.createElementVNode("span",{class:"apf-chevron"},null,-1)),F[9]||(F[9]=c.createElementVNode("span",null,"思考过程",-1)),R.value?(c.openBlock(),c.createElementBlock("span",qL)):c.createCommentVNode("",!0)],8,_L),c.createElementVNode("div",$L,[c.createElementVNode("div",gT,[c.createElementVNode("div",{class:c.normalizeClass(["apf-detail-content",{streaming:R.value}])},c.toDisplayString(C.message.thinking),3)])])],2)):c.createCommentVNode("",!0),!l.value&&s.value&&((E=C.message.toolCalls)!=null&&E.length)?(c.openBlock(),c.createElementBlock("div",{key:8,class:c.normalizeClass(["apf-detail-block",{open:H.value}])},[c.createElementVNode("button",{type:"button",class:"apf-detail-summary","aria-expanded":H.value,onClick:M},[F[10]||(F[10]=c.createElementVNode("span",{class:"apf-chevron"},null,-1)),c.createElementVNode("span",null,"处理步骤("+c.toDisplayString(C.message.toolCalls.length)+")",1)],8,IT),c.createElementVNode("div",CT,[c.createElementVNode("div",AT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.message.toolCalls,gg=>(c.openBlock(),c.createElementBlock("div",{key:gg.id||gg.name,class:"apf-tool-row"},[c.createElementVNode("strong",null,c.toDisplayString(gg.name),1),c.createElementVNode("span",{class:c.normalizeClass({"apf-err":!!gg.error})},c.toDisplayString(V(gg)),3)]))),128))])])],2)):c.createCommentVNode("",!0),l.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock(c.Fragment,{key:9},[s.value&&C.message.status!=="COMPLETED"&&C.message.status!=="CANCELLED"?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(["apf-chip",m(C.message.status)])},[F[11]||(F[11]=c.createElementVNode("i",null,null,-1)),c.createTextVNode(c.toDisplayString(Z(C.message.status)),1)],2)):s.value&&C.message.status==="COMPLETED"?(c.openBlock(),c.createElementBlock("span",iT,[...F[12]||(F[12]=[c.createElementVNode("i",null,null,-1),c.createTextVNode("已完成",-1)])])):c.createCommentVNode("",!0)],64)),!l.value&&G.value?(c.openBlock(),c.createElementBlock("div",{key:10,class:c.normalizeClass(["apf-inline-approval",{"apf-dangerous-approval":G.value.dangerous}])},[c.createElementVNode("div",lT,[F[13]||(F[13]=c.createElementVNode("span",{class:"apf-approval-title"},"需要你的确认",-1)),G.value.dangerous?(c.openBlock(),c.createElementBlock("span",eT,"需谨慎")):c.createCommentVNode("",!0)]),c.createElementVNode("p",tT,c.toDisplayString(G.value.prompt),1),c.createElementVNode("div",aT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(G.value.actions,gg=>(c.openBlock(),c.createElementBlock("button",{key:gg.action,type:"button",class:c.normalizeClass(["apf-approval-btn",gg.style==="danger"?"apf-approval-btn-danger":"apf-approval-btn-primary"]),disabled:C.sending,onClick:q=>w(gg.action)},c.toDisplayString(gg.label),11,cT))),128))])],2)):c.createCommentVNode("",!0)])],2)}}}),[["__scopeId","data-v-43084dc4"]]),dT={class:"apf-tip-banner"},oT={class:"apf-tip-banner__text"},nT=O(c.defineComponent({__name:"TipBanner",props:{text:{},icon:{default:"info-filled"}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",dT,[c.createVNode(c.unref($),{name:C.icon,class:"apf-tip-banner__icon",size:18},null,8,["name"]),c.createElementVNode("span",oT,c.toDisplayString(C.text),1)]))}}),[["__scopeId","data-v-29445db0"]]),sT={class:"apf-starter-grid"},ZT=["onClick"],mT={class:"apf-starter-grid__text"},bT=O(c.defineComponent({__name:"StarterPromptGrid",props:{prompts:{}},emits:["select"],setup(C,{emit:I}){const g=I;return(A,i)=>(c.openBlock(),c.createElementBlock("div",sT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.prompts,(l,e)=>(c.openBlock(),c.createElementBlock("button",{key:e,type:"button",class:"apf-starter-grid__card",onClick:t=>g("select",l)},[l.icon?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:l.icon,size:16,class:"apf-starter-grid__icon"},null,8,["name"])):c.createCommentVNode("",!0),c.createElementVNode("span",mT,c.toDisplayString(l.text),1)],8,ZT))),128))]))}}),[["__scopeId","data-v-227b664d"]]),GT={key:0,class:"apf-skeleton-line"},rT=O(c.defineComponent({__name:"MessageList",props:{messages:{},loading:{type:Boolean},currentRun:{},sending:{type:Boolean},brandMark:{}},emits:["resume","cancel","retry","open-process","preview"],setup(C,{expose:I,emit:g}){const A=C,i=g,l=c.useSlots(),e=c.ref(null),t=c.computed(()=>!!l.body),a=c.computed(()=>!A.loading&&A.messages.length===0&&!!l.empty);async function d(){await c.nextTick(),e.value&&(e.value.scrollTop=e.value.scrollHeight)}c.watch(()=>A.messages.length,()=>{t.value||d()},{flush:"post"}),c.watch(()=>A.messages.map(n=>`${n.id}:${n.status}:${(n.content||"").length}`).join("|"),()=>{t.value||d()},{flush:"post"});function o(n){return!A.currentRun||!n.runtimeExecutionId?null:A.currentRun.runtimeExecutionId===n.runtimeExecutionId?A.currentRun:null}return I({scrollToBottom:d,container:e}),(n,s)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"container",ref:e,class:"apf-message-list"},[C.loading&&!C.messages.length&&!t.value?(c.openBlock(),c.createElementBlock("div",GT,[...s[4]||(s[4]=[c.createElementVNode("div",{class:"apf-skeleton",style:{height:"var(--icon-size-sm, 14px)",width:"60%"}},null,-1),c.createElementVNode("div",{class:"apf-skeleton",style:{height:"var(--icon-size-sm, 14px)",width:"45%","margin-top":"var(--spacing-sm, 8px)"}},null,-1)])])):a.value?c.renderSlot(n.$slots,"empty",{},void 0,!0,1):c.renderSlot(n.$slots,"body",{messages:C.messages,scrollToBottom:d},()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.messages,Z=>(c.openBlock(),c.createBlock(Iw,{key:Z.id,message:Z,run:o(Z),sending:!!C.sending,"brand-mark":C.brandMark,"session-messages":C.messages,onResume:s[0]||(s[0]=(m,b)=>i("resume",m,b)),onCancel:s[1]||(s[1]=m=>i("cancel")),onRetry:s[2]||(s[2]=m=>i("retry")),onOpenProcess:m=>i("open-process",Z),onPreview:s[3]||(s[3]=m=>i("preview",m))},null,8,["message","run","sending","brand-mark","session-messages","onOpenProcess"]))),128))],!0,2)],512))}}),[["__scopeId","data-v-5df6388a"]]),hT={key:0,class:"apf-pending-list"},uT=["src"],BT={class:"apf-pending-name"},WT={key:1,class:"apf-pending-status"},wT={key:2,class:"apf-pending-status apf-error"},YT=["onClick"],VT=["placeholder","disabled"],pT={class:"apf-composer-footer"},yT={class:"apf-composer-tools"},NT=["disabled"],XT=["disabled"],RT={key:0,class:"apf-composer-meta"},HT={class:"apf-cap-row"},ST={key:0,class:"apf-cap-chip"},MT={key:1,class:"apf-cap-chip"},DT={class:"apf-meta-right"},KT=O(c.defineComponent({__name:"Composer",props:{disabled:{type:Boolean},placeholder:{},supportedInputs:{},hitlCapable:{type:Boolean},wsStatus:{},wsLabel:{},hideDefaultInput:{type:Boolean},hideSend:{type:Boolean},hideFileButton:{type:Boolean},hideMeta:{type:Boolean},stretch:{type:Boolean}},emits:["send","upload","remove-attachment","ws-click"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(""),l=c.ref(null),e=c.ref(null),t=c.ref([]),a=c.ref(!1),d=c.useSlots(),o=c.computed(()=>g.supportedInputs||["text"]),n=c.computed(()=>o.value.some(Y=>Y==="file"||Y==="image"||Y==="document")),s=c.computed(()=>!!d.input),Z=c.computed(()=>!g.hideDefaultInput&&!s.value),m=c.computed(()=>!g.hideSend),b=c.computed(()=>n.value&&!g.hideFileButton),G=c.computed(()=>{if(g.disabled||a.value)return!1;const Y=!!i.value.trim(),p=t.value.some(y=>y.status==="done"),V=t.value.some(y=>y.status==="uploading");return(Y||p)&&!V});function r(){var Y;g.disabled||!n.value||(Y=e.value)==null||Y.click()}function h(Y){const p=Y.target,V=p.files;if(V!=null&&V.length){for(const y of Array.from(V))A("upload",y);p.value=""}}function u(Y){const p=t.value.find(V=>V.id===Y);p!=null&&p.previewUrl&&URL.revokeObjectURL(p.previewUrl),t.value=t.value.filter(V=>V.id!==Y),A("remove-attachment",Y)}async function B(){if(!G.value)return;const Y=i.value.trim(),p=t.value.filter(V=>V.status==="done").map(V=>V.id);A("send",Y,p),i.value="",t.value.forEach(V=>{V.previewUrl&&URL.revokeObjectURL(V.previewUrl)}),t.value=[],await c.nextTick(),l.value&&(l.value.style.height="auto")}function W(Y){const p=Y.target;p.style.height="auto",p.style.height=Math.min(p.scrollHeight,220)+"px"}function w(Y){Y.key==="Enter"&&!Y.shiftKey&&(Y.preventDefault(),B())}return c.onBeforeUnmount(()=>{t.value.forEach(Y=>{Y.previewUrl&&URL.revokeObjectURL(Y.previewUrl)})}),(Y,p)=>(c.openBlock(),c.createElementBlock("form",{class:c.normalizeClass(["apf-composer",{"apf-composer-stretch":C.stretch}]),onSubmit:c.withModifiers(B,["prevent"])},[c.createElementVNode("div",{class:c.normalizeClass(["apf-composer-field",{"apf-disabled":C.disabled}])},[p[3]||(p[3]=c.createElementVNode("svg",{class:"apf-stream-ring","aria-hidden":"true",focusable:"false"},[c.createElementVNode("rect",{class:"apf-stream-ring-trail apf-stream-cw",pathLength:"100"}),c.createElementVNode("rect",{class:"apf-stream-ring-path apf-stream-cw",pathLength:"100"}),c.createElementVNode("rect",{class:"apf-stream-ring-trail apf-stream-ccw",pathLength:"100"}),c.createElementVNode("rect",{class:"apf-stream-ring-path apf-stream-ccw",pathLength:"100"})],-1)),c.renderSlot(Y.$slots,"pending",{},()=>[t.value.length?(c.openBlock(),c.createElementBlock("div",hT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.value,V=>(c.openBlock(),c.createElementBlock("div",{key:V.id,class:c.normalizeClass(["apf-pending-chip",V.status])},[V.previewUrl?(c.openBlock(),c.createElementBlock("img",{key:0,src:V.previewUrl,alt:"",class:"apf-pending-thumb"},null,8,uT)):c.createCommentVNode("",!0),c.createElementVNode("span",BT,c.toDisplayString(V.filename),1),V.status==="uploading"?(c.openBlock(),c.createElementBlock("span",WT,"上传中")):V.status==="error"?(c.openBlock(),c.createElementBlock("span",wT,c.toDisplayString(V.error||"失败"),1)):c.createCommentVNode("",!0),c.createElementVNode("button",{type:"button",class:"apf-pending-remove",onClick:y=>u(V.id)},"×",8,YT)],2))),128))])):c.createCommentVNode("",!0)],!0),c.renderSlot(Y.$slots,"input",{},()=>[Z.value?c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{key:0,ref_key:"textareaRef",ref:l,"onUpdate:modelValue":p[0]||(p[0]=V=>i.value=V),placeholder:C.placeholder||"输入消息…",disabled:C.disabled,onInput:W,onKeydown:w},null,40,VT)),[[c.vModelText,i.value]]):c.createCommentVNode("",!0)],!0),c.createElementVNode("div",pT,[c.createElementVNode("div",yT,[c.renderSlot(Y.$slots,"tools",{},void 0,!0),c.createElementVNode("input",{ref_key:"fileInputRef",ref:e,type:"file",class:"apf-file-input",multiple:"",accept:"image/*,.pdf,.txt,.md,.csv,.json,.doc,.docx,.xls,.xlsx",onChange:h},null,544),b.value?(c.openBlock(),c.createElementBlock("button",{key:0,class:"apf-cap-btn",type:"button","aria-label":"添加文件",disabled:C.disabled||a.value,onClick:r},[...p[2]||(p[2]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("path",{d:"M9.2 2.8 4.4 7.6a2.6 2.6 0 0 0 3.7 3.7l5.2-5.2a1.8 1.8 0 0 0-2.5-2.5L5.6 8.8",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,NT)):c.createCommentVNode("",!0)]),c.renderSlot(Y.$slots,"actions",{},()=>[m.value?(c.openBlock(),c.createElementBlock("button",{key:0,type:"submit",class:"apf-send-btn",disabled:!G.value,title:"发送"},"↗",8,XT)):c.createCommentVNode("",!0)],!0)])],2),C.hideMeta?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",RT,[c.createElementVNode("div",HT,[p[4]||(p[4]=c.createElementVNode("span",{class:"apf-cap-chip"},"文本",-1)),n.value?(c.openBlock(),c.createElementBlock("span",ST,"文件")):c.createCommentVNode("",!0),C.hitlCapable?(c.openBlock(),c.createElementBlock("span",MT,"需要确认")):c.createCommentVNode("",!0)]),c.createElementVNode("div",DT,[C.wsStatus?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(["apf-ws-status",C.wsStatus]),onClick:p[1]||(p[1]=V=>A("ws-click"))},[...p[5]||(p[5]=[c.createElementVNode("i",{class:"apf-ws-dot"},null,-1)])],2)):c.createCommentVNode("",!0),p[6]||(p[6]=c.createElementVNode("small",{class:"apf-hint"},"Enter 发送 · Shift+Enter 换行",-1))])]))],34))}}),[["__scopeId","data-v-80a967c0"]]),FT={key:0,class:"apf-run-bar"},zT={class:"apf-row"},JT={key:0,class:"apf-elapsed"},vT={key:0,class:"apf-error-text"},Cw=O(c.defineComponent({__name:"RunStatusBar",props:{run:{},sending:{type:Boolean}},emits:["cancel"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>{var a;return((a=g.run)==null?void 0:a.status)||null});function l(a){return{RUNNING:"正在处理",COMPLETED:"已完成",FAILED:"处理失败",WAITING_INPUT:"等待你的确认",CANCELLED:"已取消"}[a]||a}function e(a){return{RUNNING:"apf-running",COMPLETED:"apf-success",FAILED:"apf-failed",WAITING_INPUT:"apf-waiting",CANCELLED:"apf-cancelled"}[a]||""}function t(){if(!g.run)return"";const a=new Date(g.run.startedAt).getTime(),d=g.run.finishedAt?new Date(g.run.finishedAt).getTime():Date.now(),o=Math.round((d-a)/1e3);return o<60?o+"s":Math.floor(o/60)+"m "+o%60+"s"}return(a,d)=>C.run?(c.openBlock(),c.createElementBlock("div",FT,[c.createElementVNode("div",zT,[c.createElementVNode("span",{class:c.normalizeClass(["apf-chip",e(i.value||"")])},[d[1]||(d[1]=c.createElementVNode("i",null,null,-1)),c.createTextVNode(c.toDisplayString(l(i.value||"")),1)],2),i.value==="RUNNING"||i.value==="WAITING_INPUT"?(c.openBlock(),c.createElementBlock("span",JT,c.toDisplayString(t()),1)):c.createCommentVNode("",!0),i.value==="RUNNING"?(c.openBlock(),c.createElementBlock("button",{key:1,class:"apf-btn-cancel",onClick:d[0]||(d[0]=o=>A("cancel"))},"停止")):c.createCommentVNode("",!0)]),C.run.errorMessage?(c.openBlock(),c.createElementBlock("p",vT,c.toDisplayString(C.run.errorMessage),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)}}),[["__scopeId","data-v-33963f1d"]]),kT={class:"apf-stream-banner__text"},LT=O(c.defineComponent({__name:"StreamStatusBanner",props:{status:{},message:{},retryLabel:{default:"重试"},showRetry:{type:Boolean,default:!0}},emits:["retry"],setup(C,{emit:I}){const g=I;return(A,i)=>C.status==="disconnected"||C.status==="reconnecting"||C.status==="connecting"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["apf-stream-banner",`is-${C.status}`]),role:"status"},[c.createElementVNode("span",kT,c.toDisplayString(C.message||C.status),1),C.showRetry&&C.status==="disconnected"?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-stream-banner__retry",onClick:i[0]||(i[0]=l=>g("retry"))},c.toDisplayString(C.retryLabel),1)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0)}}),[["__scopeId","data-v-c9033191"]]),TT={class:"apf-header"},xT={key:0,class:"apf-danger-tag"},fT={class:"apf-prompt"},jT=["placeholder"],QT=["value"],UT=["placeholder"],OT={class:"apf-actions"},ET=["disabled","onClick"],PT=O(c.defineComponent({__name:"ApprovalCard",props:{waiting:{},disabled:{type:Boolean}},emits:["resume"],setup(C,{emit:I}){const g=I,A=c.ref("");function i(e){return e==="danger"?"apf-btn-danger":e==="ghost"||e==="default"?"apf-btn-ghost":"apf-btn-primary"}function l(e){g("resume",e,A.value||void 0),A.value=""}return(e,t)=>C.waiting?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["apf-approval-card",{"apf-dangerous":C.waiting.dangerous}])},[c.createElementVNode("div",TT,[t[3]||(t[3]=c.createElementVNode("span",{class:"apf-title"},"需要你的操作",-1)),C.waiting.dangerous?(c.openBlock(),c.createElementBlock("span",xT,"危险操作")):c.createCommentVNode("",!0)]),c.createElementVNode("p",fT,c.toDisplayString(C.waiting.prompt),1),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.waiting.fields,a=>(c.openBlock(),c.createElementBlock("div",{key:a.key,class:"apf-field"},[c.createElementVNode("label",null,c.toDisplayString(a.label),1),a.type==="textarea"?c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{key:0,"onUpdate:modelValue":t[0]||(t[0]=d=>A.value=d),placeholder:"请输入"+a.label,rows:"2"},null,8,jT)),[[c.vModelText,A.value]]):a.type==="select"&&a.options.length?c.withDirectives((c.openBlock(),c.createElementBlock("select",{key:1,"onUpdate:modelValue":t[1]||(t[1]=d=>A.value=d)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.options,d=>(c.openBlock(),c.createElementBlock("option",{key:d,value:d},c.toDisplayString(d),9,QT))),128))],512)),[[c.vModelSelect,A.value]]):c.withDirectives((c.openBlock(),c.createElementBlock("input",{key:2,"onUpdate:modelValue":t[2]||(t[2]=d=>A.value=d),placeholder:"请输入"+a.label},null,8,UT)),[[c.vModelText,A.value]])]))),128)),c.createElementVNode("div",OT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.waiting.actions,a=>(c.openBlock(),c.createElementBlock("button",{key:a.action,type:"button",class:c.normalizeClass(["apf-btn",i(a.style)]),disabled:C.disabled,onClick:d=>l(a.action)},c.toDisplayString(a.label),11,ET))),128))])],2)):c.createCommentVNode("",!0)}}),[["__scopeId","data-v-d568067a"]]),_T={class:"apf-session-sidebar","aria-label":"会话列表"},qT={class:"apf-session-sidebar__head"},$T={class:"apf-session-sidebar__head-actions"},gx={key:0,class:"apf-session-sidebar__below-head"},Ix={class:"apf-session-sidebar__list"},Cx=["onClick"],Ax={class:"apf-session-sidebar__item-title"},ix={class:"apf-session-sidebar__item-meta"},lx={key:0,class:"apf-session-sidebar__empty"},ex=O(c.defineComponent({__name:"SessionSidebar",props:{sessions:{},activeId:{},loading:{type:Boolean},title:{},hideCreate:{type:Boolean},hideDelete:{type:Boolean},emptyText:{}},emits:["select","create","delete"],setup(C,{emit:I}){const g=I;function A(i){if(!i)return"";const l=new Date(i),e=new Date,t=e.getTime()-l.getTime();if(t<864e5&&l.getDate()===e.getDate())return l.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});const a=new Date(e);return a.setDate(a.getDate()-1),l.getDate()===a.getDate()&&l.getMonth()===a.getMonth()&&l.getFullYear()===a.getFullYear()?"昨天":t<6e4?"刚刚":t<36e5?`${Math.floor(t/6e4)} 分钟前`:t<864e5?`${Math.floor(t/36e5)} 小时前`:l.toLocaleDateString("zh-CN",{month:"2-digit",day:"2-digit"})}return(i,l)=>{const e=c.resolveComponent("el-button"),t=c.resolveDirective("loading");return c.openBlock(),c.createElementBlock("aside",_T,[c.createElementVNode("div",qT,[c.createElementVNode("strong",null,c.toDisplayString(C.title||"会话"),1),c.createElementVNode("div",$T,[c.renderSlot(i.$slots,"toolbar",{},void 0,!0),C.hideCreate?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(e,{key:0,type:"primary",size:"small",onClick:l[0]||(l[0]=a=>g("create"))},{default:c.withCtx(()=>[...l[2]||(l[2]=[c.createTextVNode("新建",-1)])]),_:1}))])]),i.$slots["below-head"]?(c.openBlock(),c.createElementBlock("div",gx,[c.renderSlot(i.$slots,"below-head",{},void 0,!0)])):c.createCommentVNode("",!0),c.withDirectives((c.openBlock(),c.createElementBlock("div",Ix,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.sessions,a=>(c.openBlock(),c.createElementBlock("button",{key:a.id,type:"button",class:c.normalizeClass(["apf-session-sidebar__item",{"is-active":a.id===C.activeId}]),onClick:d=>g("select",a.id)},[c.createElementVNode("span",Ax,c.toDisplayString(a.title||"未命名会话"),1),c.createElementVNode("div",ix,[c.renderSlot(i.$slots,"item-meta",{session:a},()=>[c.createElementVNode("small",null,c.toDisplayString(A(a.updatedAt||a.createdAt)),1)],!0)]),c.createElementVNode("div",{class:"apf-session-sidebar__item-actions",onClick:l[1]||(l[1]=c.withModifiers(()=>{},["stop"]))},[c.renderSlot(i.$slots,"item-actions",{session:a},()=>[C.hideDelete?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(e,{key:0,class:"apf-session-sidebar__delete",link:"",type:"danger",size:"small",onClick:d=>g("delete",a.id)},{default:c.withCtx(()=>[...l[3]||(l[3]=[c.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"]))],!0)])],10,Cx))),128)),!C.loading&&!C.sessions.length?(c.openBlock(),c.createElementBlock("div",lx,c.toDisplayString(C.emptyText||"暂无会话"),1)):c.createCommentVNode("",!0)])),[[t,C.loading]])])}}}),[["__scopeId","data-v-b00284f7"]]),tx=c.defineComponent({__name:"SessionHistoryDrawer",props:{visible:{type:Boolean},title:{default:"对话历史"},size:{default:320},direction:{default:"rtl"}},emits:["update:visible"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-drawer");return c.openBlock(),c.createBlock(l,{"model-value":C.visible,title:C.title,size:C.size,direction:C.direction,class:"apf-session-history-drawer","append-to-body":"","onUpdate:modelValue":i[0]||(i[0]=e=>g("update:visible",e))},{default:c.withCtx(()=>[c.renderSlot(A.$slots,"default")]),_:3},8,["model-value","title","size","direction"])}}}),ax=O(c.defineComponent({__name:"VirtualMessageScroller",props:{items:{},keyField:{default:"key"},minItemSize:{default:72},sizeDependencies:{}},emits:["scroll"],setup(C,{emit:I}){const g=I;return(A,i)=>(c.openBlock(),c.createBlock(c.unref(tB.DynamicScroller),{items:C.items,"min-item-size":C.minItemSize,"key-field":C.keyField,class:"apf-virtual-message-scroller",onScroll:i[0]||(i[0]=l=>g("scroll",l))},{default:c.withCtx(({item:l,index:e,active:t})=>[c.createVNode(c.unref(tB.DynamicScrollerItem),{item:l,active:t,"data-index":e,"size-dependencies":C.sizeDependencies?C.sizeDependencies(l):void 0},{default:c.withCtx(()=>[c.renderSlot(A.$slots,"default",{item:l,index:e,active:t},void 0,!0)]),_:2},1032,["item","active","data-index","size-dependencies"])]),_:3},8,["items","min-item-size","key-field"]))}}),[["__scopeId","data-v-d9fdb738"]]),cx={key:0,class:"apf-processing-drawer__subtitle"},dx={class:"apf-processing-drawer__body"},ox=O(c.defineComponent({__name:"ProcessingDrawer",props:{modelValue:{type:Boolean},run:{},title:{},subtitle:{},sending:{type:Boolean}},emits:["update:modelValue","cancel"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-drawer");return c.openBlock(),c.createBlock(l,{"model-value":C.modelValue,title:C.title||"处理详情",size:"380px","append-to-body":"","onUpdate:modelValue":i[1]||(i[1]=e=>g("update:modelValue",e))},{default:c.withCtx(()=>[C.subtitle?(c.openBlock(),c.createElementBlock("p",cx,c.toDisplayString(C.subtitle),1)):c.createCommentVNode("",!0),C.run?(c.openBlock(),c.createBlock(c.unref(Cw),{key:1,run:C.run,sending:C.sending??!1,onCancel:i[0]||(i[0]=e=>g("cancel"))},null,8,["run","sending"])):c.createCommentVNode("",!0),c.createElementVNode("div",dx,[c.renderSlot(A.$slots,"default",{},void 0,!0)])]),_:3},8,["model-value","title"])}}}),[["__scopeId","data-v-6036074a"]]),nx={class:"apf-conversation-header"},sx={class:"apf-conversation-header__identity"},Zx={class:"apf-conversation-header__copy"},mx={class:"apf-conversation-header__meta-row"},bx={key:0,class:"apf-conversation-header__label"},Gx={class:"apf-conversation-header__actions"},rx={key:0,class:"apf-conversation-header__processing"},hx=O(c.defineComponent({__name:"ConversationHeader",props:{title:{},label:{},hasMessages:{type:Boolean},processing:{type:Boolean},hideDefaultActions:{type:Boolean}},emits:["changeAssistant","toggleDetails","create"],setup(C,{emit:I}){const g=C,A=I,i=c.useSlots(),l=c.computed(()=>!g.hideDefaultActions&&!i.actions);return(e,t)=>(c.openBlock(),c.createElementBlock("header",nx,[c.createElementVNode("div",sx,[c.renderSlot(e.$slots,"identity",{},()=>[c.createElementVNode("div",Zx,[c.createElementVNode("div",mx,[C.label?(c.openBlock(),c.createElementBlock("span",bx,c.toDisplayString(C.label),1)):c.createCommentVNode("",!0),c.renderSlot(e.$slots,"meta",{},void 0,!0)]),c.createElementVNode("strong",null,c.toDisplayString(C.title||"选择一个智能体开始"),1)])],!0)]),c.createElementVNode("div",Gx,[C.processing?(c.openBlock(),c.createElementBlock("span",rx,[...t[2]||(t[2]=[c.createElementVNode("i",null,null,-1),c.createElementVNode("span",null,"正在处理",-1)])])):c.createCommentVNode("",!0),c.renderSlot(e.$slots,"actions",{},()=>[l.value?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("button",{type:"button",class:"apf-conversation-header__btn",onClick:t[0]||(t[0]=a=>C.hasMessages?A("create"):A("changeAssistant"))},c.toDisplayString(C.hasMessages?"新建对话":"选择智能体"),1),C.hasMessages?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-conversation-header__btn",onClick:t[1]||(t[1]=a=>A("toggleDetails"))}," 处理详情 ")):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)],!0)])]))}}),[["__scopeId","data-v-127a684e"]]),ux=["title"],Bx={key:0,class:"apf-pending-chip__spinner"},Wx=["src","alt"],Yx=["disabled"],Vx={key:3,class:"apf-pending-chip__status"},px={key:4,class:"apf-pending-chip__status is-error"},yx=O(c.defineComponent({__name:"PendingAttachmentChip",props:{attachment:{}},emits:["preview","remove"],setup(C,{emit:I}){const g=C,A=I;function i(e){return e!=null&&e.startsWith("image/")?"picture":"document"}function l(){g.attachment.status==="done"&&A("preview",g.attachment)}return(e,t)=>{var a;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-pending-chip",{"is-error":C.attachment.status==="error","is-clickable":C.attachment.status==="done"}]),title:C.attachment.status==="error"&&C.attachment.error||C.attachment.filename},[C.attachment.status==="uploading"?(c.openBlock(),c.createElementBlock("span",Bx)):C.attachment.previewUrl&&((a=C.attachment.mimetype)!=null&&a.startsWith("image/"))?(c.openBlock(),c.createElementBlock("img",{key:1,class:"apf-pending-chip__thumb",src:C.attachment.previewUrl,alt:C.attachment.filename},null,8,Wx)):(c.openBlock(),c.createBlock(c.unref($),{key:2,name:i(C.attachment.mimetype),size:14,class:"apf-pending-chip__icon"},null,8,["name"])),c.createElementVNode("button",{type:"button",class:"apf-pending-chip__name",disabled:C.attachment.status!=="done",onClick:l},c.toDisplayString(C.attachment.filename),9,Yx),C.attachment.status==="uploading"?(c.openBlock(),c.createElementBlock("span",Vx,"上传中")):C.attachment.status==="error"?(c.openBlock(),c.createElementBlock("span",px,c.toDisplayString(C.attachment.error||"失败"),1)):c.createCommentVNode("",!0),c.createElementVNode("button",{type:"button",class:"apf-pending-chip__remove","aria-label":"移除",onClick:t[0]||(t[0]=d=>A("remove",C.attachment.id))},[c.createVNode(c.unref($),{name:"close",size:12})])],10,ux)}}}),[["__scopeId","data-v-75e794a8"]]),Nx={key:0,class:"apf-mention-panel",role:"listbox"},Xx={class:"apf-mention-panel-search"},Rx=["placeholder"],Hx={class:"apf-mention-tabs"},Sx=["onClick"],Mx={class:"apf-mention-results"},Dx={key:0,class:"apf-mention-loading","aria-busy":"true"},Kx=["onClick","onMouseenter"],Fx=["data-type"],zx={class:"apf-mention-result-info"},Jx={class:"apf-mention-result-name"},vx={key:0,class:"apf-mention-result-meta"},kx={key:2,class:"apf-mention-empty"},Lx={key:1,class:"apf-mention-chips"},Tx={class:"apf-mention-chip-icon"},xx=["onClick"],fx=["placeholder","disabled"],jx=O(c.defineComponent({__name:"MentionInput",props:{disabled:{type:Boolean},loading:{type:Boolean},placeholder:{default:"描述你想要生成的内容..."},tabs:{},search:{},typeBadge:{},debounceMs:{default:250},emptyText:{default:"无匹配结果"},searchPlaceholder:{default:"搜索引用..."}},emits:["send","input"],setup(C,{expose:I,emit:g}){var H;const A=C,i=g,l=c.ref(""),e=c.ref(),t=c.ref([]),a=c.ref(),d=c.ref(!1),o=c.ref(""),n=c.ref(((H=A.tabs[0])==null?void 0:H.key)??""),s=c.ref([]),Z=c.ref(!1),m=c.ref(-1),b=c.ref(-1);let G=null;c.watch(()=>A.tabs,R=>{var S;R.some(M=>M.key===n.value)||(n.value=((S=R[0])==null?void 0:S.key)??"")},{deep:!0});function r(R){return A.typeBadge?A.typeBadge(R):(R[0]||"?").toUpperCase()}function h(){const R=e.value;R&&(R.style.height="auto",R.style.height=`${Math.min(R.scrollHeight,102)}px`)}c.watch(l,()=>{c.nextTick(h)});function u(R,S){if(G&&clearTimeout(G),!R.trim()){s.value=[],Z.value=!1;return}Z.value=!0,G=setTimeout(async()=>{try{s.value=await A.search(R,S)}catch{s.value=[]}finally{Z.value=!1}},A.debounceMs)}c.watch([o,n],([R,S])=>{m.value=-1,u(R,S)});function B(){d.value=!1,o.value="",b.value=-1,m.value=-1,s.value=[]}function W(){var F;const R=l.value;i("input",R);const S=(F=e.value)==null?void 0:F.selectionStart,M=S!=null&&S>0?S:R.length,D=R.lastIndexOf("@",M-1);if(D>=0&&(D===0||R[D-1]===" "||R[D-1]===`
72
- `)){const z=R.slice(D+1,M);if(!z.includes(" ")&&z.length<=30){b.value=D,o.value=z,d.value=!0;return}}B()}function w(R){if(d.value){if(R.key==="ArrowDown"){R.preventDefault(),m.value=Math.min(m.value+1,Math.max(s.value.length-1,0));return}if(R.key==="ArrowUp"){R.preventDefault(),m.value=Math.max(m.value-1,0);return}if(R.key==="Enter"&&m.value>=0&&s.value[m.value]){R.preventDefault(),Y(s.value[m.value]);return}if(R.key==="Escape"){R.preventDefault(),B();return}}R.key==="Enter"&&!R.shiftKey&&!d.value&&(R.preventDefault(),V())}function Y(R){var z;const S={id:R.id,type:R.type,label:R.name};t.value.some(k=>k.id===S.id&&k.type===S.type)||t.value.push(S);const M=l.value,D=b.value,F=((z=e.value)==null?void 0:z.selectionStart)??M.length;D>=0&&(l.value=`${M.slice(0,D)}@${R.name} ${M.slice(F)}`),B(),c.nextTick(()=>{var k;return(k=e.value)==null?void 0:k.focus()})}function p(R){t.value.splice(R,1)}function V(){const R=l.value.trim();!R&&t.value.length===0||A.disabled||(i("send",R,[...t.value]),l.value="",t.value=[])}function y(R){a.value&&!a.value.contains(R.target)&&B()}function N(){var R;(R=e.value)==null||R.focus()}return I({focus:N}),c.onMounted(()=>{document.addEventListener("mousedown",y)}),c.onBeforeUnmount(()=>{document.removeEventListener("mousedown",y),G&&clearTimeout(G)}),(R,S)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"wrapperRef",ref:a,class:"apf-mention-input"},[d.value?(c.openBlock(),c.createElementBlock("div",Nx,[c.createElementVNode("div",Xx,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":S[0]||(S[0]=M=>o.value=M),class:"apf-mention-panel-input",type:"text",placeholder:C.searchPlaceholder,autocomplete:"off"},null,8,Rx),[[c.vModelText,o.value]])]),c.createElementVNode("div",Hx,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.tabs,M=>(c.openBlock(),c.createElementBlock("button",{key:M.key,type:"button",class:c.normalizeClass(["apf-mention-tab",{"is-active":n.value===M.key}]),onClick:D=>n.value=M.key},c.toDisplayString(M.label),11,Sx))),128))]),c.createElementVNode("div",Mx,[Z.value?(c.openBlock(),c.createElementBlock("div",Dx,[...S[2]||(S[2]=[c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1),c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1),c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1)])])):s.value.length>0?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(s.value,(M,D)=>(c.openBlock(),c.createElementBlock("div",{key:`${M.type}-${M.id}`,class:c.normalizeClass(["apf-mention-result",{"is-highlighted":D===m.value}]),role:"option",onClick:F=>Y(M),onMouseenter:F=>m.value=D},[c.createElementVNode("div",{class:"apf-mention-badge","data-type":M.type},c.toDisplayString(r(M.type)),9,Fx),c.createElementVNode("div",zx,[c.createElementVNode("div",Jx,c.toDisplayString(M.name),1),M.description?(c.openBlock(),c.createElementBlock("div",vx,c.toDisplayString(M.description),1)):c.createCommentVNode("",!0)])],42,Kx))),128)):o.value.trim()?(c.openBlock(),c.createElementBlock("div",kx,c.toDisplayString(C.emptyText),1)):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0),t.value.length>0?(c.openBlock(),c.createElementBlock("div",Lx,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.value,(M,D)=>(c.openBlock(),c.createElementBlock("div",{key:`${M.type}-${M.id}`,class:"apf-mention-chip"},[c.createElementVNode("span",Tx,c.toDisplayString(r(M.type)),1),c.createElementVNode("span",null,c.toDisplayString(M.label),1),c.createElementVNode("button",{type:"button",class:"apf-mention-chip-remove","aria-label":"移除引用",onClick:F=>p(D)}," × ",8,xx)]))),128))])):c.createCommentVNode("",!0),c.withDirectives(c.createElementVNode("textarea",{ref_key:"textareaRef",ref:e,"onUpdate:modelValue":S[1]||(S[1]=M=>l.value=M),class:"apf-mention-textarea",placeholder:C.placeholder,disabled:C.disabled||C.loading,rows:"1",onInput:W,onKeydown:w},null,40,fx),[[c.vModelText,l.value]])],512))}}),[["__scopeId","data-v-467928f5"]]),Qx={class:"apf-thinking-head-main"},Ux={class:"apf-thinking-titles"},Ox={class:"apf-thinking-title"},Ex={key:0,class:"apf-thinking-badge"},Px={class:"apf-thinking-sub"},_x={class:"apf-thinking-head-aside"},qx={class:"apf-thinking-status"},$x={class:"apf-thinking-chevron","aria-hidden":"true"},gf={key:0,class:"apf-thinking-body"},If=["innerHTML"],Cf=O(c.defineComponent({__name:"ThinkingBlock",props:{content:{},title:{default:"思考过程"},badge:{},defaultCollapsed:{type:Boolean,default:!0},statusLabel:{default:"已完成"}},setup(C){const I=C,g=c.ref(I.defaultCollapsed),A=c.computed(()=>{if(!I.content)return"";const e=I.content.replace(/<[^>]*>/g,"").trim();return e.length>100?`${e.slice(0,100)}...`:e}),i=c.computed(()=>I.content?am(I.content):"");function l(){g.value=!g.value}return(e,t)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-thinking",{"is-expanded":!g.value}])},[c.createElementVNode("button",{type:"button",class:"apf-thinking-head",onClick:l},[c.createElementVNode("div",Qx,[t[0]||(t[0]=c.createElementVNode("span",{class:"apf-thinking-icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("circle",{cx:"8",cy:"8",r:"5.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M8 5v3.2L10 10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})])],-1)),c.createElementVNode("div",Ux,[c.createElementVNode("div",Ox,[c.createTextVNode(c.toDisplayString(C.title)+" ",1),C.badge?(c.openBlock(),c.createElementBlock("span",Ex,c.toDisplayString(C.badge),1)):c.createCommentVNode("",!0)]),c.createElementVNode("div",Px,c.toDisplayString(g.value?A.value:"已完成思考"),1)])]),c.createElementVNode("div",_x,[c.createElementVNode("span",qx,c.toDisplayString(C.statusLabel),1),c.createElementVNode("span",$x,c.toDisplayString(g.value?"▾":"▴"),1)])]),g.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",gf,[c.createElementVNode("div",{class:"apf-thinking-md",innerHTML:i.value},null,8,If)]))],2))}}),[["__scopeId","data-v-ecf2c951"]]),Af={class:"apf-editable-artifact"},lf={class:"apf-editable-artifact__head"},ef={class:"apf-editable-artifact__head-left"},tf={class:"apf-editable-artifact__tag"},af={key:0,class:"apf-editable-artifact__tag is-danger"},cf={class:"apf-editable-artifact__head-right"},df={class:"apf-editable-artifact__body"},of=["placeholder"],nf=["srcdoc"],sf={class:"apf-editable-artifact__footer"},Zf={class:"apf-editable-artifact__hint"},mf=O(c.defineComponent({__name:"EditableArtifactCard",props:{content:{},artifactType:{default:"code"},language:{},sendBackLabel:{default:"回传给助手"},hint:{default:"编辑后可回传给助手继续优化"}},emits:["sendback","copy"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.content),l=c.ref("edit");c.watch(()=>g.content,Z=>{i.value=Z});const e=c.computed(()=>g.language||g.artifactType),t=c.computed(()=>g.artifactType==="html"),a=c.computed(()=>g.artifactType==="json"),d=c.computed(()=>{if(!a.value)return null;try{return JSON.parse(i.value),!0}catch{return!1}});function o(){var Z;i.value&&((Z=navigator.clipboard)==null||Z.writeText(i.value),A("copy",i.value))}function n(){if(a.value)try{i.value=JSON.stringify(JSON.parse(i.value),null,2)}catch{}}function s(){i.value.trim()&&A("sendback",i.value,e.value)}return(Z,m)=>(c.openBlock(),c.createElementBlock("div",Af,[c.createElementVNode("div",lf,[c.createElementVNode("div",ef,[m[3]||(m[3]=c.createElementVNode("span",{class:"apf-editable-artifact__title"},"工件",-1)),c.createElementVNode("span",tf,c.toDisplayString(C.artifactType),1),a.value&&d.value===!1?(c.openBlock(),c.createElementBlock("span",af,"JSON 无效")):c.createCommentVNode("",!0)]),c.createElementVNode("div",cf,[t.value?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(["apf-editable-artifact__mode",{"is-active":l.value==="edit"}]),onClick:m[0]||(m[0]=b=>l.value="edit")}," 编辑 ",2)):c.createCommentVNode("",!0),t.value?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(["apf-editable-artifact__mode",{"is-active":l.value==="preview"}]),onClick:m[1]||(m[1]=b=>l.value="preview")}," 预览 ",2)):c.createCommentVNode("",!0),a.value?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:"apf-editable-artifact__tool",onClick:n}," 格式化 ")):c.createCommentVNode("",!0),c.createElementVNode("button",{type:"button",class:"apf-editable-artifact__tool","aria-label":"复制",onClick:o}," 复制 ")])]),c.createElementVNode("div",df,[l.value==="edit"?c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{key:0,"onUpdate:modelValue":m[2]||(m[2]=b=>i.value=b),class:"apf-editable-artifact__editor",placeholder:`可编辑 ${C.artifactType} 内容`,spellcheck:"false"},null,8,of)),[[c.vModelText,i.value]]):(c.openBlock(),c.createElementBlock("iframe",{key:1,class:"apf-editable-artifact__preview",srcdoc:i.value,sandbox:"allow-scripts",title:"artifact preview"},null,8,nf))]),c.createElementVNode("div",sf,[c.createElementVNode("span",Zf,c.toDisplayString(C.hint),1),c.createElementVNode("button",{type:"button",class:"apf-editable-artifact__send",onClick:s},c.toDisplayString(C.sendBackLabel),1)])]))}}),[["__scopeId","data-v-60860f31"]]),bf=O(c.defineComponent({__name:"MessageActionBar",props:{content:{},feedback:{},visible:{type:Boolean},showCopy:{type:Boolean,default:!0},showRegenerate:{type:Boolean,default:!0},showFeedback:{type:Boolean,default:!0}},emits:["copy","regenerate","feedback"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1),l=c.ref(g.feedback??null);let e=null;c.watch(()=>g.feedback,d=>{l.value=d??null}),c.watch(()=>g.visible,d=>{if(d){e=setTimeout(()=>{i.value=!0},300);return}i.value=!1,e&&(clearTimeout(e),e=null)},{immediate:!0});function t(){var d;g.content&&((d=navigator.clipboard)==null||d.writeText(g.content)),A("copy")}function a(d){l.value=l.value===d?null:d,A("feedback",d)}return(d,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-msg-actions",{"is-visible":i.value}])},[C.showCopy?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-msg-actions__btn",title:"复制","aria-label":"复制",onClick:t},[...o[3]||(o[3]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])])):c.createCommentVNode("",!0),C.showRegenerate?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-msg-actions__btn",title:"重新生成","aria-label":"重新生成",onClick:o[0]||(o[0]=n=>A("regenerate"))},[...o[4]||(o[4]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M3 8a5 5 0 0 1 8.5-3.5M13 3v3.5H9.5",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"}),c.createElementVNode("path",{d:"M13 8a5 5 0 0 1-8.5 3.5M3 13v-3.5H6.5",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):c.createCommentVNode("",!0),C.showFeedback?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:c.normalizeClass(["apf-msg-actions__btn",{"is-active":l.value==="positive"}]),title:"点赞","aria-label":"点赞",onClick:o[1]||(o[1]=n=>a("positive"))},[...o[5]||(o[5]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M8 2.5 9.6 6l3.9.3-3 2.7.9 3.8L8 10.8 4.6 12.8l.9-3.8-3-2.7L6.4 6 8 2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})],-1)])],2)):c.createCommentVNode("",!0),C.showFeedback?(c.openBlock(),c.createElementBlock("button",{key:3,type:"button",class:c.normalizeClass(["apf-msg-actions__btn apf-msg-actions__btn--down",{"is-active":l.value==="negative"}]),title:"点踩","aria-label":"点踩",onClick:o[2]||(o[2]=n=>a("negative"))},[...o[6]||(o[6]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M8 2.5 9.6 6l3.9.3-3 2.7.9 3.8L8 10.8 4.6 12.8l.9-3.8-3-2.7L6.4 6 8 2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})],-1)])],2)):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-e20bc750"]]),Gf={class:"apf-step-card__head-left"},rf={class:"apf-step-card__icon","aria-hidden":"true"},hf={key:0,viewBox:"0 0 16 16",width:"14",height:"14"},uf={key:1,viewBox:"0 0 16 16",width:"14",height:"14"},Bf={class:"apf-step-card__titles"},Wf={class:"apf-step-card__title"},wf={key:0,class:"apf-step-card__badge"},Yf={key:0,class:"apf-step-card__subtitle"},Vf={class:"apf-step-card__head-right"},pf={key:0,class:"apf-step-card__time"},yf={key:1,class:"apf-step-card__status"},Nf={class:"apf-step-card__chevron","aria-hidden":"true"},Xf={class:"apf-step-card__body"},Rf=O(c.defineComponent({__name:"CollapsibleStepCard",props:{title:{},subtitle:{},badge:{},statusLabel:{},tone:{default:"default"},timestamp:{},defaultCollapsed:{type:Boolean,default:!0},collapsed:{type:Boolean}},emits:["update:collapsed"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.collapsed??g.defaultCollapsed);c.watch(()=>g.collapsed,t=>{t!==void 0&&(i.value=t)});const l=()=>g.collapsed!==void 0?g.collapsed:i.value;function e(){const t=!l();g.collapsed===void 0&&(i.value=t),A("update:collapsed",t)}return(t,a)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-step-card",`is-${C.tone}`])},[c.createElementVNode("button",{type:"button",class:"apf-step-card__head",onClick:e},[c.createElementVNode("div",Gf,[c.createElementVNode("span",rf,[c.renderSlot(t.$slots,"icon",{},()=>[C.tone==="error"?(c.openBlock(),c.createElementBlock("svg",hf,[...a[0]||(a[0]=[c.createElementVNode("circle",{cx:"8",cy:"8",r:"5.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"},null,-1),c.createElementVNode("path",{d:"M8 5v3.5M8 11h.01",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])])):(c.openBlock(),c.createElementBlock("svg",uf,[...a[1]||(a[1]=[c.createElementVNode("rect",{x:"3",y:"3",width:"10",height:"10",rx:"2",fill:"none",stroke:"currentColor","stroke-width":"1.4"},null,-1),c.createElementVNode("path",{d:"M6 8h4M8 6v4",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])]))],!0)]),c.createElementVNode("div",Bf,[c.createElementVNode("div",Wf,[c.createTextVNode(c.toDisplayString(C.title)+" ",1),C.badge?(c.openBlock(),c.createElementBlock("span",wf,c.toDisplayString(C.badge),1)):c.createCommentVNode("",!0)]),C.subtitle?(c.openBlock(),c.createElementBlock("div",Yf,c.toDisplayString(C.subtitle),1)):c.createCommentVNode("",!0)])]),c.createElementVNode("div",Vf,[C.timestamp?(c.openBlock(),c.createElementBlock("span",pf,c.toDisplayString(C.timestamp),1)):c.createCommentVNode("",!0),C.statusLabel?(c.openBlock(),c.createElementBlock("span",yf,[a[2]||(a[2]=c.createElementVNode("i",{class:"apf-step-card__dot"},null,-1)),c.createTextVNode(" "+c.toDisplayString(C.statusLabel),1)])):c.createCommentVNode("",!0),c.createElementVNode("span",Nf,c.toDisplayString(l()?"▾":"▴"),1)])]),c.withDirectives(c.createElementVNode("div",Xf,[c.renderSlot(t.$slots,"default",{},void 0,!0)],512),[[c.vShow,!l()]])],2))}}),[["__scopeId","data-v-9cc9ff88"]]),Hf={class:"apf-agent-transfer"},Sf={class:"apf-agent-transfer__row"},Mf={class:"apf-agent-transfer__pill"},Df={class:"apf-agent-transfer__pill is-target"},Kf={key:0,class:"apf-agent-transfer__reason"},Ff=O(c.defineComponent({__name:"AgentTransferCard",props:{fromLabel:{},toLabel:{},reason:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",Hf,[c.createElementVNode("div",Sf,[c.createElementVNode("span",Mf,c.toDisplayString(C.fromLabel),1),g[0]||(g[0]=c.createElementVNode("span",{class:"apf-agent-transfer__arrow","aria-hidden":"true"},"→",-1)),c.createElementVNode("span",Df,c.toDisplayString(C.toLabel),1)]),C.reason?(c.openBlock(),c.createElementBlock("p",Kf,c.toDisplayString(C.reason),1)):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ec98ad49"]]),zf={class:"apf-field-list-card__head"},Jf={class:"apf-field-list-card__head-left"},vf={class:"apf-field-list-card__title"},kf={class:"apf-field-list-card__badge"},Lf={class:"apf-field-list-card__body"},Tf={class:"apf-field-list-card__info"},xf={class:"apf-field-list-card__name"},ff={class:"apf-field-list-card__type"},jf={key:0,class:"apf-field-list-card__actions"},Qf=O(c.defineComponent({__name:"FieldListCard",props:{title:{},fields:{},badgeLabel:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1}},emits:["primary-action","secondary-action"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.badgeLabel||`${g.fields.length} 个字段`;return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-field-list-card",{"is-compact":C.compact}])},[c.createElementVNode("div",zf,[c.createElementVNode("div",Jf,[e[2]||(e[2]=c.createElementVNode("span",{class:"apf-field-list-card__icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.3"}),c.createElementVNode("path",{d:"M5 6.5h6M5 9.5h4",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"})])],-1)),c.createElementVNode("span",vf,c.toDisplayString(C.title),1)]),c.createElementVNode("span",kf,c.toDisplayString(i()),1)]),c.createElementVNode("div",Lf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.fields,(t,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"apf-field-list-card__row"},[c.createElementVNode("div",Tf,[c.createElementVNode("div",xf,c.toDisplayString(t.name),1),c.createElementVNode("div",ff,[c.createTextVNode(c.toDisplayString(t.type),1),t.meta?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" · "+c.toDisplayString(t.meta),1)],64)):c.createCommentVNode("",!0)])]),c.createElementVNode("span",{class:c.normalizeClass(["apf-field-list-card__flag",{"is-req":t.required}])},c.toDisplayString(t.required?"必填":"可选"),3)]))),128))]),!C.compact&&(C.primaryAction||C.secondaryAction)?(c.openBlock(),c.createElementBlock("div",jf,[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-field-list-card__btn is-ghost",onClick:e[0]||(e[0]=t=>A("secondary-action"))},c.toDisplayString(C.secondaryAction),1)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-field-list-card__btn is-primary",onClick:e[1]||(e[1]=t=>A("primary-action"))},c.toDisplayString(C.primaryAction),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-ee1ab2b6"]]),Uf={class:"apf-flow-strip__head"},Of={class:"apf-flow-strip__head-left"},Ef={class:"apf-flow-strip__title"},Pf={class:"apf-flow-strip__badge"},_f={class:"apf-flow-strip__body"},qf={key:0,class:"apf-flow-strip__arrow","aria-hidden":"true"},$f=["data-type"],gj={key:0,class:"apf-flow-strip__actions"},Ij=O(c.defineComponent({__name:"FlowNodeStripCard",props:{title:{},nodes:{},badgeLabel:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1}},emits:["primary-action","secondary-action"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.badgeLabel||`${g.nodes.length} 个节点`;return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-flow-strip",{"is-compact":C.compact}])},[c.createElementVNode("div",Uf,[c.createElementVNode("div",Of,[e[2]||(e[2]=c.createStaticVNode('<span class="apf-flow-strip__icon" aria-hidden="true" data-v-1fea171e><svg viewBox="0 0 16 16" width="14" height="14" data-v-1fea171e><circle cx="4" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></circle><circle cx="12" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></circle><path d="M6 8h4" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></path></svg></span>',1)),c.createElementVNode("span",Ef,c.toDisplayString(C.title),1)]),c.createElementVNode("span",Pf,c.toDisplayString(i()),1)]),c.createElementVNode("div",_f,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.nodes,(t,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:a},[a>0?(c.openBlock(),c.createElementBlock("div",qf)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:"apf-flow-strip__node","data-type":t.type},c.toDisplayString(t.label),9,$f)],64))),128))]),!C.compact&&(C.primaryAction||C.secondaryAction)?(c.openBlock(),c.createElementBlock("div",gj,[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-flow-strip__btn is-ghost",onClick:e[0]||(e[0]=t=>A("secondary-action"))},c.toDisplayString(C.secondaryAction),1)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-flow-strip__btn is-primary",onClick:e[1]||(e[1]=t=>A("primary-action"))},c.toDisplayString(C.primaryAction),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-1fea171e"]]),Cj={class:"apf-token-usage"},Aj={class:"apf-token-usage__head"},ij={class:"apf-token-usage__title"},lj={class:"apf-token-usage__body"},ej={class:"apf-token-usage__stats"},tj={class:"apf-token-usage__stat"},aj={class:"apf-token-usage__value"},cj={class:"apf-token-usage__stat"},dj={class:"apf-token-usage__value"},oj={class:"apf-token-usage__stat is-total"},nj={class:"apf-token-usage__value"},sj={key:0,class:"apf-token-usage__footer"},Zj={key:0,class:"apf-token-usage__model"},mj={key:1,class:"apf-token-usage__cost"},bj=O(c.defineComponent({__name:"TokenUsageCard",props:{inputTokens:{},outputTokens:{},totalTokens:{},estimatedCost:{},model:{},title:{}},setup(C){const I=C,g=c.computed(()=>I.totalTokens??I.inputTokens+I.outputTokens),A=c.computed(()=>{const l=g.value;return l>=1e6?`${(l/1e6).toFixed(2)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:String(l)}),i=c.computed(()=>{const l=I.estimatedCost;return l==null?null:l<.01?"<$0.01":`$${l.toFixed(4)}`});return(l,e)=>(c.openBlock(),c.createElementBlock("div",Cj,[c.createElementVNode("div",Aj,[c.createElementVNode("span",ij,c.toDisplayString(C.title||"Token 消耗"),1)]),c.createElementVNode("div",lj,[c.createElementVNode("div",ej,[c.createElementVNode("div",tj,[e[0]||(e[0]=c.createElementVNode("span",{class:"apf-token-usage__label"},"输入",-1)),c.createElementVNode("span",aj,c.toDisplayString(C.inputTokens.toLocaleString()),1)]),c.createElementVNode("div",cj,[e[1]||(e[1]=c.createElementVNode("span",{class:"apf-token-usage__label"},"输出",-1)),c.createElementVNode("span",dj,c.toDisplayString(C.outputTokens.toLocaleString()),1)]),c.createElementVNode("div",oj,[e[2]||(e[2]=c.createElementVNode("span",{class:"apf-token-usage__label"},"总计",-1)),c.createElementVNode("span",nj,c.toDisplayString(A.value),1)])]),i.value||C.model?(c.openBlock(),c.createElementBlock("div",sj,[C.model?(c.openBlock(),c.createElementBlock("span",Zj,c.toDisplayString(C.model),1)):c.createCommentVNode("",!0),i.value?(c.openBlock(),c.createElementBlock("span",mj,c.toDisplayString(i.value),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-0aacc361"]]),Gj={class:"apf-questionnaire"},rj={class:"apf-questionnaire__head"},hj={class:"apf-questionnaire__title"},uj=["data-status"],Bj={key:0,class:"apf-questionnaire__desc"},Wj={key:1,class:"apf-questionnaire__list"},wj={class:"apf-questionnaire__q"},Yj={key:0,class:"apf-questionnaire__req"},Vj={key:0,class:"apf-questionnaire__options"},pj=["name","value","checked","disabled","onChange"],yj=["value","disabled","onInput"],Nj={key:2,class:"apf-questionnaire__actions"},Xj=["disabled"],Rj=O(c.defineComponent({__name:"QuestionnaireCard",props:{title:{},description:{},questions:{},answers:{default:()=>({})},status:{default:"waiting"},approveLabel:{default:"批准"},rejectLabel:{default:"拒绝"},disabled:{type:Boolean}},emits:["answer","approve","reject"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.status==="approved"?"已批准":g.status==="rejected"?"已拒绝":"待审批",l=()=>g.questions.filter(a=>a.required).every(a=>!!g.answers[a.id]),e=()=>g.status==="waiting"&&!g.disabled;return(t,a)=>(c.openBlock(),c.createElementBlock("div",Gj,[c.createElementVNode("div",rj,[c.createElementVNode("span",hj,c.toDisplayString(C.title),1),c.createElementVNode("span",{class:"apf-questionnaire__status","data-status":C.status},c.toDisplayString(i()),9,uj)]),C.description?(c.openBlock(),c.createElementBlock("p",Bj,c.toDisplayString(C.description),1)):c.createCommentVNode("",!0),C.questions.length?(c.openBlock(),c.createElementBlock("div",Wj,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.questions,d=>{var o;return c.openBlock(),c.createElementBlock("div",{key:d.id,class:"apf-questionnaire__item"},[c.createElementVNode("div",wj,[d.required?(c.openBlock(),c.createElementBlock("span",Yj,"*")):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(d.question),1)]),(o=d.options)!=null&&o.length?(c.openBlock(),c.createElementBlock("div",Vj,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d.options,n=>(c.openBlock(),c.createElementBlock("label",{key:n,class:"apf-questionnaire__opt"},[c.createElementVNode("input",{type:"radio",name:d.id,value:n,checked:C.answers[d.id]===n,disabled:!e(),onChange:s=>A("answer",d.id,n)},null,40,pj),c.createTextVNode(" "+c.toDisplayString(n),1)]))),128))])):(c.openBlock(),c.createElementBlock("input",{key:1,class:"apf-questionnaire__input",type:"text",value:C.answers[d.id]||"",placeholder:"请输入...",disabled:!e(),onInput:n=>A("answer",d.id,n.target.value)},null,40,yj))])}),128))])):c.createCommentVNode("",!0),e()?(c.openBlock(),c.createElementBlock("div",Nj,[c.createElementVNode("button",{type:"button",class:"apf-questionnaire__btn is-ghost",onClick:a[0]||(a[0]=d=>A("reject"))},c.toDisplayString(C.rejectLabel),1),c.createElementVNode("button",{type:"button",class:"apf-questionnaire__btn is-primary",disabled:!l(),onClick:a[1]||(a[1]=d=>A("approve"))},c.toDisplayString(C.approveLabel),9,Xj)])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0e4beff5"]]),Hj=["onClick"],Sj=["onClick"],Mj={key:0},Dj={key:1},Kj=O(c.defineComponent({__name:"ChecklistProposalCard",props:{proposal:{},status:{},selectedIds:{},readonly:{type:Boolean}},emits:["toggle-item","toggle-all","approve","reject","modify","reset"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(new Set(g.proposal.actionItems.map(B=>B.id))),l=c.computed(()=>g.selectedIds??i.value),e=c.computed(()=>l.value.size),t=c.computed(()=>e.value===g.proposal.actionItems.length&&g.proposal.actionItems.length>0),a={high:{label:"高",color:"#F56C6C",bgColor:"#fef0f0"},medium:{label:"中",color:"#E6A23C",bgColor:"#fdf6ec"},low:{label:"低",color:"#67C23A",bgColor:"#f0f9eb"}},d={todo:{icon:"document",label:"待办"},approval:{icon:"stamp",label:"审批"},review:{icon:"view",label:"审阅"},decision:{icon:"warning",label:"决策"}},o=c.ref(null),n=c.ref({});function s(B){g.readonly||g.status==="approved"||g.status==="rejected"||(g.selectedIds?A("toggle-item",B):i.value.has(B)?i.value.delete(B):i.value.add(B))}function Z(){g.readonly||g.status==="approved"||g.status==="rejected"||(g.selectedIds?A("toggle-all"):t.value?i.value.clear():g.proposal.actionItems.forEach(B=>i.value.add(B.id)))}function m(B){o.value=B.id,n.value={...B}}function b(){o.value&&n.value&&(A("modify",o.value,n.value),o.value=null,n.value={})}function G(){o.value=null,n.value={}}function r(){A("approve",Array.from(l.value))}function h(){A("reject")}function u(){A("reset")}return(B,W)=>{var w;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([B.$style.card,C.status==="approved"&&B.$style.cardApproved,C.status==="rejected"&&B.$style.cardRejected])},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.titleRow)},[c.createVNode(c.unref($),{name:"circle-check-filled",size:16,style:{color:"#409EFF"}}),c.createElementVNode("span",{class:c.normalizeClass(B.$style.title)},"智能拟办",2),C.proposal.documentTitle?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.docTitle)},c.toDisplayString(C.proposal.documentTitle),3)):c.createCommentVNode("",!0)],2),!C.status||C.status==="pending"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.countBadge)},c.toDisplayString(e.value)+"/"+c.toDisplayString(C.proposal.actionItems.length)+" 项 ",3)):C.status==="approved"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass([B.$style.statusBadge,B.$style.statusApproved])},[c.createVNode(c.unref($),{name:"check",size:12}),W[7]||(W[7]=c.createTextVNode(" 已批准 ",-1))],2)):C.status==="rejected"?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass([B.$style.statusBadge,B.$style.statusRejected])},[c.createVNode(c.unref($),{name:"close",size:12}),W[8]||(W[8]=c.createTextVNode(" 已拒绝 ",-1))],2)):c.createCommentVNode("",!0)],2),C.proposal.summary?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.summary)},c.toDisplayString(C.proposal.summary),3)):c.createCommentVNode("",!0),(!C.status||C.status==="pending")&&!C.readonly?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(B.$style.selectAllRow)},[c.createElementVNode("label",{class:c.normalizeClass(B.$style.checkbox),onClick:Z},[c.createElementVNode("span",{class:c.normalizeClass([B.$style.checkboxInner,t.value&&B.$style.checked])},[t.value?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"check",size:10})):c.createCommentVNode("",!0)],2),W[9]||(W[9]=c.createElementVNode("span",null,"全选",-1))],2)],2)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.proposal.actionItems,Y=>{var p,V,y,N,H;return c.openBlock(),c.createElementBlock("div",{key:Y.id,class:c.normalizeClass([B.$style.item,l.value.has(Y.id)&&B.$style.itemSelected,o.value===Y.id&&B.$style.itemEditing])},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemHeader),onClick:R=>s(Y.id)},[c.createElementVNode("label",{class:c.normalizeClass(B.$style.checkbox),onClick:W[0]||(W[0]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{class:c.normalizeClass([B.$style.checkboxInner,l.value.has(Y.id)&&B.$style.checked])},[l.value.has(Y.id)?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"check",size:10})):c.createCommentVNode("",!0)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemBadges)},[Y.priority?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.priorityBadge),style:c.normalizeStyle({color:(p=a[Y.priority])==null?void 0:p.color,background:(V=a[Y.priority])==null?void 0:V.bgColor})},c.toDisplayString(((y=a[Y.priority])==null?void 0:y.label)??Y.priority),7)):c.createCommentVNode("",!0),Y.type?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(B.$style.typeBadge)},[c.createVNode(c.unref($),{name:((N=d[Y.type])==null?void 0:N.icon)??"document",size:12},null,8,["name"]),c.createTextVNode(" "+c.toDisplayString(((H=d[Y.type])==null?void 0:H.label)??Y.type),1)],2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemTitle)},c.toDisplayString(Y.title),3),!C.readonly&&(!C.status||C.status==="pending")?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(B.$style.editBtn),onClick:c.withModifiers(R=>m(Y),["stop"])},[c.createVNode(c.unref($),{name:"edit",size:12})],10,Sj)):c.createCommentVNode("",!0)],10,Hj),o.value===Y.id?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.editForm)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[10]||(W[10]=c.createElementVNode("label",null,"标题",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[1]||(W[1]=R=>n.value.title=R),class:c.normalizeClass(B.$style.editInput)},null,2),[[c.vModelText,n.value.title]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[11]||(W[11]=c.createElementVNode("label",null,"描述",-1)),c.withDirectives(c.createElementVNode("textarea",{"onUpdate:modelValue":W[2]||(W[2]=R=>n.value.description=R),class:c.normalizeClass(B.$style.editTextarea),rows:"2"},null,2),[[c.vModelText,n.value.description]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRowInline)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[12]||(W[12]=c.createElementVNode("label",null,"负责人",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[3]||(W[3]=R=>n.value.assignee=R),class:c.normalizeClass(B.$style.editInput),placeholder:"可选"},null,2),[[c.vModelText,n.value.assignee]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[13]||(W[13]=c.createElementVNode("label",null,"截止日期",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[4]||(W[4]=R=>n.value.deadline=R),class:c.normalizeClass(B.$style.editInput),placeholder:"可选"},null,2),[[c.vModelText,n.value.deadline]])],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRowInline)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[15]||(W[15]=c.createElementVNode("label",null,"优先级",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":W[5]||(W[5]=R=>n.value.priority=R),class:c.normalizeClass(B.$style.editSelect)},[...W[14]||(W[14]=[c.createElementVNode("option",{value:"high"},"高",-1),c.createElementVNode("option",{value:"medium"},"中",-1),c.createElementVNode("option",{value:"low"},"低",-1)])],2),[[c.vModelSelect,n.value.priority]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[17]||(W[17]=c.createElementVNode("label",null,"类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":W[6]||(W[6]=R=>n.value.type=R),class:c.normalizeClass(B.$style.editSelect)},[...W[16]||(W[16]=[c.createElementVNode("option",{value:"todo"},"待办",-1),c.createElementVNode("option",{value:"approval"},"审批",-1),c.createElementVNode("option",{value:"review"},"审阅",-1),c.createElementVNode("option",{value:"decision"},"决策",-1)])],2),[[c.vModelSelect,n.value.type]])],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editActions)},[c.createElementVNode("button",{class:c.normalizeClass(B.$style.saveBtn),onClick:b},"保存",2),c.createElementVNode("button",{class:c.normalizeClass(B.$style.cancelBtn),onClick:G},"取消",2)],2)],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(B.$style.itemBody)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemDesc)},c.toDisplayString(Y.description),3),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemMeta)},[Y.assignee?(c.openBlock(),c.createElementBlock("span",Mj,[c.createVNode(c.unref($),{name:"user",size:12}),c.createTextVNode(" "+c.toDisplayString(Y.assignee),1)])):c.createCommentVNode("",!0),Y.deadline?(c.openBlock(),c.createElementBlock("span",Dj,[c.createVNode(c.unref($),{name:"clock",size:12}),c.createTextVNode(" "+c.toDisplayString(Y.deadline),1)])):c.createCommentVNode("",!0)],2)],2))],2)}),128))],2),(w=C.proposal.approvalChain)!=null&&w.length?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(B.$style.chain)},[c.createElementVNode("span",{class:c.normalizeClass(B.$style.chainLabel)},"审批链:",2),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.proposal.approvalChain,(Y,p)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:p},[c.createElementVNode("span",{class:c.normalizeClass(B.$style.chainPerson)},c.toDisplayString(Y),3),p<C.proposal.approvalChain.length-1?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.chainArrow)},"→",2)):c.createCommentVNode("",!0)],64))),128))],2)):c.createCommentVNode("",!0),C.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:3,class:c.normalizeClass(B.$style.actions)},[!C.status||C.status==="pending"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("button",{class:c.normalizeClass(B.$style.approveBtn),onClick:r},[c.createVNode(c.unref($),{name:"check",size:14}),c.createTextVNode(" 确认执行 ("+c.toDisplayString(e.value)+" 项) ",1)],2),c.createElementVNode("button",{class:c.normalizeClass(B.$style.rejectBtn),onClick:h},[c.createVNode(c.unref($),{name:"close",size:14}),W[18]||(W[18]=c.createTextVNode(" 暂不执行 ",-1))],2)],64)):(c.openBlock(),c.createElementBlock("button",{key:1,class:c.normalizeClass(B.$style.resetBtn),onClick:u},[c.createVNode(c.unref($),{name:"refresh",size:14}),W[19]||(W[19]=c.createTextVNode(" 重新审核 ",-1))],2))],2))],2)}}}),[["__cssModules",{$style:{card:"_card_yghuq_2",cardApproved:"_cardApproved_yghuq_9",cardRejected:"_cardRejected_yghuq_14",header:"_header_yghuq_20",titleRow:"_titleRow_yghuq_27",title:"_title_yghuq_27",docTitle:"_docTitle_yghuq_39",countBadge:"_countBadge_yghuq_47",statusBadge:"_statusBadge_yghuq_53",statusApproved:"_statusApproved_yghuq_63",statusRejected:"_statusRejected_yghuq_68",summary:"_summary_yghuq_74",selectAllRow:"_selectAllRow_yghuq_85",checkbox:"_checkbox_yghuq_89",checkboxInner:"_checkboxInner_yghuq_99",checked:"_checked_yghuq_110",itemList:"_itemList_yghuq_117",item:"_item_yghuq_117",itemSelected:"_itemSelected_yghuq_136",itemEditing:"_itemEditing_yghuq_141",itemHeader:"_itemHeader_yghuq_145",itemBadges:"_itemBadges_yghuq_151",priorityBadge:"_priorityBadge_yghuq_156",typeBadge:"_typeBadge_yghuq_163",itemTitle:"_itemTitle_yghuq_171",editBtn:"_editBtn_yghuq_178",itemBody:"_itemBody_yghuq_194",itemDesc:"_itemDesc_yghuq_199",itemMeta:"_itemMeta_yghuq_206",editForm:"_editForm_yghuq_220",editRow:"_editRow_yghuq_225",editInput:"_editInput_yghuq_236",editTextarea:"_editTextarea_yghuq_237",editSelect:"_editSelect_yghuq_238",editRowInline:"_editRowInline_yghuq_260",editActions:"_editActions_yghuq_270",saveBtn:"_saveBtn_yghuq_276",cancelBtn:"_cancelBtn_yghuq_277",chain:"_chain_yghuq_309",chainLabel:"_chainLabel_yghuq_321",chainPerson:"_chainPerson_yghuq_325",chainArrow:"_chainArrow_yghuq_331",actions:"_actions_yghuq_337",approveBtn:"_approveBtn_yghuq_344",rejectBtn:"_rejectBtn_yghuq_345",resetBtn:"_resetBtn_yghuq_346"}}]]),Fj=["onClick"],zj=O(c.defineComponent({__name:"RequirementAnalysisCard",props:{analysis:{},partialAnswers:{default:()=>({})},nextQuestionId:{default:null},waitingConfirmation:{type:Boolean,default:!0}},emits:["answer","skip"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>({...g.partialAnswers})),l=c.computed(()=>({simple:"简单",medium:"中等",complex:"复杂"})[g.analysis.complexity]||g.analysis.complexity),e=c.computed(()=>{const s=g.analysis.completeness.score;return s>=80?"success":s>=60?"warning":"danger"}),t=c.computed(()=>g.analysis.confirmQuestions.filter(s=>s.required).every(s=>{var Z;return(Z=i.value[s.id])==null?void 0:Z.trim()}));function a(){A("skip")}function d(s,Z){g.waitingConfirmation&&A("answer",s,Z)}function o(s){var Z;return!!((Z=i.value[s])!=null&&Z.trim())}function n(s){return g.waitingConfirmation&&g.nextQuestionId===s}return(s,Z)=>{const m=c.resolveComponent("el-tag"),b=c.resolveComponent("el-progress");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(s.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summary)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryHeader)},[c.createVNode(c.unref($),{name:"data-board",size:16}),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryTitle)},"需求分析结果",2)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryGrid)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"意图",2),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.intent),3)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"类型",2),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.type),3)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"复杂度",2),c.createVNode(m,{type:C.analysis.complexity==="complex"?"danger":C.analysis.complexity==="medium"?"warning":"success",size:"small"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l.value),1)]),_:1},8,["type"])],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"完整性",2),c.createVNode(b,{percentage:C.analysis.completeness.score,color:e.value==="success"?"#67c23a":e.value==="warning"?"#e6a23c":"#f56c6c","stroke-width":8,"show-text":!1,style:{width:"80px"}},null,8,["percentage","color"]),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.completeness.score)+"%",3)],2)],2),C.analysis.completeness.missing.length>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.missingSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.missingTitle)},[c.createVNode(c.unref($),{name:"warning",size:14}),Z[0]||(Z[0]=c.createElementVNode("span",null,"缺失信息",-1))],2),c.createElementVNode("ul",{class:c.normalizeClass(s.$style.missingList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.completeness.missing,(G,r)=>(c.openBlock(),c.createElementBlock("li",{key:r},c.toDisplayString(G),1))),128))],2)],2)):c.createCommentVNode("",!0),C.analysis.completeness.assumptions.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.assumptionsSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.assumptionsTitle)},[c.createVNode(c.unref($),{name:"info-filled",size:14}),Z[1]||(Z[1]=c.createElementVNode("span",null,"AI 假设",-1))],2),c.createElementVNode("ul",{class:c.normalizeClass(s.$style.assumptionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.completeness.assumptions,(G,r)=>(c.openBlock(),c.createElementBlock("li",{key:r},c.toDisplayString(G),1))),128))],2)],2)):c.createCommentVNode("",!0)],2),C.analysis.suggestedChain.length>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.chainSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainTitle)},[c.createVNode(c.unref($),{name:"list",size:14}),Z[2]||(Z[2]=c.createElementVNode("span",null,"执行计划",-1))],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.suggestedChain,(G,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:c.normalizeClass(s.$style.chainItem)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainStep)},c.toDisplayString(r+1),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainContent)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainAgent)},c.toDisplayString(G.agent),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainDesc)},c.toDisplayString(G.description),3)],2)],2))),128))],2)],2)):c.createCommentVNode("",!0),C.analysis.confirmQuestions.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.questionsSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionsTitle)},[c.createVNode(c.unref($),{name:"question-filled",size:14}),Z[3]||(Z[3]=c.createElementVNode("span",null,"请确认以下信息",-1)),C.waitingConfirmation&&!t.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(s.$style.progressHint)}," 在下方输入框逐条回复,答完必填项后自动继续 ",2)):C.waitingConfirmation&&t.value?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(s.$style.progressHint)}," 必填项已完成,发送任意内容或直接点选以继续 ",2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.confirmQuestions,G=>(c.openBlock(),c.createElementBlock("div",{key:G.id,class:c.normalizeClass([s.$style.questionItem,n(G.id)&&s.$style.questionItemActive,o(G.id)&&s.$style.questionItemDone])},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionText)},[o(G.id)?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"circle-check",size:14,class:c.normalizeClass(s.$style.answeredIcon)},null,8,["class"])):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(G.question)+" ",1),G.required?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(s.$style.required)},"*",2)):c.createCommentVNode("",!0)],2),o(G.id)?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.answeredValue)},c.toDisplayString(i.value[G.id]),3)):G.options&&G.options.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.optionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(G.options,(r,h)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:c.normalizeClass([s.$style.optionItem,{[s.$style.optionDisabled]:!C.waitingConfirmation}]),onClick:u=>C.waitingConfirmation&&d(G.id,r)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.optionIndex)},c.toDisplayString(h+1),3),c.createElementVNode("span",{class:c.normalizeClass(s.$style.optionText)},c.toDisplayString(r),3)],10,Fj))),128))],2)):n(G.id)?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(s.$style.inputHint)}," 请在下方输入框回复 ",2)):c.createCommentVNode("",!0)],2))),128))],2)],2)):c.createCommentVNode("",!0),C.waitingConfirmation?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(s.$style.actions)},[c.createElementVNode("button",{type:"button",class:c.normalizeClass(s.$style.skipLink),onClick:a}," 跳过,直接执行 ",2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_8r8st_2",summary:"_summary_8r8st_10",summaryHeader:"_summaryHeader_8r8st_15",summaryTitle:"_summaryTitle_8r8st_24",summaryGrid:"_summaryGrid_8r8st_28",summaryItem:"_summaryItem_8r8st_34",summaryLabel:"_summaryLabel_8r8st_40",summaryValue:"_summaryValue_8r8st_46",missingSection:"_missingSection_8r8st_52",missingTitle:"_missingTitle_8r8st_59",missingList:"_missingList_8r8st_69",assumptionsSection:"_assumptionsSection_8r8st_81",assumptionsTitle:"_assumptionsTitle_8r8st_88",assumptionsList:"_assumptionsList_8r8st_98",chainSection:"_chainSection_8r8st_110",chainTitle:"_chainTitle_8r8st_115",chainList:"_chainList_8r8st_125",chainItem:"_chainItem_8r8st_131",chainStep:"_chainStep_8r8st_137",chainContent:"_chainContent_8r8st_151",chainAgent:"_chainAgent_8r8st_155",chainDesc:"_chainDesc_8r8st_161",questionsSection:"_questionsSection_8r8st_167",questionsTitle:"_questionsTitle_8r8st_171",progressHint:"_progressHint_8r8st_182",questionItemActive:"_questionItemActive_8r8st_188",questionItemDone:"_questionItemDone_8r8st_195",answeredIcon:"_answeredIcon_8r8st_199",answeredValue:"_answeredValue_8r8st_204",inputHint:"_inputHint_8r8st_210",optionDisabled:"_optionDisabled_8r8st_216",questionsList:"_questionsList_8r8st_221",questionItem:"_questionItem_8r8st_188",questionText:"_questionText_8r8st_233",required:"_required_8r8st_238",optionsList:"_optionsList_8r8st_243",optionItem:"_optionItem_8r8st_249",optionSelected:"_optionSelected_8r8st_265",optionIndex:"_optionIndex_8r8st_270",optionText:"_optionText_8r8st_289",actions:"_actions_8r8st_295",skipLink:"_skipLink_8r8st_303"}}]]),gi={card:"_card_6xf4y_1",header:"_header_6xf4y_9",title:"_title_6xf4y_16",filename:"_filename_6xf4y_22",summary:"_summary_6xf4y_27",points:"_points_6xf4y_34",section:"_section_6xf4y_44",sectionTitle:"_sectionTitle_6xf4y_48",sectionContent:"_sectionContent_6xf4y_55"},Jj=c.defineComponent({__name:"DocumentDetailSummaryCard",props:{item:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref(gi).card)},[c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).header)},[c.createVNode(c.unref($),{name:"document",size:16}),c.createElementVNode("div",null,[c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).title)},c.toDisplayString(C.item.summary.title),3),c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).filename)},c.toDisplayString(C.item.filename),3)])],2),c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).summary)},c.toDisplayString(C.item.summary.summary),3),C.item.summary.keyPoints.length?(c.openBlock(),c.createElementBlock("ul",{key:0,class:c.normalizeClass(c.unref(gi).points)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.item.summary.keyPoints,(A,i)=>(c.openBlock(),c.createElementBlock("li",{key:i},c.toDisplayString(A),1))),128))],2)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.item.summary.sections,(A,i)=>(c.openBlock(),c.createElementBlock("div",{key:i,class:c.normalizeClass(c.unref(gi).section)},[c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).sectionTitle)},c.toDisplayString(A.heading),3),c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).sectionContent)},c.toDisplayString(A.content),3)],2))),128))],2))}}),vj=["disabled","onClick"],kj=O(c.defineComponent({__name:"ErrorRecoveryCard",props:{error:{},nodeName:{},nodeType:{},strategies:{}},emits:["select"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-tag");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(A.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.header)},[c.createVNode(c.unref($),{name:"warning-filled",size:14,class:c.normalizeClass(A.$style.headerIcon)},null,8,["class"]),c.createElementVNode("span",{class:c.normalizeClass(A.$style.title)},"执行错误",2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.body)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.errorInfo)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.nodeInfo)},[c.createElementVNode("span",{class:c.normalizeClass(A.$style.nodeLabel)},"节点:",2),c.createElementVNode("span",{class:c.normalizeClass(A.$style.nodeName)},c.toDisplayString(C.nodeName),3),C.nodeType?(c.openBlock(),c.createBlock(l,{key:0,size:"small",type:"info"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(C.nodeType),1)]),_:1})):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.errorMessage)},[c.createVNode(c.unref($),{name:"circle-close-filled",size:14}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategies)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyLabel)},"选择恢复策略:",2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.strategies,e=>(c.openBlock(),c.createElementBlock("button",{key:e.value,class:c.normalizeClass([A.$style.strategyBtn,e.disabled&&A.$style.strategyDisabled]),disabled:e.disabled,onClick:t=>g("select",e.value)},[c.createVNode(c.unref($),{name:e.icon,size:16},null,8,["name"]),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyInfo)},[c.createElementVNode("span",{class:c.normalizeClass(A.$style.strategyName)},c.toDisplayString(e.label),3),c.createElementVNode("span",{class:c.normalizeClass(A.$style.strategyDesc)},c.toDisplayString(e.description),3)],2)],10,vj))),128))],2)],2)],2)],2)}}}),[["__cssModules",{$style:{card:"_card_170h5_2",header:"_header_170h5_8",headerIcon:"_headerIcon_170h5_17",title:"_title_170h5_21",body:"_body_170h5_27",errorInfo:"_errorInfo_170h5_31",nodeInfo:"_nodeInfo_170h5_35",nodeLabel:"_nodeLabel_170h5_42",nodeName:"_nodeName_170h5_47",errorMessage:"_errorMessage_170h5_53",strategies:"_strategies_170h5_65",strategyLabel:"_strategyLabel_170h5_70",strategyList:"_strategyList_170h5_76",strategyBtn:"_strategyBtn_170h5_82",strategyDisabled:"_strategyDisabled_170h5_104",strategyInfo:"_strategyInfo_170h5_108",strategyName:"_strategyName_170h5_114",strategyDesc:"_strategyDesc_170h5_120"}}]]),Lj=O(c.defineComponent({__name:"VariableDiffCard",props:{nodeName:{},changes:{}},setup(C){const I=C,g=c.computed(()=>I.changes.length>0);function A(l){return l==null?"null":typeof l=="string"?l:JSON.stringify(l,null,2)}function i(l){switch(l.type){case"add":return{icon:"plus",color:"var(--el-color-success, #67c23a)",label:"新增"};case"update":return{icon:"edit",color:"var(--el-color-primary, #409eff)",label:"更新"};case"delete":return{icon:"delete",color:"var(--el-color-danger, #f56c6c)",label:"删除"};default:return{icon:"info-filled",color:"var(--el-color-info, #909399)",label:"变更"}}}return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(l.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerLeft)},[c.createVNode(c.unref($),{name:"data-line",size:14,class:c.normalizeClass(l.$style.headerIcon)},null,8,["class"]),c.createElementVNode("span",{class:c.normalizeClass(l.$style.title)},"变量变更",2)],2),C.nodeName?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(l.$style.nodeInfo)},c.toDisplayString(C.nodeName),3)):c.createCommentVNode("",!0)],2),g.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.body)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.changes,(t,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:c.normalizeClass(l.$style.change)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.changeHeader)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.changeType)},[c.createVNode(c.unref($),{name:i(t).icon,size:12,style:c.normalizeStyle({color:i(t).color})},null,8,["name","style"]),c.createElementVNode("span",{style:c.normalizeStyle({color:i(t).color})},c.toDisplayString(i(t).label),5)],2),c.createElementVNode("span",{class:c.normalizeClass(l.$style.varName)},c.toDisplayString(t.name),3)],2),t.type==="update"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.diff)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.diffOld)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"旧值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.oldValue)),3)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.diffNew)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"新值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.newValue)),3)],2)],2)):t.type==="add"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(l.$style.singleValue)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.newValue)),3)],2)):c.createCommentVNode("",!0)],2))),128))],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(l.$style.empty)}," 暂无变量变更 ",2))],2))}}),[["__cssModules",{$style:{card:"_card_1byhf_2",header:"_header_1byhf_8",headerLeft:"_headerLeft_1byhf_17",headerIcon:"_headerIcon_1byhf_23",title:"_title_1byhf_27",nodeInfo:"_nodeInfo_1byhf_33",body:"_body_1byhf_38",change:"_change_1byhf_45",changeHeader:"_changeHeader_1byhf_51",changeType:"_changeType_1byhf_59",varName:"_varName_1byhf_67",diff:"_diff_1byhf_73",diffOld:"_diffOld_1byhf_78",diffNew:"_diffNew_1byhf_84",singleValue:"_singleValue_1byhf_89",diffLabel:"_diffLabel_1byhf_93",diffValue:"_diffValue_1byhf_100",empty:"_empty_1byhf_108"}}]]),Tj=O(c.defineComponent({__name:"SubWorkflowStatusCard",props:{workflowName:{},status:{},durationMs:{},error:{},nodeCount:{},completedNodes:{}},emits:["detail","retry"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1),l=c.computed(()=>{switch(g.status){case"running":return"loading";case"success":return"circle-check";case"error":return"circle-close-filled";case"waiting":return"clock";case"cancelled":return"minus";default:return"more-filled"}}),e=c.computed(()=>{switch(g.status){case"running":return"执行中";case"success":return"成功";case"error":return"失败";case"waiting":return"待确认";case"cancelled":return"已取消";default:return"等待"}}),t=c.computed(()=>{switch(g.status){case"running":return"primary";case"success":return"success";case"error":return"danger";case"waiting":return"warning";default:return"info"}}),a=c.computed(()=>{const s=g.durationMs;return s==null?"":s<1e3?`${s}ms`:`${(s/1e3).toFixed(2)}s`}),d=c.computed(()=>g.nodeCount??0),o=c.computed(()=>g.completedNodes??0),n=c.computed(()=>d.value===0?0:Math.round(o.value/d.value*100));return(s,Z)=>{const m=c.resolveComponent("el-tag"),b=c.resolveComponent("el-progress"),G=c.resolveComponent("el-button");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(s.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.header),onClick:Z[0]||(Z[0]=r=>i.value=!i.value)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.iconWrap)},[c.createVNode(c.unref($),{name:l.value,size:16,class:c.normalizeClass(C.status==="running"&&s.$style.iconSpin)},null,8,["name","class"])],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.info)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.name)},"子工作流:"+c.toDisplayString(C.workflowName),3),c.createElementVNode("span",{class:c.normalizeClass(s.$style.meta)},[c.createVNode(m,{size:"small",type:t.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.value),1)]),_:1},8,["type"]),a.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(s.$style.duration)},c.toDisplayString(a.value),3)):c.createCommentVNode("",!0)],2)],2),c.createVNode(c.unref($),{name:i.value?"arrow-up":"arrow-down",size:14,class:c.normalizeClass(s.$style.expandIcon)},null,8,["name","class"])],2),i.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.detail)},[d.value>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.progress)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.progressLabel)}," 节点进度:"+c.toDisplayString(o.value)+" / "+c.toDisplayString(d.value),3),c.createVNode(b,{percentage:n.value,status:C.status==="error"?"exception":void 0,"stroke-width":6},null,8,["percentage","status"])],2)):c.createCommentVNode("",!0),C.error?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.error)},[c.createVNode(c.unref($),{name:"warning-filled",size:14}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(s.$style.actions)},[c.createVNode(G,{size:"small",onClick:Z[1]||(Z[1]=r=>A("detail"))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"view",size:14,style:{"margin-right":"4px"}}),Z[3]||(Z[3]=c.createTextVNode(" 查看详情 ",-1))]),_:1}),C.status==="error"?(c.openBlock(),c.createBlock(G,{key:0,size:"small",type:"primary",plain:"",onClick:Z[2]||(Z[2]=r=>A("retry"))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"refresh",size:14,style:{"margin-right":"4px"}}),Z[4]||(Z[4]=c.createTextVNode(" 重试 ",-1))]),_:1})):c.createCommentVNode("",!0)],2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_15eqh_2",header:"_header_15eqh_8",iconWrap:"_iconWrap_15eqh_21",info:"_info_15eqh_33",name:"_name_15eqh_41",meta:"_meta_15eqh_50",duration:"_duration_15eqh_56",expandIcon:"_expandIcon_15eqh_62",detail:"_detail_15eqh_67",progress:"_progress_15eqh_73",progressLabel:"_progressLabel_15eqh_77",error:"_error_15eqh_83",actions:"_actions_15eqh_95",iconSpin:"_iconSpin_15eqh_100","sub-workflow-spin":"_sub-workflow-spin_15eqh_1"}}]]),xj={key:0},fj=O(c.defineComponent({__name:"PptPreviewCard",props:{slides:{},metadata:{},loading:{type:Boolean},error:{},blob:{}},emits:["download"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>(g.slides??[]).slice(0,4)),l={business:"商务",tech:"科技",education:"教育",creative:"创意"},e={professional:"专业",casual:"休闲",academic:"学术"},t={title:"document",content:"notebook",chart:"data-line",comparison:"scale-to-original",summary:"document-checked"};function a(){var d;if(g.blob){const o=URL.createObjectURL(g.blob),n=document.createElement("a");n.href=o,n.download=`${((d=g.metadata)==null?void 0:d.title)??"presentation"}.pptx`,n.click(),URL.revokeObjectURL(o)}else A("download")}return(d,o)=>{var n,s,Z,m;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(d.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.titleRow)},[c.createVNode(c.unref($),{name:"data-board",size:16,style:{color:"#67C23A"}}),c.createElementVNode("span",{class:c.normalizeClass(d.$style.title)},c.toDisplayString(((n=C.metadata)==null?void 0:n.title)??"AI PPT 生成"),3)],2),C.metadata?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.metaBadges)},[c.createElementVNode("span",{class:c.normalizeClass(d.$style.badge)},c.toDisplayString(l[C.metadata.template]??C.metadata.template),3),c.createElementVNode("span",{class:c.normalizeClass(d.$style.badge)},c.toDisplayString(C.metadata.totalSlides)+" 页",3)],2)):c.createCommentVNode("",!0)],2),C.loading?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.loadingState)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.spinner)},null,2),o[0]||(o[0]=c.createElementVNode("span",null,"正在生成 PPT...",-1))],2)):C.error?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(d.$style.errorState)},[c.createVNode(c.unref($),{name:"warning",size:24}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)):i.value.length?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(d.$style.previewGrid)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,b=>{var G;return c.openBlock(),c.createElementBlock("div",{key:b.index,class:c.normalizeClass(d.$style.slideThumb)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideHeader)},[c.createVNode(c.unref($),{name:t[b.type]??"document",size:12},null,8,["name"]),c.createElementVNode("span",null,c.toDisplayString(b.heading),1)],2),c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideBody)},[(G=b.content)!=null&&G.length?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.slideContent)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(b.content.slice(0,3),(r,h)=>(c.openBlock(),c.createElementBlock("div",{key:h,class:c.normalizeClass(d.$style.slidePoint)},c.toDisplayString(r),3))),128)),b.content.length>3?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.slideMore)}," +"+c.toDisplayString(b.content.length-3)+" 更多 ",3)):c.createCommentVNode("",!0)],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(d.$style.slideEmpty)},"暂无内容",2))],2),c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideIndex)},c.toDisplayString(b.index),3)],2)}),128)),(((s=C.slides)==null?void 0:s.length)??0)>4?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.moreSlides)},[c.createElementVNode("span",null,"+"+c.toDisplayString((((Z=C.slides)==null?void 0:Z.length)??0)-4)+" 页",1)],2)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0),C.metadata?(c.openBlock(),c.createElementBlock("div",{key:3,class:c.normalizeClass(d.$style.meta)},[C.metadata.style?(c.openBlock(),c.createElementBlock("span",xj,[c.createVNode(c.unref($),{name:"brush",size:12}),c.createTextVNode(" "+c.toDisplayString(e[C.metadata.style]??C.metadata.style),1)])):c.createCommentVNode("",!0),c.createElementVNode("span",null,[c.createVNode(c.unref($),{name:"document",size:12}),c.createTextVNode(" "+c.toDisplayString(C.metadata.totalSlides)+" 页 ",1)])],2)):c.createCommentVNode("",!0),!C.loading&&((m=C.slides)!=null&&m.length)?(c.openBlock(),c.createElementBlock("div",{key:4,class:c.normalizeClass(d.$style.actions)},[c.createElementVNode("button",{class:c.normalizeClass(d.$style.downloadBtn),onClick:a},[c.createVNode(c.unref($),{name:"download",size:14}),o[1]||(o[1]=c.createTextVNode(" 下载 PPT ",-1))],2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_z1wac_2",header:"_header_z1wac_9",titleRow:"_titleRow_z1wac_16",title:"_title_z1wac_16",metaBadges:"_metaBadges_z1wac_28",badge:"_badge_z1wac_33",loadingState:"_loadingState_z1wac_41",errorState:"_errorState_z1wac_42",spinner:"_spinner_z1wac_56",spin:"_spin_z1wac_56",previewGrid:"_previewGrid_z1wac_69",slideThumb:"_slideThumb_z1wac_76",slideHeader:"_slideHeader_z1wac_85",slideBody:"_slideBody_z1wac_97",slideContent:"_slideContent_z1wac_101",slidePoint:"_slidePoint_z1wac_107",slideMore:"_slideMore_z1wac_116",slideEmpty:"_slideEmpty_z1wac_122",slideIndex:"_slideIndex_z1wac_127",moreSlides:"_moreSlides_z1wac_136",meta:"_meta_z1wac_28",actions:"_actions_z1wac_161",downloadBtn:"_downloadBtn_z1wac_166"}}]]),jj=O(c.defineComponent({__name:"FlowPreviewShell",props:{title:{},badge:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1},showFitButton:{type:Boolean,default:!0}},emits:["primary-action","secondary-action","fit-view"],setup(C,{emit:I}){const g=I;return(A,i)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([A.$style.card,{[A.$style.compact]:C.compact}])},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.head)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.headLeft)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.headIcon)},[c.renderSlot(A.$slots,"icon",{},()=>[c.createVNode(c.unref($),{name:"connection",size:14})])],2),c.createElementVNode("span",{class:c.normalizeClass(A.$style.title)},c.toDisplayString(C.title),3)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.headRight)},[C.badge?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(A.$style.badge)},c.toDisplayString(C.badge),3)):c.createCommentVNode("",!0),C.showFitButton?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(A.$style.fitBtn),title:"适配画布",onClick:i[0]||(i[0]=l=>g("fit-view"))},[c.createVNode(c.unref($),{name:"full-screen"})],2)):c.createCommentVNode("",!0)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.canvasWrapper)},[c.renderSlot(A.$slots,"default")],2),C.primaryAction||C.secondaryAction?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(A.$style.actions)},[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(A.$style.btnGhost),onClick:i[1]||(i[1]=l=>g("secondary-action"))},[c.createVNode(c.unref($),{name:"edit",size:12}),c.createTextVNode(" "+c.toDisplayString(C.secondaryAction),1)],2)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(A.$style.btnPrimary),onClick:i[2]||(i[2]=l=>g("primary-action"))},[c.createVNode(c.unref($),{name:"check",size:12}),c.createTextVNode(" "+c.toDisplayString(C.primaryAction),1)],2)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{card:"_card_h1z12_1",head:"_head_h1z12_16",headLeft:"_headLeft_h1z12_25",headRight:"_headRight_h1z12_31",headIcon:"_headIcon_h1z12_37",title:"_title_h1z12_49",badge:"_badge_h1z12_55",fitBtn:"_fitBtn_h1z12_64",canvasWrapper:"_canvasWrapper_h1z12_86","vue-flow__node":"_vue-flow__node_h1z12_92",selected:"_selected_h1z12_96","vue-flow__edge-path":"_vue-flow__edge-path_h1z12_101","vue-flow__controls":"_vue-flow__controls_h1z12_105","vue-flow__controls-button":"_vue-flow__controls-button_h1z12_111",actions:"_actions_h1z12_121",btnPrimary:"_btnPrimary_h1z12_130",btnGhost:"_btnGhost_h1z12_150",compact:"_compact_h1z12_173"}}]]),Qj={class:"apf-bpmn-node"},Uj={class:"apf-bpmn-node__label"},Aw=O(c.defineComponent({__name:"PreviewStartEvent",props:{data:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",Qj,[g[0]||(g[0]=c.createElementVNode("div",{class:"apf-bpmn-start"},[c.createElementVNode("div",{class:"apf-bpmn-start__inner"})],-1)),c.createElementVNode("div",Uj,c.toDisplayString(C.data.label),1),c.createVNode(c.unref(AC.Handle),{type:"source",position:c.unref(AC.Position).Bottom},null,8,["position"])]))}}),[["__scopeId","data-v-06a5d706"]]),Oj={class:"apf-bpmn-node"},Ej={class:"apf-bpmn-node__label"},iw=O(c.defineComponent({__name:"PreviewEndEvent",props:{data:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",Oj,[c.createVNode(c.unref(AC.Handle),{type:"target",position:c.unref(AC.Position).Top},null,8,["position"]),g[0]||(g[0]=c.createElementVNode("div",{class:"apf-bpmn-end"},[c.createElementVNode("div",{class:"apf-bpmn-end__inner"})],-1)),c.createElementVNode("div",Ej,c.toDisplayString(C.data.label),1)]))}}),[["__scopeId","data-v-6c6caa4e"]]),Pj={class:"apf-bpmn-node"},_j={class:"apf-bpmn-task"},qj={class:"apf-bpmn-task__icon"},$j={class:"apf-bpmn-task__label"},lw=O(c.defineComponent({__name:"PreviewTask",props:{data:{}},setup(C){const I={userTask:"👤",serviceTask:"⚙",scriptTask:"📜",sendTask:"📤",receiveTask:"📥"};return(g,A)=>(c.openBlock(),c.createElementBlock("div",Pj,[c.createVNode(c.unref(AC.Handle),{type:"target",position:c.unref(AC.Position).Top},null,8,["position"]),c.createElementVNode("div",_j,[c.createElementVNode("span",qj,c.toDisplayString(I[C.data.bpmnType]||"📋"),1),c.createElementVNode("span",$j,c.toDisplayString(C.data.label),1)]),c.createVNode(c.unref(AC.Handle),{type:"source",position:c.unref(AC.Position).Bottom},null,8,["position"])]))}}),[["__scopeId","data-v-5b6a4a18"]]),gQ={class:"apf-bpmn-node"},IQ={class:"apf-bpmn-gateway"},CQ={class:"apf-bpmn-gateway__icon"},AQ={class:"apf-bpmn-node__label"},ew=O(c.defineComponent({__name:"PreviewGateway",props:{data:{}},setup(C){const I={exclusiveGateway:"✕",parallelGateway:"+",inclusiveGateway:"◎"};return(g,A)=>(c.openBlock(),c.createElementBlock("div",gQ,[c.createVNode(c.unref(AC.Handle),{type:"target",position:c.unref(AC.Position).Top},null,8,["position"]),c.createElementVNode("div",IQ,[c.createElementVNode("span",CQ,c.toDisplayString(I[C.data.bpmnType]||"◆"),1)]),c.createElementVNode("div",AQ,c.toDisplayString(C.data.label),1),c.createVNode(c.unref(AC.Handle),{type:"source",position:c.unref(AC.Position).Bottom},null,8,["position"])]))}}),[["__scopeId","data-v-3ff1b368"]]),iQ=O(c.defineComponent({__name:"BpmnFlowPreviewCanvas",props:{nodes:{},edges:{},flowId:{}},emits:["node-click","fit-view"],setup(C,{expose:I,emit:g}){const A=C,i=g,l=A.flowId??`apf-bpmn-preview-${Math.random().toString(36).slice(2,8)}`,e=c.computed(()=>A.nodes.map(n=>({id:n.id,type:n.type,position:n.position,data:n.data,draggable:!0}))),t=c.computed(()=>A.edges.map(n=>({id:n.id,source:n.source,target:n.target,label:n.label,type:"smoothstep",animated:!0,markerEnd:{type:AC.MarkerType.ArrowClosed},style:{stroke:"var(--c-info, #4581e9)",strokeWidth:1.5}}))),{onNodeClick:a,fitView:d}=AC.useVueFlow({id:l});a(({node:n})=>{i("node-click",n.id,n.data)});function o(){d({padding:.2}),i("fit-view")}return c.watch(()=>[A.nodes,A.edges],async()=>{await c.nextTick(),setTimeout(()=>d({padding:.2}),100)},{deep:!0}),I({fitView:o}),(n,s)=>(c.openBlock(),c.createBlock(c.unref(AC.VueFlow),{id:c.unref(l),nodes:e.value,edges:t.value,"nodes-draggable":!0,"nodes-connectable":!1,"edges-updatable":!1,"elements-selectable":!0,"default-viewport":{zoom:.8,x:0,y:0},"min-zoom":.2,"max-zoom":2,"fit-view-on-init":"",class:"apf-bpmn-canvas"},{"node-start-event":c.withCtx(Z=>[c.createVNode(Aw,c.normalizeProps(c.guardReactiveProps(Z)),null,16)]),"node-end-event":c.withCtx(Z=>[c.createVNode(iw,c.normalizeProps(c.guardReactiveProps(Z)),null,16)]),"node-task":c.withCtx(Z=>[c.createVNode(lw,c.normalizeProps(c.guardReactiveProps(Z)),null,16)]),"node-gateway":c.withCtx(Z=>[c.createVNode(ew,c.normalizeProps(c.guardReactiveProps(Z)),null,16)]),default:c.withCtx(()=>[c.createVNode(c.unref(p9.Background),{gap:16,size:.6,color:"#e0e5ec"}),c.createVNode(c.unref(y9.Controls),{"show-interactive":!1})]),_:1},8,["id","nodes","edges"]))}}),[["__scopeId","data-v-41401ec3"]]),tw={startEvent:"start-event",endEvent:"end-event",userTask:"task",serviceTask:"task",scriptTask:"task",sendTask:"task",receiveTask:"task",exclusiveGateway:"gateway",parallelGateway:"gateway",inclusiveGateway:"gateway"};function lQ(C){return tw[C]??"task"}const eQ={class:"apf-model3d"},tQ={class:"apf-model3d__header"},aQ={class:"apf-model3d__badge"},cQ={class:"apf-model3d__filename"},dQ={class:"apf-model3d__body"},oQ={key:0,slot:"poster",class:"apf-model3d__hint"},nQ={key:1,class:"apf-model3d__hint is-error"},sQ={key:0,class:"apf-model3d__actions"},ZQ=["href"],mQ=O(c.defineComponent({__name:"Model3dPreviewCard",props:{url:{},filename:{},mimeType:{},poster:{}},setup(C){const I=C,g=c.ref(!1),A=c.ref(null),i=c.computed(()=>{var a,d;const t=((d=(a=I.filename)==null?void 0:a.split(".").pop())==null?void 0:d.toLowerCase())||"";return["gltf","glb"].includes(t)?"glTF":t==="obj"?"OBJ":t==="stl"?"STL":t==="fbx"?"FBX":"3D"});function l(){g.value=!0,A.value=null}function e(){A.value="加载失败"}return(t,a)=>{const d=c.resolveComponent("model-viewer");return c.openBlock(),c.createElementBlock("div",eQ,[c.createElementVNode("div",tQ,[c.createElementVNode("span",aQ,c.toDisplayString(i.value),1),c.createElementVNode("span",cQ,c.toDisplayString(C.filename||"3D 模型"),1)]),c.createElementVNode("div",dQ,[c.createVNode(d,{src:C.url,poster:C.poster,"camera-controls":"","auto-rotate":"","shadow-intensity":"1",class:"apf-model3d__viewer",onLoad:l,onError:e},{default:c.withCtx(()=>[!g.value&&!A.value?(c.openBlock(),c.createElementBlock("div",oQ,[c.createVNode(c.unref($),{name:"loading",size:24,class:"apf-model3d__spin"}),a[0]||(a[0]=c.createElementVNode("span",null,"加载 3D 模型中...",-1))])):c.createCommentVNode("",!0),A.value?(c.openBlock(),c.createElementBlock("div",nQ,[c.createVNode(c.unref($),{name:"warning-filled",size:24}),c.createElementVNode("span",null,c.toDisplayString(A.value),1)])):c.createCommentVNode("",!0)]),_:1},8,["src","poster"])]),A.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",sQ,[c.createElementVNode("a",{class:"apf-model3d__download",href:C.url,download:""},[c.createVNode(c.unref($),{name:"download",size:14}),a[1]||(a[1]=c.createTextVNode(" 下载 ",-1))],8,ZQ)]))])}}}),[["__scopeId","data-v-b562b8bd"]]),bQ={class:"apf-image-generate"},GQ={class:"apf-image-generate__header"},rQ={class:"apf-image-generate__title-row"},hQ={key:0,class:"apf-image-generate__model"},uQ={key:0,class:"apf-image-generate__prompt"},BQ={class:"apf-image-generate__image-container"},WQ={key:0,class:"apf-image-generate__overlay"},wQ={key:1,class:"apf-image-generate__overlay apf-image-generate__overlay--error"},YQ=["src"],VQ={class:"apf-image-generate__zoom-hint"},pQ={key:3,class:"apf-image-generate__placeholder"},yQ={key:1,class:"apf-image-generate__meta"},NQ={key:0},XQ={key:1},RQ={key:2},HQ={key:2,class:"apf-image-generate__actions"},SQ=O(c.defineComponent({__name:"ImageGenerateCard",props:{imageUrl:{},prompt:{},model:{},size:{},imageStyle:{},quality:{},loading:{type:Boolean},error:{}},emits:["download","regenerate"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1);function l(){if(!g.imageUrl)return;const o=document.createElement("a");o.href=g.imageUrl,o.download=`ai-image-${Date.now()}.png`,o.click(),A("download")}function e(){g.imageUrl&&(i.value=!0)}function t(){i.value=!1}const a={vivid:"鲜艳",natural:"自然"},d={standard:"标准",hd:"高清"};return(o,n)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",bQ,[c.createElementVNode("div",GQ,[c.createElementVNode("div",rQ,[c.createVNode(c.unref($),{name:"picture",size:16,style:{color:"#E6A23C"}}),n[1]||(n[1]=c.createElementVNode("span",{class:"apf-image-generate__title"},"AI 图片生成",-1))]),C.model?(c.openBlock(),c.createElementBlock("div",hQ,c.toDisplayString(C.model),1)):c.createCommentVNode("",!0)]),C.prompt?(c.openBlock(),c.createElementBlock("div",uQ,[n[2]||(n[2]=c.createElementVNode("span",{class:"apf-image-generate__prompt-label"},"Prompt:",-1)),c.createTextVNode(c.toDisplayString(C.prompt),1)])):c.createCommentVNode("",!0),c.createElementVNode("div",BQ,[C.loading?(c.openBlock(),c.createElementBlock("div",WQ,[...n[3]||(n[3]=[c.createElementVNode("div",{class:"apf-image-generate__spinner"},null,-1),c.createElementVNode("span",null,"正在生成图片...",-1)])])):C.error?(c.openBlock(),c.createElementBlock("div",wQ,[c.createVNode(c.unref($),{name:"warning",size:24}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)])):C.imageUrl?(c.openBlock(),c.createElementBlock("div",{key:2,class:"apf-image-generate__image-wrap",onClick:e},[c.createElementVNode("img",{src:C.imageUrl,class:"apf-image-generate__image",alt:"AI generated image"},null,8,YQ),c.createElementVNode("div",VQ,[c.createVNode(c.unref($),{name:"full-screen",size:16}),n[4]||(n[4]=c.createElementVNode("span",null,"点击放大",-1))])])):(c.openBlock(),c.createElementBlock("div",pQ,[c.createVNode(c.unref($),{name:"picture",size:32}),n[5]||(n[5]=c.createElementVNode("span",null,"等待生成",-1))]))]),C.size||C.imageStyle||C.quality?(c.openBlock(),c.createElementBlock("div",yQ,[C.size?(c.openBlock(),c.createElementBlock("span",NQ,[c.createVNode(c.unref($),{name:"full-screen",size:12}),c.createTextVNode(" "+c.toDisplayString(C.size),1)])):c.createCommentVNode("",!0),C.imageStyle?(c.openBlock(),c.createElementBlock("span",XQ,[c.createVNode(c.unref($),{name:"brush",size:12}),c.createTextVNode(" "+c.toDisplayString(a[C.imageStyle]??C.imageStyle),1)])):c.createCommentVNode("",!0),C.quality?(c.openBlock(),c.createElementBlock("span",RQ,[c.createVNode(c.unref($),{name:"picture",size:12}),c.createTextVNode(" "+c.toDisplayString(d[C.quality]??C.quality),1)])):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),!C.loading&&C.imageUrl?(c.openBlock(),c.createElementBlock("div",HQ,[c.createElementVNode("button",{type:"button",class:"apf-image-generate__btn apf-image-generate__btn--primary",onClick:l},[c.createVNode(c.unref($),{name:"download",size:14}),n[6]||(n[6]=c.createTextVNode(" 下载图片 ",-1))]),c.createElementVNode("button",{type:"button",class:"apf-image-generate__btn",onClick:n[0]||(n[0]=s=>A("regenerate"))},[c.createVNode(c.unref($),{name:"refresh",size:14}),n[7]||(n[7]=c.createTextVNode(" 重新生成 ",-1))])])):c.createCommentVNode("",!0)]),i.value&&C.imageUrl?(c.openBlock(),c.createBlock(c.unref(WC.ElImageViewer),{key:0,"url-list":[C.imageUrl],"initial-index":0,"close-on-press-escape":!0,teleported:"",onClose:t},null,8,["url-list"])):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-7f771b7c"]]),MQ=O(c.defineComponent({__name:"SchemaFormPreview",props:{fields:{},title:{default:"生成的表单"},compact:{type:Boolean,default:!1},labelWidth:{default:"100px"},labelPosition:{default:"right"},primaryActionLabel:{default:"确认发布"},showPrimaryAction:{type:Boolean}},emits:["click","primary-action"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>g.showPrimaryAction!==void 0?g.showPrimaryAction:!g.compact);return(l,e)=>{const t=c.resolveComponent("el-input"),a=c.resolveComponent("el-form-item"),d=c.resolveComponent("el-option"),o=c.resolveComponent("el-select"),n=c.resolveComponent("el-checkbox"),s=c.resolveComponent("el-checkbox-group"),Z=c.resolveComponent("el-radio"),m=c.resolveComponent("el-radio-group"),b=c.resolveComponent("el-switch"),G=c.resolveComponent("el-date-picker"),r=c.resolveComponent("el-time-picker"),h=c.resolveComponent("el-button"),u=c.resolveComponent("el-input-number"),B=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([l.$style.previewCard,{[l.$style.compact]:C.compact}]),onClick:e[1]||(e[1]=W=>A("click"))},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerLeft)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerIcon)},[c.createVNode(c.unref($),{name:"grid",size:14})],2),c.createElementVNode("span",{class:c.normalizeClass(l.$style.title)},c.toDisplayString(C.title),3)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerRight)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.badge)},c.toDisplayString(C.fields.length)+" 个字段",3),c.createElementVNode("span",{class:c.normalizeClass(l.$style.viewHint)},[c.createVNode(c.unref($),{name:"view",size:12}),e[2]||(e[2]=c.createTextVNode(" 预览 ",-1))],2)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.previewBody)},[c.createVNode(B,{"label-width":C.labelWidth,"label-position":C.labelPosition,class:c.normalizeClass(l.$style.form)},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.fields,W=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:W.id},[["input","email","phone","password"].includes(W.type)?(c.openBlock(),c.createBlock(a,{key:0,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{placeholder:W.placeholder,clearable:W.clearable,"show-password":W.showPassword,maxlength:W.maxlength,disabled:C.compact,size:"default"},null,8,["placeholder","clearable","show-password","maxlength","disabled"])]),_:2},1032,["label","class"])):W.type==="textarea"?(c.openBlock(),c.createBlock(a,{key:1,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{type:"textarea",placeholder:W.placeholder,rows:3,disabled:C.compact},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="select"?(c.openBlock(),c.createBlock(a,{key:2,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(o,{placeholder:W.placeholder,clearable:W.clearable,disabled:C.compact,style:{width:"100%"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(d,{key:String(w.value),label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","clearable","disabled"])]),_:2},1032,["label","class"])):W.type==="checkbox"?(c.openBlock(),c.createBlock(a,{key:3,label:W.label||void 0,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(s,{disabled:C.compact},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(n,{key:String(w.value),label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:2},1032,["disabled"])]),_:2},1032,["label","class"])):W.type==="radio"?(c.openBlock(),c.createBlock(a,{key:4,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(m,{disabled:C.compact},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(Z,{key:String(w.value),value:w.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["disabled"])]),_:2},1032,["label","class"])):W.type==="switch"?(c.openBlock(),c.createBlock(a,{key:5,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(b,{disabled:C.compact},null,8,["disabled"])]),_:1},8,["label","class"])):W.type==="date-picker"||W.type==="datepicker"?(c.openBlock(),c.createBlock(a,{key:6,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(G,{placeholder:W.placeholder,disabled:C.compact,style:{width:"100%"}},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="time-picker"||W.type==="timepicker"?(c.openBlock(),c.createBlock(a,{key:7,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(r,{placeholder:W.placeholder,disabled:C.compact,style:{width:"100%"}},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="button"?(c.openBlock(),c.createBlock(a,{key:8,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(h,{type:W.buttonType??"default",disabled:C.compact},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(W.buttonText??W.label??"按钮"),1)]),_:2},1032,["type","disabled"])]),_:2},1032,["class"])):W.type==="number"?(c.openBlock(),c.createBlock(a,{key:9,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(u,{disabled:C.compact,style:{width:"100%"}},null,8,["disabled"])]),_:1},8,["label","class"])):(c.openBlock(),c.createBlock(a,{key:10,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{placeholder:W.placeholder||W.type,disabled:C.compact},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"]))],64))),128))]),_:1},8,["label-width","label-position","class"])],2),i.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.actions)},[c.createVNode(h,{class:c.normalizeClass(l.$style.btnPrimary),type:"primary",onClick:e[0]||(e[0]=c.withModifiers(W=>A("primary-action"),["stop"]))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"check",size:12}),c.createTextVNode(" "+c.toDisplayString(C.primaryActionLabel),1)]),_:1},8,["class"])],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{previewCard:"_previewCard_18hnt_2",compact:"_compact_18hnt_16",header:"_header_18hnt_21",headerLeft:"_headerLeft_18hnt_30",headerIcon:"_headerIcon_18hnt_36",title:"_title_18hnt_47",headerRight:"_headerRight_18hnt_53",badge:"_badge_18hnt_59",viewHint:"_viewHint_18hnt_67",previewBody:"_previewBody_18hnt_79",form:"_form_18hnt_83",formItem:"_formItem_18hnt_87",actions:"_actions_18hnt_95",btnOutline:"_btnOutline_18hnt_105",btnPrimary:"_btnPrimary_18hnt_127"}}]]),DQ=O(c.defineComponent({__name:"WorkflowRunTimeline",props:{title:{},status:{},progressText:{},steps:{},defaultCollapsed:{type:Boolean,default:!1},emptyText:{default:"等待首个节点开始…"}},setup(C){const I=C,g=c.ref(I.defaultCollapsed);c.watch(()=>I.status,a=>{a==="running"&&(g.value=!1)});const A={running:"loading",success:"circle-check",error:"circle-close-filled",waiting:"clock",skipped:"minus",pending:"more-filled"},i=c.computed(()=>{const a=I.status;return a?`status${a.charAt(0).toUpperCase()}${a.slice(1)}`:""});function l(a){return`icon${a.charAt(0).toUpperCase()}${a.slice(1)}`}function e(a){return A[a]??"more-filled"}function t(){g.value=!g.value}return(a,d)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([a.$style.block,a.$style[i.value]])},[c.createElementVNode("button",{type:"button",class:c.normalizeClass(a.$style.header),onClick:t},[c.createElementVNode("span",{class:c.normalizeClass(a.$style.headerLeft)},[c.createVNode(c.unref($),{name:g.value?"arrow-right":"arrow-down",size:12,class:c.normalizeClass(a.$style.chevron)},null,8,["name","class"]),c.createElementVNode("span",{class:c.normalizeClass(a.$style.title)},c.toDisplayString(C.title),3)],2),C.progressText?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.progress)},c.toDisplayString(C.progressText),3)):c.createCommentVNode("",!0)],2),g.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(a.$style.timeline)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.steps,(o,n)=>(c.openBlock(),c.createElementBlock("div",{key:o.id,class:c.normalizeClass([a.$style.item,o.status==="running"&&a.$style.itemRunning,o.streaming&&a.$style.itemStreaming])},[c.createElementVNode("div",{class:c.normalizeClass(a.$style.rail)},[c.createElementVNode("span",{class:c.normalizeClass([a.$style.iconWrap,a.$style[l(o.status)]])},[c.createVNode(c.unref($),{name:e(o.status),size:14,class:c.normalizeClass(o.status==="running"?a.$style.spin:void 0)},null,8,["name","class"])],2),n<C.steps.length-1?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.connector)},null,2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(a.$style.body)},[c.createElementVNode("span",{class:c.normalizeClass(a.$style.nodeName)},c.toDisplayString(o.label),3),o.hint?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.nodeHint)},c.toDisplayString(o.hint),3)):c.createCommentVNode("",!0),c.renderSlot(a.$slots,"step",{step:o})],2)],2))),128)),C.steps.length?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(a.$style.empty)},c.toDisplayString(C.emptyText),3))],2))],2))}}),[["__cssModules",{$style:{block:"_block_2l73c_2",statusRunning:"_statusRunning_2l73c_10",statusError:"_statusError_2l73c_14",statusWaiting:"_statusWaiting_2l73c_18",header:"_header_2l73c_22",headerLeft:"_headerLeft_2l73c_39",chevron:"_chevron_2l73c_46",title:"_title_2l73c_51",progress:"_progress_2l73c_60",timeline:"_timeline_2l73c_66",item:"_item_2l73c_70",itemRunning:"_itemRunning_2l73c_76",nodeName:"_nodeName_2l73c_76",itemStreaming:"_itemStreaming_2l73c_81",iconWrap:"_iconWrap_2l73c_81",rail:"_rail_2l73c_85",iconSuccess:"_iconSuccess_2l73c_104",iconError:"_iconError_2l73c_109",iconRunning:"_iconRunning_2l73c_114",iconWaiting:"_iconWaiting_2l73c_119",iconSkipped:"_iconSkipped_2l73c_124",spin:"_spin_2l73c_129",connector:"_connector_2l73c_138",body:"_body_2l73c_146",nodeHint:"_nodeHint_2l73c_160",empty:"_empty_2l73c_166"}}]]),KQ=["tabindex","aria-label"],FQ=O(c.defineComponent({__name:"SuggestionCard",props:{suggestion:{},accepted:{type:Boolean},dismissed:{type:Boolean}},emits:["accept","dismiss"],setup(C,{emit:I}){const g=C,A=I,i={action:{icon:"promotion",label:"操作",color:"#409EFF"},optimization:{icon:"magic-stick",label:"优化",color:"#E6A23C"},reference:{icon:"document",label:"参考",color:"#67C23A"}},l={high:{label:"高",color:"#F56C6C",bgColor:"#fef0f0"},medium:{label:"中",color:"#E6A23C",bgColor:"#fdf6ec"},low:{label:"低",color:"#909399",bgColor:"#f4f4f5"}},e=c.computed(()=>i[g.suggestion.type]??i.action),t=c.computed(()=>l[g.suggestion.priority]??l.medium),a=c.computed(()=>!g.accepted&&!g.dismissed);function d(){a.value&&A("accept",g.suggestion.id)}function o(){a.value&&A("dismiss",g.suggestion.id)}function n(s){a.value&&(s.key==="Enter"||s.key===" "?(s.preventDefault(),d()):s.key==="Escape"&&(s.preventDefault(),o()))}return(s,Z)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([s.$style.card,C.accepted&&s.$style.accepted,C.dismissed&&s.$style.dismissed]),tabindex:a.value?0:-1,role:"article","aria-label":`建议: ${C.suggestion.title}`,onKeydown:n},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.typeBadge),style:c.normalizeStyle({color:e.value.color})},[c.createVNode(c.unref($),{name:e.value.icon,size:14},null,8,["name"]),c.createElementVNode("span",null,c.toDisplayString(e.value.label),1)],6),c.createElementVNode("div",{class:c.normalizeClass(s.$style.priorityBadge),style:c.normalizeStyle({color:t.value.color,background:t.value.bgColor})},c.toDisplayString(t.value.label)+"优先 ",7)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.body)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.title)},c.toDisplayString(C.suggestion.title),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.description)},c.toDisplayString(C.suggestion.description),3),C.suggestion.targetName?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.target)},[c.createVNode(c.unref($),{name:"connection",size:12}),c.createElementVNode("span",null,c.toDisplayString(C.suggestion.targetName),1)],2)):c.createCommentVNode("",!0)],2),a.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.actions)},[c.createElementVNode("button",{class:c.normalizeClass(s.$style.acceptBtn),type:"button",onClick:d},[c.createVNode(c.unref($),{name:"check",size:14}),Z[0]||(Z[0]=c.createTextVNode(" 采纳 ",-1))],2),c.createElementVNode("button",{class:c.normalizeClass(s.$style.dismissBtn),type:"button",onClick:o},[c.createVNode(c.unref($),{name:"close",size:14}),Z[1]||(Z[1]=c.createTextVNode(" 忽略 ",-1))],2)],2)):c.createCommentVNode("",!0),C.accepted?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.statusBadge)},[c.createVNode(c.unref($),{name:"check",size:14}),Z[2]||(Z[2]=c.createTextVNode(" 已采纳 ",-1))],2)):c.createCommentVNode("",!0),C.dismissed?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass([s.$style.statusBadge,s.$style.statusDismissed])},[c.createVNode(c.unref($),{name:"close",size:14}),Z[3]||(Z[3]=c.createTextVNode(" 已忽略 ",-1))],2)):c.createCommentVNode("",!0)],42,KQ))}}),[["__cssModules",{$style:{card:"_card_69ko9_2",accepted:"_accepted_69ko9_21",dismissed:"_dismissed_69ko9_31",header:"_header_69ko9_36",typeBadge:"_typeBadge_69ko9_43",priorityBadge:"_priorityBadge_69ko9_51",body:"_body_69ko9_58",title:"_title_69ko9_62",description:"_description_69ko9_69",target:"_target_69ko9_75",actions:"_actions_69ko9_84",acceptBtn:"_acceptBtn_69ko9_91",dismissBtn:"_dismissBtn_69ko9_92",statusBadge:"_statusBadge_69ko9_132",statusDismissed:"_statusDismissed_69ko9_144"}}]]),zQ=["onClick"],JQ=O(c.defineComponent({__name:"ConversationSearchBar",props:{modelValue:{},searching:{type:Boolean,default:!1},panelVisible:{type:Boolean,default:!1},results:{},total:{default:0},sourceOptions:{},sourceFilter:{default:""},startDate:{default:""},endDate:{default:""},filtersExpanded:{type:Boolean,default:!1},placeholder:{default:"搜索对话..."}},emits:["update:modelValue","update:sourceFilter","update:startDate","update:endDate","update:filtersExpanded","update:panelVisible","select","clear","search"],setup(C,{emit:I}){const g=[{value:"",label:"全部来源"},{value:"editor",label:"Editor"},{value:"flow",label:"Flow"},{value:"standalone",label:"AI"}],A=C,i=I,l=c.computed(()=>A.sourceOptions??g),e=c.computed(()=>A.startDate!==""||A.endDate!==""||A.sourceFilter!=="");function t(m){const b=new Date(m),G=r=>String(r).padStart(2,"0");return`${b.getFullYear()}${G(b.getMonth()+1)}${G(b.getDate())} ${G(b.getHours())}${G(b.getMinutes())}${G(b.getSeconds())}`}function a(m){if(!m)return"AI";const b=l.value.find(G=>G.value===m);return b!=null&&b.label?b.label:m==="editor"?"Editor":m==="flow"?"Flow":"AI"}function d(m){return m==="editor"?"success":m==="flow"?"primary":"warning"}function o(){i("update:modelValue",""),i("update:startDate",""),i("update:endDate",""),i("update:sourceFilter",""),i("update:panelVisible",!1),i("clear")}function n(m){i("select",m)}function s(){i("update:filtersExpanded",!A.filtersExpanded)}function Z(m,b){const G=b??"";i(m==="start"?"update:startDate":"update:endDate",G)}return(m,b)=>{const G=c.resolveComponent("el-input"),r=c.resolveComponent("el-button"),h=c.resolveComponent("el-option"),u=c.resolveComponent("el-select"),B=c.resolveComponent("el-date-picker"),W=c.resolveComponent("el-popover"),w=c.resolveComponent("el-tag");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(m.$style.root)},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.searchRow)},[c.createVNode(G,{"model-value":C.modelValue,placeholder:C.placeholder,size:"small",clearable:"","onUpdate:modelValue":b[0]||(b[0]=Y=>i("update:modelValue",Y)),onClear:o,onKeyup:b[1]||(b[1]=c.withKeys(Y=>i("search"),["enter"]))},{prefix:c.withCtx(()=>[c.createVNode(c.unref($),{name:"search",size:14})]),_:1},8,["model-value","placeholder"]),c.createVNode(W,{visible:C.filtersExpanded,placement:"bottom-end",width:220,trigger:"click","show-arrow":!1,offset:4},{reference:c.withCtx(()=>[c.createVNode(r,{size:"small",type:e.value?"primary":"default",link:!e.value,onClick:s},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"filter",size:14})]),_:1},8,["type","link"])]),default:c.withCtx(()=>[c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterPanel)},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterRow)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterLabel)},"来源",2),c.createVNode(u,{"model-value":C.sourceFilter,size:"small",placeholder:"全部",style:{flex:"1"},"onUpdate:modelValue":b[2]||(b[2]=Y=>i("update:sourceFilter",Y))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,Y=>(c.openBlock(),c.createBlock(h,{key:Y.value,label:Y.label,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])],2),c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterRow)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterLabel)},"时间",2),c.createVNode(B,{"model-value":C.startDate||null,type:"date",placeholder:"开始",size:"small","value-format":"YYYY-MM-DD",style:{flex:"1"},"onUpdate:modelValue":b[3]||(b[3]=Y=>Z("start",Y))},null,8,["model-value"]),c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterSep)},"~",2),c.createVNode(B,{"model-value":C.endDate||null,type:"date",placeholder:"结束",size:"small","value-format":"YYYY-MM-DD",style:{flex:"1"},"onUpdate:modelValue":b[4]||(b[4]=Y=>Z("end",Y))},null,8,["model-value"])],2)],2)]),_:1},8,["visible"])],2),C.panelVisible?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(m.$style.results)},[C.searching?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(m.$style.empty)},"搜索中...",2)):C.results.length>0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.resultCount)},"找到 "+c.toDisplayString(C.total)+" 条结果",3),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.results,Y=>(c.openBlock(),c.createElementBlock("div",{key:Y.id,class:c.normalizeClass(m.$style.resultItem),onClick:p=>n(Y.id)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.resultTitle)},c.toDisplayString(Y.title),3),c.createVNode(w,{type:d(Y.source),size:"small"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a(Y.source)),1)]),_:2},1032,["type"]),Y.updatedAt?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(m.$style.resultTime)},c.toDisplayString(t(Y.updatedAt)),3)):c.createCommentVNode("",!0)],10,zQ))),128))],64)):(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(m.$style.empty)},"无匹配对话",2))],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{root:"_root_x8tmk_2",searchRow:"_searchRow_x8tmk_8",filterPanel:"_filterPanel_x8tmk_16",filterRow:"_filterRow_x8tmk_22",filterLabel:"_filterLabel_x8tmk_28",filterSep:"_filterSep_x8tmk_35",results:"_results_x8tmk_40",resultCount:"_resultCount_x8tmk_46",resultItem:"_resultItem_x8tmk_53",resultTitle:"_resultTitle_x8tmk_71",resultTime:"_resultTime_x8tmk_82",empty:"_empty_x8tmk_88"}}]]),vQ={class:"apf-task-chain"},kQ={class:"apf-task-chain__label"},LQ={class:"apf-task-chain__steps"},TQ=["data-step"],xQ={class:"apf-task-chain__icon"},fQ={class:"apf-task-chain__agent"},jQ={class:"apf-task-chain__desc"},QQ={key:0,class:"apf-task-chain__arrow"},UQ=O(c.defineComponent({__name:"TaskChainBar",props:{steps:{},currentIndex:{},label:{default:"任务链"}},setup(C){const I=C,g=c.ref();function A(l){switch(l){case"done":return"✓";case"running":return"●";case"skipped":return"○";case"error":return"!";default:return"○"}}function i(l){return l==="editor"?"表单":l==="flow"?"流程":l==="page"?"页面":l}return c.watch(()=>I.currentIndex,()=>{c.nextTick(()=>{const l=g.value;if(!l)return;const t=l.querySelectorAll("[data-step]")[I.currentIndex];t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}),(l,e)=>(c.openBlock(),c.createElementBlock("div",vQ,[c.createElementVNode("div",kQ,c.toDisplayString(C.label),1),c.createElementVNode("div",{ref_key:"scrollbarRef",ref:g,class:"apf-task-chain__scroll"},[c.createElementVNode("div",LQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.steps,(t,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:a},[c.createElementVNode("div",{"data-step":a,class:c.normalizeClass(["apf-task-chain__step",[t.status?`is-${t.status}`:"is-pending",{"is-current":a===C.currentIndex}]])},[c.createElementVNode("span",xQ,c.toDisplayString(A(t.status)),1),c.createElementVNode("span",fQ,c.toDisplayString(i(t.agent)),1),c.createElementVNode("span",jQ,c.toDisplayString(t.description),1)],10,TQ),a<C.steps.length-1?(c.openBlock(),c.createElementBlock("div",QQ,"→")):c.createCommentVNode("",!0)],64))),128))])],512)]))}}),[["__scopeId","data-v-31bc7b98"]]),OQ={class:"apf-rag-panel"},EQ={class:"apf-rag-panel__header"},PQ=["value","placeholder"],_Q={key:0,class:"apf-rag-panel__spinner","aria-label":"加载中"},qQ={key:0,class:"apf-rag-panel__chips"},$Q={class:"apf-rag-panel__chip-name"},gU=["onClick"],IU={class:"apf-rag-panel__list"},CU=["onClick"],AU={class:"apf-rag-panel__info"},iU={class:"apf-rag-panel__name"},lU={key:0,class:"apf-rag-panel__desc"},eU={key:1,class:"apf-rag-panel__tags"},tU={key:0,class:"apf-rag-panel__tag"},aU={key:1,class:"apf-rag-panel__empty"},cU={key:2,class:"apf-rag-panel__empty"},dU={class:"apf-rag-panel__footer"},oU=O(c.defineComponent({__name:"RagContextPanel",props:{results:{},selected:{},loading:{type:Boolean,default:!1},query:{default:""},placeholder:{default:"智能匹配 Schema,如:用户注册表单..."},emptyHint:{default:"未找到匹配的 Schema"},idleHint:{default:"输入自然语言描述,智能匹配已有 Schema"},footerHint:{default:"选择 Schema 注入对话上下文"},selectedFooterHint:{default:"已选 {n} 个 Schema 作为上下文"}},emits:["update:query","search","select","remove","close"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.query);c.watch(()=>g.query,o=>{o!==i.value&&(i.value=o)});function l(o){i.value=o,A("update:query",o),A("search",o)}function e(o){return g.selected.some(n=>n.id===o.id)}function t(o){e(o)||A("select",o)}function a(o){return o>=70?"high":o>=40?"medium":"low"}const d=c.computed(()=>g.selected.length>0?g.selectedFooterHint.replace("{n}",String(g.selected.length)):g.footerHint);return(o,n)=>(c.openBlock(),c.createElementBlock("div",OQ,[c.createElementVNode("div",EQ,[n[2]||(n[2]=c.createElementVNode("svg",{class:"apf-rag-panel__icon",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[c.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),c.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),c.createElementVNode("input",{class:"apf-rag-panel__input",value:i.value,placeholder:C.placeholder,onInput:n[0]||(n[0]=s=>l(s.target.value))},null,40,PQ),C.loading?(c.openBlock(),c.createElementBlock("span",_Q)):c.createCommentVNode("",!0)]),C.selected.length>0?(c.openBlock(),c.createElementBlock("div",qQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.selected,s=>(c.openBlock(),c.createElementBlock("span",{key:s.id,class:"apf-rag-panel__chip"},[c.createElementVNode("span",$Q,c.toDisplayString(s.name),1),c.createElementVNode("button",{type:"button",class:"apf-rag-panel__chip-remove",title:"移除",onClick:Z=>A("remove",s.id)}," × ",8,gU)]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",IU,[C.results.length>0?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(C.results,s=>{var Z;return c.openBlock(),c.createElementBlock("button",{key:s.id,type:"button",class:c.normalizeClass(["apf-rag-panel__item",{"is-selected":e(s)}]),onClick:m=>t(s)},[c.createElementVNode("div",{class:c.normalizeClass(["apf-rag-panel__score",`is-${a(s.score)}`])},c.toDisplayString(s.score),3),c.createElementVNode("div",AU,[c.createElementVNode("div",iU,c.toDisplayString(s.name),1),s.description?(c.openBlock(),c.createElementBlock("div",lU,c.toDisplayString(s.description),1)):c.createCommentVNode("",!0),(Z=s.tags)!=null&&Z.length?(c.openBlock(),c.createElementBlock("div",eU,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.tags.slice(0,5),m=>(c.openBlock(),c.createElementBlock("span",{key:m,class:"apf-rag-panel__tag"},c.toDisplayString(m),1))),128)),s.tags.length>5?(c.openBlock(),c.createElementBlock("span",tU," +"+c.toDisplayString(s.tags.length-5),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])],10,CU)}),128)):!C.loading&&i.value.trim()?(c.openBlock(),c.createElementBlock("div",aU,[n[3]||(n[3]=c.createElementVNode("div",{class:"apf-rag-panel__empty-icon"},"⌕",-1)),c.createElementVNode("div",null,c.toDisplayString(C.emptyHint),1)])):C.loading?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",cU,[n[4]||(n[4]=c.createElementVNode("div",{class:"apf-rag-panel__empty-icon"},"✦",-1)),c.createElementVNode("div",null,c.toDisplayString(C.idleHint),1)]))]),c.createElementVNode("div",dU,[c.createElementVNode("span",null,c.toDisplayString(d.value),1),c.createElementVNode("button",{type:"button",class:"apf-rag-panel__close",onClick:n[1]||(n[1]=s=>A("close"))},"关闭")])]))}}),[["__scopeId","data-v-c6864f2d"]]),nU={class:"apf-assistant-picker"},sU={key:0,class:"apf-assistant-picker__state"},ZU={key:1,class:"apf-assistant-picker__state apf-assistant-picker__state--error"},mU={key:2,class:"apf-assistant-picker__state"},bU=["onClick"],GU={class:"apf-assistant-picker__main"},rU={class:"apf-assistant-picker__icon-wrap"},hU={class:"apf-assistant-picker__info"},uU={class:"apf-assistant-picker__caps"},BU=O(c.defineComponent({__name:"AssistantPicker",props:{items:{},modelValue:{},loading:{type:Boolean,default:!1},error:{default:null}},emits:["update:modelValue","select"],setup(C,{emit:I}){const g=C,A=I;function i(a){var o,n;const d=["文本"];return(o=a.supportedInputs)!=null&&o.includes("file")&&d.push("文件"),(n=a.supportedInputs)!=null&&n.includes("image")&&d.push("图片"),a.hitlCapable&&d.push("需要确认"),d}function l(a){return a.icon||"chat-dot-round"}function e(a){A("update:modelValue",a.id),A("select",a)}const t=c.computed(()=>!g.loading&&!g.error&&!g.items.length);return(a,d)=>(c.openBlock(),c.createElementBlock("div",nU,[C.loading?(c.openBlock(),c.createElementBlock("div",sU,[...d[0]||(d[0]=[c.createElementVNode("p",null,"正在加载智能体…",-1)])])):C.error?(c.openBlock(),c.createElementBlock("div",ZU,[c.createElementVNode("p",null,c.toDisplayString(C.error),1)])):t.value?(c.openBlock(),c.createElementBlock("div",mU,[...d[1]||(d[1]=[c.createElementVNode("p",null,"暂无可用智能体",-1)])])):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.items,o=>(c.openBlock(),c.createElementBlock("button",{key:o.id,type:"button",class:c.normalizeClass(["apf-assistant-picker__item",{"is-active":C.modelValue===o.id}]),onClick:n=>e(o)},[c.createElementVNode("div",GU,[c.createElementVNode("span",rU,[c.createVNode(c.unref($),{name:l(o),size:22},null,8,["name"])]),c.createElementVNode("span",hU,[c.createElementVNode("b",null,c.toDisplayString(o.name),1),c.createElementVNode("small",null,c.toDisplayString(o.description||"适合处理一类明确任务"),1),c.createElementVNode("span",uU,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i(o),n=>(c.openBlock(),c.createElementBlock("span",{key:n,class:c.normalizeClass(["apf-assistant-picker__cap",{"is-confirm":n==="需要确认"}])},c.toDisplayString(n),3))),128))])])]),c.createElementVNode("span",{class:c.normalizeClass(["apf-assistant-picker__choose",{"is-selected":C.modelValue===o.id}])},c.toDisplayString(C.modelValue===o.id?"已选择":"开始使用"),3)],10,bU))),128))]))}}),[["__scopeId","data-v-f05e69c0"]]),WU={class:"apf-model-picker"},wU=O(c.defineComponent({__name:"ModelPicker",props:{models:{},modelValue:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-option"),e=c.resolveComponent("el-select");return c.openBlock(),c.createElementBlock("label",WU,[c.createVNode(e,{"model-value":C.modelValue||void 0,disabled:C.loading||!C.models.length,placeholder:"选择模型","onUpdate:modelValue":i[0]||(i[0]=t=>g("update:modelValue",t))},{default:c.withCtx(()=>[C.loading?(c.openBlock(),c.createBlock(l,{key:0,label:"正在加载模型…",value:"",disabled:""})):C.models.length?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(l,{key:1,label:"暂无可用模型",value:"",disabled:""})),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.models,t=>(c.openBlock(),c.createBlock(l,{key:t.id,label:`${t.name} · ${t.provider}`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["model-value","disabled"])])}}}),[["__scopeId","data-v-483ae73d"]]),aw=Symbol("fg-toast");function YU(C){return{[aw]:C}}function VU(){const C=c.inject(aw);return{show(I,g="info",A){var i;(i=C==null?void 0:C.value)==null||i.show(I,g,A)},info(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"info",g)},success(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"success",g)},warning(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"warning",g)},error(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"error",g)}}}function pU(){async function C(A,i={}){const{title:l="确认操作",type:e="warning",confirmButtonText:t="确定",cancelButtonText:a="取消"}=i;try{return await WC.ElMessageBox.confirm(A,l,{confirmButtonText:t,cancelButtonText:a,type:e}),!0}catch{return!1}}async function I(A,i={}){return C(`此操作将永久删除${A},是否继续?`,{title:"确认删除",type:"warning",confirmButtonText:"确认删除",...i})}async function g(A,i={}){return C(A,{title:"确认操作",type:"warning",...i})}return{confirm:C,confirmDelete:I,confirmDanger:g}}function yU(){return{success(C,I={}){WC.ElMessage({message:C,type:"success",...I})},error(C,I={}){WC.ElMessage({message:C,type:"error",...I})},warning(C,I={}){WC.ElMessage({message:C,type:"warning",...I})},info(C,I={}){WC.ElMessage({message:C,type:"info",...I})}}}function NU(C,I=300){const g=c.ref(null);function A(...i){g.value&&clearTimeout(g.value),g.value=setTimeout(()=>{C(...i),g.value=null},I)}return c.onUnmounted(()=>{g.value&&clearTimeout(g.value)}),A}function XU(C,I){var t;const g=c.ref(1),A=c.ref((I==null?void 0:I.initialPageSize)??zZ),i=c.computed(()=>{const a=C.value,d=(g.value-1)*A.value;return a.slice(d,d+A.value)}),l=c.computed(()=>C.value.length);function e(){g.value=1}return c.watch(A,()=>{g.value=1},{flush:"sync"}),c.watch(C,a=>{const d=Math.max(1,Math.ceil(a.length/A.value)||1);g.value>d&&(g.value=d)}),(t=I==null?void 0:I.resetOn)!=null&&t.length&&c.watch(I.resetOn,()=>{e()}),{currentPage:g,pageSize:A,pagedItems:i,total:l,resetPage:e}}function RU(C={}){const{timeout:I=15e3,silentError:g=!1}=C,A=c.ref(!1),i=c.ref(null),l=c.ref(!1),e=c.computed(()=>i.value!==null);let t=null,a=0;function d(){a++,a===1&&(A.value=!0,i.value=null,l.value=!1,t=setTimeout(()=>{l.value=!0},I))}function o(){a=Math.max(0,a-1),a===0&&(A.value=!1,l.value=!1,t&&(clearTimeout(t),t=null))}async function n(Z){d();try{return await Z()}catch(m){return g||(i.value=m instanceof Error?m.message:"加载失败"),null}finally{o()}}function s(){a=0,A.value=!1,i.value=null,l.value=!1,t&&(clearTimeout(t),t=null)}return{loading:A,error:i,timedOut:l,hasError:e,withLoading:n,reset:s}}function HU(C){const{containerRef:I,autoScroll:g=!0,behavior:A="smooth",offset:i=50}=C,l=c.ref(!0),e=c.ref(g);function t(){const Z=I.value;if(!Z)return!0;const{scrollTop:m,scrollHeight:b,clientHeight:G}=Z;return b-m-G<i}async function a(Z=!0){if(!Z&&!e.value)return;await c.nextTick();const m=I.value;m&&m.scrollTo({top:m.scrollHeight,behavior:A})}function d(Z){const m=I.value;m&&m.scrollTo({top:Z,behavior:A})}function o(){e.value=!0}function n(){e.value=!1}function s(){l.value=t(),l.value&&(e.value=!0)}return c.onMounted(()=>{const Z=I.value;Z&&(Z.addEventListener("scroll",s),l.value=t())}),c.onUnmounted(()=>{const Z=I.value;Z&&Z.removeEventListener("scroll",s)}),{scrollToBottom:a,scrollTo:d,isAtBottom:l,autoScrollEnabled:e,checkIfAtBottom:t,enableAutoScroll:o,disableAutoScroll:n}}const cm=new Map;function SU(C){const{url:I,token:g,projectId:A,reconnectInterval:i=3e3,maxRetries:l=1/0}=C;let e=cm.get(I);e||(e={ws:null,status:c.ref("closed"),refCount:0,handlers:new Map,subscribedProjects:new Set,reconnectTimer:null,pingTimer:null,pongTimer:null,retries:0,reconnectInterval:i,maxRetries:l,intentionalClose:!1,token:g},cm.set(I,e)),e.refCount+=1,e.reconnectInterval=i,e.maxRetries=l,e.token=g;const t=[],a=e.status,d=()=>c.toValue(A);function o(){e&&(e.pingTimer&&clearInterval(e.pingTimer),e.pongTimer&&clearTimeout(e.pongTimer),e.pingTimer=null,e.pongTimer=null)}function n(){e&&(o(),e.pingTimer=setInterval(()=>{!(e!=null&&e.ws)||e.ws.readyState!==WebSocket.OPEN||(e.ws.send(JSON.stringify({action:"ping"})),e.pongTimer&&clearTimeout(e.pongTimer),e.pongTimer=setTimeout(()=>{var B;(B=e==null?void 0:e.ws)==null||B.close()},6e4))},3e4))}function s(){if(!e||e.intentionalClose)return;if(e.retries>=e.maxRetries){e.status.value="error";return}const B=Math.min(e.reconnectInterval*2**e.retries,3e4);e.retries+=1,e.reconnectTimer&&clearTimeout(e.reconnectTimer),e.reconnectTimer=setTimeout(()=>{G()},B)}function Z(B){if(!(e!=null&&e.ws)||e.ws.readyState!==WebSocket.OPEN)return;const W={action:"subscribe",project_id:B??null},w=typeof e.token=="function"?e.token():e.token;if(w&&(W.token=w),!e.subscribedProjects.has(B??null)){if(B==null){e.ws.send(JSON.stringify(W)),e.subscribedProjects.add(null);return}e.ws.send(JSON.stringify(W)),e.subscribedProjects.add(B)}}function m(){if(!e)return;e.subscribedProjects.clear();const B=new Set;let W=!1;for(const Y of e.handlers.values())for(const p of Y){const V=p.getProjectId();V==null?W=!0:B.add(V)}const w=d();w==null?W=!0:B.add(w),W&&Z(void 0);for(const Y of B)Z(Y)}function b(B){if(!e)return;const W=e.handlers.get(B.type);if(W)for(const w of W){const Y=w.getProjectId();Y!=null&&Y!==B.project_id||w.handler(B.data)}}function G(){if(!e)return;if(e.ws&&(e.ws.readyState===WebSocket.OPEN||e.ws.readyState===WebSocket.CONNECTING)){e.ws.readyState===WebSocket.OPEN&&Z(d());return}e.intentionalClose=!1,e.status.value="connecting";const B=new WebSocket(I);e.ws=B,B.onopen=()=>{e&&(e.status.value="open",e.retries=0,n(),m())},B.onmessage=W=>{if(e)try{const w=JSON.parse(String(W.data));if(w.action==="pong"||w.type==="pong"){e.pongTimer&&clearTimeout(e.pongTimer),e.pongTimer=null;return}typeof w.type=="string"&&b(w)}catch{}},B.onerror=()=>{e&&(e.status.value="error")},B.onclose=()=>{e&&(o(),e.ws=null,e.subscribedProjects.clear(),e.intentionalClose?e.status.value="closed":(e.status.value="closed",s()))}}function r(){if(e){for(const B of t)for(const W of e.handlers.values())W.delete(B);t.length=0}}function h(){var B;e&&(r(),e.refCount=Math.max(0,e.refCount-1),!(e.refCount>0)&&(e.intentionalClose=!0,e.reconnectTimer&&clearTimeout(e.reconnectTimer),o(),(B=e.ws)==null||B.close(),e.ws=null,e.status.value="closed",cm.delete(I),e=void 0))}function u(B,W){var p;if(!e)return()=>{};let w=e.handlers.get(B);w||(w=new Set,e.handlers.set(B,w));const Y={getProjectId:d,handler:W};return w.add(Y),t.push(Y),((p=e.ws)==null?void 0:p.readyState)===WebSocket.OPEN&&Z(d()),()=>{w==null||w.delete(Y);const V=t.indexOf(Y);V>=0&&t.splice(V,1)}}return G(),c.watch(d,B=>{var W;((W=e==null?void 0:e.ws)==null?void 0:W.readyState)===WebSocket.OPEN&&Z(B)}),c.onUnmounted(()=>{h()}),{status:a,connect:G,disconnect:h,on:u}}function MU(C){if(!C)return"操作失败";if(typeof C=="string")return C;if(C instanceof Error)return C.message||"操作失败";if(typeof C=="object"){const I=C;if(I.message)return I.message;if(I.errors&&typeof I.errors=="object"){const g=[];for(const A of Object.values(I.errors))Array.isArray(A)&&g.push(...A);if(g.length>0)return g.join(";")}if(I.code)return`错误码:${I.code}`}return"操作失败"}const DU=/\/(?:schema-platform\/)?api\/ai\/documents\/([^/?#]+)\/file/i,cw=/\.(mp4|webm|mov|m4v)(?:\?|#|$|\s)/i,KU=/\.(png|jpe?g|gif|webp|bmp|svg)(?:\?|#|$|\s)/i,dm=/\.pdf(?:\?|#|$|\s)/i,om=/\.(docx?|xlsx?|csv|txt|md)(?:\?|#|$|\s)/i,dw=/(?:https?:\/\/[^\s"'<>\]]+|\/(?:schema-platform\/)?api\/ai\/documents\/[^/\s"'<>\]]+\/file)/gi;function fe(C){const I=C.trim().match(DU);if(I!=null&&I[1])return I[1];if(/^[0-9a-f]{24}$/i.test(C.trim()))return C.trim()}function ul(C){const{url:I="",filename:g="",mimetype:A="",hint:i}=C;if(i==="video"||i==="videoUrl")return"video";if(i==="image"||i==="imageUrls")return"image";if(i==="text")return"text";if(i==="json")return"json";if(i==="document"||i==="documentIds"){const t=g||I;return dm.test(t)||A.includes("pdf")?"pdf":om.test(t)||/word|sheet|excel|csv|text/.test(A)?"office":"file"}const l=[I,g].filter(Boolean).join(" ").toLowerCase(),e=A.toLowerCase();return e.startsWith("video/")||cw.test(l)?"video":e.startsWith("image/")||KU.test(l)?"image":e.includes("pdf")||dm.test(l)?"pdf":om.test(l)||e.includes("word")||e.includes("sheet")||e.includes("excel")||e.includes("csv")||e.startsWith("text/")?"office":fe(I)&&!dm.test(I)&&!om.test(I)&&!cw.test(I)?"image":"file"}function FU(C){var I;return C.documentId?`doc:${C.documentId}`:C.url?`url:${C.url}`:`${C.kind}:${((I=C.text)==null?void 0:I.slice(0,40))??C.id}`}function pA(C,I,g){const A=FU(g);!A||I.has(A)||(I.add(A),C.push(g))}function nm(C){const I=wi(C);if(!I)return null;const g=sl(I.data);return{kind:"json",text:I.jsonText,label:g?_B(g):"JSON 输出",prose:I.prose||void 0}}function zU(C,I="art"){if(C==null)return[];const g=[],A=new Set;let i=0;const l=()=>`${I}-${++i}`;if(typeof C=="string"){const d=C.match(dw)??[];for(const o of d){const n=ul({url:o});pA(g,A,{id:l(),kind:n,url:o,documentId:fe(o),source:"text"})}if(!d.length&&C.trim()){const o=nm(C);o!=null&&o.prose&&pA(g,A,{id:l(),kind:"text",text:o.prose,label:"确认提示",source:"text"}),pA(g,A,{id:l(),kind:(o==null?void 0:o.kind)??"text",text:(o==null?void 0:o.text)??C,label:(o==null?void 0:o.label)??"文本输出",source:"text"})}return g}if(typeof C!="object")return g;const e=C;typeof e.videoUrl=="string"&&e.videoUrl.trim()&&pA(g,A,{id:l(),kind:"video",url:e.videoUrl,documentId:fe(e.videoUrl),source:"videoUrl"});const t=(d,o,n)=>{if(Array.isArray(d))for(const s of d){let Z="";if(typeof s=="string"?Z=s:s&&typeof s=="object"&&"url"in s&&(Z=String(s.url??"")),!Z.trim())continue;const m=ul({url:Z,hint:n});pA(g,A,{id:l(),kind:m,url:Z,documentId:fe(Z),source:o})}};if(t(e.imageUrls,"imageUrls","image"),t(e.mediaUrls,"mediaUrls"),g.some(d=>d.kind==="image"&&d.url)||t(e.images,"images","image"),Array.isArray(e.documentIds))for(const d of e.documentIds)typeof d!="string"||!d.trim()||A.has(`doc:${d}`)||pA(g,A,{id:l(),kind:ul({url:d,hint:"document"}),documentId:d,url:void 0,label:`文档 ${d.slice(-6)}`,source:"documentIds"});typeof e.documentId=="string"&&e.documentId.trim()&&pA(g,A,{id:l(),kind:ul({url:e.documentId,hint:"document"}),documentId:e.documentId,label:`文档 ${e.documentId.slice(-6)}`,source:"documentId"});for(const d of["text","message","confirmMessage","prompt"]){const o=e[d];if(typeof o!="string"||!o.trim())continue;const n=o.match(dw)??[];for(const s of n)pA(g,A,{id:l(),kind:ul({url:s}),url:s,documentId:fe(s),source:d});if(!n.length&&(d==="text"||d==="message")){const s=nm(o);s!=null&&s.prose&&pA(g,A,{id:l(),kind:"text",text:s.prose,label:d==="message"?"确认提示":"说明",source:d}),pA(g,A,{id:l(),kind:(s==null?void 0:s.kind)??"text",text:(s==null?void 0:s.text)??o,label:(s==null?void 0:s.label)??(d==="text"?"文本输出":"确认提示"),source:d})}}return g}function JU(C){return C.map((I,g)=>{const A=ul({url:I.url,filename:I.filename,mimetype:I.mimetype});return{id:I.id||`att-${g}`,kind:A,url:I.url,documentId:I.id,filename:I.filename,mimetype:I.mimetype,label:I.filename,source:"attachment"}})}function ya(C,I=[]){const g=new Set;for(const A of I)g.add(A);for(const A of C.slice(0,20))for(const i of Object.keys(A))g.add(i);return[...g].map(A=>({prop:A,label:A}))}function go(C){return!Array.isArray(C)||C.length===0||!C.every(I=>I&&typeof I=="object"&&!Array.isArray(I))?null:C}function vU(C){if(!C||typeof C!="object")return null;const I=C,g=I.columns,A=I.rows;if(!Array.isArray(g)||!Array.isArray(A))return null;const i=g.map((e,t)=>{if(e&&typeof e=="object"){const d=e,o=String(d.field??d.prop??`col${t}`),n=String(d.title??d.label??o);return{prop:o,label:n}}const a=String(e);return{prop:a,label:a}}),l=A.map(e=>e&&typeof e=="object"&&!Array.isArray(e)?e:{value:e});return i.length===0&&l.length===0?null:{key:"chart-table",title:"图表数据表",columns:i,rows:l}}function ow(C){const I=C.chartType;return typeof I!="string"||!I.trim()?!1:C.option!=null&&typeof C.option=="object"}function kU(C,I){if(!I||typeof I!="object")return[];const g=I,A=[],i=C??"";if(i==="compliance-check"||!i&&Array.isArray(g.violations)){const l=go(g.violations);l!=null&&l.length&&A.push({key:"violations",title:"违规项",columns:ya(l,["severity","rule","detail"]),rows:l})}if(i==="anomaly-detect"||!i&&Array.isArray(g.anomalies)){const l=go(g.anomalies);l!=null&&l.length&&A.push({key:"anomalies",title:"异常项",columns:ya(l,["severity","type","value","reason"]),rows:l})}if(i==="form-query"||!i&&Array.isArray(g.submissions)){const l=g.submissions;if(Array.isArray(l)&&l.length){const e=l.map(t=>{if(!t||typeof t!="object")return{value:t};const a=t,d=a.data&&typeof a.data=="object"&&!Array.isArray(a.data)?a.data:{};return{id:String(a._id??a.id??""),status:a.status??"",submitterId:a.submitterId??"",createdAt:a.createdAt??"",...d}});A.push({key:"submissions",title:`表单提交(共 ${Number(g.total??e.length)})`,columns:ya(e,["id","status","submitterId","createdAt"]),rows:e})}}if(i==="chart-generate"||!i&&ow(g)){if(String(g.chartType)==="table"){const e=vU(g.option);e&&A.push(e)}const l=go(g.data);l!=null&&l.length&&A.push({key:"chart-data",title:"图表数据",columns:ya(l,["label","value","name"]),rows:l})}if((i==="module-assemble"||!i&&("schema"in g||"moduleType"in g))&&(i==="module-assemble"||g.moduleType!=null)){const l=[{key:"schema",label:"Schema",present:!!g.schema},{key:"flow",label:"Flow",present:!!g.flow},{key:"listView",label:"列表视图",present:!!g.listView},{key:"detailView",label:"详情视图",present:!!g.detailView}];A.push({key:"module-parts",title:`模块组装(${String(g.moduleType??"")})`,columns:[{prop:"part",label:"部件"},{prop:"status",label:"状态"}],rows:l.map(e=>({part:e.label,status:e.present?"已生成":"无"}))})}if(A.length===0)for(const[l,e]of Object.entries(g)){const t=go(e);if(!(!t||t.length<1)&&!(t.length===1&&Object.keys(t[0]).length>12)&&(A.push({key:`field-${l}`,title:l,columns:ya(t),rows:t}),A.length>=2))break}return A}function LU(C,I){if(!I||typeof I!="object")return null;const g=I;if(C&&C!=="chart-generate"||!C&&!ow(g))return null;const A=String(g.chartType??"");return!A||A==="table"||!g.option||typeof g.option!="object"?null:{chartType:A,option:g.option}}const TU="1.10.36",xU="2.14.2",fU="2026-08-27";/*! *****************************************************************************
72
+ `)){const z=R.slice(D+1,M);if(!z.includes(" ")&&z.length<=30){b.value=D,o.value=z,d.value=!0;return}}B()}function w(R){if(d.value){if(R.key==="ArrowDown"){R.preventDefault(),m.value=Math.min(m.value+1,Math.max(s.value.length-1,0));return}if(R.key==="ArrowUp"){R.preventDefault(),m.value=Math.max(m.value-1,0);return}if(R.key==="Enter"&&m.value>=0&&s.value[m.value]){R.preventDefault(),Y(s.value[m.value]);return}if(R.key==="Escape"){R.preventDefault(),B();return}}R.key==="Enter"&&!R.shiftKey&&!d.value&&(R.preventDefault(),V())}function Y(R){var z;const S={id:R.id,type:R.type,label:R.name};t.value.some(k=>k.id===S.id&&k.type===S.type)||t.value.push(S);const M=l.value,D=b.value,F=((z=e.value)==null?void 0:z.selectionStart)??M.length;D>=0&&(l.value=`${M.slice(0,D)}@${R.name} ${M.slice(F)}`),B(),c.nextTick(()=>{var k;return(k=e.value)==null?void 0:k.focus()})}function p(R){t.value.splice(R,1)}function V(){const R=l.value.trim();!R&&t.value.length===0||A.disabled||(i("send",R,[...t.value]),l.value="",t.value=[])}function y(R){a.value&&!a.value.contains(R.target)&&B()}function N(){var R;(R=e.value)==null||R.focus()}return I({focus:N}),c.onMounted(()=>{document.addEventListener("mousedown",y)}),c.onBeforeUnmount(()=>{document.removeEventListener("mousedown",y),G&&clearTimeout(G)}),(R,S)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"wrapperRef",ref:a,class:"apf-mention-input"},[d.value?(c.openBlock(),c.createElementBlock("div",Nx,[c.createElementVNode("div",Xx,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":S[0]||(S[0]=M=>o.value=M),class:"apf-mention-panel-input",type:"text",placeholder:C.searchPlaceholder,autocomplete:"off"},null,8,Rx),[[c.vModelText,o.value]])]),c.createElementVNode("div",Hx,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.tabs,M=>(c.openBlock(),c.createElementBlock("button",{key:M.key,type:"button",class:c.normalizeClass(["apf-mention-tab",{"is-active":n.value===M.key}]),onClick:D=>n.value=M.key},c.toDisplayString(M.label),11,Sx))),128))]),c.createElementVNode("div",Mx,[Z.value?(c.openBlock(),c.createElementBlock("div",Dx,[...S[2]||(S[2]=[c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1),c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1),c.createElementVNode("span",{class:"apf-mention-loading-dot"},null,-1)])])):s.value.length>0?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(s.value,(M,D)=>(c.openBlock(),c.createElementBlock("div",{key:`${M.type}-${M.id}`,class:c.normalizeClass(["apf-mention-result",{"is-highlighted":D===m.value}]),role:"option",onClick:F=>Y(M),onMouseenter:F=>m.value=D},[c.createElementVNode("div",{class:"apf-mention-badge","data-type":M.type},c.toDisplayString(r(M.type)),9,Fx),c.createElementVNode("div",zx,[c.createElementVNode("div",Jx,c.toDisplayString(M.name),1),M.description?(c.openBlock(),c.createElementBlock("div",vx,c.toDisplayString(M.description),1)):c.createCommentVNode("",!0)])],42,Kx))),128)):o.value.trim()?(c.openBlock(),c.createElementBlock("div",kx,c.toDisplayString(C.emptyText),1)):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0),t.value.length>0?(c.openBlock(),c.createElementBlock("div",Lx,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.value,(M,D)=>(c.openBlock(),c.createElementBlock("div",{key:`${M.type}-${M.id}`,class:"apf-mention-chip"},[c.createElementVNode("span",Tx,c.toDisplayString(r(M.type)),1),c.createElementVNode("span",null,c.toDisplayString(M.label),1),c.createElementVNode("button",{type:"button",class:"apf-mention-chip-remove","aria-label":"移除引用",onClick:F=>p(D)}," × ",8,xx)]))),128))])):c.createCommentVNode("",!0),c.withDirectives(c.createElementVNode("textarea",{ref_key:"textareaRef",ref:e,"onUpdate:modelValue":S[1]||(S[1]=M=>l.value=M),class:"apf-mention-textarea",placeholder:C.placeholder,disabled:C.disabled||C.loading,rows:"1",onInput:W,onKeydown:w},null,40,fx),[[c.vModelText,l.value]])],512))}}),[["__scopeId","data-v-467928f5"]]),Qx={class:"apf-thinking-head-main"},Ux={class:"apf-thinking-titles"},Ox={class:"apf-thinking-title"},Ex={key:0,class:"apf-thinking-badge"},Px={class:"apf-thinking-sub"},_x={class:"apf-thinking-head-aside"},qx={class:"apf-thinking-status"},$x={class:"apf-thinking-chevron","aria-hidden":"true"},gf={key:0,class:"apf-thinking-body"},If=["innerHTML"],Cf=O(c.defineComponent({__name:"ThinkingBlock",props:{content:{},title:{default:"思考过程"},badge:{},defaultCollapsed:{type:Boolean,default:!0},statusLabel:{default:"已完成"}},setup(C){const I=C,g=c.ref(I.defaultCollapsed),A=c.computed(()=>{if(!I.content)return"";const e=I.content.replace(/<[^>]*>/g,"").trim();return e.length>100?`${e.slice(0,100)}...`:e}),i=c.computed(()=>I.content?am(I.content):"");function l(){g.value=!g.value}return(e,t)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-thinking",{"is-expanded":!g.value}])},[c.createElementVNode("button",{type:"button",class:"apf-thinking-head",onClick:l},[c.createElementVNode("div",Qx,[t[0]||(t[0]=c.createElementVNode("span",{class:"apf-thinking-icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("circle",{cx:"8",cy:"8",r:"5.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M8 5v3.2L10 10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})])],-1)),c.createElementVNode("div",Ux,[c.createElementVNode("div",Ox,[c.createTextVNode(c.toDisplayString(C.title)+" ",1),C.badge?(c.openBlock(),c.createElementBlock("span",Ex,c.toDisplayString(C.badge),1)):c.createCommentVNode("",!0)]),c.createElementVNode("div",Px,c.toDisplayString(g.value?A.value:"已完成思考"),1)])]),c.createElementVNode("div",_x,[c.createElementVNode("span",qx,c.toDisplayString(C.statusLabel),1),c.createElementVNode("span",$x,c.toDisplayString(g.value?"▾":"▴"),1)])]),g.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",gf,[c.createElementVNode("div",{class:"apf-thinking-md",innerHTML:i.value},null,8,If)]))],2))}}),[["__scopeId","data-v-ecf2c951"]]),Af={class:"apf-editable-artifact"},lf={class:"apf-editable-artifact__head"},ef={class:"apf-editable-artifact__head-left"},tf={class:"apf-editable-artifact__tag"},af={key:0,class:"apf-editable-artifact__tag is-danger"},cf={class:"apf-editable-artifact__head-right"},df={class:"apf-editable-artifact__body"},of=["placeholder"],nf=["srcdoc"],sf={class:"apf-editable-artifact__footer"},Zf={class:"apf-editable-artifact__hint"},mf=O(c.defineComponent({__name:"EditableArtifactCard",props:{content:{},artifactType:{default:"code"},language:{},sendBackLabel:{default:"回传给助手"},hint:{default:"编辑后可回传给助手继续优化"}},emits:["sendback","copy"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.content),l=c.ref("edit");c.watch(()=>g.content,Z=>{i.value=Z});const e=c.computed(()=>g.language||g.artifactType),t=c.computed(()=>g.artifactType==="html"),a=c.computed(()=>g.artifactType==="json"),d=c.computed(()=>{if(!a.value)return null;try{return JSON.parse(i.value),!0}catch{return!1}});function o(){var Z;i.value&&((Z=navigator.clipboard)==null||Z.writeText(i.value),A("copy",i.value))}function n(){if(a.value)try{i.value=JSON.stringify(JSON.parse(i.value),null,2)}catch{}}function s(){i.value.trim()&&A("sendback",i.value,e.value)}return(Z,m)=>(c.openBlock(),c.createElementBlock("div",Af,[c.createElementVNode("div",lf,[c.createElementVNode("div",ef,[m[3]||(m[3]=c.createElementVNode("span",{class:"apf-editable-artifact__title"},"工件",-1)),c.createElementVNode("span",tf,c.toDisplayString(C.artifactType),1),a.value&&d.value===!1?(c.openBlock(),c.createElementBlock("span",af,"JSON 无效")):c.createCommentVNode("",!0)]),c.createElementVNode("div",cf,[t.value?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(["apf-editable-artifact__mode",{"is-active":l.value==="edit"}]),onClick:m[0]||(m[0]=b=>l.value="edit")}," 编辑 ",2)):c.createCommentVNode("",!0),t.value?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(["apf-editable-artifact__mode",{"is-active":l.value==="preview"}]),onClick:m[1]||(m[1]=b=>l.value="preview")}," 预览 ",2)):c.createCommentVNode("",!0),a.value?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:"apf-editable-artifact__tool",onClick:n}," 格式化 ")):c.createCommentVNode("",!0),c.createElementVNode("button",{type:"button",class:"apf-editable-artifact__tool","aria-label":"复制",onClick:o}," 复制 ")])]),c.createElementVNode("div",df,[l.value==="edit"?c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{key:0,"onUpdate:modelValue":m[2]||(m[2]=b=>i.value=b),class:"apf-editable-artifact__editor",placeholder:`可编辑 ${C.artifactType} 内容`,spellcheck:"false"},null,8,of)),[[c.vModelText,i.value]]):(c.openBlock(),c.createElementBlock("iframe",{key:1,class:"apf-editable-artifact__preview",srcdoc:i.value,sandbox:"allow-scripts",title:"artifact preview"},null,8,nf))]),c.createElementVNode("div",sf,[c.createElementVNode("span",Zf,c.toDisplayString(C.hint),1),c.createElementVNode("button",{type:"button",class:"apf-editable-artifact__send",onClick:s},c.toDisplayString(C.sendBackLabel),1)])]))}}),[["__scopeId","data-v-60860f31"]]),bf=O(c.defineComponent({__name:"MessageActionBar",props:{content:{},feedback:{},visible:{type:Boolean},showCopy:{type:Boolean,default:!0},showRegenerate:{type:Boolean,default:!0},showFeedback:{type:Boolean,default:!0}},emits:["copy","regenerate","feedback"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1),l=c.ref(g.feedback??null);let e=null;c.watch(()=>g.feedback,d=>{l.value=d??null}),c.watch(()=>g.visible,d=>{if(d){e=setTimeout(()=>{i.value=!0},300);return}i.value=!1,e&&(clearTimeout(e),e=null)},{immediate:!0});function t(){var d;g.content&&((d=navigator.clipboard)==null||d.writeText(g.content)),A("copy")}function a(d){l.value=l.value===d?null:d,A("feedback",d)}return(d,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-msg-actions",{"is-visible":i.value}])},[C.showCopy?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-msg-actions__btn",title:"复制","aria-label":"复制",onClick:t},[...o[3]||(o[3]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"}),c.createElementVNode("path",{d:"M3.5 10.5V3.5h7",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})],-1)])])):c.createCommentVNode("",!0),C.showRegenerate?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-msg-actions__btn",title:"重新生成","aria-label":"重新生成",onClick:o[0]||(o[0]=n=>A("regenerate"))},[...o[4]||(o[4]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M3 8a5 5 0 0 1 8.5-3.5M13 3v3.5H9.5",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"}),c.createElementVNode("path",{d:"M13 8a5 5 0 0 1-8.5 3.5M3 13v-3.5H6.5",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):c.createCommentVNode("",!0),C.showFeedback?(c.openBlock(),c.createElementBlock("button",{key:2,type:"button",class:c.normalizeClass(["apf-msg-actions__btn",{"is-active":l.value==="positive"}]),title:"点赞","aria-label":"点赞",onClick:o[1]||(o[1]=n=>a("positive"))},[...o[5]||(o[5]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M8 2.5 9.6 6l3.9.3-3 2.7.9 3.8L8 10.8 4.6 12.8l.9-3.8-3-2.7L6.4 6 8 2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})],-1)])],2)):c.createCommentVNode("",!0),C.showFeedback?(c.openBlock(),c.createElementBlock("button",{key:3,type:"button",class:c.normalizeClass(["apf-msg-actions__btn apf-msg-actions__btn--down",{"is-active":l.value==="negative"}]),title:"点踩","aria-label":"点踩",onClick:o[2]||(o[2]=n=>a("negative"))},[...o[6]||(o[6]=[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true"},[c.createElementVNode("path",{d:"M8 2.5 9.6 6l3.9.3-3 2.7.9 3.8L8 10.8 4.6 12.8l.9-3.8-3-2.7L6.4 6 8 2.5Z",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"})],-1)])],2)):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-e20bc750"]]),Gf={class:"apf-step-card__head-left"},rf={class:"apf-step-card__icon","aria-hidden":"true"},hf={key:0,viewBox:"0 0 16 16",width:"14",height:"14"},uf={key:1,viewBox:"0 0 16 16",width:"14",height:"14"},Bf={class:"apf-step-card__titles"},Wf={class:"apf-step-card__title"},wf={key:0,class:"apf-step-card__badge"},Yf={key:0,class:"apf-step-card__subtitle"},Vf={class:"apf-step-card__head-right"},pf={key:0,class:"apf-step-card__time"},yf={key:1,class:"apf-step-card__status"},Nf={class:"apf-step-card__chevron","aria-hidden":"true"},Xf={class:"apf-step-card__body"},Rf=O(c.defineComponent({__name:"CollapsibleStepCard",props:{title:{},subtitle:{},badge:{},statusLabel:{},tone:{default:"default"},timestamp:{},defaultCollapsed:{type:Boolean,default:!0},collapsed:{type:Boolean}},emits:["update:collapsed"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.collapsed??g.defaultCollapsed);c.watch(()=>g.collapsed,t=>{t!==void 0&&(i.value=t)});const l=()=>g.collapsed!==void 0?g.collapsed:i.value;function e(){const t=!l();g.collapsed===void 0&&(i.value=t),A("update:collapsed",t)}return(t,a)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-step-card",`is-${C.tone}`])},[c.createElementVNode("button",{type:"button",class:"apf-step-card__head",onClick:e},[c.createElementVNode("div",Gf,[c.createElementVNode("span",rf,[c.renderSlot(t.$slots,"icon",{},()=>[C.tone==="error"?(c.openBlock(),c.createElementBlock("svg",hf,[...a[0]||(a[0]=[c.createElementVNode("circle",{cx:"8",cy:"8",r:"5.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"},null,-1),c.createElementVNode("path",{d:"M8 5v3.5M8 11h.01",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])])):(c.openBlock(),c.createElementBlock("svg",uf,[...a[1]||(a[1]=[c.createElementVNode("rect",{x:"3",y:"3",width:"10",height:"10",rx:"2",fill:"none",stroke:"currentColor","stroke-width":"1.4"},null,-1),c.createElementVNode("path",{d:"M6 8h4M8 6v4",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"},null,-1)])]))],!0)]),c.createElementVNode("div",Bf,[c.createElementVNode("div",Wf,[c.createTextVNode(c.toDisplayString(C.title)+" ",1),C.badge?(c.openBlock(),c.createElementBlock("span",wf,c.toDisplayString(C.badge),1)):c.createCommentVNode("",!0)]),C.subtitle?(c.openBlock(),c.createElementBlock("div",Yf,c.toDisplayString(C.subtitle),1)):c.createCommentVNode("",!0)])]),c.createElementVNode("div",Vf,[C.timestamp?(c.openBlock(),c.createElementBlock("span",pf,c.toDisplayString(C.timestamp),1)):c.createCommentVNode("",!0),C.statusLabel?(c.openBlock(),c.createElementBlock("span",yf,[a[2]||(a[2]=c.createElementVNode("i",{class:"apf-step-card__dot"},null,-1)),c.createTextVNode(" "+c.toDisplayString(C.statusLabel),1)])):c.createCommentVNode("",!0),c.createElementVNode("span",Nf,c.toDisplayString(l()?"▾":"▴"),1)])]),c.withDirectives(c.createElementVNode("div",Xf,[c.renderSlot(t.$slots,"default",{},void 0,!0)],512),[[c.vShow,!l()]])],2))}}),[["__scopeId","data-v-9cc9ff88"]]),Hf={class:"apf-agent-transfer"},Sf={class:"apf-agent-transfer__row"},Mf={class:"apf-agent-transfer__pill"},Df={class:"apf-agent-transfer__pill is-target"},Kf={key:0,class:"apf-agent-transfer__reason"},Ff=O(c.defineComponent({__name:"AgentTransferCard",props:{fromLabel:{},toLabel:{},reason:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",Hf,[c.createElementVNode("div",Sf,[c.createElementVNode("span",Mf,c.toDisplayString(C.fromLabel),1),g[0]||(g[0]=c.createElementVNode("span",{class:"apf-agent-transfer__arrow","aria-hidden":"true"},"→",-1)),c.createElementVNode("span",Df,c.toDisplayString(C.toLabel),1)]),C.reason?(c.openBlock(),c.createElementBlock("p",Kf,c.toDisplayString(C.reason),1)):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ec98ad49"]]),zf={class:"apf-field-list-card__head"},Jf={class:"apf-field-list-card__head-left"},vf={class:"apf-field-list-card__title"},kf={class:"apf-field-list-card__badge"},Lf={class:"apf-field-list-card__body"},Tf={class:"apf-field-list-card__info"},xf={class:"apf-field-list-card__name"},ff={class:"apf-field-list-card__type"},jf={key:0,class:"apf-field-list-card__actions"},Qf=O(c.defineComponent({__name:"FieldListCard",props:{title:{},fields:{},badgeLabel:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1}},emits:["primary-action","secondary-action"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.badgeLabel||`${g.fields.length} 个字段`;return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-field-list-card",{"is-compact":C.compact}])},[c.createElementVNode("div",zf,[c.createElementVNode("div",Jf,[e[2]||(e[2]=c.createElementVNode("span",{class:"apf-field-list-card__icon","aria-hidden":"true"},[c.createElementVNode("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[c.createElementVNode("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5",fill:"none",stroke:"currentColor","stroke-width":"1.3"}),c.createElementVNode("path",{d:"M5 6.5h6M5 9.5h4",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"})])],-1)),c.createElementVNode("span",vf,c.toDisplayString(C.title),1)]),c.createElementVNode("span",kf,c.toDisplayString(i()),1)]),c.createElementVNode("div",Lf,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.fields,(t,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"apf-field-list-card__row"},[c.createElementVNode("div",Tf,[c.createElementVNode("div",xf,c.toDisplayString(t.name),1),c.createElementVNode("div",ff,[c.createTextVNode(c.toDisplayString(t.type),1),t.meta?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" · "+c.toDisplayString(t.meta),1)],64)):c.createCommentVNode("",!0)])]),c.createElementVNode("span",{class:c.normalizeClass(["apf-field-list-card__flag",{"is-req":t.required}])},c.toDisplayString(t.required?"必填":"可选"),3)]))),128))]),!C.compact&&(C.primaryAction||C.secondaryAction)?(c.openBlock(),c.createElementBlock("div",jf,[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-field-list-card__btn is-ghost",onClick:e[0]||(e[0]=t=>A("secondary-action"))},c.toDisplayString(C.secondaryAction),1)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-field-list-card__btn is-primary",onClick:e[1]||(e[1]=t=>A("primary-action"))},c.toDisplayString(C.primaryAction),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-ee1ab2b6"]]),Uf={class:"apf-flow-strip__head"},Of={class:"apf-flow-strip__head-left"},Ef={class:"apf-flow-strip__title"},Pf={class:"apf-flow-strip__badge"},_f={class:"apf-flow-strip__body"},qf={key:0,class:"apf-flow-strip__arrow","aria-hidden":"true"},$f=["data-type"],gj={key:0,class:"apf-flow-strip__actions"},Ij=O(c.defineComponent({__name:"FlowNodeStripCard",props:{title:{},nodes:{},badgeLabel:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1}},emits:["primary-action","secondary-action"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.badgeLabel||`${g.nodes.length} 个节点`;return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["apf-flow-strip",{"is-compact":C.compact}])},[c.createElementVNode("div",Uf,[c.createElementVNode("div",Of,[e[2]||(e[2]=c.createStaticVNode('<span class="apf-flow-strip__icon" aria-hidden="true" data-v-1fea171e><svg viewBox="0 0 16 16" width="14" height="14" data-v-1fea171e><circle cx="4" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></circle><circle cx="12" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></circle><path d="M6 8h4" fill="none" stroke="currentColor" stroke-width="1.3" data-v-1fea171e></path></svg></span>',1)),c.createElementVNode("span",Ef,c.toDisplayString(C.title),1)]),c.createElementVNode("span",Pf,c.toDisplayString(i()),1)]),c.createElementVNode("div",_f,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.nodes,(t,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:a},[a>0?(c.openBlock(),c.createElementBlock("div",qf)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:"apf-flow-strip__node","data-type":t.type},c.toDisplayString(t.label),9,$f)],64))),128))]),!C.compact&&(C.primaryAction||C.secondaryAction)?(c.openBlock(),c.createElementBlock("div",gj,[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"apf-flow-strip__btn is-ghost",onClick:e[0]||(e[0]=t=>A("secondary-action"))},c.toDisplayString(C.secondaryAction),1)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"apf-flow-strip__btn is-primary",onClick:e[1]||(e[1]=t=>A("primary-action"))},c.toDisplayString(C.primaryAction),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-1fea171e"]]),Cj={class:"apf-token-usage"},Aj={class:"apf-token-usage__head"},ij={class:"apf-token-usage__title"},lj={class:"apf-token-usage__body"},ej={class:"apf-token-usage__stats"},tj={class:"apf-token-usage__stat"},aj={class:"apf-token-usage__value"},cj={class:"apf-token-usage__stat"},dj={class:"apf-token-usage__value"},oj={class:"apf-token-usage__stat is-total"},nj={class:"apf-token-usage__value"},sj={key:0,class:"apf-token-usage__footer"},Zj={key:0,class:"apf-token-usage__model"},mj={key:1,class:"apf-token-usage__cost"},bj=O(c.defineComponent({__name:"TokenUsageCard",props:{inputTokens:{},outputTokens:{},totalTokens:{},estimatedCost:{},model:{},title:{}},setup(C){const I=C,g=c.computed(()=>I.totalTokens??I.inputTokens+I.outputTokens),A=c.computed(()=>{const l=g.value;return l>=1e6?`${(l/1e6).toFixed(2)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:String(l)}),i=c.computed(()=>{const l=I.estimatedCost;return l==null?null:l<.01?"<$0.01":`$${l.toFixed(4)}`});return(l,e)=>(c.openBlock(),c.createElementBlock("div",Cj,[c.createElementVNode("div",Aj,[c.createElementVNode("span",ij,c.toDisplayString(C.title||"Token 消耗"),1)]),c.createElementVNode("div",lj,[c.createElementVNode("div",ej,[c.createElementVNode("div",tj,[e[0]||(e[0]=c.createElementVNode("span",{class:"apf-token-usage__label"},"输入",-1)),c.createElementVNode("span",aj,c.toDisplayString(C.inputTokens.toLocaleString()),1)]),c.createElementVNode("div",cj,[e[1]||(e[1]=c.createElementVNode("span",{class:"apf-token-usage__label"},"输出",-1)),c.createElementVNode("span",dj,c.toDisplayString(C.outputTokens.toLocaleString()),1)]),c.createElementVNode("div",oj,[e[2]||(e[2]=c.createElementVNode("span",{class:"apf-token-usage__label"},"总计",-1)),c.createElementVNode("span",nj,c.toDisplayString(A.value),1)])]),i.value||C.model?(c.openBlock(),c.createElementBlock("div",sj,[C.model?(c.openBlock(),c.createElementBlock("span",Zj,c.toDisplayString(C.model),1)):c.createCommentVNode("",!0),i.value?(c.openBlock(),c.createElementBlock("span",mj,c.toDisplayString(i.value),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-0aacc361"]]),Gj={class:"apf-questionnaire"},rj={class:"apf-questionnaire__head"},hj={class:"apf-questionnaire__title"},uj=["data-status"],Bj={key:0,class:"apf-questionnaire__desc"},Wj={key:1,class:"apf-questionnaire__list"},wj={class:"apf-questionnaire__q"},Yj={key:0,class:"apf-questionnaire__req"},Vj={key:0,class:"apf-questionnaire__options"},pj=["name","value","checked","disabled","onChange"],yj=["value","disabled","onInput"],Nj={key:2,class:"apf-questionnaire__actions"},Xj=["disabled"],Rj=O(c.defineComponent({__name:"QuestionnaireCard",props:{title:{},description:{},questions:{},answers:{default:()=>({})},status:{default:"waiting"},approveLabel:{default:"批准"},rejectLabel:{default:"拒绝"},disabled:{type:Boolean}},emits:["answer","approve","reject"],setup(C,{emit:I}){const g=C,A=I,i=()=>g.status==="approved"?"已批准":g.status==="rejected"?"已拒绝":"待审批",l=()=>g.questions.filter(a=>a.required).every(a=>!!g.answers[a.id]),e=()=>g.status==="waiting"&&!g.disabled;return(t,a)=>(c.openBlock(),c.createElementBlock("div",Gj,[c.createElementVNode("div",rj,[c.createElementVNode("span",hj,c.toDisplayString(C.title),1),c.createElementVNode("span",{class:"apf-questionnaire__status","data-status":C.status},c.toDisplayString(i()),9,uj)]),C.description?(c.openBlock(),c.createElementBlock("p",Bj,c.toDisplayString(C.description),1)):c.createCommentVNode("",!0),C.questions.length?(c.openBlock(),c.createElementBlock("div",Wj,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.questions,d=>{var o;return c.openBlock(),c.createElementBlock("div",{key:d.id,class:"apf-questionnaire__item"},[c.createElementVNode("div",wj,[d.required?(c.openBlock(),c.createElementBlock("span",Yj,"*")):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(d.question),1)]),(o=d.options)!=null&&o.length?(c.openBlock(),c.createElementBlock("div",Vj,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d.options,n=>(c.openBlock(),c.createElementBlock("label",{key:n,class:"apf-questionnaire__opt"},[c.createElementVNode("input",{type:"radio",name:d.id,value:n,checked:C.answers[d.id]===n,disabled:!e(),onChange:s=>A("answer",d.id,n)},null,40,pj),c.createTextVNode(" "+c.toDisplayString(n),1)]))),128))])):(c.openBlock(),c.createElementBlock("input",{key:1,class:"apf-questionnaire__input",type:"text",value:C.answers[d.id]||"",placeholder:"请输入...",disabled:!e(),onInput:n=>A("answer",d.id,n.target.value)},null,40,yj))])}),128))])):c.createCommentVNode("",!0),e()?(c.openBlock(),c.createElementBlock("div",Nj,[c.createElementVNode("button",{type:"button",class:"apf-questionnaire__btn is-ghost",onClick:a[0]||(a[0]=d=>A("reject"))},c.toDisplayString(C.rejectLabel),1),c.createElementVNode("button",{type:"button",class:"apf-questionnaire__btn is-primary",disabled:!l(),onClick:a[1]||(a[1]=d=>A("approve"))},c.toDisplayString(C.approveLabel),9,Xj)])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0e4beff5"]]),Hj=["onClick"],Sj=["onClick"],Mj={key:0},Dj={key:1},Kj=O(c.defineComponent({__name:"ChecklistProposalCard",props:{proposal:{},status:{},selectedIds:{},readonly:{type:Boolean}},emits:["toggle-item","toggle-all","approve","reject","modify","reset"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(new Set(g.proposal.actionItems.map(B=>B.id))),l=c.computed(()=>g.selectedIds??i.value),e=c.computed(()=>l.value.size),t=c.computed(()=>e.value===g.proposal.actionItems.length&&g.proposal.actionItems.length>0),a={high:{label:"高",color:"#F56C6C",bgColor:"#fef0f0"},medium:{label:"中",color:"#E6A23C",bgColor:"#fdf6ec"},low:{label:"低",color:"#67C23A",bgColor:"#f0f9eb"}},d={todo:{icon:"document",label:"待办"},approval:{icon:"stamp",label:"审批"},review:{icon:"view",label:"审阅"},decision:{icon:"warning",label:"决策"}},o=c.ref(null),n=c.ref({});function s(B){g.readonly||g.status==="approved"||g.status==="rejected"||(g.selectedIds?A("toggle-item",B):i.value.has(B)?i.value.delete(B):i.value.add(B))}function Z(){g.readonly||g.status==="approved"||g.status==="rejected"||(g.selectedIds?A("toggle-all"):t.value?i.value.clear():g.proposal.actionItems.forEach(B=>i.value.add(B.id)))}function m(B){o.value=B.id,n.value={...B}}function b(){o.value&&n.value&&(A("modify",o.value,n.value),o.value=null,n.value={})}function G(){o.value=null,n.value={}}function r(){A("approve",Array.from(l.value))}function h(){A("reject")}function u(){A("reset")}return(B,W)=>{var w;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([B.$style.card,C.status==="approved"&&B.$style.cardApproved,C.status==="rejected"&&B.$style.cardRejected])},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.titleRow)},[c.createVNode(c.unref($),{name:"circle-check-filled",size:16,style:{color:"#409EFF"}}),c.createElementVNode("span",{class:c.normalizeClass(B.$style.title)},"智能拟办",2),C.proposal.documentTitle?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.docTitle)},c.toDisplayString(C.proposal.documentTitle),3)):c.createCommentVNode("",!0)],2),!C.status||C.status==="pending"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.countBadge)},c.toDisplayString(e.value)+"/"+c.toDisplayString(C.proposal.actionItems.length)+" 项 ",3)):C.status==="approved"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass([B.$style.statusBadge,B.$style.statusApproved])},[c.createVNode(c.unref($),{name:"check",size:12}),W[7]||(W[7]=c.createTextVNode(" 已批准 ",-1))],2)):C.status==="rejected"?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass([B.$style.statusBadge,B.$style.statusRejected])},[c.createVNode(c.unref($),{name:"close",size:12}),W[8]||(W[8]=c.createTextVNode(" 已拒绝 ",-1))],2)):c.createCommentVNode("",!0)],2),C.proposal.summary?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.summary)},c.toDisplayString(C.proposal.summary),3)):c.createCommentVNode("",!0),(!C.status||C.status==="pending")&&!C.readonly?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(B.$style.selectAllRow)},[c.createElementVNode("label",{class:c.normalizeClass(B.$style.checkbox),onClick:Z},[c.createElementVNode("span",{class:c.normalizeClass([B.$style.checkboxInner,t.value&&B.$style.checked])},[t.value?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"check",size:10})):c.createCommentVNode("",!0)],2),W[9]||(W[9]=c.createElementVNode("span",null,"全选",-1))],2)],2)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.proposal.actionItems,Y=>{var p,V,y,N,H;return c.openBlock(),c.createElementBlock("div",{key:Y.id,class:c.normalizeClass([B.$style.item,l.value.has(Y.id)&&B.$style.itemSelected,o.value===Y.id&&B.$style.itemEditing])},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemHeader),onClick:R=>s(Y.id)},[c.createElementVNode("label",{class:c.normalizeClass(B.$style.checkbox),onClick:W[0]||(W[0]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{class:c.normalizeClass([B.$style.checkboxInner,l.value.has(Y.id)&&B.$style.checked])},[l.value.has(Y.id)?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"check",size:10})):c.createCommentVNode("",!0)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemBadges)},[Y.priority?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.priorityBadge),style:c.normalizeStyle({color:(p=a[Y.priority])==null?void 0:p.color,background:(V=a[Y.priority])==null?void 0:V.bgColor})},c.toDisplayString(((y=a[Y.priority])==null?void 0:y.label)??Y.priority),7)):c.createCommentVNode("",!0),Y.type?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(B.$style.typeBadge)},[c.createVNode(c.unref($),{name:((N=d[Y.type])==null?void 0:N.icon)??"document",size:12},null,8,["name"]),c.createTextVNode(" "+c.toDisplayString(((H=d[Y.type])==null?void 0:H.label)??Y.type),1)],2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemTitle)},c.toDisplayString(Y.title),3),!C.readonly&&(!C.status||C.status==="pending")?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(B.$style.editBtn),onClick:c.withModifiers(R=>m(Y),["stop"])},[c.createVNode(c.unref($),{name:"edit",size:12})],10,Sj)):c.createCommentVNode("",!0)],10,Hj),o.value===Y.id?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(B.$style.editForm)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[10]||(W[10]=c.createElementVNode("label",null,"标题",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[1]||(W[1]=R=>n.value.title=R),class:c.normalizeClass(B.$style.editInput)},null,2),[[c.vModelText,n.value.title]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[11]||(W[11]=c.createElementVNode("label",null,"描述",-1)),c.withDirectives(c.createElementVNode("textarea",{"onUpdate:modelValue":W[2]||(W[2]=R=>n.value.description=R),class:c.normalizeClass(B.$style.editTextarea),rows:"2"},null,2),[[c.vModelText,n.value.description]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRowInline)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[12]||(W[12]=c.createElementVNode("label",null,"负责人",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[3]||(W[3]=R=>n.value.assignee=R),class:c.normalizeClass(B.$style.editInput),placeholder:"可选"},null,2),[[c.vModelText,n.value.assignee]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[13]||(W[13]=c.createElementVNode("label",null,"截止日期",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":W[4]||(W[4]=R=>n.value.deadline=R),class:c.normalizeClass(B.$style.editInput),placeholder:"可选"},null,2),[[c.vModelText,n.value.deadline]])],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRowInline)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[15]||(W[15]=c.createElementVNode("label",null,"优先级",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":W[5]||(W[5]=R=>n.value.priority=R),class:c.normalizeClass(B.$style.editSelect)},[...W[14]||(W[14]=[c.createElementVNode("option",{value:"high"},"高",-1),c.createElementVNode("option",{value:"medium"},"中",-1),c.createElementVNode("option",{value:"low"},"低",-1)])],2),[[c.vModelSelect,n.value.priority]])],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editRow)},[W[17]||(W[17]=c.createElementVNode("label",null,"类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":W[6]||(W[6]=R=>n.value.type=R),class:c.normalizeClass(B.$style.editSelect)},[...W[16]||(W[16]=[c.createElementVNode("option",{value:"todo"},"待办",-1),c.createElementVNode("option",{value:"approval"},"审批",-1),c.createElementVNode("option",{value:"review"},"审阅",-1),c.createElementVNode("option",{value:"decision"},"决策",-1)])],2),[[c.vModelSelect,n.value.type]])],2)],2),c.createElementVNode("div",{class:c.normalizeClass(B.$style.editActions)},[c.createElementVNode("button",{class:c.normalizeClass(B.$style.saveBtn),onClick:b},"保存",2),c.createElementVNode("button",{class:c.normalizeClass(B.$style.cancelBtn),onClick:G},"取消",2)],2)],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(B.$style.itemBody)},[c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemDesc)},c.toDisplayString(Y.description),3),c.createElementVNode("div",{class:c.normalizeClass(B.$style.itemMeta)},[Y.assignee?(c.openBlock(),c.createElementBlock("span",Mj,[c.createVNode(c.unref($),{name:"user",size:12}),c.createTextVNode(" "+c.toDisplayString(Y.assignee),1)])):c.createCommentVNode("",!0),Y.deadline?(c.openBlock(),c.createElementBlock("span",Dj,[c.createVNode(c.unref($),{name:"clock",size:12}),c.createTextVNode(" "+c.toDisplayString(Y.deadline),1)])):c.createCommentVNode("",!0)],2)],2))],2)}),128))],2),(w=C.proposal.approvalChain)!=null&&w.length?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(B.$style.chain)},[c.createElementVNode("span",{class:c.normalizeClass(B.$style.chainLabel)},"审批链:",2),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.proposal.approvalChain,(Y,p)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:p},[c.createElementVNode("span",{class:c.normalizeClass(B.$style.chainPerson)},c.toDisplayString(Y),3),p<C.proposal.approvalChain.length-1?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(B.$style.chainArrow)},"→",2)):c.createCommentVNode("",!0)],64))),128))],2)):c.createCommentVNode("",!0),C.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:3,class:c.normalizeClass(B.$style.actions)},[!C.status||C.status==="pending"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("button",{class:c.normalizeClass(B.$style.approveBtn),onClick:r},[c.createVNode(c.unref($),{name:"check",size:14}),c.createTextVNode(" 确认执行 ("+c.toDisplayString(e.value)+" 项) ",1)],2),c.createElementVNode("button",{class:c.normalizeClass(B.$style.rejectBtn),onClick:h},[c.createVNode(c.unref($),{name:"close",size:14}),W[18]||(W[18]=c.createTextVNode(" 暂不执行 ",-1))],2)],64)):(c.openBlock(),c.createElementBlock("button",{key:1,class:c.normalizeClass(B.$style.resetBtn),onClick:u},[c.createVNode(c.unref($),{name:"refresh",size:14}),W[19]||(W[19]=c.createTextVNode(" 重新审核 ",-1))],2))],2))],2)}}}),[["__cssModules",{$style:{card:"_card_yghuq_2",cardApproved:"_cardApproved_yghuq_9",cardRejected:"_cardRejected_yghuq_14",header:"_header_yghuq_20",titleRow:"_titleRow_yghuq_27",title:"_title_yghuq_27",docTitle:"_docTitle_yghuq_39",countBadge:"_countBadge_yghuq_47",statusBadge:"_statusBadge_yghuq_53",statusApproved:"_statusApproved_yghuq_63",statusRejected:"_statusRejected_yghuq_68",summary:"_summary_yghuq_74",selectAllRow:"_selectAllRow_yghuq_85",checkbox:"_checkbox_yghuq_89",checkboxInner:"_checkboxInner_yghuq_99",checked:"_checked_yghuq_110",itemList:"_itemList_yghuq_117",item:"_item_yghuq_117",itemSelected:"_itemSelected_yghuq_136",itemEditing:"_itemEditing_yghuq_141",itemHeader:"_itemHeader_yghuq_145",itemBadges:"_itemBadges_yghuq_151",priorityBadge:"_priorityBadge_yghuq_156",typeBadge:"_typeBadge_yghuq_163",itemTitle:"_itemTitle_yghuq_171",editBtn:"_editBtn_yghuq_178",itemBody:"_itemBody_yghuq_194",itemDesc:"_itemDesc_yghuq_199",itemMeta:"_itemMeta_yghuq_206",editForm:"_editForm_yghuq_220",editRow:"_editRow_yghuq_225",editInput:"_editInput_yghuq_236",editTextarea:"_editTextarea_yghuq_237",editSelect:"_editSelect_yghuq_238",editRowInline:"_editRowInline_yghuq_260",editActions:"_editActions_yghuq_270",saveBtn:"_saveBtn_yghuq_276",cancelBtn:"_cancelBtn_yghuq_277",chain:"_chain_yghuq_309",chainLabel:"_chainLabel_yghuq_321",chainPerson:"_chainPerson_yghuq_325",chainArrow:"_chainArrow_yghuq_331",actions:"_actions_yghuq_337",approveBtn:"_approveBtn_yghuq_344",rejectBtn:"_rejectBtn_yghuq_345",resetBtn:"_resetBtn_yghuq_346"}}]]),Fj=["onClick"],zj=O(c.defineComponent({__name:"RequirementAnalysisCard",props:{analysis:{},partialAnswers:{default:()=>({})},nextQuestionId:{default:null},waitingConfirmation:{type:Boolean,default:!0}},emits:["answer","skip"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>({...g.partialAnswers})),l=c.computed(()=>({simple:"简单",medium:"中等",complex:"复杂"})[g.analysis.complexity]||g.analysis.complexity),e=c.computed(()=>{const s=g.analysis.completeness.score;return s>=80?"success":s>=60?"warning":"danger"}),t=c.computed(()=>g.analysis.confirmQuestions.filter(s=>s.required).every(s=>{var Z;return(Z=i.value[s.id])==null?void 0:Z.trim()}));function a(){A("skip")}function d(s,Z){g.waitingConfirmation&&A("answer",s,Z)}function o(s){var Z;return!!((Z=i.value[s])!=null&&Z.trim())}function n(s){return g.waitingConfirmation&&g.nextQuestionId===s}return(s,Z)=>{const m=c.resolveComponent("el-tag"),b=c.resolveComponent("el-progress");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(s.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summary)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryHeader)},[c.createVNode(c.unref($),{name:"data-board",size:16}),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryTitle)},"需求分析结果",2)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryGrid)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"意图",2),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.intent),3)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"类型",2),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.type),3)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"复杂度",2),c.createVNode(m,{type:C.analysis.complexity==="complex"?"danger":C.analysis.complexity==="medium"?"warning":"success",size:"small"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l.value),1)]),_:1},8,["type"])],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.summaryItem)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryLabel)},"完整性",2),c.createVNode(b,{percentage:C.analysis.completeness.score,color:e.value==="success"?"#67c23a":e.value==="warning"?"#e6a23c":"#f56c6c","stroke-width":8,"show-text":!1,style:{width:"80px"}},null,8,["percentage","color"]),c.createElementVNode("span",{class:c.normalizeClass(s.$style.summaryValue)},c.toDisplayString(C.analysis.completeness.score)+"%",3)],2)],2),C.analysis.completeness.missing.length>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.missingSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.missingTitle)},[c.createVNode(c.unref($),{name:"warning",size:14}),Z[0]||(Z[0]=c.createElementVNode("span",null,"缺失信息",-1))],2),c.createElementVNode("ul",{class:c.normalizeClass(s.$style.missingList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.completeness.missing,(G,r)=>(c.openBlock(),c.createElementBlock("li",{key:r},c.toDisplayString(G),1))),128))],2)],2)):c.createCommentVNode("",!0),C.analysis.completeness.assumptions.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.assumptionsSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.assumptionsTitle)},[c.createVNode(c.unref($),{name:"info-filled",size:14}),Z[1]||(Z[1]=c.createElementVNode("span",null,"AI 假设",-1))],2),c.createElementVNode("ul",{class:c.normalizeClass(s.$style.assumptionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.completeness.assumptions,(G,r)=>(c.openBlock(),c.createElementBlock("li",{key:r},c.toDisplayString(G),1))),128))],2)],2)):c.createCommentVNode("",!0)],2),C.analysis.suggestedChain.length>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.chainSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainTitle)},[c.createVNode(c.unref($),{name:"list",size:14}),Z[2]||(Z[2]=c.createElementVNode("span",null,"执行计划",-1))],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.suggestedChain,(G,r)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:c.normalizeClass(s.$style.chainItem)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainStep)},c.toDisplayString(r+1),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainContent)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainAgent)},c.toDisplayString(G.agent),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.chainDesc)},c.toDisplayString(G.description),3)],2)],2))),128))],2)],2)):c.createCommentVNode("",!0),C.analysis.confirmQuestions.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.questionsSection)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionsTitle)},[c.createVNode(c.unref($),{name:"question-filled",size:14}),Z[3]||(Z[3]=c.createElementVNode("span",null,"请确认以下信息",-1)),C.waitingConfirmation&&!t.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(s.$style.progressHint)}," 在下方输入框逐条回复,答完必填项后自动继续 ",2)):C.waitingConfirmation&&t.value?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(s.$style.progressHint)}," 必填项已完成,发送任意内容或直接点选以继续 ",2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.analysis.confirmQuestions,G=>(c.openBlock(),c.createElementBlock("div",{key:G.id,class:c.normalizeClass([s.$style.questionItem,n(G.id)&&s.$style.questionItemActive,o(G.id)&&s.$style.questionItemDone])},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.questionText)},[o(G.id)?(c.openBlock(),c.createBlock(c.unref($),{key:0,name:"circle-check",size:14,class:c.normalizeClass(s.$style.answeredIcon)},null,8,["class"])):c.createCommentVNode("",!0),c.createTextVNode(" "+c.toDisplayString(G.question)+" ",1),G.required?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass(s.$style.required)},"*",2)):c.createCommentVNode("",!0)],2),o(G.id)?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.answeredValue)},c.toDisplayString(i.value[G.id]),3)):G.options&&G.options.length>0?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.optionsList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(G.options,(r,h)=>(c.openBlock(),c.createElementBlock("div",{key:r,class:c.normalizeClass([s.$style.optionItem,{[s.$style.optionDisabled]:!C.waitingConfirmation}]),onClick:u=>C.waitingConfirmation&&d(G.id,r)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.optionIndex)},c.toDisplayString(h+1),3),c.createElementVNode("span",{class:c.normalizeClass(s.$style.optionText)},c.toDisplayString(r),3)],10,Fj))),128))],2)):n(G.id)?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(s.$style.inputHint)}," 请在下方输入框回复 ",2)):c.createCommentVNode("",!0)],2))),128))],2)],2)):c.createCommentVNode("",!0),C.waitingConfirmation?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(s.$style.actions)},[c.createElementVNode("button",{type:"button",class:c.normalizeClass(s.$style.skipLink),onClick:a}," 跳过,直接执行 ",2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_8r8st_2",summary:"_summary_8r8st_10",summaryHeader:"_summaryHeader_8r8st_15",summaryTitle:"_summaryTitle_8r8st_24",summaryGrid:"_summaryGrid_8r8st_28",summaryItem:"_summaryItem_8r8st_34",summaryLabel:"_summaryLabel_8r8st_40",summaryValue:"_summaryValue_8r8st_46",missingSection:"_missingSection_8r8st_52",missingTitle:"_missingTitle_8r8st_59",missingList:"_missingList_8r8st_69",assumptionsSection:"_assumptionsSection_8r8st_81",assumptionsTitle:"_assumptionsTitle_8r8st_88",assumptionsList:"_assumptionsList_8r8st_98",chainSection:"_chainSection_8r8st_110",chainTitle:"_chainTitle_8r8st_115",chainList:"_chainList_8r8st_125",chainItem:"_chainItem_8r8st_131",chainStep:"_chainStep_8r8st_137",chainContent:"_chainContent_8r8st_151",chainAgent:"_chainAgent_8r8st_155",chainDesc:"_chainDesc_8r8st_161",questionsSection:"_questionsSection_8r8st_167",questionsTitle:"_questionsTitle_8r8st_171",progressHint:"_progressHint_8r8st_182",questionItemActive:"_questionItemActive_8r8st_188",questionItemDone:"_questionItemDone_8r8st_195",answeredIcon:"_answeredIcon_8r8st_199",answeredValue:"_answeredValue_8r8st_204",inputHint:"_inputHint_8r8st_210",optionDisabled:"_optionDisabled_8r8st_216",questionsList:"_questionsList_8r8st_221",questionItem:"_questionItem_8r8st_188",questionText:"_questionText_8r8st_233",required:"_required_8r8st_238",optionsList:"_optionsList_8r8st_243",optionItem:"_optionItem_8r8st_249",optionSelected:"_optionSelected_8r8st_265",optionIndex:"_optionIndex_8r8st_270",optionText:"_optionText_8r8st_289",actions:"_actions_8r8st_295",skipLink:"_skipLink_8r8st_303"}}]]),gi={card:"_card_6xf4y_1",header:"_header_6xf4y_9",title:"_title_6xf4y_16",filename:"_filename_6xf4y_22",summary:"_summary_6xf4y_27",points:"_points_6xf4y_34",section:"_section_6xf4y_44",sectionTitle:"_sectionTitle_6xf4y_48",sectionContent:"_sectionContent_6xf4y_55"},Jj=c.defineComponent({__name:"DocumentDetailSummaryCard",props:{item:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref(gi).card)},[c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).header)},[c.createVNode(c.unref($),{name:"document",size:16}),c.createElementVNode("div",null,[c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).title)},c.toDisplayString(C.item.summary.title),3),c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).filename)},c.toDisplayString(C.item.filename),3)])],2),c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).summary)},c.toDisplayString(C.item.summary.summary),3),C.item.summary.keyPoints.length?(c.openBlock(),c.createElementBlock("ul",{key:0,class:c.normalizeClass(c.unref(gi).points)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.item.summary.keyPoints,(A,i)=>(c.openBlock(),c.createElementBlock("li",{key:i},c.toDisplayString(A),1))),128))],2)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.item.summary.sections,(A,i)=>(c.openBlock(),c.createElementBlock("div",{key:i,class:c.normalizeClass(c.unref(gi).section)},[c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).sectionTitle)},c.toDisplayString(A.heading),3),c.createElementVNode("div",{class:c.normalizeClass(c.unref(gi).sectionContent)},c.toDisplayString(A.content),3)],2))),128))],2))}}),vj=["disabled","onClick"],kj=O(c.defineComponent({__name:"ErrorRecoveryCard",props:{error:{},nodeName:{},nodeType:{},strategies:{}},emits:["select"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-tag");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(A.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.header)},[c.createVNode(c.unref($),{name:"warning-filled",size:14,class:c.normalizeClass(A.$style.headerIcon)},null,8,["class"]),c.createElementVNode("span",{class:c.normalizeClass(A.$style.title)},"执行错误",2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.body)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.errorInfo)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.nodeInfo)},[c.createElementVNode("span",{class:c.normalizeClass(A.$style.nodeLabel)},"节点:",2),c.createElementVNode("span",{class:c.normalizeClass(A.$style.nodeName)},c.toDisplayString(C.nodeName),3),C.nodeType?(c.openBlock(),c.createBlock(l,{key:0,size:"small",type:"info"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(C.nodeType),1)]),_:1})):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.errorMessage)},[c.createVNode(c.unref($),{name:"circle-close-filled",size:14}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategies)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyLabel)},"选择恢复策略:",2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyList)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.strategies,e=>(c.openBlock(),c.createElementBlock("button",{key:e.value,class:c.normalizeClass([A.$style.strategyBtn,e.disabled&&A.$style.strategyDisabled]),disabled:e.disabled,onClick:t=>g("select",e.value)},[c.createVNode(c.unref($),{name:e.icon,size:16},null,8,["name"]),c.createElementVNode("div",{class:c.normalizeClass(A.$style.strategyInfo)},[c.createElementVNode("span",{class:c.normalizeClass(A.$style.strategyName)},c.toDisplayString(e.label),3),c.createElementVNode("span",{class:c.normalizeClass(A.$style.strategyDesc)},c.toDisplayString(e.description),3)],2)],10,vj))),128))],2)],2)],2)],2)}}}),[["__cssModules",{$style:{card:"_card_170h5_2",header:"_header_170h5_8",headerIcon:"_headerIcon_170h5_17",title:"_title_170h5_21",body:"_body_170h5_27",errorInfo:"_errorInfo_170h5_31",nodeInfo:"_nodeInfo_170h5_35",nodeLabel:"_nodeLabel_170h5_42",nodeName:"_nodeName_170h5_47",errorMessage:"_errorMessage_170h5_53",strategies:"_strategies_170h5_65",strategyLabel:"_strategyLabel_170h5_70",strategyList:"_strategyList_170h5_76",strategyBtn:"_strategyBtn_170h5_82",strategyDisabled:"_strategyDisabled_170h5_104",strategyInfo:"_strategyInfo_170h5_108",strategyName:"_strategyName_170h5_114",strategyDesc:"_strategyDesc_170h5_120"}}]]),Lj=O(c.defineComponent({__name:"VariableDiffCard",props:{nodeName:{},changes:{}},setup(C){const I=C,g=c.computed(()=>I.changes.length>0);function A(l){return l==null?"null":typeof l=="string"?l:JSON.stringify(l,null,2)}function i(l){switch(l.type){case"add":return{icon:"plus",color:"var(--el-color-success, #67c23a)",label:"新增"};case"update":return{icon:"edit",color:"var(--el-color-primary, #409eff)",label:"更新"};case"delete":return{icon:"delete",color:"var(--el-color-danger, #f56c6c)",label:"删除"};default:return{icon:"info-filled",color:"var(--el-color-info, #909399)",label:"变更"}}}return(l,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(l.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerLeft)},[c.createVNode(c.unref($),{name:"data-line",size:14,class:c.normalizeClass(l.$style.headerIcon)},null,8,["class"]),c.createElementVNode("span",{class:c.normalizeClass(l.$style.title)},"变量变更",2)],2),C.nodeName?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(l.$style.nodeInfo)},c.toDisplayString(C.nodeName),3)):c.createCommentVNode("",!0)],2),g.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.body)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.changes,(t,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:c.normalizeClass(l.$style.change)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.changeHeader)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.changeType)},[c.createVNode(c.unref($),{name:i(t).icon,size:12,style:c.normalizeStyle({color:i(t).color})},null,8,["name","style"]),c.createElementVNode("span",{style:c.normalizeStyle({color:i(t).color})},c.toDisplayString(i(t).label),5)],2),c.createElementVNode("span",{class:c.normalizeClass(l.$style.varName)},c.toDisplayString(t.name),3)],2),t.type==="update"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.diff)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.diffOld)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"旧值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.oldValue)),3)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.diffNew)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"新值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.newValue)),3)],2)],2)):t.type==="add"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(l.$style.singleValue)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.diffLabel)},"值",2),c.createElementVNode("pre",{class:c.normalizeClass(l.$style.diffValue)},c.toDisplayString(A(t.newValue)),3)],2)):c.createCommentVNode("",!0)],2))),128))],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(l.$style.empty)}," 暂无变量变更 ",2))],2))}}),[["__cssModules",{$style:{card:"_card_1byhf_2",header:"_header_1byhf_8",headerLeft:"_headerLeft_1byhf_17",headerIcon:"_headerIcon_1byhf_23",title:"_title_1byhf_27",nodeInfo:"_nodeInfo_1byhf_33",body:"_body_1byhf_38",change:"_change_1byhf_45",changeHeader:"_changeHeader_1byhf_51",changeType:"_changeType_1byhf_59",varName:"_varName_1byhf_67",diff:"_diff_1byhf_73",diffOld:"_diffOld_1byhf_78",diffNew:"_diffNew_1byhf_84",singleValue:"_singleValue_1byhf_89",diffLabel:"_diffLabel_1byhf_93",diffValue:"_diffValue_1byhf_100",empty:"_empty_1byhf_108"}}]]),Tj=O(c.defineComponent({__name:"SubWorkflowStatusCard",props:{workflowName:{},status:{},durationMs:{},error:{},nodeCount:{},completedNodes:{}},emits:["detail","retry"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1),l=c.computed(()=>{switch(g.status){case"running":return"loading";case"success":return"circle-check";case"error":return"circle-close-filled";case"waiting":return"clock";case"cancelled":return"minus";default:return"more-filled"}}),e=c.computed(()=>{switch(g.status){case"running":return"执行中";case"success":return"成功";case"error":return"失败";case"waiting":return"待确认";case"cancelled":return"已取消";default:return"等待"}}),t=c.computed(()=>{switch(g.status){case"running":return"primary";case"success":return"success";case"error":return"danger";case"waiting":return"warning";default:return"info"}}),a=c.computed(()=>{const s=g.durationMs;return s==null?"":s<1e3?`${s}ms`:`${(s/1e3).toFixed(2)}s`}),d=c.computed(()=>g.nodeCount??0),o=c.computed(()=>g.completedNodes??0),n=c.computed(()=>d.value===0?0:Math.round(o.value/d.value*100));return(s,Z)=>{const m=c.resolveComponent("el-tag"),b=c.resolveComponent("el-progress"),G=c.resolveComponent("el-button");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(s.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.header),onClick:Z[0]||(Z[0]=r=>i.value=!i.value)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.iconWrap)},[c.createVNode(c.unref($),{name:l.value,size:16,class:c.normalizeClass(C.status==="running"&&s.$style.iconSpin)},null,8,["name","class"])],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.info)},[c.createElementVNode("span",{class:c.normalizeClass(s.$style.name)},"子工作流:"+c.toDisplayString(C.workflowName),3),c.createElementVNode("span",{class:c.normalizeClass(s.$style.meta)},[c.createVNode(m,{size:"small",type:t.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.value),1)]),_:1},8,["type"]),a.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(s.$style.duration)},c.toDisplayString(a.value),3)):c.createCommentVNode("",!0)],2)],2),c.createVNode(c.unref($),{name:i.value?"arrow-up":"arrow-down",size:14,class:c.normalizeClass(s.$style.expandIcon)},null,8,["name","class"])],2),i.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.detail)},[d.value>0?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.progress)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.progressLabel)}," 节点进度:"+c.toDisplayString(o.value)+" / "+c.toDisplayString(d.value),3),c.createVNode(b,{percentage:n.value,status:C.status==="error"?"exception":void 0,"stroke-width":6},null,8,["percentage","status"])],2)):c.createCommentVNode("",!0),C.error?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.error)},[c.createVNode(c.unref($),{name:"warning-filled",size:14}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(s.$style.actions)},[c.createVNode(G,{size:"small",onClick:Z[1]||(Z[1]=r=>A("detail"))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"view",size:14,style:{"margin-right":"4px"}}),Z[3]||(Z[3]=c.createTextVNode(" 查看详情 ",-1))]),_:1}),C.status==="error"?(c.openBlock(),c.createBlock(G,{key:0,size:"small",type:"primary",plain:"",onClick:Z[2]||(Z[2]=r=>A("retry"))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"refresh",size:14,style:{"margin-right":"4px"}}),Z[4]||(Z[4]=c.createTextVNode(" 重试 ",-1))]),_:1})):c.createCommentVNode("",!0)],2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_15eqh_2",header:"_header_15eqh_8",iconWrap:"_iconWrap_15eqh_21",info:"_info_15eqh_33",name:"_name_15eqh_41",meta:"_meta_15eqh_50",duration:"_duration_15eqh_56",expandIcon:"_expandIcon_15eqh_62",detail:"_detail_15eqh_67",progress:"_progress_15eqh_73",progressLabel:"_progressLabel_15eqh_77",error:"_error_15eqh_83",actions:"_actions_15eqh_95",iconSpin:"_iconSpin_15eqh_100","sub-workflow-spin":"_sub-workflow-spin_15eqh_1"}}]]),xj={key:0},fj=O(c.defineComponent({__name:"PptPreviewCard",props:{slides:{},metadata:{},loading:{type:Boolean},error:{},blob:{}},emits:["download"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>(g.slides??[]).slice(0,4)),l={business:"商务",tech:"科技",education:"教育",creative:"创意"},e={professional:"专业",casual:"休闲",academic:"学术"},t={title:"document",content:"notebook",chart:"data-line",comparison:"scale-to-original",summary:"document-checked"};function a(){var d;if(g.blob){const o=URL.createObjectURL(g.blob),n=document.createElement("a");n.href=o,n.download=`${((d=g.metadata)==null?void 0:d.title)??"presentation"}.pptx`,n.click(),URL.revokeObjectURL(o)}else A("download")}return(d,o)=>{var n,s,Z,m;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(d.$style.card)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.titleRow)},[c.createVNode(c.unref($),{name:"data-board",size:16,style:{color:"#67C23A"}}),c.createElementVNode("span",{class:c.normalizeClass(d.$style.title)},c.toDisplayString(((n=C.metadata)==null?void 0:n.title)??"AI PPT 生成"),3)],2),C.metadata?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.metaBadges)},[c.createElementVNode("span",{class:c.normalizeClass(d.$style.badge)},c.toDisplayString(l[C.metadata.template]??C.metadata.template),3),c.createElementVNode("span",{class:c.normalizeClass(d.$style.badge)},c.toDisplayString(C.metadata.totalSlides)+" 页",3)],2)):c.createCommentVNode("",!0)],2),C.loading?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.loadingState)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.spinner)},null,2),o[0]||(o[0]=c.createElementVNode("span",null,"正在生成 PPT...",-1))],2)):C.error?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(d.$style.errorState)},[c.createVNode(c.unref($),{name:"warning",size:24}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)],2)):i.value.length?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(d.$style.previewGrid)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,b=>{var G;return c.openBlock(),c.createElementBlock("div",{key:b.index,class:c.normalizeClass(d.$style.slideThumb)},[c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideHeader)},[c.createVNode(c.unref($),{name:t[b.type]??"document",size:12},null,8,["name"]),c.createElementVNode("span",null,c.toDisplayString(b.heading),1)],2),c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideBody)},[(G=b.content)!=null&&G.length?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.slideContent)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(b.content.slice(0,3),(r,h)=>(c.openBlock(),c.createElementBlock("div",{key:h,class:c.normalizeClass(d.$style.slidePoint)},c.toDisplayString(r),3))),128)),b.content.length>3?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.slideMore)}," +"+c.toDisplayString(b.content.length-3)+" 更多 ",3)):c.createCommentVNode("",!0)],2)):(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(d.$style.slideEmpty)},"暂无内容",2))],2),c.createElementVNode("div",{class:c.normalizeClass(d.$style.slideIndex)},c.toDisplayString(b.index),3)],2)}),128)),(((s=C.slides)==null?void 0:s.length)??0)>4?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(d.$style.moreSlides)},[c.createElementVNode("span",null,"+"+c.toDisplayString((((Z=C.slides)==null?void 0:Z.length)??0)-4)+" 页",1)],2)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0),C.metadata?(c.openBlock(),c.createElementBlock("div",{key:3,class:c.normalizeClass(d.$style.meta)},[C.metadata.style?(c.openBlock(),c.createElementBlock("span",xj,[c.createVNode(c.unref($),{name:"brush",size:12}),c.createTextVNode(" "+c.toDisplayString(e[C.metadata.style]??C.metadata.style),1)])):c.createCommentVNode("",!0),c.createElementVNode("span",null,[c.createVNode(c.unref($),{name:"document",size:12}),c.createTextVNode(" "+c.toDisplayString(C.metadata.totalSlides)+" 页 ",1)])],2)):c.createCommentVNode("",!0),!C.loading&&((m=C.slides)!=null&&m.length)?(c.openBlock(),c.createElementBlock("div",{key:4,class:c.normalizeClass(d.$style.actions)},[c.createElementVNode("button",{class:c.normalizeClass(d.$style.downloadBtn),onClick:a},[c.createVNode(c.unref($),{name:"download",size:14}),o[1]||(o[1]=c.createTextVNode(" 下载 PPT ",-1))],2)],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{card:"_card_z1wac_2",header:"_header_z1wac_9",titleRow:"_titleRow_z1wac_16",title:"_title_z1wac_16",metaBadges:"_metaBadges_z1wac_28",badge:"_badge_z1wac_33",loadingState:"_loadingState_z1wac_41",errorState:"_errorState_z1wac_42",spinner:"_spinner_z1wac_56",spin:"_spin_z1wac_56",previewGrid:"_previewGrid_z1wac_69",slideThumb:"_slideThumb_z1wac_76",slideHeader:"_slideHeader_z1wac_85",slideBody:"_slideBody_z1wac_97",slideContent:"_slideContent_z1wac_101",slidePoint:"_slidePoint_z1wac_107",slideMore:"_slideMore_z1wac_116",slideEmpty:"_slideEmpty_z1wac_122",slideIndex:"_slideIndex_z1wac_127",moreSlides:"_moreSlides_z1wac_136",meta:"_meta_z1wac_28",actions:"_actions_z1wac_161",downloadBtn:"_downloadBtn_z1wac_166"}}]]),jj=O(c.defineComponent({__name:"FlowPreviewShell",props:{title:{},badge:{},primaryAction:{},secondaryAction:{},compact:{type:Boolean,default:!1},showFitButton:{type:Boolean,default:!0}},emits:["primary-action","secondary-action","fit-view"],setup(C,{emit:I}){const g=I;return(A,i)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([A.$style.card,{[A.$style.compact]:C.compact}])},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.head)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.headLeft)},[c.createElementVNode("div",{class:c.normalizeClass(A.$style.headIcon)},[c.renderSlot(A.$slots,"icon",{},()=>[c.createVNode(c.unref($),{name:"connection",size:14})])],2),c.createElementVNode("span",{class:c.normalizeClass(A.$style.title)},c.toDisplayString(C.title),3)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.headRight)},[C.badge?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(A.$style.badge)},c.toDisplayString(C.badge),3)):c.createCommentVNode("",!0),C.showFitButton?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(A.$style.fitBtn),title:"适配画布",onClick:i[0]||(i[0]=l=>g("fit-view"))},[c.createVNode(c.unref($),{name:"full-screen"})],2)):c.createCommentVNode("",!0)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(A.$style.canvasWrapper)},[c.renderSlot(A.$slots,"default")],2),C.primaryAction||C.secondaryAction?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(A.$style.actions)},[C.secondaryAction?(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:c.normalizeClass(A.$style.btnGhost),onClick:i[1]||(i[1]=l=>g("secondary-action"))},[c.createVNode(c.unref($),{name:"edit",size:12}),c.createTextVNode(" "+c.toDisplayString(C.secondaryAction),1)],2)):c.createCommentVNode("",!0),C.primaryAction?(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:c.normalizeClass(A.$style.btnPrimary),onClick:i[2]||(i[2]=l=>g("primary-action"))},[c.createVNode(c.unref($),{name:"check",size:12}),c.createTextVNode(" "+c.toDisplayString(C.primaryAction),1)],2)):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{card:"_card_h1z12_1",head:"_head_h1z12_16",headLeft:"_headLeft_h1z12_25",headRight:"_headRight_h1z12_31",headIcon:"_headIcon_h1z12_37",title:"_title_h1z12_49",badge:"_badge_h1z12_55",fitBtn:"_fitBtn_h1z12_64",canvasWrapper:"_canvasWrapper_h1z12_86","vue-flow__node":"_vue-flow__node_h1z12_92",selected:"_selected_h1z12_96","vue-flow__edge-path":"_vue-flow__edge-path_h1z12_101","vue-flow__controls":"_vue-flow__controls_h1z12_105","vue-flow__controls-button":"_vue-flow__controls-button_h1z12_111",actions:"_actions_h1z12_121",btnPrimary:"_btnPrimary_h1z12_130",btnGhost:"_btnGhost_h1z12_150",compact:"_compact_h1z12_173"}}]]),Qj={class:"apf-model3d"},Uj={class:"apf-model3d__header"},Oj={class:"apf-model3d__badge"},Ej={class:"apf-model3d__filename"},Pj={class:"apf-model3d__body"},_j={key:0,slot:"poster",class:"apf-model3d__hint"},qj={key:1,class:"apf-model3d__hint is-error"},$j={key:0,class:"apf-model3d__actions"},gQ=["href"],IQ=O(c.defineComponent({__name:"Model3dPreviewCard",props:{url:{},filename:{},mimeType:{},poster:{}},setup(C){const I=C,g=c.ref(!1),A=c.ref(null),i=c.computed(()=>{var a,d;const t=((d=(a=I.filename)==null?void 0:a.split(".").pop())==null?void 0:d.toLowerCase())||"";return["gltf","glb"].includes(t)?"glTF":t==="obj"?"OBJ":t==="stl"?"STL":t==="fbx"?"FBX":"3D"});function l(){g.value=!0,A.value=null}function e(){A.value="加载失败"}return(t,a)=>{const d=c.resolveComponent("model-viewer");return c.openBlock(),c.createElementBlock("div",Qj,[c.createElementVNode("div",Uj,[c.createElementVNode("span",Oj,c.toDisplayString(i.value),1),c.createElementVNode("span",Ej,c.toDisplayString(C.filename||"3D 模型"),1)]),c.createElementVNode("div",Pj,[c.createVNode(d,{src:C.url,poster:C.poster,"camera-controls":"","auto-rotate":"","shadow-intensity":"1",class:"apf-model3d__viewer",onLoad:l,onError:e},{default:c.withCtx(()=>[!g.value&&!A.value?(c.openBlock(),c.createElementBlock("div",_j,[c.createVNode(c.unref($),{name:"loading",size:24,class:"apf-model3d__spin"}),a[0]||(a[0]=c.createElementVNode("span",null,"加载 3D 模型中...",-1))])):c.createCommentVNode("",!0),A.value?(c.openBlock(),c.createElementBlock("div",qj,[c.createVNode(c.unref($),{name:"warning-filled",size:24}),c.createElementVNode("span",null,c.toDisplayString(A.value),1)])):c.createCommentVNode("",!0)]),_:1},8,["src","poster"])]),A.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",$j,[c.createElementVNode("a",{class:"apf-model3d__download",href:C.url,download:""},[c.createVNode(c.unref($),{name:"download",size:14}),a[1]||(a[1]=c.createTextVNode(" 下载 ",-1))],8,gQ)]))])}}}),[["__scopeId","data-v-b562b8bd"]]),CQ={class:"apf-image-generate"},AQ={class:"apf-image-generate__header"},iQ={class:"apf-image-generate__title-row"},lQ={key:0,class:"apf-image-generate__model"},eQ={key:0,class:"apf-image-generate__prompt"},tQ={class:"apf-image-generate__image-container"},aQ={key:0,class:"apf-image-generate__overlay"},cQ={key:1,class:"apf-image-generate__overlay apf-image-generate__overlay--error"},dQ=["src"],oQ={class:"apf-image-generate__zoom-hint"},nQ={key:3,class:"apf-image-generate__placeholder"},sQ={key:1,class:"apf-image-generate__meta"},ZQ={key:0},mQ={key:1},bQ={key:2},GQ={key:2,class:"apf-image-generate__actions"},rQ=O(c.defineComponent({__name:"ImageGenerateCard",props:{imageUrl:{},prompt:{},model:{},size:{},imageStyle:{},quality:{},loading:{type:Boolean},error:{}},emits:["download","regenerate"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(!1);function l(){if(!g.imageUrl)return;const o=document.createElement("a");o.href=g.imageUrl,o.download=`ai-image-${Date.now()}.png`,o.click(),A("download")}function e(){g.imageUrl&&(i.value=!0)}function t(){i.value=!1}const a={vivid:"鲜艳",natural:"自然"},d={standard:"标准",hd:"高清"};return(o,n)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",CQ,[c.createElementVNode("div",AQ,[c.createElementVNode("div",iQ,[c.createVNode(c.unref($),{name:"picture",size:16,style:{color:"#E6A23C"}}),n[1]||(n[1]=c.createElementVNode("span",{class:"apf-image-generate__title"},"AI 图片生成",-1))]),C.model?(c.openBlock(),c.createElementBlock("div",lQ,c.toDisplayString(C.model),1)):c.createCommentVNode("",!0)]),C.prompt?(c.openBlock(),c.createElementBlock("div",eQ,[n[2]||(n[2]=c.createElementVNode("span",{class:"apf-image-generate__prompt-label"},"Prompt:",-1)),c.createTextVNode(c.toDisplayString(C.prompt),1)])):c.createCommentVNode("",!0),c.createElementVNode("div",tQ,[C.loading?(c.openBlock(),c.createElementBlock("div",aQ,[...n[3]||(n[3]=[c.createElementVNode("div",{class:"apf-image-generate__spinner"},null,-1),c.createElementVNode("span",null,"正在生成图片...",-1)])])):C.error?(c.openBlock(),c.createElementBlock("div",cQ,[c.createVNode(c.unref($),{name:"warning",size:24}),c.createElementVNode("span",null,c.toDisplayString(C.error),1)])):C.imageUrl?(c.openBlock(),c.createElementBlock("div",{key:2,class:"apf-image-generate__image-wrap",onClick:e},[c.createElementVNode("img",{src:C.imageUrl,class:"apf-image-generate__image",alt:"AI generated image"},null,8,dQ),c.createElementVNode("div",oQ,[c.createVNode(c.unref($),{name:"full-screen",size:16}),n[4]||(n[4]=c.createElementVNode("span",null,"点击放大",-1))])])):(c.openBlock(),c.createElementBlock("div",nQ,[c.createVNode(c.unref($),{name:"picture",size:32}),n[5]||(n[5]=c.createElementVNode("span",null,"等待生成",-1))]))]),C.size||C.imageStyle||C.quality?(c.openBlock(),c.createElementBlock("div",sQ,[C.size?(c.openBlock(),c.createElementBlock("span",ZQ,[c.createVNode(c.unref($),{name:"full-screen",size:12}),c.createTextVNode(" "+c.toDisplayString(C.size),1)])):c.createCommentVNode("",!0),C.imageStyle?(c.openBlock(),c.createElementBlock("span",mQ,[c.createVNode(c.unref($),{name:"brush",size:12}),c.createTextVNode(" "+c.toDisplayString(a[C.imageStyle]??C.imageStyle),1)])):c.createCommentVNode("",!0),C.quality?(c.openBlock(),c.createElementBlock("span",bQ,[c.createVNode(c.unref($),{name:"picture",size:12}),c.createTextVNode(" "+c.toDisplayString(d[C.quality]??C.quality),1)])):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),!C.loading&&C.imageUrl?(c.openBlock(),c.createElementBlock("div",GQ,[c.createElementVNode("button",{type:"button",class:"apf-image-generate__btn apf-image-generate__btn--primary",onClick:l},[c.createVNode(c.unref($),{name:"download",size:14}),n[6]||(n[6]=c.createTextVNode(" 下载图片 ",-1))]),c.createElementVNode("button",{type:"button",class:"apf-image-generate__btn",onClick:n[0]||(n[0]=s=>A("regenerate"))},[c.createVNode(c.unref($),{name:"refresh",size:14}),n[7]||(n[7]=c.createTextVNode(" 重新生成 ",-1))])])):c.createCommentVNode("",!0)]),i.value&&C.imageUrl?(c.openBlock(),c.createBlock(c.unref(WC.ElImageViewer),{key:0,"url-list":[C.imageUrl],"initial-index":0,"close-on-press-escape":!0,teleported:"",onClose:t},null,8,["url-list"])):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-7f771b7c"]]),hQ=O(c.defineComponent({__name:"SchemaFormPreview",props:{fields:{},title:{default:"生成的表单"},compact:{type:Boolean,default:!1},labelWidth:{default:"100px"},labelPosition:{default:"right"},primaryActionLabel:{default:"确认发布"},showPrimaryAction:{type:Boolean}},emits:["click","primary-action"],setup(C,{emit:I}){const g=C,A=I,i=c.computed(()=>g.showPrimaryAction!==void 0?g.showPrimaryAction:!g.compact);return(l,e)=>{const t=c.resolveComponent("el-input"),a=c.resolveComponent("el-form-item"),d=c.resolveComponent("el-option"),o=c.resolveComponent("el-select"),n=c.resolveComponent("el-checkbox"),s=c.resolveComponent("el-checkbox-group"),Z=c.resolveComponent("el-radio"),m=c.resolveComponent("el-radio-group"),b=c.resolveComponent("el-switch"),G=c.resolveComponent("el-date-picker"),r=c.resolveComponent("el-time-picker"),h=c.resolveComponent("el-button"),u=c.resolveComponent("el-input-number"),B=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([l.$style.previewCard,{[l.$style.compact]:C.compact}]),onClick:e[1]||(e[1]=W=>A("click"))},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerLeft)},[c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerIcon)},[c.createVNode(c.unref($),{name:"grid",size:14})],2),c.createElementVNode("span",{class:c.normalizeClass(l.$style.title)},c.toDisplayString(C.title),3)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.headerRight)},[c.createElementVNode("span",{class:c.normalizeClass(l.$style.badge)},c.toDisplayString(C.fields.length)+" 个字段",3),c.createElementVNode("span",{class:c.normalizeClass(l.$style.viewHint)},[c.createVNode(c.unref($),{name:"view",size:12}),e[2]||(e[2]=c.createTextVNode(" 预览 ",-1))],2)],2)],2),c.createElementVNode("div",{class:c.normalizeClass(l.$style.previewBody)},[c.createVNode(B,{"label-width":C.labelWidth,"label-position":C.labelPosition,class:c.normalizeClass(l.$style.form)},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.fields,W=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:W.id},[["input","email","phone","password"].includes(W.type)?(c.openBlock(),c.createBlock(a,{key:0,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{placeholder:W.placeholder,clearable:W.clearable,"show-password":W.showPassword,maxlength:W.maxlength,disabled:C.compact,size:"default"},null,8,["placeholder","clearable","show-password","maxlength","disabled"])]),_:2},1032,["label","class"])):W.type==="textarea"?(c.openBlock(),c.createBlock(a,{key:1,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{type:"textarea",placeholder:W.placeholder,rows:3,disabled:C.compact},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="select"?(c.openBlock(),c.createBlock(a,{key:2,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(o,{placeholder:W.placeholder,clearable:W.clearable,disabled:C.compact,style:{width:"100%"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(d,{key:String(w.value),label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","clearable","disabled"])]),_:2},1032,["label","class"])):W.type==="checkbox"?(c.openBlock(),c.createBlock(a,{key:3,label:W.label||void 0,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(s,{disabled:C.compact},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(n,{key:String(w.value),label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:2},1032,["disabled"])]),_:2},1032,["label","class"])):W.type==="radio"?(c.openBlock(),c.createBlock(a,{key:4,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(m,{disabled:C.compact},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(W.options??[],w=>(c.openBlock(),c.createBlock(Z,{key:String(w.value),value:w.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["disabled"])]),_:2},1032,["label","class"])):W.type==="switch"?(c.openBlock(),c.createBlock(a,{key:5,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(b,{disabled:C.compact},null,8,["disabled"])]),_:1},8,["label","class"])):W.type==="date-picker"||W.type==="datepicker"?(c.openBlock(),c.createBlock(a,{key:6,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(G,{placeholder:W.placeholder,disabled:C.compact,style:{width:"100%"}},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="time-picker"||W.type==="timepicker"?(c.openBlock(),c.createBlock(a,{key:7,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(r,{placeholder:W.placeholder,disabled:C.compact,style:{width:"100%"}},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"])):W.type==="button"?(c.openBlock(),c.createBlock(a,{key:8,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(h,{type:W.buttonType??"default",disabled:C.compact},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(W.buttonText??W.label??"按钮"),1)]),_:2},1032,["type","disabled"])]),_:2},1032,["class"])):W.type==="number"?(c.openBlock(),c.createBlock(a,{key:9,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(u,{disabled:C.compact,style:{width:"100%"}},null,8,["disabled"])]),_:1},8,["label","class"])):(c.openBlock(),c.createBlock(a,{key:10,label:W.label,class:c.normalizeClass(l.$style.formItem)},{default:c.withCtx(()=>[c.createVNode(t,{placeholder:W.placeholder||W.type,disabled:C.compact},null,8,["placeholder","disabled"])]),_:2},1032,["label","class"]))],64))),128))]),_:1},8,["label-width","label-position","class"])],2),i.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(l.$style.actions)},[c.createVNode(h,{class:c.normalizeClass(l.$style.btnPrimary),type:"primary",onClick:e[0]||(e[0]=c.withModifiers(W=>A("primary-action"),["stop"]))},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"check",size:12}),c.createTextVNode(" "+c.toDisplayString(C.primaryActionLabel),1)]),_:1},8,["class"])],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{previewCard:"_previewCard_18hnt_2",compact:"_compact_18hnt_16",header:"_header_18hnt_21",headerLeft:"_headerLeft_18hnt_30",headerIcon:"_headerIcon_18hnt_36",title:"_title_18hnt_47",headerRight:"_headerRight_18hnt_53",badge:"_badge_18hnt_59",viewHint:"_viewHint_18hnt_67",previewBody:"_previewBody_18hnt_79",form:"_form_18hnt_83",formItem:"_formItem_18hnt_87",actions:"_actions_18hnt_95",btnOutline:"_btnOutline_18hnt_105",btnPrimary:"_btnPrimary_18hnt_127"}}]]),uQ=O(c.defineComponent({__name:"WorkflowRunTimeline",props:{title:{},status:{},progressText:{},steps:{},defaultCollapsed:{type:Boolean,default:!1},emptyText:{default:"等待首个节点开始…"}},setup(C){const I=C,g=c.ref(I.defaultCollapsed);c.watch(()=>I.status,a=>{a==="running"&&(g.value=!1)});const A={running:"loading",success:"circle-check",error:"circle-close-filled",waiting:"clock",skipped:"minus",pending:"more-filled"},i=c.computed(()=>{const a=I.status;return a?`status${a.charAt(0).toUpperCase()}${a.slice(1)}`:""});function l(a){return`icon${a.charAt(0).toUpperCase()}${a.slice(1)}`}function e(a){return A[a]??"more-filled"}function t(){g.value=!g.value}return(a,d)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([a.$style.block,a.$style[i.value]])},[c.createElementVNode("button",{type:"button",class:c.normalizeClass(a.$style.header),onClick:t},[c.createElementVNode("span",{class:c.normalizeClass(a.$style.headerLeft)},[c.createVNode(c.unref($),{name:g.value?"arrow-right":"arrow-down",size:12,class:c.normalizeClass(a.$style.chevron)},null,8,["name","class"]),c.createElementVNode("span",{class:c.normalizeClass(a.$style.title)},c.toDisplayString(C.title),3)],2),C.progressText?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.progress)},c.toDisplayString(C.progressText),3)):c.createCommentVNode("",!0)],2),g.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(a.$style.timeline)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.steps,(o,n)=>(c.openBlock(),c.createElementBlock("div",{key:o.id,class:c.normalizeClass([a.$style.item,o.status==="running"&&a.$style.itemRunning,o.streaming&&a.$style.itemStreaming])},[c.createElementVNode("div",{class:c.normalizeClass(a.$style.rail)},[c.createElementVNode("span",{class:c.normalizeClass([a.$style.iconWrap,a.$style[l(o.status)]])},[c.createVNode(c.unref($),{name:e(o.status),size:14,class:c.normalizeClass(o.status==="running"?a.$style.spin:void 0)},null,8,["name","class"])],2),n<C.steps.length-1?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.connector)},null,2)):c.createCommentVNode("",!0)],2),c.createElementVNode("div",{class:c.normalizeClass(a.$style.body)},[c.createElementVNode("span",{class:c.normalizeClass(a.$style.nodeName)},c.toDisplayString(o.label),3),o.hint?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(a.$style.nodeHint)},c.toDisplayString(o.hint),3)):c.createCommentVNode("",!0),c.renderSlot(a.$slots,"step",{step:o})],2)],2))),128)),C.steps.length?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(a.$style.empty)},c.toDisplayString(C.emptyText),3))],2))],2))}}),[["__cssModules",{$style:{block:"_block_2l73c_2",statusRunning:"_statusRunning_2l73c_10",statusError:"_statusError_2l73c_14",statusWaiting:"_statusWaiting_2l73c_18",header:"_header_2l73c_22",headerLeft:"_headerLeft_2l73c_39",chevron:"_chevron_2l73c_46",title:"_title_2l73c_51",progress:"_progress_2l73c_60",timeline:"_timeline_2l73c_66",item:"_item_2l73c_70",itemRunning:"_itemRunning_2l73c_76",nodeName:"_nodeName_2l73c_76",itemStreaming:"_itemStreaming_2l73c_81",iconWrap:"_iconWrap_2l73c_81",rail:"_rail_2l73c_85",iconSuccess:"_iconSuccess_2l73c_104",iconError:"_iconError_2l73c_109",iconRunning:"_iconRunning_2l73c_114",iconWaiting:"_iconWaiting_2l73c_119",iconSkipped:"_iconSkipped_2l73c_124",spin:"_spin_2l73c_129",connector:"_connector_2l73c_138",body:"_body_2l73c_146",nodeHint:"_nodeHint_2l73c_160",empty:"_empty_2l73c_166"}}]]),BQ=["tabindex","aria-label"],WQ=O(c.defineComponent({__name:"SuggestionCard",props:{suggestion:{},accepted:{type:Boolean},dismissed:{type:Boolean}},emits:["accept","dismiss"],setup(C,{emit:I}){const g=C,A=I,i={action:{icon:"promotion",label:"操作",color:"#409EFF"},optimization:{icon:"magic-stick",label:"优化",color:"#E6A23C"},reference:{icon:"document",label:"参考",color:"#67C23A"}},l={high:{label:"高",color:"#F56C6C",bgColor:"#fef0f0"},medium:{label:"中",color:"#E6A23C",bgColor:"#fdf6ec"},low:{label:"低",color:"#909399",bgColor:"#f4f4f5"}},e=c.computed(()=>i[g.suggestion.type]??i.action),t=c.computed(()=>l[g.suggestion.priority]??l.medium),a=c.computed(()=>!g.accepted&&!g.dismissed);function d(){a.value&&A("accept",g.suggestion.id)}function o(){a.value&&A("dismiss",g.suggestion.id)}function n(s){a.value&&(s.key==="Enter"||s.key===" "?(s.preventDefault(),d()):s.key==="Escape"&&(s.preventDefault(),o()))}return(s,Z)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([s.$style.card,C.accepted&&s.$style.accepted,C.dismissed&&s.$style.dismissed]),tabindex:a.value?0:-1,role:"article","aria-label":`建议: ${C.suggestion.title}`,onKeydown:n},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.header)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.typeBadge),style:c.normalizeStyle({color:e.value.color})},[c.createVNode(c.unref($),{name:e.value.icon,size:14},null,8,["name"]),c.createElementVNode("span",null,c.toDisplayString(e.value.label),1)],6),c.createElementVNode("div",{class:c.normalizeClass(s.$style.priorityBadge),style:c.normalizeStyle({color:t.value.color,background:t.value.bgColor})},c.toDisplayString(t.value.label)+"优先 ",7)],2),c.createElementVNode("div",{class:c.normalizeClass(s.$style.body)},[c.createElementVNode("div",{class:c.normalizeClass(s.$style.title)},c.toDisplayString(C.suggestion.title),3),c.createElementVNode("div",{class:c.normalizeClass(s.$style.description)},c.toDisplayString(C.suggestion.description),3),C.suggestion.targetName?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.target)},[c.createVNode(c.unref($),{name:"connection",size:12}),c.createElementVNode("span",null,c.toDisplayString(C.suggestion.targetName),1)],2)):c.createCommentVNode("",!0)],2),a.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(s.$style.actions)},[c.createElementVNode("button",{class:c.normalizeClass(s.$style.acceptBtn),type:"button",onClick:d},[c.createVNode(c.unref($),{name:"check",size:14}),Z[0]||(Z[0]=c.createTextVNode(" 采纳 ",-1))],2),c.createElementVNode("button",{class:c.normalizeClass(s.$style.dismissBtn),type:"button",onClick:o},[c.createVNode(c.unref($),{name:"close",size:14}),Z[1]||(Z[1]=c.createTextVNode(" 忽略 ",-1))],2)],2)):c.createCommentVNode("",!0),C.accepted?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(s.$style.statusBadge)},[c.createVNode(c.unref($),{name:"check",size:14}),Z[2]||(Z[2]=c.createTextVNode(" 已采纳 ",-1))],2)):c.createCommentVNode("",!0),C.dismissed?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass([s.$style.statusBadge,s.$style.statusDismissed])},[c.createVNode(c.unref($),{name:"close",size:14}),Z[3]||(Z[3]=c.createTextVNode(" 已忽略 ",-1))],2)):c.createCommentVNode("",!0)],42,BQ))}}),[["__cssModules",{$style:{card:"_card_69ko9_2",accepted:"_accepted_69ko9_21",dismissed:"_dismissed_69ko9_31",header:"_header_69ko9_36",typeBadge:"_typeBadge_69ko9_43",priorityBadge:"_priorityBadge_69ko9_51",body:"_body_69ko9_58",title:"_title_69ko9_62",description:"_description_69ko9_69",target:"_target_69ko9_75",actions:"_actions_69ko9_84",acceptBtn:"_acceptBtn_69ko9_91",dismissBtn:"_dismissBtn_69ko9_92",statusBadge:"_statusBadge_69ko9_132",statusDismissed:"_statusDismissed_69ko9_144"}}]]),wQ=["onClick"],YQ=O(c.defineComponent({__name:"ConversationSearchBar",props:{modelValue:{},searching:{type:Boolean,default:!1},panelVisible:{type:Boolean,default:!1},results:{},total:{default:0},sourceOptions:{},sourceFilter:{default:""},startDate:{default:""},endDate:{default:""},filtersExpanded:{type:Boolean,default:!1},placeholder:{default:"搜索对话..."}},emits:["update:modelValue","update:sourceFilter","update:startDate","update:endDate","update:filtersExpanded","update:panelVisible","select","clear","search"],setup(C,{emit:I}){const g=[{value:"",label:"全部来源"},{value:"editor",label:"Editor"},{value:"flow",label:"Flow"},{value:"standalone",label:"AI"}],A=C,i=I,l=c.computed(()=>A.sourceOptions??g),e=c.computed(()=>A.startDate!==""||A.endDate!==""||A.sourceFilter!=="");function t(m){const b=new Date(m),G=r=>String(r).padStart(2,"0");return`${b.getFullYear()}${G(b.getMonth()+1)}${G(b.getDate())} ${G(b.getHours())}${G(b.getMinutes())}${G(b.getSeconds())}`}function a(m){if(!m)return"AI";const b=l.value.find(G=>G.value===m);return b!=null&&b.label?b.label:m==="editor"?"Editor":m==="flow"?"Flow":"AI"}function d(m){return m==="editor"?"success":m==="flow"?"primary":"warning"}function o(){i("update:modelValue",""),i("update:startDate",""),i("update:endDate",""),i("update:sourceFilter",""),i("update:panelVisible",!1),i("clear")}function n(m){i("select",m)}function s(){i("update:filtersExpanded",!A.filtersExpanded)}function Z(m,b){const G=b??"";i(m==="start"?"update:startDate":"update:endDate",G)}return(m,b)=>{const G=c.resolveComponent("el-input"),r=c.resolveComponent("el-button"),h=c.resolveComponent("el-option"),u=c.resolveComponent("el-select"),B=c.resolveComponent("el-date-picker"),W=c.resolveComponent("el-popover"),w=c.resolveComponent("el-tag");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(m.$style.root)},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.searchRow)},[c.createVNode(G,{"model-value":C.modelValue,placeholder:C.placeholder,size:"small",clearable:"","onUpdate:modelValue":b[0]||(b[0]=Y=>i("update:modelValue",Y)),onClear:o,onKeyup:b[1]||(b[1]=c.withKeys(Y=>i("search"),["enter"]))},{prefix:c.withCtx(()=>[c.createVNode(c.unref($),{name:"search",size:14})]),_:1},8,["model-value","placeholder"]),c.createVNode(W,{visible:C.filtersExpanded,placement:"bottom-end",width:220,trigger:"click","show-arrow":!1,offset:4},{reference:c.withCtx(()=>[c.createVNode(r,{size:"small",type:e.value?"primary":"default",link:!e.value,onClick:s},{default:c.withCtx(()=>[c.createVNode(c.unref($),{name:"filter",size:14})]),_:1},8,["type","link"])]),default:c.withCtx(()=>[c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterPanel)},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterRow)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterLabel)},"来源",2),c.createVNode(u,{"model-value":C.sourceFilter,size:"small",placeholder:"全部",style:{flex:"1"},"onUpdate:modelValue":b[2]||(b[2]=Y=>i("update:sourceFilter",Y))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(l.value,Y=>(c.openBlock(),c.createBlock(h,{key:Y.value,label:Y.label,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])],2),c.createElementVNode("div",{class:c.normalizeClass(m.$style.filterRow)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterLabel)},"时间",2),c.createVNode(B,{"model-value":C.startDate||null,type:"date",placeholder:"开始",size:"small","value-format":"YYYY-MM-DD",style:{flex:"1"},"onUpdate:modelValue":b[3]||(b[3]=Y=>Z("start",Y))},null,8,["model-value"]),c.createElementVNode("span",{class:c.normalizeClass(m.$style.filterSep)},"~",2),c.createVNode(B,{"model-value":C.endDate||null,type:"date",placeholder:"结束",size:"small","value-format":"YYYY-MM-DD",style:{flex:"1"},"onUpdate:modelValue":b[4]||(b[4]=Y=>Z("end",Y))},null,8,["model-value"])],2)],2)]),_:1},8,["visible"])],2),C.panelVisible?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(m.$style.results)},[C.searching?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(m.$style.empty)},"搜索中...",2)):C.results.length>0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("div",{class:c.normalizeClass(m.$style.resultCount)},"找到 "+c.toDisplayString(C.total)+" 条结果",3),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.results,Y=>(c.openBlock(),c.createElementBlock("div",{key:Y.id,class:c.normalizeClass(m.$style.resultItem),onClick:p=>n(Y.id)},[c.createElementVNode("span",{class:c.normalizeClass(m.$style.resultTitle)},c.toDisplayString(Y.title),3),c.createVNode(w,{type:d(Y.source),size:"small"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a(Y.source)),1)]),_:2},1032,["type"]),Y.updatedAt?(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(m.$style.resultTime)},c.toDisplayString(t(Y.updatedAt)),3)):c.createCommentVNode("",!0)],10,wQ))),128))],64)):(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(m.$style.empty)},"无匹配对话",2))],2)):c.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{root:"_root_x8tmk_2",searchRow:"_searchRow_x8tmk_8",filterPanel:"_filterPanel_x8tmk_16",filterRow:"_filterRow_x8tmk_22",filterLabel:"_filterLabel_x8tmk_28",filterSep:"_filterSep_x8tmk_35",results:"_results_x8tmk_40",resultCount:"_resultCount_x8tmk_46",resultItem:"_resultItem_x8tmk_53",resultTitle:"_resultTitle_x8tmk_71",resultTime:"_resultTime_x8tmk_82",empty:"_empty_x8tmk_88"}}]]),VQ={class:"apf-task-chain"},pQ={class:"apf-task-chain__label"},yQ={class:"apf-task-chain__steps"},NQ=["data-step"],XQ={class:"apf-task-chain__icon"},RQ={class:"apf-task-chain__agent"},HQ={class:"apf-task-chain__desc"},SQ={key:0,class:"apf-task-chain__arrow"},MQ=O(c.defineComponent({__name:"TaskChainBar",props:{steps:{},currentIndex:{},label:{default:"任务链"}},setup(C){const I=C,g=c.ref();function A(l){switch(l){case"done":return"✓";case"running":return"●";case"skipped":return"○";case"error":return"!";default:return"○"}}function i(l){return l==="editor"?"表单":l==="flow"?"流程":l==="page"?"页面":l}return c.watch(()=>I.currentIndex,()=>{c.nextTick(()=>{const l=g.value;if(!l)return;const t=l.querySelectorAll("[data-step]")[I.currentIndex];t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}),(l,e)=>(c.openBlock(),c.createElementBlock("div",VQ,[c.createElementVNode("div",pQ,c.toDisplayString(C.label),1),c.createElementVNode("div",{ref_key:"scrollbarRef",ref:g,class:"apf-task-chain__scroll"},[c.createElementVNode("div",yQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.steps,(t,a)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:a},[c.createElementVNode("div",{"data-step":a,class:c.normalizeClass(["apf-task-chain__step",[t.status?`is-${t.status}`:"is-pending",{"is-current":a===C.currentIndex}]])},[c.createElementVNode("span",XQ,c.toDisplayString(A(t.status)),1),c.createElementVNode("span",RQ,c.toDisplayString(i(t.agent)),1),c.createElementVNode("span",HQ,c.toDisplayString(t.description),1)],10,NQ),a<C.steps.length-1?(c.openBlock(),c.createElementBlock("div",SQ,"→")):c.createCommentVNode("",!0)],64))),128))])],512)]))}}),[["__scopeId","data-v-31bc7b98"]]),DQ={class:"apf-rag-panel"},KQ={class:"apf-rag-panel__header"},FQ=["value","placeholder"],zQ={key:0,class:"apf-rag-panel__spinner","aria-label":"加载中"},JQ={key:0,class:"apf-rag-panel__chips"},vQ={class:"apf-rag-panel__chip-name"},kQ=["onClick"],LQ={class:"apf-rag-panel__list"},TQ=["onClick"],xQ={class:"apf-rag-panel__info"},fQ={class:"apf-rag-panel__name"},jQ={key:0,class:"apf-rag-panel__desc"},QQ={key:1,class:"apf-rag-panel__tags"},UQ={key:0,class:"apf-rag-panel__tag"},OQ={key:1,class:"apf-rag-panel__empty"},EQ={key:2,class:"apf-rag-panel__empty"},PQ={class:"apf-rag-panel__footer"},_Q=O(c.defineComponent({__name:"RagContextPanel",props:{results:{},selected:{},loading:{type:Boolean,default:!1},query:{default:""},placeholder:{default:"智能匹配 Schema,如:用户注册表单..."},emptyHint:{default:"未找到匹配的 Schema"},idleHint:{default:"输入自然语言描述,智能匹配已有 Schema"},footerHint:{default:"选择 Schema 注入对话上下文"},selectedFooterHint:{default:"已选 {n} 个 Schema 作为上下文"}},emits:["update:query","search","select","remove","close"],setup(C,{emit:I}){const g=C,A=I,i=c.ref(g.query);c.watch(()=>g.query,o=>{o!==i.value&&(i.value=o)});function l(o){i.value=o,A("update:query",o),A("search",o)}function e(o){return g.selected.some(n=>n.id===o.id)}function t(o){e(o)||A("select",o)}function a(o){return o>=70?"high":o>=40?"medium":"low"}const d=c.computed(()=>g.selected.length>0?g.selectedFooterHint.replace("{n}",String(g.selected.length)):g.footerHint);return(o,n)=>(c.openBlock(),c.createElementBlock("div",DQ,[c.createElementVNode("div",KQ,[n[2]||(n[2]=c.createElementVNode("svg",{class:"apf-rag-panel__icon",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[c.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),c.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),c.createElementVNode("input",{class:"apf-rag-panel__input",value:i.value,placeholder:C.placeholder,onInput:n[0]||(n[0]=s=>l(s.target.value))},null,40,FQ),C.loading?(c.openBlock(),c.createElementBlock("span",zQ)):c.createCommentVNode("",!0)]),C.selected.length>0?(c.openBlock(),c.createElementBlock("div",JQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.selected,s=>(c.openBlock(),c.createElementBlock("span",{key:s.id,class:"apf-rag-panel__chip"},[c.createElementVNode("span",vQ,c.toDisplayString(s.name),1),c.createElementVNode("button",{type:"button",class:"apf-rag-panel__chip-remove",title:"移除",onClick:Z=>A("remove",s.id)}," × ",8,kQ)]))),128))])):c.createCommentVNode("",!0),c.createElementVNode("div",LQ,[C.results.length>0?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(C.results,s=>{var Z;return c.openBlock(),c.createElementBlock("button",{key:s.id,type:"button",class:c.normalizeClass(["apf-rag-panel__item",{"is-selected":e(s)}]),onClick:m=>t(s)},[c.createElementVNode("div",{class:c.normalizeClass(["apf-rag-panel__score",`is-${a(s.score)}`])},c.toDisplayString(s.score),3),c.createElementVNode("div",xQ,[c.createElementVNode("div",fQ,c.toDisplayString(s.name),1),s.description?(c.openBlock(),c.createElementBlock("div",jQ,c.toDisplayString(s.description),1)):c.createCommentVNode("",!0),(Z=s.tags)!=null&&Z.length?(c.openBlock(),c.createElementBlock("div",QQ,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.tags.slice(0,5),m=>(c.openBlock(),c.createElementBlock("span",{key:m,class:"apf-rag-panel__tag"},c.toDisplayString(m),1))),128)),s.tags.length>5?(c.openBlock(),c.createElementBlock("span",UQ," +"+c.toDisplayString(s.tags.length-5),1)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)])],10,TQ)}),128)):!C.loading&&i.value.trim()?(c.openBlock(),c.createElementBlock("div",OQ,[n[3]||(n[3]=c.createElementVNode("div",{class:"apf-rag-panel__empty-icon"},"⌕",-1)),c.createElementVNode("div",null,c.toDisplayString(C.emptyHint),1)])):C.loading?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",EQ,[n[4]||(n[4]=c.createElementVNode("div",{class:"apf-rag-panel__empty-icon"},"✦",-1)),c.createElementVNode("div",null,c.toDisplayString(C.idleHint),1)]))]),c.createElementVNode("div",PQ,[c.createElementVNode("span",null,c.toDisplayString(d.value),1),c.createElementVNode("button",{type:"button",class:"apf-rag-panel__close",onClick:n[1]||(n[1]=s=>A("close"))},"关闭")])]))}}),[["__scopeId","data-v-c6864f2d"]]),qQ={class:"apf-assistant-picker"},$Q={key:0,class:"apf-assistant-picker__state"},gU={key:1,class:"apf-assistant-picker__state apf-assistant-picker__state--error"},IU={key:2,class:"apf-assistant-picker__state"},CU=["onClick"],AU={class:"apf-assistant-picker__main"},iU={class:"apf-assistant-picker__icon-wrap"},lU={class:"apf-assistant-picker__info"},eU={class:"apf-assistant-picker__caps"},tU=O(c.defineComponent({__name:"AssistantPicker",props:{items:{},modelValue:{},loading:{type:Boolean,default:!1},error:{default:null}},emits:["update:modelValue","select"],setup(C,{emit:I}){const g=C,A=I;function i(a){var o,n;const d=["文本"];return(o=a.supportedInputs)!=null&&o.includes("file")&&d.push("文件"),(n=a.supportedInputs)!=null&&n.includes("image")&&d.push("图片"),a.hitlCapable&&d.push("需要确认"),d}function l(a){return a.icon||"chat-dot-round"}function e(a){A("update:modelValue",a.id),A("select",a)}const t=c.computed(()=>!g.loading&&!g.error&&!g.items.length);return(a,d)=>(c.openBlock(),c.createElementBlock("div",qQ,[C.loading?(c.openBlock(),c.createElementBlock("div",$Q,[...d[0]||(d[0]=[c.createElementVNode("p",null,"正在加载智能体…",-1)])])):C.error?(c.openBlock(),c.createElementBlock("div",gU,[c.createElementVNode("p",null,c.toDisplayString(C.error),1)])):t.value?(c.openBlock(),c.createElementBlock("div",IU,[...d[1]||(d[1]=[c.createElementVNode("p",null,"暂无可用智能体",-1)])])):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.items,o=>(c.openBlock(),c.createElementBlock("button",{key:o.id,type:"button",class:c.normalizeClass(["apf-assistant-picker__item",{"is-active":C.modelValue===o.id}]),onClick:n=>e(o)},[c.createElementVNode("div",AU,[c.createElementVNode("span",iU,[c.createVNode(c.unref($),{name:l(o),size:22},null,8,["name"])]),c.createElementVNode("span",lU,[c.createElementVNode("b",null,c.toDisplayString(o.name),1),c.createElementVNode("small",null,c.toDisplayString(o.description||"适合处理一类明确任务"),1),c.createElementVNode("span",eU,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i(o),n=>(c.openBlock(),c.createElementBlock("span",{key:n,class:c.normalizeClass(["apf-assistant-picker__cap",{"is-confirm":n==="需要确认"}])},c.toDisplayString(n),3))),128))])])]),c.createElementVNode("span",{class:c.normalizeClass(["apf-assistant-picker__choose",{"is-selected":C.modelValue===o.id}])},c.toDisplayString(C.modelValue===o.id?"已选择":"开始使用"),3)],10,CU))),128))]))}}),[["__scopeId","data-v-f05e69c0"]]),aU={class:"apf-model-picker"},cU=O(c.defineComponent({__name:"ModelPicker",props:{models:{},modelValue:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(C,{emit:I}){const g=I;return(A,i)=>{const l=c.resolveComponent("el-option"),e=c.resolveComponent("el-select");return c.openBlock(),c.createElementBlock("label",aU,[c.createVNode(e,{"model-value":C.modelValue||void 0,disabled:C.loading||!C.models.length,placeholder:"选择模型","onUpdate:modelValue":i[0]||(i[0]=t=>g("update:modelValue",t))},{default:c.withCtx(()=>[C.loading?(c.openBlock(),c.createBlock(l,{key:0,label:"正在加载模型…",value:"",disabled:""})):C.models.length?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(l,{key:1,label:"暂无可用模型",value:"",disabled:""})),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(C.models,t=>(c.openBlock(),c.createBlock(l,{key:t.id,label:`${t.name} · ${t.provider}`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["model-value","disabled"])])}}}),[["__scopeId","data-v-483ae73d"]]);function dU(C){const{containerRef:I,autoScroll:g=!0,behavior:A="smooth",offset:i=50}=C,l=c.ref(!0),e=c.ref(g);function t(){const Z=I.value;if(!Z)return!0;const{scrollTop:m,scrollHeight:b,clientHeight:G}=Z;return b-m-G<i}async function a(Z=!0){if(!Z&&!e.value)return;await c.nextTick();const m=I.value;m&&m.scrollTo({top:m.scrollHeight,behavior:A})}function d(Z){const m=I.value;m&&m.scrollTo({top:Z,behavior:A})}function o(){e.value=!0}function n(){e.value=!1}function s(){l.value=t(),l.value&&(e.value=!0)}return c.onMounted(()=>{const Z=I.value;Z&&(Z.addEventListener("scroll",s),l.value=t())}),c.onUnmounted(()=>{const Z=I.value;Z&&Z.removeEventListener("scroll",s)}),{scrollToBottom:a,scrollTo:d,isAtBottom:l,autoScrollEnabled:e,checkIfAtBottom:t,enableAutoScroll:o,disableAutoScroll:n}}const oU={class:"apf-bpmn-node"},nU={class:"apf-bpmn-node__label"},Aw=O(c.defineComponent({__name:"PreviewStartEvent",props:{data:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",oU,[g[0]||(g[0]=c.createElementVNode("div",{class:"apf-bpmn-start"},[c.createElementVNode("div",{class:"apf-bpmn-start__inner"})],-1)),c.createElementVNode("div",nU,c.toDisplayString(C.data.label),1),c.createVNode(c.unref(AC.Handle),{type:"source",position:c.unref(AC.Position).Bottom},null,8,["position"])]))}}),[["__scopeId","data-v-06a5d706"]]),sU={class:"apf-bpmn-node"},ZU={class:"apf-bpmn-node__label"},iw=O(c.defineComponent({__name:"PreviewEndEvent",props:{data:{}},setup(C){return(I,g)=>(c.openBlock(),c.createElementBlock("div",sU,[c.createVNode(c.unref(AC.Handle),{type:"target",position:c.unref(AC.Position).Top},null,8,["position"]),g[0]||(g[0]=c.createElementVNode("div",{class:"apf-bpmn-end"},[c.createElementVNode("div",{class:"apf-bpmn-end__inner"})],-1)),c.createElementVNode("div",ZU,c.toDisplayString(C.data.label),1)]))}}),[["__scopeId","data-v-6c6caa4e"]]),mU={class:"apf-bpmn-node"},bU={class:"apf-bpmn-task"},GU={class:"apf-bpmn-task__icon"},rU={class:"apf-bpmn-task__label"},lw=O(c.defineComponent({__name:"PreviewTask",props:{data:{}},setup(C){const I={userTask:"👤",serviceTask:"⚙",scriptTask:"📜",sendTask:"📤",receiveTask:"📥"};return(g,A)=>(c.openBlock(),c.createElementBlock("div",mU,[c.createVNode(c.unref(AC.Handle),{type:"target",position:c.unref(AC.Position).Top},null,8,["position"]),c.createElementVNode("div",bU,[c.createElementVNode("span",GU,c.toDisplayString(I[C.data.bpmnType]||"📋"),1),c.createElementVNode("span",rU,c.toDisplayString(C.data.label),1)]),c.createVNode(c.unref(AC.Handle),{type:"source",position:c.unref(AC.Position).Bottom},null,8,["position"])]))}}),[["__scopeId","data-v-5b6a4a18"]]),hU={class:"apf-bpmn-node"},uU={class:"apf-bpmn-gateway"},BU={class:"apf-bpmn-gateway__icon"},WU={class:"apf-bpmn-node__label"},ew=O(c.defineComponent({__name:"PreviewGateway",props:{data:{}},setup(C){const I={exclusiveGateway:"✕",parallelGateway:"+",inclusiveGateway:"◎"};return(g,A)=>(c.openBlock(),c.createElementBlock("div",hU,[c.createVNode(c.unref(AC.Handle),{type:"target",position:c.unref(AC.Position).Top},null,8,["position"]),c.createElementVNode("div",uU,[c.createElementVNode("span",BU,c.toDisplayString(I[C.data.bpmnType]||"◆"),1)]),c.createElementVNode("div",WU,c.toDisplayString(C.data.label),1),c.createVNode(c.unref(AC.Handle),{type:"source",position:c.unref(AC.Position).Bottom},null,8,["position"])]))}}),[["__scopeId","data-v-3ff1b368"]]),wU=O(c.defineComponent({__name:"BpmnFlowPreviewCanvas",props:{nodes:{},edges:{},flowId:{}},emits:["node-click","fit-view"],setup(C,{expose:I,emit:g}){const A=C,i=g,l=A.flowId??`apf-bpmn-preview-${Math.random().toString(36).slice(2,8)}`,e=c.computed(()=>A.nodes.map(n=>({id:n.id,type:n.type,position:n.position,data:n.data,draggable:!0}))),t=c.computed(()=>A.edges.map(n=>({id:n.id,source:n.source,target:n.target,label:n.label,type:"smoothstep",animated:!0,markerEnd:{type:AC.MarkerType.ArrowClosed},style:{stroke:"var(--c-info, #4581e9)",strokeWidth:1.5}}))),{onNodeClick:a,fitView:d}=AC.useVueFlow({id:l});a(({node:n})=>{i("node-click",n.id,n.data)});function o(){d({padding:.2}),i("fit-view")}return c.watch(()=>[A.nodes,A.edges],async()=>{await c.nextTick(),setTimeout(()=>d({padding:.2}),100)},{deep:!0}),I({fitView:o}),(n,s)=>(c.openBlock(),c.createBlock(c.unref(AC.VueFlow),{id:c.unref(l),nodes:e.value,edges:t.value,"nodes-draggable":!0,"nodes-connectable":!1,"edges-updatable":!1,"elements-selectable":!0,"default-viewport":{zoom:.8,x:0,y:0},"min-zoom":.2,"max-zoom":2,"fit-view-on-init":"",class:"apf-bpmn-canvas"},{"node-start-event":c.withCtx(Z=>[c.createVNode(Aw,c.normalizeProps(c.guardReactiveProps(Z)),null,16)]),"node-end-event":c.withCtx(Z=>[c.createVNode(iw,c.normalizeProps(c.guardReactiveProps(Z)),null,16)]),"node-task":c.withCtx(Z=>[c.createVNode(lw,c.normalizeProps(c.guardReactiveProps(Z)),null,16)]),"node-gateway":c.withCtx(Z=>[c.createVNode(ew,c.normalizeProps(c.guardReactiveProps(Z)),null,16)]),default:c.withCtx(()=>[c.createVNode(c.unref(p9.Background),{gap:16,size:.6,color:"#e0e5ec"}),c.createVNode(c.unref(y9.Controls),{"show-interactive":!1})]),_:1},8,["id","nodes","edges"]))}}),[["__scopeId","data-v-41401ec3"]]),tw={startEvent:"start-event",endEvent:"end-event",userTask:"task",serviceTask:"task",scriptTask:"task",sendTask:"task",receiveTask:"task",exclusiveGateway:"gateway",parallelGateway:"gateway",inclusiveGateway:"gateway"};function YU(C){return tw[C]??"task"}const aw=Symbol("fg-toast");function VU(C){return{[aw]:C}}function pU(){const C=c.inject(aw);return{show(I,g="info",A){var i;(i=C==null?void 0:C.value)==null||i.show(I,g,A)},info(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"info",g)},success(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"success",g)},warning(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"warning",g)},error(I,g){var A;(A=C==null?void 0:C.value)==null||A.show(I,"error",g)}}}function yU(){async function C(A,i={}){const{title:l="确认操作",type:e="warning",confirmButtonText:t="确定",cancelButtonText:a="取消"}=i;try{return await WC.ElMessageBox.confirm(A,l,{confirmButtonText:t,cancelButtonText:a,type:e}),!0}catch{return!1}}async function I(A,i={}){return C(`此操作将永久删除${A},是否继续?`,{title:"确认删除",type:"warning",confirmButtonText:"确认删除",...i})}async function g(A,i={}){return C(A,{title:"确认操作",type:"warning",...i})}return{confirm:C,confirmDelete:I,confirmDanger:g}}function NU(){return{success(C,I={}){WC.ElMessage({message:C,type:"success",...I})},error(C,I={}){WC.ElMessage({message:C,type:"error",...I})},warning(C,I={}){WC.ElMessage({message:C,type:"warning",...I})},info(C,I={}){WC.ElMessage({message:C,type:"info",...I})}}}function XU(C,I=300){const g=c.ref(null);function A(...i){g.value&&clearTimeout(g.value),g.value=setTimeout(()=>{C(...i),g.value=null},I)}return c.onUnmounted(()=>{g.value&&clearTimeout(g.value)}),A}function RU(C,I){var t;const g=c.ref(1),A=c.ref((I==null?void 0:I.initialPageSize)??zZ),i=c.computed(()=>{const a=C.value,d=(g.value-1)*A.value;return a.slice(d,d+A.value)}),l=c.computed(()=>C.value.length);function e(){g.value=1}return c.watch(A,()=>{g.value=1},{flush:"sync"}),c.watch(C,a=>{const d=Math.max(1,Math.ceil(a.length/A.value)||1);g.value>d&&(g.value=d)}),(t=I==null?void 0:I.resetOn)!=null&&t.length&&c.watch(I.resetOn,()=>{e()}),{currentPage:g,pageSize:A,pagedItems:i,total:l,resetPage:e}}function HU(C={}){const{timeout:I=15e3,silentError:g=!1}=C,A=c.ref(!1),i=c.ref(null),l=c.ref(!1),e=c.computed(()=>i.value!==null);let t=null,a=0;function d(){a++,a===1&&(A.value=!0,i.value=null,l.value=!1,t=setTimeout(()=>{l.value=!0},I))}function o(){a=Math.max(0,a-1),a===0&&(A.value=!1,l.value=!1,t&&(clearTimeout(t),t=null))}async function n(Z){d();try{return await Z()}catch(m){return g||(i.value=m instanceof Error?m.message:"加载失败"),null}finally{o()}}function s(){a=0,A.value=!1,i.value=null,l.value=!1,t&&(clearTimeout(t),t=null)}return{loading:A,error:i,timedOut:l,hasError:e,withLoading:n,reset:s}}const cm=new Map;function SU(C){const{url:I,token:g,projectId:A,reconnectInterval:i=3e3,maxRetries:l=1/0}=C;let e=cm.get(I);e||(e={ws:null,status:c.ref("closed"),refCount:0,handlers:new Map,subscribedProjects:new Set,reconnectTimer:null,pingTimer:null,pongTimer:null,retries:0,reconnectInterval:i,maxRetries:l,intentionalClose:!1,token:g},cm.set(I,e)),e.refCount+=1,e.reconnectInterval=i,e.maxRetries=l,e.token=g;const t=[],a=e.status,d=()=>c.toValue(A);function o(){e&&(e.pingTimer&&clearInterval(e.pingTimer),e.pongTimer&&clearTimeout(e.pongTimer),e.pingTimer=null,e.pongTimer=null)}function n(){e&&(o(),e.pingTimer=setInterval(()=>{!(e!=null&&e.ws)||e.ws.readyState!==WebSocket.OPEN||(e.ws.send(JSON.stringify({action:"ping"})),e.pongTimer&&clearTimeout(e.pongTimer),e.pongTimer=setTimeout(()=>{var B;(B=e==null?void 0:e.ws)==null||B.close()},6e4))},3e4))}function s(){if(!e||e.intentionalClose)return;if(e.retries>=e.maxRetries){e.status.value="error";return}const B=Math.min(e.reconnectInterval*2**e.retries,3e4);e.retries+=1,e.reconnectTimer&&clearTimeout(e.reconnectTimer),e.reconnectTimer=setTimeout(()=>{G()},B)}function Z(B){if(!(e!=null&&e.ws)||e.ws.readyState!==WebSocket.OPEN)return;const W={action:"subscribe",project_id:B??null},w=typeof e.token=="function"?e.token():e.token;if(w&&(W.token=w),!e.subscribedProjects.has(B??null)){if(B==null){e.ws.send(JSON.stringify(W)),e.subscribedProjects.add(null);return}e.ws.send(JSON.stringify(W)),e.subscribedProjects.add(B)}}function m(){if(!e)return;e.subscribedProjects.clear();const B=new Set;let W=!1;for(const Y of e.handlers.values())for(const p of Y){const V=p.getProjectId();V==null?W=!0:B.add(V)}const w=d();w==null?W=!0:B.add(w),W&&Z(void 0);for(const Y of B)Z(Y)}function b(B){if(!e)return;const W=e.handlers.get(B.type);if(W)for(const w of W){const Y=w.getProjectId();Y!=null&&Y!==B.project_id||w.handler(B.data)}}function G(){if(!e)return;if(e.ws&&(e.ws.readyState===WebSocket.OPEN||e.ws.readyState===WebSocket.CONNECTING)){e.ws.readyState===WebSocket.OPEN&&Z(d());return}e.intentionalClose=!1,e.status.value="connecting";const B=new WebSocket(I);e.ws=B,B.onopen=()=>{e&&(e.status.value="open",e.retries=0,n(),m())},B.onmessage=W=>{if(e)try{const w=JSON.parse(String(W.data));if(w.action==="pong"||w.type==="pong"){e.pongTimer&&clearTimeout(e.pongTimer),e.pongTimer=null;return}typeof w.type=="string"&&b(w)}catch{}},B.onerror=()=>{e&&(e.status.value="error")},B.onclose=()=>{e&&(o(),e.ws=null,e.subscribedProjects.clear(),e.intentionalClose?e.status.value="closed":(e.status.value="closed",s()))}}function r(){if(e){for(const B of t)for(const W of e.handlers.values())W.delete(B);t.length=0}}function h(){var B;e&&(r(),e.refCount=Math.max(0,e.refCount-1),!(e.refCount>0)&&(e.intentionalClose=!0,e.reconnectTimer&&clearTimeout(e.reconnectTimer),o(),(B=e.ws)==null||B.close(),e.ws=null,e.status.value="closed",cm.delete(I),e=void 0))}function u(B,W){var p;if(!e)return()=>{};let w=e.handlers.get(B);w||(w=new Set,e.handlers.set(B,w));const Y={getProjectId:d,handler:W};return w.add(Y),t.push(Y),((p=e.ws)==null?void 0:p.readyState)===WebSocket.OPEN&&Z(d()),()=>{w==null||w.delete(Y);const V=t.indexOf(Y);V>=0&&t.splice(V,1)}}return G(),c.watch(d,B=>{var W;((W=e==null?void 0:e.ws)==null?void 0:W.readyState)===WebSocket.OPEN&&Z(B)}),c.onUnmounted(()=>{h()}),{status:a,connect:G,disconnect:h,on:u}}function MU(C){if(!C)return"操作失败";if(typeof C=="string")return C;if(C instanceof Error)return C.message||"操作失败";if(typeof C=="object"){const I=C;if(I.message)return I.message;if(I.errors&&typeof I.errors=="object"){const g=[];for(const A of Object.values(I.errors))Array.isArray(A)&&g.push(...A);if(g.length>0)return g.join(";")}if(I.code)return`错误码:${I.code}`}return"操作失败"}const DU=/\/(?:schema-platform\/)?api\/ai\/documents\/([^/?#]+)\/file/i,cw=/\.(mp4|webm|mov|m4v)(?:\?|#|$|\s)/i,KU=/\.(png|jpe?g|gif|webp|bmp|svg)(?:\?|#|$|\s)/i,dm=/\.pdf(?:\?|#|$|\s)/i,om=/\.(docx?|xlsx?|csv|txt|md)(?:\?|#|$|\s)/i,dw=/(?:https?:\/\/[^\s"'<>\]]+|\/(?:schema-platform\/)?api\/ai\/documents\/[^/\s"'<>\]]+\/file)/gi;function fe(C){const I=C.trim().match(DU);if(I!=null&&I[1])return I[1];if(/^[0-9a-f]{24}$/i.test(C.trim()))return C.trim()}function ul(C){const{url:I="",filename:g="",mimetype:A="",hint:i}=C;if(i==="video"||i==="videoUrl")return"video";if(i==="image"||i==="imageUrls")return"image";if(i==="text")return"text";if(i==="json")return"json";if(i==="document"||i==="documentIds"){const t=g||I;return dm.test(t)||A.includes("pdf")?"pdf":om.test(t)||/word|sheet|excel|csv|text/.test(A)?"office":"file"}const l=[I,g].filter(Boolean).join(" ").toLowerCase(),e=A.toLowerCase();return e.startsWith("video/")||cw.test(l)?"video":e.startsWith("image/")||KU.test(l)?"image":e.includes("pdf")||dm.test(l)?"pdf":om.test(l)||e.includes("word")||e.includes("sheet")||e.includes("excel")||e.includes("csv")||e.startsWith("text/")?"office":fe(I)&&!dm.test(I)&&!om.test(I)&&!cw.test(I)?"image":"file"}function FU(C){var I;return C.documentId?`doc:${C.documentId}`:C.url?`url:${C.url}`:`${C.kind}:${((I=C.text)==null?void 0:I.slice(0,40))??C.id}`}function pA(C,I,g){const A=FU(g);!A||I.has(A)||(I.add(A),C.push(g))}function nm(C){const I=wi(C);if(!I)return null;const g=sl(I.data);return{kind:"json",text:I.jsonText,label:g?_B(g):"JSON 输出",prose:I.prose||void 0}}function zU(C,I="art"){if(C==null)return[];const g=[],A=new Set;let i=0;const l=()=>`${I}-${++i}`;if(typeof C=="string"){const d=C.match(dw)??[];for(const o of d){const n=ul({url:o});pA(g,A,{id:l(),kind:n,url:o,documentId:fe(o),source:"text"})}if(!d.length&&C.trim()){const o=nm(C);o!=null&&o.prose&&pA(g,A,{id:l(),kind:"text",text:o.prose,label:"确认提示",source:"text"}),pA(g,A,{id:l(),kind:(o==null?void 0:o.kind)??"text",text:(o==null?void 0:o.text)??C,label:(o==null?void 0:o.label)??"文本输出",source:"text"})}return g}if(typeof C!="object")return g;const e=C;typeof e.videoUrl=="string"&&e.videoUrl.trim()&&pA(g,A,{id:l(),kind:"video",url:e.videoUrl,documentId:fe(e.videoUrl),source:"videoUrl"});const t=(d,o,n)=>{if(Array.isArray(d))for(const s of d){let Z="";if(typeof s=="string"?Z=s:s&&typeof s=="object"&&"url"in s&&(Z=String(s.url??"")),!Z.trim())continue;const m=ul({url:Z,hint:n});pA(g,A,{id:l(),kind:m,url:Z,documentId:fe(Z),source:o})}};if(t(e.imageUrls,"imageUrls","image"),t(e.mediaUrls,"mediaUrls"),g.some(d=>d.kind==="image"&&d.url)||t(e.images,"images","image"),Array.isArray(e.documentIds))for(const d of e.documentIds)typeof d!="string"||!d.trim()||A.has(`doc:${d}`)||pA(g,A,{id:l(),kind:ul({url:d,hint:"document"}),documentId:d,url:void 0,label:`文档 ${d.slice(-6)}`,source:"documentIds"});typeof e.documentId=="string"&&e.documentId.trim()&&pA(g,A,{id:l(),kind:ul({url:e.documentId,hint:"document"}),documentId:e.documentId,label:`文档 ${e.documentId.slice(-6)}`,source:"documentId"});for(const d of["text","message","confirmMessage","prompt"]){const o=e[d];if(typeof o!="string"||!o.trim())continue;const n=o.match(dw)??[];for(const s of n)pA(g,A,{id:l(),kind:ul({url:s}),url:s,documentId:fe(s),source:d});if(!n.length&&(d==="text"||d==="message")){const s=nm(o);s!=null&&s.prose&&pA(g,A,{id:l(),kind:"text",text:s.prose,label:d==="message"?"确认提示":"说明",source:d}),pA(g,A,{id:l(),kind:(s==null?void 0:s.kind)??"text",text:(s==null?void 0:s.text)??o,label:(s==null?void 0:s.label)??(d==="text"?"文本输出":"确认提示"),source:d})}}return g}function JU(C){return C.map((I,g)=>{const A=ul({url:I.url,filename:I.filename,mimetype:I.mimetype});return{id:I.id||`att-${g}`,kind:A,url:I.url,documentId:I.id,filename:I.filename,mimetype:I.mimetype,label:I.filename,source:"attachment"}})}function ya(C,I=[]){const g=new Set;for(const A of I)g.add(A);for(const A of C.slice(0,20))for(const i of Object.keys(A))g.add(i);return[...g].map(A=>({prop:A,label:A}))}function go(C){return!Array.isArray(C)||C.length===0||!C.every(I=>I&&typeof I=="object"&&!Array.isArray(I))?null:C}function vU(C){if(!C||typeof C!="object")return null;const I=C,g=I.columns,A=I.rows;if(!Array.isArray(g)||!Array.isArray(A))return null;const i=g.map((e,t)=>{if(e&&typeof e=="object"){const d=e,o=String(d.field??d.prop??`col${t}`),n=String(d.title??d.label??o);return{prop:o,label:n}}const a=String(e);return{prop:a,label:a}}),l=A.map(e=>e&&typeof e=="object"&&!Array.isArray(e)?e:{value:e});return i.length===0&&l.length===0?null:{key:"chart-table",title:"图表数据表",columns:i,rows:l}}function ow(C){const I=C.chartType;return typeof I!="string"||!I.trim()?!1:C.option!=null&&typeof C.option=="object"}function kU(C,I){if(!I||typeof I!="object")return[];const g=I,A=[],i=C??"";if(i==="compliance-check"||!i&&Array.isArray(g.violations)){const l=go(g.violations);l!=null&&l.length&&A.push({key:"violations",title:"违规项",columns:ya(l,["severity","rule","detail"]),rows:l})}if(i==="anomaly-detect"||!i&&Array.isArray(g.anomalies)){const l=go(g.anomalies);l!=null&&l.length&&A.push({key:"anomalies",title:"异常项",columns:ya(l,["severity","type","value","reason"]),rows:l})}if(i==="form-query"||!i&&Array.isArray(g.submissions)){const l=g.submissions;if(Array.isArray(l)&&l.length){const e=l.map(t=>{if(!t||typeof t!="object")return{value:t};const a=t,d=a.data&&typeof a.data=="object"&&!Array.isArray(a.data)?a.data:{};return{id:String(a._id??a.id??""),status:a.status??"",submitterId:a.submitterId??"",createdAt:a.createdAt??"",...d}});A.push({key:"submissions",title:`表单提交(共 ${Number(g.total??e.length)})`,columns:ya(e,["id","status","submitterId","createdAt"]),rows:e})}}if(i==="chart-generate"||!i&&ow(g)){if(String(g.chartType)==="table"){const e=vU(g.option);e&&A.push(e)}const l=go(g.data);l!=null&&l.length&&A.push({key:"chart-data",title:"图表数据",columns:ya(l,["label","value","name"]),rows:l})}if((i==="module-assemble"||!i&&("schema"in g||"moduleType"in g))&&(i==="module-assemble"||g.moduleType!=null)){const l=[{key:"schema",label:"Schema",present:!!g.schema},{key:"flow",label:"Flow",present:!!g.flow},{key:"listView",label:"列表视图",present:!!g.listView},{key:"detailView",label:"详情视图",present:!!g.detailView}];A.push({key:"module-parts",title:`模块组装(${String(g.moduleType??"")})`,columns:[{prop:"part",label:"部件"},{prop:"status",label:"状态"}],rows:l.map(e=>({part:e.label,status:e.present?"已生成":"无"}))})}if(A.length===0)for(const[l,e]of Object.entries(g)){const t=go(e);if(!(!t||t.length<1)&&!(t.length===1&&Object.keys(t[0]).length>12)&&(A.push({key:`field-${l}`,title:l,columns:ya(t),rows:t}),A.length>=2))break}return A}function LU(C,I){if(!I||typeof I!="object")return null;const g=I;if(C&&C!=="chart-generate"||!C&&!ow(g))return null;const A=String(g.chartType??"");return!A||A==="table"||!g.option||typeof g.option!="object"?null:{chartType:A,option:g.option}}const TU="1.10.38",xU="2.14.2",fU="2026-08-27";/*! *****************************************************************************
73
73
  Copyright (c) Microsoft Corporation.
74
74
 
75
75
  Permission to use, copy, modify, and/or distribute this software for any
@@ -143,4 +143,4 @@ echarts.use([`+H+"]);":"Unknown series "+N))}return}if(n==="tooltip"){if(u){proc
143
143
  `,"Illegal config:",o,`.
144
144
  `)),xg(A));var h=Z?ap(Z):null;Z&&!h&&(process.env.NODE_ENV!=="production"&&(A=lC("Invalid parser name "+Z+`.
145
145
  `,"Illegal config:",o,`.
146
- `)),xg(A)),l.push({dimIdx:r.index,parser:h,comparator:new dp(s,m)})});var e=I.sourceFormat;e!==qI&&e!==OC&&(process.env.NODE_ENV!=="production"&&(A='sourceFormat "'+e+'" is not supported yet'),xg(A));for(var t=[],a=0,d=I.count();a<d;a++)t.push(I.getRawDataItem(a));return t.sort(function(o,n){for(var s=0;s<l.length;s++){var Z=l[s],m=I.retrieveValueFromItem(o,Z.dimIdx),b=I.retrieveValueFromItem(n,Z.dimIdx);Z.parser&&(m=Z.parser(m),b=Z.parser(b));var G=Z.comparator.evaluate(m,b);if(G!==0)return G}return 0}),{data:t}}};function Sog(C){C.registerTransform(Rog),C.registerTransform(Hog)}var Mog=(function(C){J(I,C);function I(){var g=C!==null&&C.apply(this,arguments)||this;return g.type="dataset",g}return I.prototype.init=function(g,A,i){C.prototype.init.call(this,g,A,i),this._sourceManager=new bp(this),Gp(this)},I.prototype.mergeOption=function(g,A){C.prototype.mergeOption.call(this,g,A),Gp(this)},I.prototype.optionUpdated=function(){this._sourceManager.dirty()},I.prototype.getSourceManager=function(){return this._sourceManager},I.type="dataset",I.defaultOption={seriesLayoutBy:kA},I})(Ng),Dog=(function(C){J(I,C);function I(){var g=C!==null&&C.apply(this,arguments)||this;return g.type="dataset",g}return I.type="dataset",I})($g);function Kog(C){C.registerComponentModel(Mog),C.registerComponentView(Dog)}var EA=FA.CMD;function ea(C,I){return Math.abs(C-I)<1e-5}function ku(C){var I=C.data,g=C.len(),A=[],i,l=0,e=0,t=0,a=0;function d(R,S){i&&i.length>2&&A.push(i),i=[R,S]}function o(R,S,M,D){ea(R,M)&&ea(S,D)||i.push(R,S,M,D,M,D)}function n(R,S,M,D,F,z){var k=Math.abs(S-R),f=Math.tan(k/4)*4/3,Q=S<R?-1:1,E=Math.cos(R),gg=Math.sin(R),q=Math.cos(S),bg=Math.sin(S),jg=E*F+M,aI=gg*z+D,Yg=q*F+M,og=bg*z+D,pg=F*f*Q,lg=z*f*Q;i.push(jg-pg*gg,aI+lg*E,Yg+pg*bg,og-lg*q,Yg,og)}for(var s,Z,m,b,G=0;G<g;){var r=I[G++],h=G===1;switch(h&&(l=I[G],e=I[G+1],t=l,a=e,(r===EA.L||r===EA.C||r===EA.Q)&&(i=[t,a])),r){case EA.M:l=t=I[G++],e=a=I[G++],d(t,a);break;case EA.L:s=I[G++],Z=I[G++],o(l,e,s,Z),l=s,e=Z;break;case EA.C:i.push(I[G++],I[G++],I[G++],I[G++],l=I[G++],e=I[G++]);break;case EA.Q:s=I[G++],Z=I[G++],m=I[G++],b=I[G++],i.push(l+2/3*(s-l),e+2/3*(Z-e),m+2/3*(s-m),b+2/3*(Z-b),m,b),l=m,e=b;break;case EA.A:var u=I[G++],B=I[G++],W=I[G++],w=I[G++],Y=I[G++],p=I[G++]+Y;G+=1;var V=!I[G++];s=Math.cos(Y)*W+u,Z=Math.sin(Y)*w+B,h?(t=s,a=Z,d(t,a)):o(l,e,s,Z),l=Math.cos(p)*W+u,e=Math.sin(p)*w+B;for(var y=(V?-1:1)*Math.PI/2,N=Y;V?N>p:N<p;N+=y){var H=V?Math.max(N+y,p):Math.min(N+y,p);n(N,H,u,B,W,w)}break;case EA.R:t=l=I[G++],a=e=I[G++],s=t+I[G++],Z=a+I[G++],d(s,a),o(s,a,s,Z),o(s,Z,t,Z),o(t,Z,t,a),o(t,a,s,a);break;case EA.Z:i&&o(l,e,t,a),l=t,e=a;break}}return i&&i.length>2&&A.push(i),A}function Lu(C,I,g,A,i,l,e,t,a,d){if(ea(C,g)&&ea(I,A)&&ea(i,e)&&ea(l,t)){a.push(e,t);return}var o=2/d,n=o*o,s=e-C,Z=t-I,m=Math.sqrt(s*s+Z*Z);s/=m,Z/=m;var b=g-C,G=A-I,r=i-e,h=l-t,u=b*b+G*G,B=r*r+h*h;if(u<n&&B<n){a.push(e,t);return}var W=s*b+Z*G,w=-s*r-Z*h,Y=u-W*W,p=B-w*w;if(Y<n&&W>=0&&p<n&&w>=0){a.push(e,t);return}var V=[],y=[];Ki(C,g,i,e,.5,V),Ki(I,A,l,t,.5,y),Lu(V[0],y[0],V[1],y[1],V[2],y[2],V[3],y[3],a,d),Lu(V[4],y[4],V[5],y[5],V[6],y[6],V[7],y[7],a,d)}function Fog(C,I){var g=ku(C),A=[];I=I||1;for(var i=0;i<g.length;i++){var l=g[i],e=[],t=l[0],a=l[1];e.push(t,a);for(var d=2;d<l.length;){var o=l[d++],n=l[d++],s=l[d++],Z=l[d++],m=l[d++],b=l[d++];Lu(t,a,o,n,s,Z,m,b,e,I),t=m,a=b}A.push(e)}return A}function D5(C,I,g){var A=C[I],i=C[1-I],l=Math.abs(A/i),e=Math.ceil(Math.sqrt(l*g)),t=Math.floor(g/e);t===0&&(t=1,e=g);for(var a=[],d=0;d<e;d++)a.push(t);var o=e*t,n=g-o;if(n>0)for(var d=0;d<n;d++)a[d%e]+=1;return a}function K5(C,I,g){for(var A=C.r0,i=C.r,l=C.startAngle,e=C.endAngle,t=Math.abs(e-l),a=t*i,d=i-A,o=a>Math.abs(d),n=D5([a,d],o?0:1,I),s=(o?t:d)/n.length,Z=0;Z<n.length;Z++)for(var m=(o?d:t)/n[Z],b=0;b<n[Z];b++){var G={};o?(G.startAngle=l+s*Z,G.endAngle=l+s*(Z+1),G.r0=A+m*b,G.r=A+m*(b+1)):(G.startAngle=l+m*b,G.endAngle=l+m*(b+1),G.r0=A+s*Z,G.r=A+s*(Z+1)),G.clockwise=C.clockwise,G.cx=C.cx,G.cy=C.cy,g.push(G)}}function zog(C,I,g){for(var A=C.width,i=C.height,l=A>i,e=D5([A,i],l?0:1,I),t=l?"width":"height",a=l?"height":"width",d=l?"x":"y",o=l?"y":"x",n=C[t]/e.length,s=0;s<e.length;s++)for(var Z=C[a]/e[s],m=0;m<e[s];m++){var b={};b[d]=s*n,b[o]=m*Z,b[t]=n,b[a]=Z,b.x+=C.x,b.y+=C.y,g.push(b)}}function F5(C,I,g,A){return C*A-g*I}function Jog(C,I,g,A,i,l,e,t){var a=g-C,d=A-I,o=e-i,n=t-l,s=F5(o,n,a,d);if(Math.abs(s)<1e-6)return null;var Z=C-i,m=I-l,b=F5(Z,m,o,n)/s;return b<0||b>1?null:new Wg(b*a+C,b*d+I)}function vog(C,I,g){var A=new Wg;Wg.sub(A,g,I),A.normalize();var i=new Wg;Wg.sub(i,C,I);var l=i.dot(A);return l}function ta(C,I){var g=C[C.length-1];g&&g[0]===I[0]&&g[1]===I[1]||C.push(I)}function kog(C,I,g){for(var A=C.length,i=[],l=0;l<A;l++){var e=C[l],t=C[(l+1)%A],a=Jog(e[0],e[1],t[0],t[1],I.x,I.y,g.x,g.y);a&&i.push({projPt:vog(a,I,g),pt:a,idx:l})}if(i.length<2)return[{points:C},{points:C}];i.sort(function(G,r){return G.projPt-r.projPt});var d=i[0],o=i[i.length-1];if(o.idx<d.idx){var n=d;d=o,o=n}for(var s=[d.pt.x,d.pt.y],Z=[o.pt.x,o.pt.y],m=[s],b=[Z],l=d.idx+1;l<=o.idx;l++)ta(m,C[l].slice());ta(m,Z),ta(m,s);for(var l=o.idx+1;l<=d.idx+A;l++)ta(b,C[l%A].slice());return ta(b,s),ta(b,Z),[{points:m},{points:b}]}function z5(C){var I=C.points,g=[],A=[];jo(I,g,A);var i=new wg(g[0],g[1],A[0]-g[0],A[1]-g[1]),l=i.width,e=i.height,t=i.x,a=i.y,d=new Wg,o=new Wg;return l>e?(d.x=o.x=t+l/2,d.y=a,o.y=a+e):(d.y=o.y=a+e/2,d.x=t,o.x=t+l),kog(I,d,o)}function dZ(C,I,g,A){if(g===1)A.push(I);else{var i=Math.floor(g/2),l=C(I);dZ(C,l[0],i,A),dZ(C,l[1],g-i,A)}return A}function Log(C,I){for(var g=[],A=0;A<I;A++)g.push(q0(C));return g}function Tog(C,I){I.setStyle(C.style),I.z=C.z,I.z2=C.z2,I.zlevel=C.zlevel}function xog(C){for(var I=[],g=0;g<C.length;)I.push([C[g++],C[g++]]);return I}function fog(C,I){var g=[],A=C.shape,i;switch(C.type){case"rect":zog(A,I,g),i=Dg;break;case"sector":K5(A,I,g),i=EI;break;case"circle":K5({r0:0,r:A.r,startAngle:0,endAngle:Math.PI*2,cx:A.cx,cy:A.cy},I,g),i=EI;break;default:var l=C.getComputedTransform(),e=l?Math.sqrt(Math.max(l[0]*l[0]+l[1]*l[1],l[2]*l[2]+l[3]*l[3])):1,t=j(Fog(C.getUpdatedPathProxy(),e),function(r){return xog(r)}),a=t.length;if(a===0)dZ(z5,{points:t[0]},I,g);else if(a===I)for(var d=0;d<a;d++)g.push({points:t[d]});else{var o=0,n=j(t,function(r){var h=[],u=[];jo(r,h,u);var B=(u[1]-h[1])*(u[0]-h[0]);return o+=B,{poly:r,area:B}});n.sort(function(r,h){return h.area-r.area});for(var s=I,d=0;d<a;d++){var Z=n[d];if(s<=0)break;var m=d===a-1?s:Math.ceil(Z.area/o*I);m<0||(dZ(z5,{points:Z.poly},m,g),s-=m)}}i=PI;break}if(!i)return Log(C,I);for(var b=[],d=0;d<g.length;d++){var G=new i;G.setShape(g[d]),Tog(C,G),b.push(G)}return b}function jog(C,I){var g=C.length,A=I.length;if(g===A)return[C,I];for(var i=[],l=[],e=g<A?C:I,t=Math.min(g,A),a=Math.abs(A-g)/6,d=(t-2)/6,o=Math.ceil(a/d)+1,n=[e[0],e[1]],s=a,Z=2;Z<t;){var m=e[Z-2],b=e[Z-1],G=e[Z++],r=e[Z++],h=e[Z++],u=e[Z++],B=e[Z++],W=e[Z++];if(s<=0){n.push(G,r,h,u,B,W);continue}for(var w=Math.min(s,o-1)+1,Y=1;Y<=w;Y++){var p=Y/w;Ki(m,G,h,B,p,i),Ki(b,r,u,W,p,l),m=i[3],b=l[3],n.push(i[1],l[1],i[2],l[2],m,b),G=i[5],r=l[5],h=i[6],u=l[6]}s-=w-1}return e===C?[n,I]:[C,n]}function J5(C,I){for(var g=C.length,A=C[g-2],i=C[g-1],l=[],e=0;e<I.length;)l[e++]=A,l[e++]=i;return l}function Qog(C,I){for(var g,A,i,l=[],e=[],t=0;t<Math.max(C.length,I.length);t++){var a=C[t],d=I[t],o=void 0,n=void 0;a?d?(g=jog(a,d),o=g[0],n=g[1],A=o,i=n):(n=J5(i||a,a),o=a):(o=J5(A||d,d),n=d),l.push(o),e.push(n)}return[l,e]}function v5(C){for(var I=0,g=0,A=0,i=C.length,l=0,e=i-2;l<i;e=l,l+=2){var t=C[e],a=C[e+1],d=C[l],o=C[l+1],n=t*o-d*a;I+=n,g+=(t+d)*n,A+=(a+o)*n}return I===0?[C[0]||0,C[1]||0]:[g/I/3,A/I/3,I]}function Uog(C,I,g,A){for(var i=(C.length-2)/6,l=1/0,e=0,t=C.length,a=t-2,d=0;d<i;d++){for(var o=d*6,n=0,s=0;s<t;s+=2){var Z=s===0?o:(o+s-2)%a+2,m=C[Z]-g[0],b=C[Z+1]-g[1],G=I[s]-A[0],r=I[s+1]-A[1],h=G-m,u=r-b;n+=h*h+u*u}n<l&&(l=n,e=d)}return e}function Oog(C){for(var I=[],g=C.length,A=0;A<g;A+=2)I[A]=C[g-A-2],I[A+1]=C[g-A-1];return I}function Eog(C,I,g,A){for(var i=[],l,e=0;e<C.length;e++){var t=C[e],a=I[e],d=v5(t),o=v5(a);l==null&&(l=d[2]<0!=o[2]<0);var n=[],s=[],Z=0,m=1/0,b=[],G=t.length;l&&(t=Oog(t));for(var r=Uog(t,a,d,o)*6,h=G-2,u=0;u<h;u+=2){var B=(r+u)%h+2;n[u+2]=t[B]-d[0],n[u+3]=t[B+1]-d[1]}n[0]=t[r]-d[0],n[1]=t[r+1]-d[1];for(var W=A/g,w=-A/2;w<=A/2;w+=W){for(var Y=Math.sin(w),p=Math.cos(w),V=0,u=0;u<t.length;u+=2){var y=n[u],N=n[u+1],H=a[u]-o[0],R=a[u+1]-o[1],S=H*p-R*Y,M=H*Y+R*p;b[u]=S,b[u+1]=M;var D=S-y,F=M-N;V+=D*D+F*F}if(V<m){m=V,Z=w;for(var z=0;z<b.length;z++)s[z]=b[z]}}i.push({from:n,to:s,fromCp:d,toCp:o,rotation:-Z})}return i}function oZ(C){return C.__isCombineMorphing}var k5="__mOriginal_";function nZ(C,I,g){var A=k5+I,i=C[A]||C[I];C[A]||(C[A]=C[I]);var l=g.replace,e=g.after,t=g.before;C[I]=function(){var a=arguments,d;return t&&t.apply(this,a),l?d=l.apply(this,a):d=i.apply(this,a),e&&e.apply(this,a),d}}function Hd(C,I){var g=k5+I;C[g]&&(C[I]=C[g],C[g]=null)}function L5(C,I){for(var g=0;g<C.length;g++)for(var A=C[g],i=0;i<A.length;){var l=A[i],e=A[i+1];A[i++]=I[0]*l+I[2]*e+I[4],A[i++]=I[1]*l+I[3]*e+I[5]}}function T5(C,I){var g=C.getUpdatedPathProxy(),A=I.getUpdatedPathProxy(),i=Qog(ku(g),ku(A)),l=i[0],e=i[1],t=C.getComputedTransform(),a=I.getComputedTransform();function d(){this.transform=null}t&&L5(l,t),a&&L5(e,a),nZ(I,"updateTransform",{replace:d}),I.transform=null;var o=Eog(l,e,10,Math.PI),n=[];nZ(I,"buildPath",{replace:function(s){for(var Z=I.__morphT,m=1-Z,b=[],G=0;G<o.length;G++){var r=o[G],h=r.from,u=r.to,B=r.rotation*Z,W=r.fromCp,w=r.toCp,Y=Math.sin(B),p=Math.cos(B);Ka(b,W,w,Z);for(var V=0;V<h.length;V+=2){var y=h[V],N=h[V+1],H=u[V],R=u[V+1],S=y*m+H*Z,M=N*m+R*Z;n[V]=S*p-M*Y+b[0],n[V+1]=S*Y+M*p+b[1]}var D=n[0],F=n[1];s.moveTo(D,F);for(var V=2;V<h.length;){var H=n[V++],R=n[V++],z=n[V++],k=n[V++],f=n[V++],Q=n[V++];D===H&&F===R&&z===f&&k===Q?s.lineTo(f,Q):s.bezierCurveTo(H,R,z,k,f,Q),D=f,F=Q}}}})}function Tu(C,I,g){if(!C||!I)return I;var A=g.done,i=g.during;T5(C,I),I.__morphT=0;function l(){Hd(I,"buildPath"),Hd(I,"updateTransform"),I.__morphT=-1,I.createPathProxy(),I.dirtyShape()}return I.animateTo({__morphT:1},ag({during:function(e){I.dirtyShape(),i&&i(e)},done:function(){l(),A&&A()}},g)),I}function Pog(C,I,g,A,i,l){var e=16;C=i===g?0:Math.round(32767*(C-g)/(i-g)),I=l===A?0:Math.round(32767*(I-A)/(l-A));for(var t=0,a,d=(1<<e)/2;d>0;d/=2){var o=0,n=0;(C&d)>0&&(o=1),(I&d)>0&&(n=1),t+=d*d*(3*o^n),n===0&&(o===1&&(C=d-1-C,I=d-1-I),a=C,C=I,I=a)}return t}function sZ(C){var I=1/0,g=1/0,A=-1/0,i=-1/0,l=j(C,function(t){var a=t.getBoundingRect(),d=t.getComputedTransform(),o=a.x+a.width/2+(d?d[4]:0),n=a.y+a.height/2+(d?d[5]:0);return I=Math.min(o,I),g=Math.min(n,g),A=Math.max(o,A),i=Math.max(n,i),[o,n]}),e=j(l,function(t,a){return{cp:t,z:Pog(t[0],t[1],I,g,A,i),path:C[a]}});return e.sort(function(t,a){return t.z-a.z}).map(function(t){return t.path})}function x5(C){return fog(C.path,C.count)}function xu(){return{fromIndividuals:[],toIndividuals:[],count:0}}function _og(C,I,g){var A=[];function i(W){for(var w=0;w<W.length;w++){var Y=W[w];oZ(Y)?i(Y.childrenRef()):Y instanceof Hg&&A.push(Y)}}i(C);var l=A.length;if(!l)return xu();var e=g.dividePath||x5,t=e({path:I,count:l});if(t.length!==l)return console.error("Invalid morphing: unmatched splitted path"),xu();A=sZ(A),t=sZ(t);for(var a=g.done,d=g.during,o=g.individualDelay,n=new ei,s=0;s<l;s++){var Z=A[s],m=t[s];m.parent=I,m.copyTransform(n),o||T5(Z,m)}I.__isCombineMorphing=!0,I.childrenRef=function(){return t};function b(W){for(var w=0;w<t.length;w++)t[w].addSelfToZr(W)}nZ(I,"addSelfToZr",{after:function(W){b(W)}}),nZ(I,"removeSelfFromZr",{after:function(W){for(var w=0;w<t.length;w++)t[w].removeSelfFromZr(W)}});function G(){I.__isCombineMorphing=!1,I.__morphT=-1,I.childrenRef=null,Hd(I,"addSelfToZr"),Hd(I,"removeSelfFromZr")}var r=t.length;if(o)for(var h=r,u=function(){h--,h===0&&(G(),a&&a())},s=0;s<r;s++){var B=o?ag({delay:(g.delay||0)+o(s,r,A[s],t[s]),done:u},g):g;Tu(A[s],t[s],B)}else I.__morphT=0,I.animateTo({__morphT:1},ag({during:function(W){for(var w=0;w<r;w++){var Y=t[w];Y.__morphT=I.__morphT,Y.dirtyShape()}d&&d(W)},done:function(){G();for(var W=0;W<C.length;W++)Hd(C[W],"updateTransform");a&&a()}},g));return I.__zr&&b(I.__zr),{fromIndividuals:A,toIndividuals:t,count:r}}function qog(C,I,g){var A=I.length,i=[],l=g.dividePath||x5;function e(Z){for(var m=0;m<Z.length;m++){var b=Z[m];oZ(b)?e(b.childrenRef()):b instanceof Hg&&i.push(b)}}if(oZ(C)){e(C.childrenRef());var t=i.length;if(t<A)for(var a=0,d=t;d<A;d++)i.push(q0(i[a++%t]));i.length=A}else{i=l({path:C,count:A});for(var o=C.getComputedTransform(),d=0;d<i.length;d++)i[d].setLocalTransform(o);if(i.length!==A)return console.error("Invalid morphing: unmatched splitted path"),xu()}i=sZ(i),I=sZ(I);for(var n=g.individualDelay,d=0;d<A;d++){var s=n?ag({delay:(g.delay||0)+n(d,A,i[d],I[d])},g):g;Tu(i[d],I[d],s)}return{fromIndividuals:i,toIndividuals:I,count:I.length}}function f5(C){return x(C[0])}function j5(C,I){for(var g=[],A=C.length,i=0;i<A;i++)g.push({one:C[i],many:[]});for(var i=0;i<I.length;i++){var l=I[i].length,e=void 0;for(e=0;e<l;e++)g[e%A].many.push(I[i][e])}for(var t=0,i=A-1;i>=0;i--)if(!g[i].many.length){var a=g[t].many;if(a.length<=1)if(t)t=0;else return g;var l=a.length,d=Math.ceil(l/2);g[i].many=a.slice(d,l),g[t].many=a.slice(0,d),t++}return g}var $og={clone:function(C){for(var I=[],g=1-Math.pow(1-C.path.style.opacity,1/C.count),A=0;A<C.count;A++){var i=q0(C.path);i.setStyle("opacity",g),I.push(i)}return I},split:null};function fu(C,I,g,A,i,l){if(!C.length||!I.length)return;var e=mt("update",A,i);if(!(e&&e.duration>0))return;var t=A.getModel("universalTransition").get("delay"),a=Object.assign({setToFinal:!0},e),d,o;f5(C)&&(d=C,o=I),f5(I)&&(d=I,o=C);function n(r,h,u,B,W){var w=r.many,Y=r.one;if(w.length===1&&!W){var p=h?w[0]:Y,V=h?Y:w[0];if(oZ(p))n({many:[p],one:V},!0,u,B,!0);else{var y=t?ag({delay:t(u,B)},a):a;Tu(p,V,y),l(p,V,p,V,y)}}else for(var N=ag({dividePath:$og[g],individualDelay:t&&function(F,z,k,f){return t(F+u,B)}},a),H=h?_og(w,Y,N):qog(Y,w,N),R=H.fromIndividuals,S=H.toIndividuals,M=R.length,D=0;D<M;D++){var y=t?ag({delay:t(D,M)},a):a;l(R[D],S[D],h?w[D]:r.one,h?r.one:w[D],y)}}for(var s=d?d===C:C.length>I.length,Z=d?j5(o,d):j5(s?I:C,[s?C:I]),m=0,b=0;b<Z.length;b++)m+=Z[b].many.length;for(var G=0,b=0;b<Z.length;b++)n(Z[b],s,G,m),G+=Z[b].many.length}function Me(C){if(!C)return[];if(x(C)){for(var I=[],g=0;g<C.length;g++)I.push(Me(C[g]));return I}var A=[];return C.traverse(function(i){i instanceof Hg&&!i.disableMorphing&&!i.invisible&&!i.ignore&&A.push(i)}),A}var Q5=1e4,gng=0,U5=1,O5=2,Ing=Fg();function Cng(C,I){for(var g=C.dimensions,A=0;A<g.length;A++){var i=C.getDimensionInfo(g[A]);if(i&&i.otherDims[I]===0)return g[A]}}function Ang(C,I,g){var A=C.getDimensionInfo(g),i=A&&A.ordinalMeta;if(A){var l=C.get(A.name,I);return i&&i.categories[l]||l+""}}function E5(C,I,g,A){var i=A?"itemChildGroupId":"itemGroupId",l=Cng(C,i);if(l){var e=Ang(C,I,l);return e}var t=C.getRawDataItem(I),a=A?"childGroupId":"groupId";if(t&&t[a])return t[a]+"";if(!A)return g||C.getId(I)}function P5(C){var I=[];return X(C,function(g){var A=g.data,i=g.dataGroupId;if(A.count()>Q5){process.env.NODE_ENV!=="production"&&eI("Universal transition is disabled on large data > 10k.");return}for(var l=A.getIndices(),e=0;e<l.length;e++)I.push({data:A,groupId:E5(A,e,i,!1),childGroupId:E5(A,e,i,!0),divide:g.divide,dataIndex:e})}),I}function ju(C,I,g){C.traverse(function(A){A instanceof Hg&&CI(A,{style:{opacity:0}},I,{dataIndex:g,isFrom:!0})})}function Qu(C){if(C.parent){var I=C.getComputedTransform();C.setLocalTransform(I),C.parent.remove(C)}}function aa(C){C.stopAnimation(),C.isGroup&&C.traverse(function(I){I.stopAnimation()})}function ing(C,I,g){var A=mt("update",g,I);A&&C.traverse(function(i){if(i instanceof xC){var l=DP(i);l&&i.animateFrom({style:l},A)}})}function lng(C,I){var g=C.length;if(g!==I.length)return!1;for(var A=0;A<g;A++){var i=C[A],l=I[A];if(i.data.getId(i.dataIndex)!==l.data.getId(l.dataIndex))return!1}return!0}function _5(C,I,g){var A=P5(C),i=P5(I);function l(u,B,W,w,Y){(W||u)&&B.animateFrom({style:W&&W!==u?T(T({},W.style),u.style):u.style},Y)}var e=!1,t=gng,a=ig(),d=ig();A.forEach(function(u){u.groupId&&a.set(u.groupId,!0),u.childGroupId&&d.set(u.childGroupId,!0)});for(var o=0;o<i.length;o++){var n=i[o].groupId;if(d.get(n)){t=U5;break}var s=i[o].childGroupId;if(s&&a.get(s)){t=O5;break}}function Z(u,B){return function(W){var w=W.data,Y=W.dataIndex;return B?w.getId(Y):u?t===U5?W.childGroupId:W.groupId:t===O5?W.childGroupId:W.groupId}}var m=lng(A,i),b={};if(!m)for(var o=0;o<i.length;o++){var G=i[o],r=G.data.getItemGraphicEl(G.dataIndex);r&&(b[r.id]=!0)}function h(u,B){var W=A[B],w=i[u],Y=w.data.hostModel,p=W.data.getItemGraphicEl(W.dataIndex),V=w.data.getItemGraphicEl(w.dataIndex);if(p===V){V&&ing(V,w.dataIndex,Y);return}p&&b[p.id]||V&&(aa(V),p?(aa(p),Qu(p),e=!0,fu(Me(p),Me(V),w.divide,Y,u,l)):ju(V,Y,u))}new Zi(A,i,Z(!0,m),Z(!1,m),null,"multiple").update(h).updateManyToOne(function(u,B){var W=i[u],w=W.data,Y=w.hostModel,p=w.getItemGraphicEl(W.dataIndex),V=vg(j(B,function(y){return A[y].data.getItemGraphicEl(A[y].dataIndex)}),function(y){return y&&y!==p&&!b[y.id]});p&&(aa(p),V.length?(X(V,function(y){aa(y),Qu(y)}),e=!0,fu(Me(V),Me(p),W.divide,Y,u,l)):ju(p,Y,W.dataIndex))}).updateOneToMany(function(u,B){var W=A[B],w=W.data.getItemGraphicEl(W.dataIndex);if(!(w&&b[w.id])){var Y=vg(j(u,function(V){return i[V].data.getItemGraphicEl(i[V].dataIndex)}),function(V){return V&&V!==w}),p=i[u[0]].data.hostModel;Y.length&&(X(Y,function(V){return aa(V)}),w?(aa(w),Qu(w),e=!0,fu(Me(w),Me(Y),W.divide,p,u[0],l)):X(Y,function(V){return ju(V,p,u[0])}))}}).updateManyToMany(function(u,B){new Zi(B,u,function(W){return A[W].data.getId(A[W].dataIndex)},function(W){return i[W].data.getId(i[W].dataIndex)}).update(function(W,w){h(u[W],B[w])}).execute()}).execute(),e&&X(I,function(u){var B=u.data,W=B.hostModel,w=W&&g.getViewOfSeriesModel(W),Y=mt("update",W,0);w&&W.isAnimationEnabled()&&Y&&Y.duration>0&&w.group.traverse(function(p){p instanceof Hg&&!p.animators.length&&p.animateFrom({style:{opacity:0}},Y)})})}function q5(C){var I=C.getModel("universalTransition").get("seriesKey");return I||C.id}function $5(C){return x(C)?C.sort().join(","):C}function dl(C){if(C.hostModel)return C.hostModel.getModel("universalTransition").get("divideShape")}function eng(C,I){var g=ig(),A=ig(),i=ig();X(C.oldSeries,function(e,t){var a=C.oldDataGroupIds[t],d=C.oldData[t],o=q5(e),n=$5(o);A.set(n,{dataGroupId:a,data:d}),x(o)&&X(o,function(s){i.set(s,{key:n,dataGroupId:a,data:d})})});function l(e){g.get(e)&&eI("Duplicated seriesKey in universalTransition "+e)}return X(I.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),a=e.getData(),d=q5(e),o=$5(d),n=A.get(o);if(n)process.env.NODE_ENV!=="production"&&l(o),g.set(o,{oldSeries:[{dataGroupId:n.dataGroupId,divide:dl(n.data),data:n.data}],newSeries:[{dataGroupId:t,divide:dl(a),data:a}]});else if(x(d)){process.env.NODE_ENV!=="production"&&l(o);var s=[];X(d,function(b){var G=A.get(b);G.data&&s.push({dataGroupId:G.dataGroupId,divide:dl(G.data),data:G.data})}),s.length&&g.set(o,{oldSeries:s,newSeries:[{dataGroupId:t,data:a,divide:dl(a)}]})}else{var Z=i.get(d);if(Z){var m=g.get(Z.key);m||(m={oldSeries:[{dataGroupId:Z.dataGroupId,data:Z.data,divide:dl(Z.data)}],newSeries:[]},g.set(Z.key,m)),m.newSeries.push({dataGroupId:t,data:a,divide:dl(a)})}}}}),g}function g9(C,I){for(var g=0;g<C.length;g++){var A=I.seriesIndex!=null&&I.seriesIndex===C[g].seriesIndex||I.seriesId!=null&&I.seriesId===C[g].id;if(A)return g}}function tng(C,I,g,A){var i=[],l=[];X(Og(C.from),function(e){var t=g9(I.oldSeries,e);t>=0&&i.push({dataGroupId:I.oldDataGroupIds[t],data:I.oldData[t],divide:dl(I.oldData[t]),groupIdDim:e.dimension})}),X(Og(C.to),function(e){var t=g9(g.updatedSeries,e);if(t>=0){var a=g.updatedSeries[t].getData();l.push({dataGroupId:I.oldDataGroupIds[t],data:a,divide:dl(a),groupIdDim:e.dimension})}}),i.length>0&&l.length>0&&_5(i,l,A)}function ang(C){C.registerUpdateLifecycle("series:beforeupdate",function(I,g,A){X(Og(A.seriesTransition),function(i){X(Og(i.to),function(l){for(var e=A.updatedSeries,t=0;t<e.length;t++)(l.seriesIndex!=null&&l.seriesIndex===e[t].seriesIndex||l.seriesId!=null&&l.seriesId===e[t].id)&&(e[t][Xn]=!0)})})}),C.registerUpdateLifecycle("series:transition",function(I,g,A){var i=Ing(g);if(i.oldSeries&&A.updatedSeries&&A.optionChanged){var l=A.seriesTransition;if(l)X(Og(l),function(Z){tng(Z,i,A,g)});else{var e=eng(i,A);X(e.keys(),function(Z){var m=e.get(Z);_5(m.oldSeries,m.newSeries,g)})}X(A.updatedSeries,function(Z){Z[Xn]&&(Z[Xn]=!1)})}for(var t=I.getSeries(),a=i.oldSeries=[],d=i.oldDataGroupIds=[],o=i.oldData=[],n=0;n<t.length;n++){var s=t[n].getData();s.count()<Q5&&(a.push(t[n]),d.push(t[n].get("dataGroupId")),o.push(s))}})}Xg([h$]),Xg([Z$]),Xg([v$,ggg,dgg,xgg,gIg,kIg,ZCg,_Cg,hAg,VAg,DAg,Nig,$ig,dlg,plg,Rlg,klg,Ulg,ieg,deg,ueg,Ctg]),Xg(Btg),Xg(Utg),Xg(QR),Xg(eag),Xg(sS),Xg(dag),Xg(hag),Xg(ecg),Xg(Vcg),Xg(Wd),Xg(Tcg),Xg(jcg),Xg(Idg),Xg(adg),Xg(Zdg),Xg(udg),Xg(Rdg),Xg(Odg),Xg(t5),Xg(o5),Xg(Zog),Xg(y5),Xg(X5),Xg(hog),Xg(Sog),Xg(Kog),Xg(ang),Xg(Dq);const cng=Object.freeze(Object.defineProperty({__proto__:null,Axis:qC,ChartView:fg,ComponentModel:Ng,ComponentView:$g,List:CC,Model:kg,PRIORITY:Gy,SeriesModel:Eg,color:PO,connect:T8,dataTool:E8,dependencies:Y8,disConnect:x8,disconnect:Sy,dispose:f8,env:Rg,extendChartView:Bq,extendComponentModel:rq,extendComponentView:hq,extendSeriesModel:uq,format:tq,getCoordinateSystemDimensions:Q8,getInstanceByDom:ZG,getInstanceById:j8,getMap:O8,graphic:eq,helper:q6,init:L8,innerDrawElementOnCanvas:$b,matrix:NO,number:iq,parseGeoJSON:KG,parseGeoJson:KG,registerAction:hA,registerCoordinateSystem:Ky,registerLayout:Fy,registerLoading:hG,registerLocale:sb,registerMap:Jy,registerPostInit:My,registerPostUpdate:Dy,registerPreprocessor:bG,registerProcessor:GG,registerTheme:mG,registerTransform:vy,registerUpdateLifecycle:Un,registerVisual:qi,setCanvasCreator:U8,setPlatformAPI:sw,throttle:Hn,time:lq,use:Xg,util:aq,vector:ZO,version:w8,zrUtil:tO,zrender:HE},Symbol.toStringTag,{value:"Module"}));v.APP_ICON_NAMES=jF,v.AVATAR_SIZE=x1,v.AgentTransferCard=Ff,v.AppDialog=Kd,v.AppIcon=$,v.AppPagination=UF,v.AppUserPanel=r1,v.ApprovalCard=PT,v.ArtifactGallery=Qd,v.AssistantPicker=BU,v.AttachmentPreviewModal=gw,v.BORDER_RADIUS=L1,v.BPMN_TO_PREVIEW_VF_TYPE=tw,v.BpmnFlowPreviewCanvas=iQ,v.BpmnPreviewEndEvent=iw,v.BpmnPreviewGateway=ew,v.BpmnPreviewStartEvent=Aw,v.BpmnPreviewTask=lw,v.BreadcrumbNav=fz,v.BusinessResultTables=Az,v.CHART_COLORS=DC,v.COLORS=YA,v.CONTROL_HEIGHT=z1,v.CardGridSkeleton=A1,v.CardTable=JZ,v.ChartOptionPreview=gz,v.ChecklistProposalCard=Kj,v.CollapsibleStepCard=Rf,v.Composer=KT,v.ConfirmDialog=OF,v.ContentPanel=JB,v.ConversationHeader=hx,v.ConversationSearchBar=JQ,v.DEFAULT_PAGE_SIZE=zZ,v.DURATION=f1,v.DocumentDetailSummaryCard=Jj,v.DocumentPreviewDrawer=xv,v.DocumentPreviewPanel=eW,v.DocumentSummaryList=qW,v.EP_FORK_BASE=xU,v.EP_FORK_DATE=fU,v.EditableArtifactCard=mf,v.EmptyState=wA,v.ErrorBoundary=g1,v.ErrorRecoveryCard=kj,v.ExcelPreviewCard=lW,v.ExecutionArtifactPanel=Gk,v.FONT_SIZE=K1,v.FORM=T1,v.FieldListCard=Qf,v.FieldRow=xB,v.FileChip=oW,v.FilterBar=Ez,v.FilterTabs=_F,v.FlowNodeStripCard=Ij,v.FlowPreviewShell=jj,v.FormDialog=EF,v.HintText=aJ,v.HitlArtifactPanel=tk,v.ICON_MAP=Td,v.ICON_SIZE=v1,v.ImageGenerateCard=SQ,v.ImagePreviewCard=tW,v.JsonCard=PB,v.JsonDetailDialog=IW,v.LAYOUT_HEIGHT=J1,v.LoadingDots=ZJ,v.LogStream=Kz,v.MentionInput=jx,v.MessageActionBar=bf,v.MessageAttachmentList=_W,v.MessageBubble=Iw,v.MessageList=rT,v.MessageParts=PW,v.MetricChart=_1,v.Model3dPreviewCard=mQ,v.ModelPicker=wU,v.NodeArtifactStrip=ik,v.PAGE=k1,v.PAGE_SIZE_OPTIONS=DB,v.PAGINATION_LAYOUT=KB,v.PROPERTY_CONTROL_SIZE=lI,v.PROPERTY_FETCH_REMOTE_KEY=kZ,v.PageHeader=Tz,v.PageShell=Lz,v.PdfPreviewCard=xZ,v.PendingAttachmentChip=yx,v.PptPreviewCard=fj,v.ProcessingDrawer=ox,v.PropertyField=jB,v.PropertyPanel=DJ,v.QuestionnaireCard=Rj,v.RagContextPanel=oU,v.RequirementAnalysisCard=zj,v.RunStatusBar=Cw,v.SCHEMA_UI_VERSION=TU,v.SHADOWS=vB,v.SPACING=F1,v.SchemaFormPreview=MQ,v.SchemaLitePreview=Cv,v.ScriptTablePreview=$B,v.SearchForm=CJ,v.SectionToggle=fB,v.ServiceGrid=Wz,v.SessionHistoryDrawer=tx,v.SessionSidebar=ex,v.SeverityBadge=Zz,v.Skeleton=C1,v.SliderCaptcha=p1,v.StarterPromptGrid=bT,v.StatCard=sz,v.StatusTag=I1,v.StatusTimeline=Vz,v.StoryboardTablePreview=gW,v.StreamStatusBanner=LT,v.StructuredJsonPreview=LZ,v.SubWorkflowStatusCard=Tj,v.SuggestionCard=FQ,v.TEXT_COLORS=D1,v.TableRowActions=_z,v.TaskChainBar=UQ,v.TextPreviewCard=dW,v.ThinkingBlock=Cf,v.ThresholdSlider=kz,v.TimeRangePicker=X1,v.TipBanner=nT,v.Toast=$F,v.TokenUsageCard=bj,v.TruncatedTooltipText=vZ,v.UserAvatar=t1,v.VariableDiffCard=Lj,v.VideoPreviewCard=aW,v.VirtualMessageScroller=ax,v.WorkflowRunTimeline=DQ,v.Z_INDEX=j1,v.detectArtifactKind=ul,v.detectStructuredJsonKind=sl,v.evalVisibleOn=UB,v.extractBusinessResultTables=kU,v.extractChartOption=LU,v.extractDocumentId=fe,v.extractEmbeddedJson=wi,v.fileKind=fd,v.filterVisiblePropertyItems=OB,v.filterVisiblePropertySections=EB,v.findEmbeddedJsonSpan=qB,v.formatSize=jd,v.isImage=Zl,v.isOffice=TZ,v.isPdf=ve,v.isPreviewable=Av,v.isRegisteredAppIcon=QF,v.normalizeAttachments=JU,v.normalizeNodeOutput=zU,v.parseStructuredJsonContent=ra,v.provideToast=YU,v.renderMarkdown=am,v.resolveApiErrorMessage=MU,v.resolveBpmnPreviewNodeType=lQ,v.splitTextAndCodeBlocks=OW,v.structuredJsonLabel=_B,v.tryParseJsonText=nm,v.useChatScroll=HU,v.useClientPagination=XU,v.useClipboard=cW,v.useConfirm=pU,v.useDataLoading=RU,v.useDebounceFn=NU,v.useMessage=yU,v.useRealtime=SU,v.useToast=VU,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})}));
146
+ `)),xg(A)),l.push({dimIdx:r.index,parser:h,comparator:new dp(s,m)})});var e=I.sourceFormat;e!==qI&&e!==OC&&(process.env.NODE_ENV!=="production"&&(A='sourceFormat "'+e+'" is not supported yet'),xg(A));for(var t=[],a=0,d=I.count();a<d;a++)t.push(I.getRawDataItem(a));return t.sort(function(o,n){for(var s=0;s<l.length;s++){var Z=l[s],m=I.retrieveValueFromItem(o,Z.dimIdx),b=I.retrieveValueFromItem(n,Z.dimIdx);Z.parser&&(m=Z.parser(m),b=Z.parser(b));var G=Z.comparator.evaluate(m,b);if(G!==0)return G}return 0}),{data:t}}};function Sog(C){C.registerTransform(Rog),C.registerTransform(Hog)}var Mog=(function(C){J(I,C);function I(){var g=C!==null&&C.apply(this,arguments)||this;return g.type="dataset",g}return I.prototype.init=function(g,A,i){C.prototype.init.call(this,g,A,i),this._sourceManager=new bp(this),Gp(this)},I.prototype.mergeOption=function(g,A){C.prototype.mergeOption.call(this,g,A),Gp(this)},I.prototype.optionUpdated=function(){this._sourceManager.dirty()},I.prototype.getSourceManager=function(){return this._sourceManager},I.type="dataset",I.defaultOption={seriesLayoutBy:kA},I})(Ng),Dog=(function(C){J(I,C);function I(){var g=C!==null&&C.apply(this,arguments)||this;return g.type="dataset",g}return I.type="dataset",I})($g);function Kog(C){C.registerComponentModel(Mog),C.registerComponentView(Dog)}var EA=FA.CMD;function ea(C,I){return Math.abs(C-I)<1e-5}function ku(C){var I=C.data,g=C.len(),A=[],i,l=0,e=0,t=0,a=0;function d(R,S){i&&i.length>2&&A.push(i),i=[R,S]}function o(R,S,M,D){ea(R,M)&&ea(S,D)||i.push(R,S,M,D,M,D)}function n(R,S,M,D,F,z){var k=Math.abs(S-R),f=Math.tan(k/4)*4/3,Q=S<R?-1:1,E=Math.cos(R),gg=Math.sin(R),q=Math.cos(S),bg=Math.sin(S),jg=E*F+M,aI=gg*z+D,Yg=q*F+M,og=bg*z+D,pg=F*f*Q,lg=z*f*Q;i.push(jg-pg*gg,aI+lg*E,Yg+pg*bg,og-lg*q,Yg,og)}for(var s,Z,m,b,G=0;G<g;){var r=I[G++],h=G===1;switch(h&&(l=I[G],e=I[G+1],t=l,a=e,(r===EA.L||r===EA.C||r===EA.Q)&&(i=[t,a])),r){case EA.M:l=t=I[G++],e=a=I[G++],d(t,a);break;case EA.L:s=I[G++],Z=I[G++],o(l,e,s,Z),l=s,e=Z;break;case EA.C:i.push(I[G++],I[G++],I[G++],I[G++],l=I[G++],e=I[G++]);break;case EA.Q:s=I[G++],Z=I[G++],m=I[G++],b=I[G++],i.push(l+2/3*(s-l),e+2/3*(Z-e),m+2/3*(s-m),b+2/3*(Z-b),m,b),l=m,e=b;break;case EA.A:var u=I[G++],B=I[G++],W=I[G++],w=I[G++],Y=I[G++],p=I[G++]+Y;G+=1;var V=!I[G++];s=Math.cos(Y)*W+u,Z=Math.sin(Y)*w+B,h?(t=s,a=Z,d(t,a)):o(l,e,s,Z),l=Math.cos(p)*W+u,e=Math.sin(p)*w+B;for(var y=(V?-1:1)*Math.PI/2,N=Y;V?N>p:N<p;N+=y){var H=V?Math.max(N+y,p):Math.min(N+y,p);n(N,H,u,B,W,w)}break;case EA.R:t=l=I[G++],a=e=I[G++],s=t+I[G++],Z=a+I[G++],d(s,a),o(s,a,s,Z),o(s,Z,t,Z),o(t,Z,t,a),o(t,a,s,a);break;case EA.Z:i&&o(l,e,t,a),l=t,e=a;break}}return i&&i.length>2&&A.push(i),A}function Lu(C,I,g,A,i,l,e,t,a,d){if(ea(C,g)&&ea(I,A)&&ea(i,e)&&ea(l,t)){a.push(e,t);return}var o=2/d,n=o*o,s=e-C,Z=t-I,m=Math.sqrt(s*s+Z*Z);s/=m,Z/=m;var b=g-C,G=A-I,r=i-e,h=l-t,u=b*b+G*G,B=r*r+h*h;if(u<n&&B<n){a.push(e,t);return}var W=s*b+Z*G,w=-s*r-Z*h,Y=u-W*W,p=B-w*w;if(Y<n&&W>=0&&p<n&&w>=0){a.push(e,t);return}var V=[],y=[];Ki(C,g,i,e,.5,V),Ki(I,A,l,t,.5,y),Lu(V[0],y[0],V[1],y[1],V[2],y[2],V[3],y[3],a,d),Lu(V[4],y[4],V[5],y[5],V[6],y[6],V[7],y[7],a,d)}function Fog(C,I){var g=ku(C),A=[];I=I||1;for(var i=0;i<g.length;i++){var l=g[i],e=[],t=l[0],a=l[1];e.push(t,a);for(var d=2;d<l.length;){var o=l[d++],n=l[d++],s=l[d++],Z=l[d++],m=l[d++],b=l[d++];Lu(t,a,o,n,s,Z,m,b,e,I),t=m,a=b}A.push(e)}return A}function D5(C,I,g){var A=C[I],i=C[1-I],l=Math.abs(A/i),e=Math.ceil(Math.sqrt(l*g)),t=Math.floor(g/e);t===0&&(t=1,e=g);for(var a=[],d=0;d<e;d++)a.push(t);var o=e*t,n=g-o;if(n>0)for(var d=0;d<n;d++)a[d%e]+=1;return a}function K5(C,I,g){for(var A=C.r0,i=C.r,l=C.startAngle,e=C.endAngle,t=Math.abs(e-l),a=t*i,d=i-A,o=a>Math.abs(d),n=D5([a,d],o?0:1,I),s=(o?t:d)/n.length,Z=0;Z<n.length;Z++)for(var m=(o?d:t)/n[Z],b=0;b<n[Z];b++){var G={};o?(G.startAngle=l+s*Z,G.endAngle=l+s*(Z+1),G.r0=A+m*b,G.r=A+m*(b+1)):(G.startAngle=l+m*b,G.endAngle=l+m*(b+1),G.r0=A+s*Z,G.r=A+s*(Z+1)),G.clockwise=C.clockwise,G.cx=C.cx,G.cy=C.cy,g.push(G)}}function zog(C,I,g){for(var A=C.width,i=C.height,l=A>i,e=D5([A,i],l?0:1,I),t=l?"width":"height",a=l?"height":"width",d=l?"x":"y",o=l?"y":"x",n=C[t]/e.length,s=0;s<e.length;s++)for(var Z=C[a]/e[s],m=0;m<e[s];m++){var b={};b[d]=s*n,b[o]=m*Z,b[t]=n,b[a]=Z,b.x+=C.x,b.y+=C.y,g.push(b)}}function F5(C,I,g,A){return C*A-g*I}function Jog(C,I,g,A,i,l,e,t){var a=g-C,d=A-I,o=e-i,n=t-l,s=F5(o,n,a,d);if(Math.abs(s)<1e-6)return null;var Z=C-i,m=I-l,b=F5(Z,m,o,n)/s;return b<0||b>1?null:new Wg(b*a+C,b*d+I)}function vog(C,I,g){var A=new Wg;Wg.sub(A,g,I),A.normalize();var i=new Wg;Wg.sub(i,C,I);var l=i.dot(A);return l}function ta(C,I){var g=C[C.length-1];g&&g[0]===I[0]&&g[1]===I[1]||C.push(I)}function kog(C,I,g){for(var A=C.length,i=[],l=0;l<A;l++){var e=C[l],t=C[(l+1)%A],a=Jog(e[0],e[1],t[0],t[1],I.x,I.y,g.x,g.y);a&&i.push({projPt:vog(a,I,g),pt:a,idx:l})}if(i.length<2)return[{points:C},{points:C}];i.sort(function(G,r){return G.projPt-r.projPt});var d=i[0],o=i[i.length-1];if(o.idx<d.idx){var n=d;d=o,o=n}for(var s=[d.pt.x,d.pt.y],Z=[o.pt.x,o.pt.y],m=[s],b=[Z],l=d.idx+1;l<=o.idx;l++)ta(m,C[l].slice());ta(m,Z),ta(m,s);for(var l=o.idx+1;l<=d.idx+A;l++)ta(b,C[l%A].slice());return ta(b,s),ta(b,Z),[{points:m},{points:b}]}function z5(C){var I=C.points,g=[],A=[];jo(I,g,A);var i=new wg(g[0],g[1],A[0]-g[0],A[1]-g[1]),l=i.width,e=i.height,t=i.x,a=i.y,d=new Wg,o=new Wg;return l>e?(d.x=o.x=t+l/2,d.y=a,o.y=a+e):(d.y=o.y=a+e/2,d.x=t,o.x=t+l),kog(I,d,o)}function dZ(C,I,g,A){if(g===1)A.push(I);else{var i=Math.floor(g/2),l=C(I);dZ(C,l[0],i,A),dZ(C,l[1],g-i,A)}return A}function Log(C,I){for(var g=[],A=0;A<I;A++)g.push(q0(C));return g}function Tog(C,I){I.setStyle(C.style),I.z=C.z,I.z2=C.z2,I.zlevel=C.zlevel}function xog(C){for(var I=[],g=0;g<C.length;)I.push([C[g++],C[g++]]);return I}function fog(C,I){var g=[],A=C.shape,i;switch(C.type){case"rect":zog(A,I,g),i=Dg;break;case"sector":K5(A,I,g),i=EI;break;case"circle":K5({r0:0,r:A.r,startAngle:0,endAngle:Math.PI*2,cx:A.cx,cy:A.cy},I,g),i=EI;break;default:var l=C.getComputedTransform(),e=l?Math.sqrt(Math.max(l[0]*l[0]+l[1]*l[1],l[2]*l[2]+l[3]*l[3])):1,t=j(Fog(C.getUpdatedPathProxy(),e),function(r){return xog(r)}),a=t.length;if(a===0)dZ(z5,{points:t[0]},I,g);else if(a===I)for(var d=0;d<a;d++)g.push({points:t[d]});else{var o=0,n=j(t,function(r){var h=[],u=[];jo(r,h,u);var B=(u[1]-h[1])*(u[0]-h[0]);return o+=B,{poly:r,area:B}});n.sort(function(r,h){return h.area-r.area});for(var s=I,d=0;d<a;d++){var Z=n[d];if(s<=0)break;var m=d===a-1?s:Math.ceil(Z.area/o*I);m<0||(dZ(z5,{points:Z.poly},m,g),s-=m)}}i=PI;break}if(!i)return Log(C,I);for(var b=[],d=0;d<g.length;d++){var G=new i;G.setShape(g[d]),Tog(C,G),b.push(G)}return b}function jog(C,I){var g=C.length,A=I.length;if(g===A)return[C,I];for(var i=[],l=[],e=g<A?C:I,t=Math.min(g,A),a=Math.abs(A-g)/6,d=(t-2)/6,o=Math.ceil(a/d)+1,n=[e[0],e[1]],s=a,Z=2;Z<t;){var m=e[Z-2],b=e[Z-1],G=e[Z++],r=e[Z++],h=e[Z++],u=e[Z++],B=e[Z++],W=e[Z++];if(s<=0){n.push(G,r,h,u,B,W);continue}for(var w=Math.min(s,o-1)+1,Y=1;Y<=w;Y++){var p=Y/w;Ki(m,G,h,B,p,i),Ki(b,r,u,W,p,l),m=i[3],b=l[3],n.push(i[1],l[1],i[2],l[2],m,b),G=i[5],r=l[5],h=i[6],u=l[6]}s-=w-1}return e===C?[n,I]:[C,n]}function J5(C,I){for(var g=C.length,A=C[g-2],i=C[g-1],l=[],e=0;e<I.length;)l[e++]=A,l[e++]=i;return l}function Qog(C,I){for(var g,A,i,l=[],e=[],t=0;t<Math.max(C.length,I.length);t++){var a=C[t],d=I[t],o=void 0,n=void 0;a?d?(g=jog(a,d),o=g[0],n=g[1],A=o,i=n):(n=J5(i||a,a),o=a):(o=J5(A||d,d),n=d),l.push(o),e.push(n)}return[l,e]}function v5(C){for(var I=0,g=0,A=0,i=C.length,l=0,e=i-2;l<i;e=l,l+=2){var t=C[e],a=C[e+1],d=C[l],o=C[l+1],n=t*o-d*a;I+=n,g+=(t+d)*n,A+=(a+o)*n}return I===0?[C[0]||0,C[1]||0]:[g/I/3,A/I/3,I]}function Uog(C,I,g,A){for(var i=(C.length-2)/6,l=1/0,e=0,t=C.length,a=t-2,d=0;d<i;d++){for(var o=d*6,n=0,s=0;s<t;s+=2){var Z=s===0?o:(o+s-2)%a+2,m=C[Z]-g[0],b=C[Z+1]-g[1],G=I[s]-A[0],r=I[s+1]-A[1],h=G-m,u=r-b;n+=h*h+u*u}n<l&&(l=n,e=d)}return e}function Oog(C){for(var I=[],g=C.length,A=0;A<g;A+=2)I[A]=C[g-A-2],I[A+1]=C[g-A-1];return I}function Eog(C,I,g,A){for(var i=[],l,e=0;e<C.length;e++){var t=C[e],a=I[e],d=v5(t),o=v5(a);l==null&&(l=d[2]<0!=o[2]<0);var n=[],s=[],Z=0,m=1/0,b=[],G=t.length;l&&(t=Oog(t));for(var r=Uog(t,a,d,o)*6,h=G-2,u=0;u<h;u+=2){var B=(r+u)%h+2;n[u+2]=t[B]-d[0],n[u+3]=t[B+1]-d[1]}n[0]=t[r]-d[0],n[1]=t[r+1]-d[1];for(var W=A/g,w=-A/2;w<=A/2;w+=W){for(var Y=Math.sin(w),p=Math.cos(w),V=0,u=0;u<t.length;u+=2){var y=n[u],N=n[u+1],H=a[u]-o[0],R=a[u+1]-o[1],S=H*p-R*Y,M=H*Y+R*p;b[u]=S,b[u+1]=M;var D=S-y,F=M-N;V+=D*D+F*F}if(V<m){m=V,Z=w;for(var z=0;z<b.length;z++)s[z]=b[z]}}i.push({from:n,to:s,fromCp:d,toCp:o,rotation:-Z})}return i}function oZ(C){return C.__isCombineMorphing}var k5="__mOriginal_";function nZ(C,I,g){var A=k5+I,i=C[A]||C[I];C[A]||(C[A]=C[I]);var l=g.replace,e=g.after,t=g.before;C[I]=function(){var a=arguments,d;return t&&t.apply(this,a),l?d=l.apply(this,a):d=i.apply(this,a),e&&e.apply(this,a),d}}function Hd(C,I){var g=k5+I;C[g]&&(C[I]=C[g],C[g]=null)}function L5(C,I){for(var g=0;g<C.length;g++)for(var A=C[g],i=0;i<A.length;){var l=A[i],e=A[i+1];A[i++]=I[0]*l+I[2]*e+I[4],A[i++]=I[1]*l+I[3]*e+I[5]}}function T5(C,I){var g=C.getUpdatedPathProxy(),A=I.getUpdatedPathProxy(),i=Qog(ku(g),ku(A)),l=i[0],e=i[1],t=C.getComputedTransform(),a=I.getComputedTransform();function d(){this.transform=null}t&&L5(l,t),a&&L5(e,a),nZ(I,"updateTransform",{replace:d}),I.transform=null;var o=Eog(l,e,10,Math.PI),n=[];nZ(I,"buildPath",{replace:function(s){for(var Z=I.__morphT,m=1-Z,b=[],G=0;G<o.length;G++){var r=o[G],h=r.from,u=r.to,B=r.rotation*Z,W=r.fromCp,w=r.toCp,Y=Math.sin(B),p=Math.cos(B);Ka(b,W,w,Z);for(var V=0;V<h.length;V+=2){var y=h[V],N=h[V+1],H=u[V],R=u[V+1],S=y*m+H*Z,M=N*m+R*Z;n[V]=S*p-M*Y+b[0],n[V+1]=S*Y+M*p+b[1]}var D=n[0],F=n[1];s.moveTo(D,F);for(var V=2;V<h.length;){var H=n[V++],R=n[V++],z=n[V++],k=n[V++],f=n[V++],Q=n[V++];D===H&&F===R&&z===f&&k===Q?s.lineTo(f,Q):s.bezierCurveTo(H,R,z,k,f,Q),D=f,F=Q}}}})}function Tu(C,I,g){if(!C||!I)return I;var A=g.done,i=g.during;T5(C,I),I.__morphT=0;function l(){Hd(I,"buildPath"),Hd(I,"updateTransform"),I.__morphT=-1,I.createPathProxy(),I.dirtyShape()}return I.animateTo({__morphT:1},ag({during:function(e){I.dirtyShape(),i&&i(e)},done:function(){l(),A&&A()}},g)),I}function Pog(C,I,g,A,i,l){var e=16;C=i===g?0:Math.round(32767*(C-g)/(i-g)),I=l===A?0:Math.round(32767*(I-A)/(l-A));for(var t=0,a,d=(1<<e)/2;d>0;d/=2){var o=0,n=0;(C&d)>0&&(o=1),(I&d)>0&&(n=1),t+=d*d*(3*o^n),n===0&&(o===1&&(C=d-1-C,I=d-1-I),a=C,C=I,I=a)}return t}function sZ(C){var I=1/0,g=1/0,A=-1/0,i=-1/0,l=j(C,function(t){var a=t.getBoundingRect(),d=t.getComputedTransform(),o=a.x+a.width/2+(d?d[4]:0),n=a.y+a.height/2+(d?d[5]:0);return I=Math.min(o,I),g=Math.min(n,g),A=Math.max(o,A),i=Math.max(n,i),[o,n]}),e=j(l,function(t,a){return{cp:t,z:Pog(t[0],t[1],I,g,A,i),path:C[a]}});return e.sort(function(t,a){return t.z-a.z}).map(function(t){return t.path})}function x5(C){return fog(C.path,C.count)}function xu(){return{fromIndividuals:[],toIndividuals:[],count:0}}function _og(C,I,g){var A=[];function i(W){for(var w=0;w<W.length;w++){var Y=W[w];oZ(Y)?i(Y.childrenRef()):Y instanceof Hg&&A.push(Y)}}i(C);var l=A.length;if(!l)return xu();var e=g.dividePath||x5,t=e({path:I,count:l});if(t.length!==l)return console.error("Invalid morphing: unmatched splitted path"),xu();A=sZ(A),t=sZ(t);for(var a=g.done,d=g.during,o=g.individualDelay,n=new ei,s=0;s<l;s++){var Z=A[s],m=t[s];m.parent=I,m.copyTransform(n),o||T5(Z,m)}I.__isCombineMorphing=!0,I.childrenRef=function(){return t};function b(W){for(var w=0;w<t.length;w++)t[w].addSelfToZr(W)}nZ(I,"addSelfToZr",{after:function(W){b(W)}}),nZ(I,"removeSelfFromZr",{after:function(W){for(var w=0;w<t.length;w++)t[w].removeSelfFromZr(W)}});function G(){I.__isCombineMorphing=!1,I.__morphT=-1,I.childrenRef=null,Hd(I,"addSelfToZr"),Hd(I,"removeSelfFromZr")}var r=t.length;if(o)for(var h=r,u=function(){h--,h===0&&(G(),a&&a())},s=0;s<r;s++){var B=o?ag({delay:(g.delay||0)+o(s,r,A[s],t[s]),done:u},g):g;Tu(A[s],t[s],B)}else I.__morphT=0,I.animateTo({__morphT:1},ag({during:function(W){for(var w=0;w<r;w++){var Y=t[w];Y.__morphT=I.__morphT,Y.dirtyShape()}d&&d(W)},done:function(){G();for(var W=0;W<C.length;W++)Hd(C[W],"updateTransform");a&&a()}},g));return I.__zr&&b(I.__zr),{fromIndividuals:A,toIndividuals:t,count:r}}function qog(C,I,g){var A=I.length,i=[],l=g.dividePath||x5;function e(Z){for(var m=0;m<Z.length;m++){var b=Z[m];oZ(b)?e(b.childrenRef()):b instanceof Hg&&i.push(b)}}if(oZ(C)){e(C.childrenRef());var t=i.length;if(t<A)for(var a=0,d=t;d<A;d++)i.push(q0(i[a++%t]));i.length=A}else{i=l({path:C,count:A});for(var o=C.getComputedTransform(),d=0;d<i.length;d++)i[d].setLocalTransform(o);if(i.length!==A)return console.error("Invalid morphing: unmatched splitted path"),xu()}i=sZ(i),I=sZ(I);for(var n=g.individualDelay,d=0;d<A;d++){var s=n?ag({delay:(g.delay||0)+n(d,A,i[d],I[d])},g):g;Tu(i[d],I[d],s)}return{fromIndividuals:i,toIndividuals:I,count:I.length}}function f5(C){return x(C[0])}function j5(C,I){for(var g=[],A=C.length,i=0;i<A;i++)g.push({one:C[i],many:[]});for(var i=0;i<I.length;i++){var l=I[i].length,e=void 0;for(e=0;e<l;e++)g[e%A].many.push(I[i][e])}for(var t=0,i=A-1;i>=0;i--)if(!g[i].many.length){var a=g[t].many;if(a.length<=1)if(t)t=0;else return g;var l=a.length,d=Math.ceil(l/2);g[i].many=a.slice(d,l),g[t].many=a.slice(0,d),t++}return g}var $og={clone:function(C){for(var I=[],g=1-Math.pow(1-C.path.style.opacity,1/C.count),A=0;A<C.count;A++){var i=q0(C.path);i.setStyle("opacity",g),I.push(i)}return I},split:null};function fu(C,I,g,A,i,l){if(!C.length||!I.length)return;var e=mt("update",A,i);if(!(e&&e.duration>0))return;var t=A.getModel("universalTransition").get("delay"),a=Object.assign({setToFinal:!0},e),d,o;f5(C)&&(d=C,o=I),f5(I)&&(d=I,o=C);function n(r,h,u,B,W){var w=r.many,Y=r.one;if(w.length===1&&!W){var p=h?w[0]:Y,V=h?Y:w[0];if(oZ(p))n({many:[p],one:V},!0,u,B,!0);else{var y=t?ag({delay:t(u,B)},a):a;Tu(p,V,y),l(p,V,p,V,y)}}else for(var N=ag({dividePath:$og[g],individualDelay:t&&function(F,z,k,f){return t(F+u,B)}},a),H=h?_og(w,Y,N):qog(Y,w,N),R=H.fromIndividuals,S=H.toIndividuals,M=R.length,D=0;D<M;D++){var y=t?ag({delay:t(D,M)},a):a;l(R[D],S[D],h?w[D]:r.one,h?r.one:w[D],y)}}for(var s=d?d===C:C.length>I.length,Z=d?j5(o,d):j5(s?I:C,[s?C:I]),m=0,b=0;b<Z.length;b++)m+=Z[b].many.length;for(var G=0,b=0;b<Z.length;b++)n(Z[b],s,G,m),G+=Z[b].many.length}function Me(C){if(!C)return[];if(x(C)){for(var I=[],g=0;g<C.length;g++)I.push(Me(C[g]));return I}var A=[];return C.traverse(function(i){i instanceof Hg&&!i.disableMorphing&&!i.invisible&&!i.ignore&&A.push(i)}),A}var Q5=1e4,gng=0,U5=1,O5=2,Ing=Fg();function Cng(C,I){for(var g=C.dimensions,A=0;A<g.length;A++){var i=C.getDimensionInfo(g[A]);if(i&&i.otherDims[I]===0)return g[A]}}function Ang(C,I,g){var A=C.getDimensionInfo(g),i=A&&A.ordinalMeta;if(A){var l=C.get(A.name,I);return i&&i.categories[l]||l+""}}function E5(C,I,g,A){var i=A?"itemChildGroupId":"itemGroupId",l=Cng(C,i);if(l){var e=Ang(C,I,l);return e}var t=C.getRawDataItem(I),a=A?"childGroupId":"groupId";if(t&&t[a])return t[a]+"";if(!A)return g||C.getId(I)}function P5(C){var I=[];return X(C,function(g){var A=g.data,i=g.dataGroupId;if(A.count()>Q5){process.env.NODE_ENV!=="production"&&eI("Universal transition is disabled on large data > 10k.");return}for(var l=A.getIndices(),e=0;e<l.length;e++)I.push({data:A,groupId:E5(A,e,i,!1),childGroupId:E5(A,e,i,!0),divide:g.divide,dataIndex:e})}),I}function ju(C,I,g){C.traverse(function(A){A instanceof Hg&&CI(A,{style:{opacity:0}},I,{dataIndex:g,isFrom:!0})})}function Qu(C){if(C.parent){var I=C.getComputedTransform();C.setLocalTransform(I),C.parent.remove(C)}}function aa(C){C.stopAnimation(),C.isGroup&&C.traverse(function(I){I.stopAnimation()})}function ing(C,I,g){var A=mt("update",g,I);A&&C.traverse(function(i){if(i instanceof xC){var l=DP(i);l&&i.animateFrom({style:l},A)}})}function lng(C,I){var g=C.length;if(g!==I.length)return!1;for(var A=0;A<g;A++){var i=C[A],l=I[A];if(i.data.getId(i.dataIndex)!==l.data.getId(l.dataIndex))return!1}return!0}function _5(C,I,g){var A=P5(C),i=P5(I);function l(u,B,W,w,Y){(W||u)&&B.animateFrom({style:W&&W!==u?T(T({},W.style),u.style):u.style},Y)}var e=!1,t=gng,a=ig(),d=ig();A.forEach(function(u){u.groupId&&a.set(u.groupId,!0),u.childGroupId&&d.set(u.childGroupId,!0)});for(var o=0;o<i.length;o++){var n=i[o].groupId;if(d.get(n)){t=U5;break}var s=i[o].childGroupId;if(s&&a.get(s)){t=O5;break}}function Z(u,B){return function(W){var w=W.data,Y=W.dataIndex;return B?w.getId(Y):u?t===U5?W.childGroupId:W.groupId:t===O5?W.childGroupId:W.groupId}}var m=lng(A,i),b={};if(!m)for(var o=0;o<i.length;o++){var G=i[o],r=G.data.getItemGraphicEl(G.dataIndex);r&&(b[r.id]=!0)}function h(u,B){var W=A[B],w=i[u],Y=w.data.hostModel,p=W.data.getItemGraphicEl(W.dataIndex),V=w.data.getItemGraphicEl(w.dataIndex);if(p===V){V&&ing(V,w.dataIndex,Y);return}p&&b[p.id]||V&&(aa(V),p?(aa(p),Qu(p),e=!0,fu(Me(p),Me(V),w.divide,Y,u,l)):ju(V,Y,u))}new Zi(A,i,Z(!0,m),Z(!1,m),null,"multiple").update(h).updateManyToOne(function(u,B){var W=i[u],w=W.data,Y=w.hostModel,p=w.getItemGraphicEl(W.dataIndex),V=vg(j(B,function(y){return A[y].data.getItemGraphicEl(A[y].dataIndex)}),function(y){return y&&y!==p&&!b[y.id]});p&&(aa(p),V.length?(X(V,function(y){aa(y),Qu(y)}),e=!0,fu(Me(V),Me(p),W.divide,Y,u,l)):ju(p,Y,W.dataIndex))}).updateOneToMany(function(u,B){var W=A[B],w=W.data.getItemGraphicEl(W.dataIndex);if(!(w&&b[w.id])){var Y=vg(j(u,function(V){return i[V].data.getItemGraphicEl(i[V].dataIndex)}),function(V){return V&&V!==w}),p=i[u[0]].data.hostModel;Y.length&&(X(Y,function(V){return aa(V)}),w?(aa(w),Qu(w),e=!0,fu(Me(w),Me(Y),W.divide,p,u[0],l)):X(Y,function(V){return ju(V,p,u[0])}))}}).updateManyToMany(function(u,B){new Zi(B,u,function(W){return A[W].data.getId(A[W].dataIndex)},function(W){return i[W].data.getId(i[W].dataIndex)}).update(function(W,w){h(u[W],B[w])}).execute()}).execute(),e&&X(I,function(u){var B=u.data,W=B.hostModel,w=W&&g.getViewOfSeriesModel(W),Y=mt("update",W,0);w&&W.isAnimationEnabled()&&Y&&Y.duration>0&&w.group.traverse(function(p){p instanceof Hg&&!p.animators.length&&p.animateFrom({style:{opacity:0}},Y)})})}function q5(C){var I=C.getModel("universalTransition").get("seriesKey");return I||C.id}function $5(C){return x(C)?C.sort().join(","):C}function dl(C){if(C.hostModel)return C.hostModel.getModel("universalTransition").get("divideShape")}function eng(C,I){var g=ig(),A=ig(),i=ig();X(C.oldSeries,function(e,t){var a=C.oldDataGroupIds[t],d=C.oldData[t],o=q5(e),n=$5(o);A.set(n,{dataGroupId:a,data:d}),x(o)&&X(o,function(s){i.set(s,{key:n,dataGroupId:a,data:d})})});function l(e){g.get(e)&&eI("Duplicated seriesKey in universalTransition "+e)}return X(I.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),a=e.getData(),d=q5(e),o=$5(d),n=A.get(o);if(n)process.env.NODE_ENV!=="production"&&l(o),g.set(o,{oldSeries:[{dataGroupId:n.dataGroupId,divide:dl(n.data),data:n.data}],newSeries:[{dataGroupId:t,divide:dl(a),data:a}]});else if(x(d)){process.env.NODE_ENV!=="production"&&l(o);var s=[];X(d,function(b){var G=A.get(b);G.data&&s.push({dataGroupId:G.dataGroupId,divide:dl(G.data),data:G.data})}),s.length&&g.set(o,{oldSeries:s,newSeries:[{dataGroupId:t,data:a,divide:dl(a)}]})}else{var Z=i.get(d);if(Z){var m=g.get(Z.key);m||(m={oldSeries:[{dataGroupId:Z.dataGroupId,data:Z.data,divide:dl(Z.data)}],newSeries:[]},g.set(Z.key,m)),m.newSeries.push({dataGroupId:t,data:a,divide:dl(a)})}}}}),g}function g9(C,I){for(var g=0;g<C.length;g++){var A=I.seriesIndex!=null&&I.seriesIndex===C[g].seriesIndex||I.seriesId!=null&&I.seriesId===C[g].id;if(A)return g}}function tng(C,I,g,A){var i=[],l=[];X(Og(C.from),function(e){var t=g9(I.oldSeries,e);t>=0&&i.push({dataGroupId:I.oldDataGroupIds[t],data:I.oldData[t],divide:dl(I.oldData[t]),groupIdDim:e.dimension})}),X(Og(C.to),function(e){var t=g9(g.updatedSeries,e);if(t>=0){var a=g.updatedSeries[t].getData();l.push({dataGroupId:I.oldDataGroupIds[t],data:a,divide:dl(a),groupIdDim:e.dimension})}}),i.length>0&&l.length>0&&_5(i,l,A)}function ang(C){C.registerUpdateLifecycle("series:beforeupdate",function(I,g,A){X(Og(A.seriesTransition),function(i){X(Og(i.to),function(l){for(var e=A.updatedSeries,t=0;t<e.length;t++)(l.seriesIndex!=null&&l.seriesIndex===e[t].seriesIndex||l.seriesId!=null&&l.seriesId===e[t].id)&&(e[t][Xn]=!0)})})}),C.registerUpdateLifecycle("series:transition",function(I,g,A){var i=Ing(g);if(i.oldSeries&&A.updatedSeries&&A.optionChanged){var l=A.seriesTransition;if(l)X(Og(l),function(Z){tng(Z,i,A,g)});else{var e=eng(i,A);X(e.keys(),function(Z){var m=e.get(Z);_5(m.oldSeries,m.newSeries,g)})}X(A.updatedSeries,function(Z){Z[Xn]&&(Z[Xn]=!1)})}for(var t=I.getSeries(),a=i.oldSeries=[],d=i.oldDataGroupIds=[],o=i.oldData=[],n=0;n<t.length;n++){var s=t[n].getData();s.count()<Q5&&(a.push(t[n]),d.push(t[n].get("dataGroupId")),o.push(s))}})}Xg([h$]),Xg([Z$]),Xg([v$,ggg,dgg,xgg,gIg,kIg,ZCg,_Cg,hAg,VAg,DAg,Nig,$ig,dlg,plg,Rlg,klg,Ulg,ieg,deg,ueg,Ctg]),Xg(Btg),Xg(Utg),Xg(QR),Xg(eag),Xg(sS),Xg(dag),Xg(hag),Xg(ecg),Xg(Vcg),Xg(Wd),Xg(Tcg),Xg(jcg),Xg(Idg),Xg(adg),Xg(Zdg),Xg(udg),Xg(Rdg),Xg(Odg),Xg(t5),Xg(o5),Xg(Zog),Xg(y5),Xg(X5),Xg(hog),Xg(Sog),Xg(Kog),Xg(ang),Xg(Dq);const cng=Object.freeze(Object.defineProperty({__proto__:null,Axis:qC,ChartView:fg,ComponentModel:Ng,ComponentView:$g,List:CC,Model:kg,PRIORITY:Gy,SeriesModel:Eg,color:PO,connect:T8,dataTool:E8,dependencies:Y8,disConnect:x8,disconnect:Sy,dispose:f8,env:Rg,extendChartView:Bq,extendComponentModel:rq,extendComponentView:hq,extendSeriesModel:uq,format:tq,getCoordinateSystemDimensions:Q8,getInstanceByDom:ZG,getInstanceById:j8,getMap:O8,graphic:eq,helper:q6,init:L8,innerDrawElementOnCanvas:$b,matrix:NO,number:iq,parseGeoJSON:KG,parseGeoJson:KG,registerAction:hA,registerCoordinateSystem:Ky,registerLayout:Fy,registerLoading:hG,registerLocale:sb,registerMap:Jy,registerPostInit:My,registerPostUpdate:Dy,registerPreprocessor:bG,registerProcessor:GG,registerTheme:mG,registerTransform:vy,registerUpdateLifecycle:Un,registerVisual:qi,setCanvasCreator:U8,setPlatformAPI:sw,throttle:Hn,time:lq,use:Xg,util:aq,vector:ZO,version:w8,zrUtil:tO,zrender:HE},Symbol.toStringTag,{value:"Module"}));v.APP_ICON_NAMES=jF,v.AVATAR_SIZE=x1,v.AgentTransferCard=Ff,v.AppDialog=Kd,v.AppIcon=$,v.AppPagination=UF,v.AppUserPanel=r1,v.ApprovalCard=PT,v.ArtifactGallery=Qd,v.AssistantPicker=tU,v.AttachmentPreviewModal=gw,v.BORDER_RADIUS=L1,v.BPMN_TO_PREVIEW_VF_TYPE=tw,v.BpmnFlowPreviewCanvas=wU,v.BpmnPreviewEndEvent=iw,v.BpmnPreviewGateway=ew,v.BpmnPreviewStartEvent=Aw,v.BpmnPreviewTask=lw,v.BreadcrumbNav=fz,v.BusinessResultTables=Az,v.CHART_COLORS=DC,v.COLORS=YA,v.CONTROL_HEIGHT=z1,v.CardGridSkeleton=A1,v.CardTable=JZ,v.ChartOptionPreview=gz,v.ChecklistProposalCard=Kj,v.CollapsibleStepCard=Rf,v.Composer=KT,v.ConfirmDialog=OF,v.ContentPanel=JB,v.ConversationHeader=hx,v.ConversationSearchBar=YQ,v.DEFAULT_PAGE_SIZE=zZ,v.DURATION=f1,v.DocumentDetailSummaryCard=Jj,v.DocumentPreviewDrawer=xv,v.DocumentPreviewPanel=eW,v.DocumentSummaryList=qW,v.EP_FORK_BASE=xU,v.EP_FORK_DATE=fU,v.EditableArtifactCard=mf,v.EmptyState=wA,v.ErrorBoundary=g1,v.ErrorRecoveryCard=kj,v.ExcelPreviewCard=lW,v.ExecutionArtifactPanel=Gk,v.FONT_SIZE=K1,v.FORM=T1,v.FieldListCard=Qf,v.FieldRow=xB,v.FileChip=oW,v.FilterBar=Ez,v.FilterTabs=_F,v.FlowNodeStripCard=Ij,v.FlowPreviewShell=jj,v.FormDialog=EF,v.HintText=aJ,v.HitlArtifactPanel=tk,v.ICON_MAP=Td,v.ICON_SIZE=v1,v.ImageGenerateCard=rQ,v.ImagePreviewCard=tW,v.JsonCard=PB,v.JsonDetailDialog=IW,v.LAYOUT_HEIGHT=J1,v.LoadingDots=ZJ,v.LogStream=Kz,v.MentionInput=jx,v.MessageActionBar=bf,v.MessageAttachmentList=_W,v.MessageBubble=Iw,v.MessageList=rT,v.MessageParts=PW,v.MetricChart=_1,v.Model3dPreviewCard=IQ,v.ModelPicker=cU,v.NodeArtifactStrip=ik,v.PAGE=k1,v.PAGE_SIZE_OPTIONS=DB,v.PAGINATION_LAYOUT=KB,v.PROPERTY_CONTROL_SIZE=lI,v.PROPERTY_FETCH_REMOTE_KEY=kZ,v.PageHeader=Tz,v.PageShell=Lz,v.PdfPreviewCard=xZ,v.PendingAttachmentChip=yx,v.PptPreviewCard=fj,v.ProcessingDrawer=ox,v.PropertyField=jB,v.PropertyPanel=DJ,v.QuestionnaireCard=Rj,v.RagContextPanel=_Q,v.RequirementAnalysisCard=zj,v.RunStatusBar=Cw,v.SCHEMA_UI_VERSION=TU,v.SHADOWS=vB,v.SPACING=F1,v.SchemaFormPreview=hQ,v.SchemaLitePreview=Cv,v.ScriptTablePreview=$B,v.SearchForm=CJ,v.SectionToggle=fB,v.ServiceGrid=Wz,v.SessionHistoryDrawer=tx,v.SessionSidebar=ex,v.SeverityBadge=Zz,v.Skeleton=C1,v.SliderCaptcha=p1,v.StarterPromptGrid=bT,v.StatCard=sz,v.StatusTag=I1,v.StatusTimeline=Vz,v.StoryboardTablePreview=gW,v.StreamStatusBanner=LT,v.StructuredJsonPreview=LZ,v.SubWorkflowStatusCard=Tj,v.SuggestionCard=WQ,v.TEXT_COLORS=D1,v.TableRowActions=_z,v.TaskChainBar=MQ,v.TextPreviewCard=dW,v.ThinkingBlock=Cf,v.ThresholdSlider=kz,v.TimeRangePicker=X1,v.TipBanner=nT,v.Toast=$F,v.TokenUsageCard=bj,v.TruncatedTooltipText=vZ,v.UserAvatar=t1,v.VariableDiffCard=Lj,v.VideoPreviewCard=aW,v.VirtualMessageScroller=ax,v.WorkflowRunTimeline=uQ,v.Z_INDEX=j1,v.detectArtifactKind=ul,v.detectStructuredJsonKind=sl,v.evalVisibleOn=UB,v.extractBusinessResultTables=kU,v.extractChartOption=LU,v.extractDocumentId=fe,v.extractEmbeddedJson=wi,v.fileKind=fd,v.filterVisiblePropertyItems=OB,v.filterVisiblePropertySections=EB,v.findEmbeddedJsonSpan=qB,v.formatSize=jd,v.isImage=Zl,v.isOffice=TZ,v.isPdf=ve,v.isPreviewable=Av,v.isRegisteredAppIcon=QF,v.normalizeAttachments=JU,v.normalizeNodeOutput=zU,v.parseStructuredJsonContent=ra,v.provideToast=VU,v.renderMarkdown=am,v.resolveApiErrorMessage=MU,v.resolveBpmnPreviewNodeType=YU,v.splitTextAndCodeBlocks=OW,v.structuredJsonLabel=_B,v.tryParseJsonText=nm,v.useChatScroll=dU,v.useClientPagination=RU,v.useClipboard=cW,v.useConfirm=yU,v.useDataLoading=HU,v.useDebounceFn=XU,v.useMessage=NU,v.useRealtime=SU,v.useToast=pU,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})}));