or3-workflow-vue 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +883 -0
- package/dist/index.js +4388 -0
- package/dist/index.umd.cjs +15 -0
- package/dist/style.css +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
(function(T,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("or3-workflow-core"),require("@vue-flow/core"),require("@vue-flow/background"),require("@vue-flow/controls"),require("@vue-flow/minimap")):typeof define=="function"&&define.amd?define(["exports","vue","or3-workflow-core","@vue-flow/core","@vue-flow/background","@vue-flow/controls","@vue-flow/minimap"],e):(T=typeof globalThis<"u"?globalThis:T||self,e(T.Or3WorkflowVue={},T.Vue,T.Or3WorkflowCore,T.VueFlow,T.VueFlowBackground,T.VueFlowControls,T.VueFlowMinimap))})(this,function(T,e,Y,I,lt,De,at){"use strict";function $e(l={}){const r=e.shallowRef(null),s=Y.createWorkflowEditor(l);r.value=e.markRaw(s);const i=s.on("update",()=>{e.triggerRef(r)});return e.onBeforeUnmount(()=>{var a;i(),(a=r.value)==null||a.destroy(),r.value=null}),r}const st=$e,ce=e.ref(new Map);function Ie(){const l=(i,a)=>{ce.value.set(i,a)},r=i=>ce.value.get(i),s=()=>{ce.value.clear()};return{outputs:e.readonly(ce),setOutput:l,getOutput:r,clear:s}}function rt(){const{setOutput:l,clear:r}=Ie(),s=e.ref(!1),i=e.ref(null),a=e.ref({}),y=e.ref({}),n=e.ref(null),c=e.ref(null),w=()=>{s.value=!1,i.value=null,a.value={},y.value={},n.value=null,c.value=null,r()};return{isRunning:s,currentNodeId:i,nodeStatuses:a,nodeOutputs:y,error:n,result:c,execute:async(p,k,D,u)=>{w(),s.value=!0;const P={onNodeStart:f=>{var b;i.value=f,a.value[f]="active",(b=u==null?void 0:u.onNodeStart)==null||b.call(u,f)},onNodeFinish:(f,b)=>{var N;a.value[f]="completed",y.value[f]=b,l(f,b),i.value===f&&(i.value=null),(N=u==null?void 0:u.onNodeFinish)==null||N.call(u,f,b)},onNodeError:(f,b)=>{var N;a.value[f]="error",n.value=b,(N=u==null?void 0:u.onNodeError)==null||N.call(u,f,b)},onToken:(f,b)=>{var N;(N=u==null?void 0:u.onToken)==null||N.call(u,f,b)},onReasoning:(f,b)=>{var N;(N=u==null?void 0:u.onReasoning)==null||N.call(u,f,b)},onRouteSelected:(f,b)=>{var N;(N=u==null?void 0:u.onRouteSelected)==null||N.call(u,f,b)},onTokenUsage:(f,b)=>{var N;(N=u==null?void 0:u.onTokenUsage)==null||N.call(u,f,b)},onContextCompacted:f=>{var b;(b=u==null?void 0:u.onContextCompacted)==null||b.call(u,f)},onBranchStart:(f,b,N)=>{var g;(g=u==null?void 0:u.onBranchStart)==null||g.call(u,f,b,N)},onBranchToken:(f,b,N,g)=>{var d;(d=u==null?void 0:u.onBranchToken)==null||d.call(u,f,b,N,g)},onBranchReasoning:(f,b,N,g)=>{var d;(d=u==null?void 0:u.onBranchReasoning)==null||d.call(u,f,b,N,g)},onBranchComplete:(f,b,N,g)=>{var d;(d=u==null?void 0:u.onBranchComplete)==null||d.call(u,f,b,N,g),l(`${f}:${b}`,g)}};try{const f=await p.execute(k,D,P);return c.value=f,f}catch(f){const b=f instanceof Error?f:new Error(String(f));throw n.value=b,b}finally{s.value=!1,i.value=null}},stop:p=>{s.value&&(p.stop(),s.value=!1)},reset:w}}function it(l){const r=e.ref(!1),s=e.ref(null),i=e.ref([]),a=e.ref(null),y=async()=>{r.value=!0,s.value=null;try{const E=await l.list();return i.value=E,E}catch(E){const V=E instanceof Error?E:new Error(String(E));throw s.value=V,V}finally{r.value=!1}};return{isLoading:r,error:s,workflows:i,currentWorkflow:a,loadList:y,load:async E=>{r.value=!0,s.value=null;try{const V=await l.load(E);return a.value=V,V}catch(V){const p=V instanceof Error?V:new Error(String(V));throw s.value=p,p}finally{r.value=!1}},save:async E=>{r.value=!0,s.value=null;try{const V=JSON.parse(JSON.stringify(E)),p=await l.save(V);return await y(),p}catch(V){const p=V instanceof Error?V:new Error(String(V));throw s.value=p,p}finally{r.value=!1}},remove:async E=>{r.value=!0,s.value=null;try{await l.delete(E),await y(),a.value=null}catch(V){const p=V instanceof Error?V:new Error(String(V));throw s.value=p,p}finally{r.value=!1}}}}function Me(){const l=e.ref({isRunning:!1,streamingContent:"",nodeStatuses:{},currentNodeId:null,error:null}),r=w=>{l.value.isRunning=w},s=w=>{l.value.streamingContent=w},i=w=>{l.value.streamingContent+=w},a=(w,E)=>{l.value.nodeStatuses[w]=E},y=w=>{l.value.currentNodeId=w},n=w=>{l.value.error=w},c=()=>{l.value={isRunning:!1,streamingContent:"",nodeStatuses:{},currentNodeId:null,error:null}};return{state:e.readonly(l),setRunning:r,setStreamingContent:s,appendStreamingContent:i,setNodeStatus:a,setCurrentNodeId:y,setError:n,reset:c}}function Te(){return Me()}function dt(l,r){const s=e.ref(l.getNodes().find(c=>c.id===r)),i=()=>{s.value=l.getNodes().find(c=>c.id===r)},a=l.on("update",i),y=l.on("nodeUpdate",i);return e.onBeforeUnmount(()=>{a(),y()}),{node:s,updateData:c=>{s.value&&l.commands.updateNodeData(s.value.id,c)}}}function Le(){const l=e.shallowRef(new Map);return{components:l,register(r,s){if(!r||typeof r!="string"){console.warn("Node type must be a non-empty string");return}const i=new Map(l.value);i.set(r,s),l.value=i},unregister(r){if(!l.value.has(r))return;const s=new Map(l.value);s.delete(r),l.value=s},get(r){return l.value.get(r)},has(r){return l.value.has(r)},getTypes(){return Array.from(l.value.keys())},clear(){l.value=new Map}}}const Oe=Le();function ct(l){Promise.resolve().then(()=>ut).then(r=>l.register("start",r.default)),Promise.resolve().then(()=>$t).then(r=>l.register("agent",r.default)),Promise.resolve().then(()=>At).then(r=>l.register("router",r.default)),Promise.resolve().then(()=>Xt).then(r=>l.register("parallel",r.default)),Promise.resolve().then(()=>io).then(r=>l.register("whileLoop",r.default)),Promise.resolve().then(()=>Vo).then(r=>l.register("subflow",r.default)),Promise.resolve().then(()=>Oo).then(r=>l.register("output",r.default))}ct(Oe);const mt={class:"start-content"},pt=e.defineComponent({__name:"StartNode",props:{id:{},data:{},selected:{type:Boolean}},setup(l){const r=l,s=e.computed(()=>r.data.label||"Start"),i=e.computed(()=>r.data.status||"idle");return(a,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["start-node",[`status-${i.value}`,{selected:l.selected}]])},[e.createElementVNode("div",mt,[y[0]||(y[0]=e.createElementVNode("svg",{class:"play-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polygon",{points:"5 3 19 12 5 21 5 3"})],-1)),e.createElementVNode("span",null,e.toDisplayString(s.value),1)]),e.createVNode(e.unref(I.Handle),{type:"source",position:e.unref(I.Position).Bottom,class:"handle"},null,8,["position"])],2))}}),H=(l,r)=>{const s=l.__vccOpts||l;for(const[i,a]of r)s[i]=a;return s},Pe=H(pt,[["__scopeId","data-v-740a3c44"]]),ut=Object.freeze(Object.defineProperty({__proto__:null,default:Pe},Symbol.toStringTag,{value:"Module"})),ft={},gt={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24"};function ht(l,r){return e.openBlock(),e.createElementBlock("svg",gt,[...r[0]||(r[0]=[e.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[e.createElementVNode("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065"}),e.createElementVNode("path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0"})],-1)])])}const Nt=H(ft,[["render",ht]]),Et={class:"node-meta-container"},kt={class:"node-id"},le=H(e.defineComponent({__name:"NodeWrapper",props:{id:{},selected:{type:Boolean},status:{default:"idle"},variant:{default:"default"}},emits:["inspect"],setup(l,{emit:r}){const s=l,i=r,a=e.computed(()=>["node-wrapper",`status-${s.status}`,`variant-${s.variant}`,{selected:s.selected}]);function y(n){n.stopPropagation(),i("inspect")}return(n,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(a.value)},[e.createElementVNode("div",Et,[e.createElementVNode("div",kt,e.toDisplayString(l.id.slice(0,6)),1),e.createElementVNode("button",{class:"inspect-btn",title:"Open inspector","aria-label":"Open node inspector",onClick:y},[e.createVNode(Nt)])]),e.renderSlot(n.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-aac8cd21"]]),yt={},Vt={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function wt(l,r){return e.openBlock(),e.createElementBlock("svg",Vt,[...r[0]||(r[0]=[e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2zm6-4v2m-3 8v9m6-9v9M5 16l4-2m6 0l4 2M9 18h6M10 8v.01M14 8v.01"},null,-1)])])}const Re=H(yt,[["render",wt]]),bt={class:"agent-node"},Bt={class:"node-header"},_t={class:"icon-wrapper"},xt={class:"node-label"},Ct={key:0,class:"status-spinner"},St={class:"model-badge"},Dt={class:"model-name"},ze=H(e.defineComponent({__name:"AgentNode",props:{id:{},data:{},selected:{type:Boolean}},emits:["inspect"],setup(l,{emit:r}){const s=l,i=e.computed(()=>s.data.label||"Agent"),a=e.computed(()=>s.data.model||"z-ai/glm-4.6:exacto"),y=e.computed(()=>s.data.status||"idle"),n=e.computed(()=>{const w=a.value.split("/");return w[w.length-1]}),c=r;return(w,E)=>(e.openBlock(),e.createBlock(le,{id:l.id,selected:l.selected,status:y.value,variant:"accent",onInspect:E[0]||(E[0]=V=>c("inspect"))},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Handle),{type:"target",position:e.unref(I.Position).Top,class:"handle"},null,8,["position"]),e.createElementVNode("div",bt,[e.createElementVNode("div",Bt,[e.createElementVNode("div",_t,[e.createVNode(Re,{class:"bot-icon"})]),e.createElementVNode("span",xt,e.toDisplayString(i.value),1),y.value==="active"?(e.openBlock(),e.createElementBlock("div",Ct)):e.createCommentVNode("",!0)]),e.createElementVNode("div",St,[e.createElementVNode("span",Dt,e.toDisplayString(n.value),1)])]),e.createVNode(e.unref(I.Handle),{type:"source",position:e.unref(I.Position).Bottom,class:"handle"},null,8,["position"]),e.createVNode(e.unref(I.Handle),{type:"source",position:e.unref(I.Position).Right,id:"error",class:"handle error-handle"},null,8,["position"])]),_:1},8,["id","selected","status"]))}}),[["__scopeId","data-v-47d0bb13"]]),$t=Object.freeze(Object.defineProperty({__proto__:null,default:ze},Symbol.toStringTag,{value:"Module"})),It={},Mt={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Tt(l,r){return e.openBlock(),e.createElementBlock("svg",Mt,[...r[0]||(r[0]=[e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 17a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12 0a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM6 15v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1m-6-6v3"},null,-1)])])}const He=H(It,[["render",Tt]]),Lt={class:"router-node"},Ot={class:"node-header"},Pt={class:"icon-wrapper"},Rt={class:"node-label"},zt={key:0,class:"status-spinner"},Ht={class:"router-badge"},Ae=H(e.defineComponent({__name:"RouterNode",props:{id:{},data:{},selected:{type:Boolean}},emits:["inspect"],setup(l,{emit:r}){const s=l,i=e.computed(()=>s.data.label||"Router"),a=e.computed(()=>s.data.status||"idle"),y=[{id:"route-1",label:"Route 1"},{id:"route-2",label:"Route 2"}],n=e.computed(()=>{const E=s.data.routes||y;return E.length>0?E:y}),c=e.computed(()=>{const E=n.value.length;return E===1?[50]:n.value.map((V,p)=>(p+1)/(E+1)*100)}),w=r;return(E,V)=>(e.openBlock(),e.createBlock(le,{id:l.id,selected:l.selected,status:a.value,variant:"warning",onInspect:V[0]||(V[0]=p=>w("inspect"))},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Handle),{type:"target",position:e.unref(I.Position).Top,class:"handle"},null,8,["position"]),e.createElementVNode("div",Lt,[e.createElementVNode("div",Ot,[e.createElementVNode("div",Pt,[e.createVNode(He,{class:"branch-icon"})]),e.createElementVNode("span",Rt,e.toDisplayString(i.value),1),a.value==="active"?(e.openBlock(),e.createElementBlock("div",zt)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ht,[e.createElementVNode("span",null,"Router · "+e.toDisplayString(n.value.length)+" routes",1)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(p,k)=>(e.openBlock(),e.createBlock(e.unref(I.Handle),{key:p.id,type:"source",position:e.unref(I.Position).Bottom,id:p.id,class:"handle route-handle","data-route-label":p.label||p.id,title:p.label||p.id,style:e.normalizeStyle({left:`${c.value[k]}%`})},null,8,["position","id","data-route-label","title","style"]))),128)),e.createVNode(e.unref(I.Handle),{type:"source",position:e.unref(I.Position).Right,id:"error",class:"handle error-handle"},null,8,["position"])]),_:1},8,["id","selected","status"]))}}),[["__scopeId","data-v-36dffe57"]]),At=Object.freeze(Object.defineProperty({__proto__:null,default:Ae},Symbol.toStringTag,{value:"Module"})),vt={},Ft={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function jt(l,r){return e.openBlock(),e.createElementBlock("svg",Ft,[...r[0]||(r[0]=[e.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[e.createElementVNode("path",{d:"M21 17h-5.397a5 5 0 0 1-4.096-2.133l-.514-.734A5 5 0 0 0 6.897 12H3m18-5h-5.395a5 5 0 0 0-4.098 2.135l-.51.73A5 5 0 0 1 6.9 12H3"}),e.createElementVNode("path",{d:"m18 10l3-3l-3-3m0 16l3-3l-3-3"})],-1)])])}const ve=H(vt,[["render",jt]]),Ut={class:"parallel-node"},Wt={class:"node-header"},Kt={class:"icon-wrapper"},qt={class:"node-label"},Gt={key:0,class:"status-spinner"},Yt={class:"parallel-badge"},Fe=H(e.defineComponent({__name:"ParallelNode",props:{id:{},data:{},selected:{type:Boolean}},emits:["inspect"],setup(l,{emit:r}){const s=l,i=e.computed(()=>s.data.label||"Parallel"),a=e.computed(()=>s.data.status||"idle"),y=e.computed(()=>s.data.mergeEnabled!==!1),n=e.computed(()=>s.data.branches||[]),c=e.computed(()=>{const E=n.value.length;return E===0?[]:E===1?[50]:n.value.map((V,p)=>(p+1)/(E+1)*100)}),w=r;return(E,V)=>(e.openBlock(),e.createBlock(le,{id:l.id,selected:l.selected,status:a.value,variant:"info",onInspect:V[0]||(V[0]=p=>w("inspect"))},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Handle),{type:"target",position:e.unref(I.Position).Top,class:"handle"},null,8,["position"]),e.createElementVNode("div",Ut,[e.createElementVNode("div",Wt,[e.createElementVNode("div",Kt,[e.createVNode(ve,{class:"merge-icon"})]),e.createElementVNode("span",qt,e.toDisplayString(i.value),1),a.value==="active"?(e.openBlock(),e.createElementBlock("div",Gt)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Yt,[e.createElementVNode("span",null,e.toDisplayString(y.value?"Parallel Merge":"Parallel Split")+" · "+e.toDisplayString(n.value.length)+" branches",1)])]),y.value?(e.openBlock(),e.createBlock(e.unref(I.Handle),{key:0,type:"source",position:e.unref(I.Position).Bottom,id:"merged",class:"handle merged-output"},null,8,["position"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.value,(p,k)=>(e.openBlock(),e.createBlock(e.unref(I.Handle),{key:p.id,type:"source",position:e.unref(I.Position).Bottom,id:p.id,class:"handle branch-handle",style:e.normalizeStyle({left:`${c.value[k]}%`})},null,8,["position","id","style"]))),128))]),_:1},8,["id","selected","status"]))}}),[["__scopeId","data-v-fe2a1cc4"]]),Xt=Object.freeze(Object.defineProperty({__proto__:null,default:Fe},Symbol.toStringTag,{value:"Module"})),Jt={},Qt={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Zt(l,r){return e.openBlock(),e.createElementBlock("svg",Qt,[...r[0]||(r[0]=[e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 6a3 3 0 1 0 6 0a3 3 0 0 0-6 0m18 5V8a2 2 0 0 0-2-2h-6l3 3m0-6l-3 3M3 13v3a2 2 0 0 0 2 2h6l-3-3m0 6l3-3m4 0a3 3 0 1 0 6 0a3 3 0 0 0-6 0"},null,-1)])])}const je=H(Jt,[["render",Zt]]),eo={class:"while-node"},to={class:"node-header"},oo={class:"icon-wrapper"},no={class:"node-label"},lo={class:"meta"},ao={class:"meta-item"},so={class:"meta-item"},ro={key:0,class:"meta-item accumulate-badge",title:"Collects all outputs"},Ue=H(e.defineComponent({__name:"WhileLoopNode",props:{id:{},data:{},selected:{type:Boolean}},emits:["inspect"],setup(l,{emit:r}){const s=l,i=e.computed(()=>s.data.label||"While Loop"),a=e.computed(()=>s.data.status||"idle"),y=e.computed(()=>s.data.maxIterations??10),n=e.computed(()=>s.data.loopMode??"condition"),c=e.computed(()=>s.data.outputMode??"last"),w=e.computed(()=>typeof s.data.iteration=="number"?s.data.iteration:null),E=e.computed(()=>n.value==="fixed"?"Fixed":"While"),V=r;return(p,k)=>(e.openBlock(),e.createBlock(le,{id:l.id,selected:l.selected,status:a.value,variant:"info",onInspect:k[0]||(k[0]=D=>V("inspect"))},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Handle),{type:"target",position:e.unref(I.Position).Top,class:"handle"},null,8,["position"]),e.createElementVNode("div",eo,[e.createElementVNode("div",to,[e.createElementVNode("div",oo,[e.createVNode(je,{class:"loop-icon"})]),e.createElementVNode("span",no,e.toDisplayString(i.value),1),e.createElementVNode("span",{class:e.normalizeClass(["pill",{fixed:n.value==="fixed"}])},e.toDisplayString(E.value),3)]),e.createElementVNode("div",lo,[e.createElementVNode("span",ao,[k[1]||(k[1]=e.createElementVNode("strong",null,"Max:",-1)),e.createTextVNode(" "+e.toDisplayString(y.value),1)]),e.createElementVNode("span",so,[k[2]||(k[2]=e.createElementVNode("strong",null,"Iter:",-1)),e.createTextVNode(" "+e.toDisplayString(w.value??"—"),1)]),c.value==="accumulate"?(e.openBlock(),e.createElementBlock("span",ro," 📦 ")):e.createCommentVNode("",!0)])]),k[3]||(k[3]=e.createElementVNode("div",{class:"port-labels"},[e.createElementVNode("span",{class:"port-label body-label"},"↻ Loop"),e.createElementVNode("span",{class:"port-label done-label"},"✓ Exit")],-1)),e.createVNode(e.unref(I.Handle),{type:"source",position:e.unref(I.Position).Bottom,id:"body",class:"handle body-handle",style:{left:"30%"}},null,8,["position"]),e.createVNode(e.unref(I.Handle),{type:"source",position:e.unref(I.Position).Bottom,id:"done",class:"handle done-handle",style:{left:"70%"}},null,8,["position"])]),_:1},8,["id","selected","status"]))}}),[["__scopeId","data-v-e439cd33"]]),io=Object.freeze(Object.defineProperty({__proto__:null,default:Ue},Symbol.toStringTag,{value:"Module"})),co={},mo={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function po(l,r){return e.openBlock(),e.createElementBlock("svg",mo,[...r[0]||(r[0]=[e.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[e.createElementVNode("path",{d:"m14 12l6-3l-8-4l-8 4l6 3"}),e.createElementVNode("path",{fill:"currentColor",d:"m10 12l-6 3l8 4l8-4l-6-3l-2 1z"})],-1)])])}const We=H(co,[["render",po]]),uo={class:"subflow-node"},fo={class:"node-header"},go={class:"icon-wrapper"},ho={class:"node-label"},No={key:0,class:"status-spinner"},Eo={class:"subflow-info"},ko={class:"meta-row"},yo={key:0,class:"meta-item"},Ke=H(e.defineComponent({__name:"SubflowNode",props:{id:{},data:{},selected:{type:Boolean}},emits:["inspect"],setup(l,{emit:r}){const s=l,i=e.computed(()=>s.data.label||"Subflow"),a=e.computed(()=>s.data.subflowId||""),y=e.computed(()=>s.data.shareSession!==!1),n=e.computed(()=>s.data.status||"idle"),c=e.computed(()=>a.value?a.value:"No subflow selected"),w=e.computed(()=>{const V=s.data.inputMappings||{};return Object.keys(V).length}),E=r;return(V,p)=>(e.openBlock(),e.createBlock(le,{id:l.id,selected:l.selected,status:n.value,variant:"secondary",onInspect:p[0]||(p[0]=k=>E("inspect"))},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Handle),{type:"target",position:e.unref(I.Position).Top,class:"handle"},null,8,["position"]),e.createElementVNode("div",uo,[e.createElementVNode("div",fo,[e.createElementVNode("div",go,[e.createVNode(We,{class:"subflow-icon"})]),e.createElementVNode("span",ho,e.toDisplayString(i.value),1),n.value==="active"?(e.openBlock(),e.createElementBlock("div",No)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Eo,[e.createElementVNode("div",{class:e.normalizeClass(["subflow-badge",{empty:!a.value}])},[p[1]||(p[1]=e.createElementVNode("svg",{class:"link-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"}),e.createElementVNode("path",{d:"M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"})],-1)),e.createElementVNode("span",null,e.toDisplayString(c.value),1)],2),e.createElementVNode("div",ko,[w.value>0?(e.openBlock(),e.createElementBlock("span",yo,[p[2]||(p[2]=e.createElementVNode("svg",{class:"meta-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),e.createElementVNode("polyline",{points:"16 17 21 12 16 7"}),e.createElementVNode("line",{x1:"21",y1:"12",x2:"9",y2:"12"})],-1)),e.createTextVNode(" "+e.toDisplayString(w.value)+" input"+e.toDisplayString(w.value!==1?"s":""),1)])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["meta-item",{muted:!y.value}])},[p[3]||(p[3]=e.createElementVNode("svg",{class:"meta-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"}),e.createElementVNode("circle",{cx:"9",cy:"7",r:"4"}),e.createElementVNode("path",{d:"M23 21v-2a4 4 0 00-3-3.87"}),e.createElementVNode("path",{d:"M16 3.13a4 4 0 010 7.75"})],-1)),e.createTextVNode(" "+e.toDisplayString(y.value?"Shared":"Isolated"),1)],2)])])]),e.createVNode(e.unref(I.Handle),{type:"source",position:e.unref(I.Position).Bottom,class:"handle"},null,8,["position"]),e.createVNode(e.unref(I.Handle),{type:"source",position:e.unref(I.Position).Right,id:"error",class:"handle error-handle"},null,8,["position"])]),_:1},8,["id","selected","status"]))}}),[["__scopeId","data-v-d5994547"]]),Vo=Object.freeze(Object.defineProperty({__proto__:null,default:Ke},Symbol.toStringTag,{value:"Module"})),wo={},bo={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Bo(l,r){return e.openBlock(),e.createElementBlock("svg",bo,[...r[0]||(r[0]=[e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.042 19.933A9.8 9.8 0 0 1 7.7 19L3 20l1.3-3.9C1.976 12.663 2.874 8.228 6.4 5.726c3.526-2.501 8.59-2.296 11.845.48c2.127 1.814 3.052 4.36 2.694 6.808M15 19l2 2l4-4"},null,-1)])])}const qe=H(wo,[["render",Bo]]),_o={class:"output-node"},xo={class:"node-header"},Co={class:"icon-wrapper"},So={class:"node-label"},Do={key:0,class:"status-spinner"},$o={class:"output-info"},Io={class:"format-badge"},Mo={class:"meta-row"},To={key:0,class:"meta-item"},Lo={key:1,class:"meta-item"},Ge=H(e.defineComponent({__name:"OutputNode",props:{id:{},data:{},selected:{type:Boolean}},emits:["inspect"],setup(l,{emit:r}){const s=l,i=e.computed(()=>s.data.label||"Output"),a=e.computed(()=>s.data.format||"text"),y=e.computed(()=>!!s.data.template),n=e.computed(()=>s.data.includeMetadata??!1),c=e.computed(()=>s.data.status||"idle"),w=e.computed(()=>{switch(a.value){case"json":return"JSON";case"markdown":return"MD";case"text":default:return"TXT"}}),E=r;return(V,p)=>(e.openBlock(),e.createBlock(le,{id:l.id,selected:l.selected,status:c.value,variant:"info",onInspect:p[0]||(p[0]=k=>E("inspect"))},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Handle),{type:"target",position:e.unref(I.Position).Top,class:"handle"},null,8,["position"]),e.createElementVNode("div",_o,[e.createElementVNode("div",xo,[e.createElementVNode("div",Co,[e.createVNode(qe,{class:"output-icon"})]),e.createElementVNode("span",So,e.toDisplayString(i.value),1),c.value==="active"?(e.openBlock(),e.createElementBlock("div",Do)):e.createCommentVNode("",!0)]),e.createElementVNode("div",$o,[e.createElementVNode("div",Io,[p[1]||(p[1]=e.createElementVNode("svg",{class:"format-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M4 7V4h16v3"}),e.createElementVNode("path",{d:"M9 20h6"}),e.createElementVNode("path",{d:"M12 4v16"})],-1)),e.createElementVNode("span",null,e.toDisplayString(w.value),1)]),e.createElementVNode("div",Mo,[y.value?(e.openBlock(),e.createElementBlock("span",To,[...p[2]||(p[2]=[e.createElementVNode("svg",{class:"meta-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})],-1),e.createTextVNode(" Template ",-1)])])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("span",Lo,[...p[3]||(p[3]=[e.createElementVNode("svg",{class:"meta-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.createElementVNode("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})],-1),e.createTextVNode(" Metadata ",-1)])])):e.createCommentVNode("",!0)])]),p[4]||(p[4]=e.createElementVNode("div",{class:"terminal-indicator"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.createElementVNode("line",{x1:"9",y1:"9",x2:"15",y2:"15"}),e.createElementVNode("line",{x1:"15",y1:"9",x2:"9",y2:"15"})]),e.createElementVNode("span",null,"Terminal")],-1))])]),_:1},8,["id","selected","status"]))}}),[["__scopeId","data-v-94e60a57"]]),Oo=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"})),Po=["data-workflow-canvas"],Ro={key:0,class:"edge-label"},zo=H(e.defineComponent({__name:"WorkflowCanvas",props:{editor:{},nodeStatuses:{},panOnDrag:{type:[Boolean,Array]},selectionKeyCode:{type:[Boolean,String,Array,Function,null]},selectionMode:{},canvasId:{}},emits:["nodeClick","edgeClick","paneClick","drop","nodeInspect"],setup(l,{expose:r,emit:s}){const i=l,a=s;function y(h){if(!d())return;i.editor.commands.selectNode(h.id);const S=N.value.find(x=>x.id===h.id);S&&a("nodeInspect",S)}const{onConnect:n,onNodeDragStop:c,screenToFlowCoordinate:w,fitView:E,nodes:V,edges:p,panOnDrag:k,selectionKeyCode:D,selectionMode:u}=I.useVueFlow(),P=k.value,f=D.value,b=u.value;e.watch(()=>i.panOnDrag,h=>{k.value=h??P},{immediate:!0}),e.watch(()=>i.selectionKeyCode,h=>{D.value=h??f},{immediate:!0}),e.watch(()=>i.selectionMode,h=>{u.value=h??b},{immediate:!0});const N=e.ref([]),g=e.ref([]),d=()=>!i.editor.isDestroyed();let _=new Map,B=new Map,M=-1;const O=(h,S)=>`${i.editor.getNodeVersion(h)}:${S}`,A=(h,S)=>`${i.editor.getEdgeVersion(h)}:${S}`,R=()=>{var fe,ge,he,ne,Ne,Ee;const h=i.editor.getNodes(),S=i.editor.getEdges(),x=i.editor.getGlobalVersion();if(M===x&&!i.nodeStatuses)return;const W=new Map,F=new Map;let K=!1;const U=new Set(N.value.map(C=>C.id)),ae=new Set(h.map(C=>C.id));if(U.size!==ae.size)K=!0;else for(const C of ae)if(!U.has(C)){K=!0;break}if(!K)for(const C of h){const q=((fe=i.nodeStatuses)==null?void 0:fe[C.id])||"idle",G=O(C.id,q);W.set(C.id,G),_.get(C.id)!==G&&(K=!0)}if(K){N.value=h.map(C=>{var q;return{id:C.id,type:C.type,position:C.position,data:{...C.data,status:((q=i.nodeStatuses)==null?void 0:q[C.id])||"idle"},selected:C.selected}}),_=new Map;for(const C of h){const q=((ge=i.nodeStatuses)==null?void 0:ge[C.id])||"idle";_.set(C.id,O(C.id,q))}}let Z=!1;const J=new Set(g.value.map(C=>C.id)),ue=new Set(S.map(C=>C.id));if(J.size!==ue.size)Z=!0;else for(const C of ue)if(!J.has(C)){Z=!0;break}if(!Z)for(const C of S){const q=((he=i.nodeStatuses)==null?void 0:he[C.source])==="active"||((ne=i.nodeStatuses)==null?void 0:ne[C.target])==="active",G=A(C.id,q);F.set(C.id,G),B.get(C.id)!==G&&(Z=!0)}if(Z){g.value=S.map(C=>{var q,G;return{id:C.id,source:C.source,target:C.target,sourceHandle:C.sourceHandle,targetHandle:C.targetHandle,label:C.label,data:C.data,animated:((q=i.nodeStatuses)==null?void 0:q[C.source])==="active"||((G=i.nodeStatuses)==null?void 0:G[C.target])==="active"}}),B=new Map;for(const C of S){const q=((Ne=i.nodeStatuses)==null?void 0:Ne[C.source])==="active"||((Ee=i.nodeStatuses)==null?void 0:Ee[C.target])==="active";B.set(C.id,A(C.id,q))}}M=x};e.watch(()=>i.nodeStatuses,()=>{R()},{deep:!0});let X=null,v=null,oe=!1;const ke=e.computed(()=>V.value.filter(h=>h.selected).map(h=>h.id).sort().join(","));e.watch(ke,(h,S)=>{if(!d()||oe||h===S)return;const x=h?h.split(","):[];i.editor.commands.setSelection(x)}),e.onMounted(()=>{d()&&(R(),X=i.editor.on("update",R),v=i.editor.on("selectionUpdate",()=>{oe=!0,R(),e.nextTick(()=>{oe=!1})}),setTimeout(()=>E({padding:.2}),100))}),e.onUnmounted(()=>{X==null||X(),v==null||v()}),n(h=>{d()&&i.editor.commands.createEdge(h.source,h.target,h.sourceHandle??void 0,h.targetHandle??void 0)}),c(()=>{if(!d())return;const h=V.value.filter(S=>S.selected);for(const S of h)i.editor.commands.setNodePosition(S.id,S.position)});const ye=h=>{d()&&(i.editor.commands.selectNode(h.node.id),a("nodeClick",h.node))},Ve=h=>{d()&&i.editor.commands.deselectAll(),a("edgeClick",h.edge)},we=()=>{d()&&(i.editor.commands.deselectAll(),a("paneClick"))},be=h=>{var ae,Z;if(!d())return;const S=(ae=h.dataTransfer)==null?void 0:ae.getData("application/vueflow"),x=(Z=h.dataTransfer)==null?void 0:Z.getData("application/json");if(!S||!x)return;let W;try{W=JSON.parse(x)}catch(J){console.warn("Failed to parse dropped node data",J);return}if(!(J=>typeof J=="object"&&J!==null&&"label"in J&&typeof J.label=="string")(W)){console.warn('Dropped node data is missing required "label" field');return}const K=W,U=w({x:h.clientX,y:h.clientY});i.editor.commands.createNode(S,K,U),a("drop",h)},Be=h=>{h.preventDefault(),h.dataTransfer&&(h.dataTransfer.dropEffect="move")},_e=h=>{var S;(S=h.currentTarget)==null||S.focus()},me=h=>{if(!d())return;const S=h,{nodeType:x,defaultData:W,x:F,y:K}=S.detail,U=w({x:F,y:K});i.editor.commands.createNode(x,W,U)},pe=()=>{const h=i.canvasId?`[data-workflow-canvas="${i.canvasId}"] .vue-flow`:".vue-flow";return document.querySelector(h)};e.onMounted(()=>{const h=pe();h&&h.addEventListener("mobileNodeDrop",me)}),e.onUnmounted(()=>{const h=pe();h&&h.removeEventListener("mobileNodeDrop",me)});const xe=h=>{if(!d())return;const S=h.target;if(!(S.tagName==="INPUT"||S.tagName==="TEXTAREA")){if(h.key==="Delete"||h.key==="Backspace"){h.preventDefault();const x=p.value.filter(F=>F.selected).map(F=>F.id),W=V.value.filter(F=>F.selected&&F.type!=="start").map(F=>F.id);if(x.length){x.forEach(F=>i.editor.commands.deleteEdge(F));return}W.forEach(F=>i.editor.commands.deleteNode(F))}(h.metaKey||h.ctrlKey)&&h.key==="z"&&!h.shiftKey&&(h.preventDefault(),i.editor.commands.undo()),(h.metaKey||h.ctrlKey)&&(h.key==="y"||h.key==="z"&&h.shiftKey)&&(h.preventDefault(),i.editor.commands.redo()),(h.metaKey||h.ctrlKey)&&h.key==="d"&&(h.preventDefault(),i.editor.getSelected().nodes.forEach(x=>i.editor.commands.duplicateNode(x)))}};return r({fitView:()=>E({padding:.2})}),(h,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["workflow-canvas",{"workflow-canvas-select":l.selectionKeyCode===!0}]),"data-workflow-canvas":l.canvasId||void 0,onDrop:be,onDragover:Be,onKeydown:xe,onMousedown:_e,tabindex:"0"},[e.createVNode(e.unref(I.VueFlow),{nodes:N.value,"onUpdate:nodes":S[0]||(S[0]=x=>N.value=x),edges:g.value,"onUpdate:edges":S[1]||(S[1]=x=>g.value=x),"default-viewport":{x:50,y:50,zoom:1},"min-zoom":.5,"max-zoom":2,"fit-view-on-init":"","pan-on-drag":l.panOnDrag,"selection-key-code":l.selectionKeyCode,"selection-mode":l.selectionMode,"delete-key-code":null,onNodeClick:ye,onEdgeClick:Ve,onPaneClick:we},{"node-start":e.withCtx(x=>[e.createVNode(Pe,{id:x.id,data:x.data,selected:x.selected},null,8,["id","data","selected"])]),"node-agent":e.withCtx(x=>[e.createVNode(ze,e.mergeProps(x,{onInspect:W=>y(x)}),null,16,["onInspect"])]),"node-router":e.withCtx(x=>[e.createVNode(Ae,e.mergeProps(x,{onInspect:W=>y(x)}),null,16,["onInspect"])]),"node-parallel":e.withCtx(x=>[e.createVNode(Fe,e.mergeProps(x,{onInspect:W=>y(x)}),null,16,["onInspect"])]),"node-whileLoop":e.withCtx(x=>[e.createVNode(Ue,e.mergeProps(x,{onInspect:W=>y(x)}),null,16,["onInspect"])]),"node-subflow":e.withCtx(x=>[e.createVNode(Ke,e.mergeProps(x,{onInspect:W=>y(x)}),null,16,["onInspect"])]),"node-output":e.withCtx(x=>[e.createVNode(Ge,e.mergeProps(x,{onInspect:W=>y(x)}),null,16,["onInspect"])]),"edge-label":e.withCtx(({label:x})=>[x?(e.openBlock(),e.createElementBlock("div",Ro,e.toDisplayString(x),1)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(lt.Background),{gap:20,size:1,"pattern-color":"rgba(255, 255, 255, 0.03)"}),e.createVNode(e.unref(De.Controls),{position:"bottom-left"})]),_:1},8,["nodes","edges","pan-on-drag","selection-key-code","selection-mode"])],42,Po))}}),[["__scopeId","data-v-149e9faf"]]),Ho={},Ao={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function vo(l,r){return e.openBlock(),e.createElementBlock("svg",Ao,[...r[0]||(r[0]=[e.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.createElementVNode("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])])}const Fo=H(Ho,[["render",vo]]),jo={},Uo={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"};function Wo(l,r){return e.openBlock(),e.createElementBlock("svg",Uo,[...r[0]||(r[0]=[e.createStaticVNode('<circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="19" r="1"></circle>',6)])])}const Ko=H(jo,[["render",Wo]]),qo={},Go={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Yo(l,r){return e.openBlock(),e.createElementBlock("svg",Go,[...r[0]||(r[0]=[e.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[e.createElementVNode("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01"}),e.createElementVNode("path",{d:"M11 12h1v4h1"})],-1)])])}const Xo=H(qo,[["render",Yo]]),Jo={class:"node-palette"},Qo={class:"palette-header"},Zo={class:"palette-nodes"},en=["onDragstart","onTouchstart","onClick"],tn={class:"node-info"},on={class:"node-name"},nn={class:"node-desc"},ln={class:"palette-hint"},an=6,sn=H(e.defineComponent({__name:"NodePalette",props:{editor:{},canvasId:{}},emits:["quick-add"],setup(l,{emit:r}){const s=l,i=r,a=e.ref(!1),y=()=>{a.value=window.innerWidth<=768};e.onMounted(()=>{y(),window.addEventListener("resize",y)}),e.onUnmounted(()=>{window.removeEventListener("resize",y)});const n=[{type:"agent",label:"AI Agent",description:"Connect to an AI model to process and respond to messages",colorVar:"--or3-color-accent",icon:Re,defaultData:{label:"New Agent",model:"z-ai/glm-4.6:exacto",prompt:""}},{type:"router",label:"Decision",description:"Route messages to different paths based on intent",colorVar:"--or3-color-warning",icon:He,defaultData:{label:"Decision"}},{type:"parallel",label:"Parallel",description:"Run multiple tasks at once and combine results",colorVar:"--or3-color-info",icon:ve,defaultData:{label:"Parallel",model:"z-ai/glm-4.6:exacto",prompt:"Combine the outputs into a coherent response.",branches:[]}},{type:"whileLoop",label:"Loop",description:"Repeat a sequence until a condition is met",colorVar:"--or3-color-info",icon:je,defaultData:{label:"Loop",conditionPrompt:'Should we continue iterating? Respond with "continue" or "done".',maxIterations:10,onMaxIterations:"warning"}},{type:"subflow",label:"Sub-workflow",description:"Embed another workflow as a single node",colorVar:"--or3-color-secondary",icon:We,defaultData:{label:"Sub-workflow",subflowId:"",inputMappings:{},shareSession:!0}},{type:"output",label:"Output",description:"Define the final output format",colorVar:"--or3-color-success",icon:qe,defaultData:{label:"Output",format:"text",template:"",includeMetadata:!1}}],c=()=>{const g=s.canvasId?`[data-workflow-canvas="${s.canvasId}"] .vue-flow`:".vue-flow";return document.querySelector(g)},w=(g,d,_)=>{g.dataTransfer&&(g.dataTransfer.setData("application/vueflow",d),g.dataTransfer.setData("application/json",JSON.stringify(_)),g.dataTransfer.effectAllowed="move")};let E=null,V=!1,p=!1,k=0,D=0;const u=(g,d,_)=>{E={nodeType:d,defaultData:_},p=!1;const B=g.touches[0];B&&(k=B.clientX,D=B.clientY)},P=g=>{if(!E||p)return;const d=g.touches[0];if(!d)return;const _=Math.abs(d.clientX-k),B=Math.abs(d.clientY-D);if(_+B<an)return;p=!0,g.currentTarget.classList.add("dragging-touch")},f=g=>{if(g.currentTarget.classList.remove("dragging-touch"),!E)return;const _=g.changedTouches[0],B=document.elementFromPoint(_.clientX,_.clientY),M=c();if(M&&(M===B||M.contains(B))){const O=new CustomEvent("mobileNodeDrop",{detail:{nodeType:E.nodeType,defaultData:E.defaultData,x:_.clientX,y:_.clientY}});M.dispatchEvent(O),V=!0,setTimeout(()=>{V=!1},0)}E=null,p=!1},b=(g,d)=>{const _=c();if(!_)return;const B=_.getBoundingClientRect(),M=B.left+B.width/2,O=B.top+B.height/2,A=new CustomEvent("mobileNodeDrop",{detail:{nodeType:g,defaultData:d,x:M,y:O}});_.dispatchEvent(A)},N=(g,d,_)=>{if(V){V=!1;return}a.value&&(g.preventDefault(),b(d,_),i("quick-add"))};return(g,d)=>(e.openBlock(),e.createElementBlock("div",Jo,[e.createElementVNode("div",Qo,[e.createVNode(Fo,{class:"plus-icon"}),d[1]||(d[1]=e.createElementVNode("span",null,"Add Nodes",-1))]),e.createElementVNode("div",Zo,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(n,_=>e.createElementVNode("div",{key:_.type,class:"palette-node",draggable:"true",onDragstart:B=>w(B,_.type,_.defaultData),onTouchstart:B=>u(B,_.type,_.defaultData),onTouchmove:P,onTouchend:d[0]||(d[0]=B=>f(B)),onClick:B=>N(B,_.type,_.defaultData)},[e.createElementVNode("div",{class:"node-icon",style:e.normalizeStyle({"--node-color":`var(${_.colorVar}, #8b5cf6)`})},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.icon)))],4),e.createElementVNode("div",tn,[e.createElementVNode("span",on,e.toDisplayString(_.label),1),e.createElementVNode("span",nn,e.toDisplayString(_.description),1)]),e.createVNode(Ko,{class:"drag-handle"})],40,en)),64))]),e.createElementVNode("div",ln,[e.createVNode(Xo,{class:"hint-icon"}),d[2]||(d[2]=e.createElementVNode("p",null," Drag nodes onto the canvas to build your workflow. Connect nodes by dragging from output to input handles. ",-1))])]))}}),[["__scopeId","data-v-958e336f"]]),rn={class:"mode-selector"},dn=["onClick","title"],cn=["innerHTML"],mn=H(e.defineComponent({__name:"OutputModeSelector",props:{modelValue:{}},emits:["update:modelValue"],setup(l,{emit:r}){const s=r,i=[{value:"combine",label:"Combine",description:"Concatenate outputs without AI processing",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>'},{value:"synthesis",label:"AI Synthesis",description:"Use AI to synthesize a new output",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7h1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-1H2a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h1a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 0 1 2-2z"/><path d="M2 12h20"/><path d="M12 12v10"/><path d="M8 17h8"/></svg>'}];return(a,y)=>(e.openBlock(),e.createElementBlock("div",rn,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,n=>e.createElementVNode("button",{key:n.value,onClick:c=>s("update:modelValue",n.value),class:e.normalizeClass(["mode-btn",{active:l.modelValue===n.value}]),title:n.description},[e.createElementVNode("span",{innerHTML:n.icon,class:"mode-icon"},null,8,cn),e.createTextVNode(" "+e.toDisplayString(n.label),1)],10,dn)),64))]))}}),[["__scopeId","data-v-080a00d4"]]),pn={class:"space-y-3 source-picker"},un={class:"flex items-center justify-between"},fn={class:"relative"},gn=["disabled"],hn={key:0,class:"absolute right-0 top-full mt-1 w-64 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 z-50 max-h-60 overflow-y-auto"},Nn={key:0,class:"p-3 text-xs text-gray-500 text-center"},En={key:1,class:"py-1"},kn={key:0,class:"px-3 py-1 text-xs font-semibold text-gray-500 bg-gray-50 dark:bg-gray-700/50"},yn=["onClick"],Vn={class:"truncate"},wn={class:"text-xs text-gray-400"},bn=["onDragstart","onDragover"],Bn={key:0,class:"drop-indicator before"},_n={key:1,class:"drop-indicator after"},xn={class:"flex-1 min-w-0 pointer-events-none"},Cn={class:"text-sm font-semibold truncate"},Sn={key:0,class:"text-xs source-subtext truncate"},Dn=["onClick"],$n={key:1,class:"empty-state"},In=H(e.defineComponent({__name:"OutputSourcePicker",props:{modelValue:{},availableGroups:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(l,{emit:r}){const s=l,i=r,a=e.computed(()=>s.availableGroups.flatMap(g=>g.sources)),y=e.computed(()=>s.modelValue.map(g=>a.value.find(d=>d.id===g)).filter(g=>!!g)),n=e.computed(()=>s.availableGroups.map(g=>({...g,sources:g.sources.filter(d=>!s.modelValue.includes(d.id))})).filter(g=>g.sources.length>0)),c=e.ref(!1);function w(g){i("update:modelValue",[...s.modelValue,g]),c.value=!1}function E(g){i("update:modelValue",s.modelValue.filter(d=>d!==g))}const V=e.ref(null),p=e.ref(null);function k(g,d){V.value=d,g.dataTransfer&&(g.dataTransfer.effectAllowed="move",g.dataTransfer.dropEffect="move")}function D(g,d){var A,R;if(g.preventDefault(),V.value===null)return;if(V.value===d){p.value=null;return}const B=g.currentTarget.getBoundingClientRect(),M=B.top+B.height/2,O=g.clientY<M?"before":"after";(((A=p.value)==null?void 0:A.index)!==d||((R=p.value)==null?void 0:R.position)!==O)&&(p.value={index:d,position:O})}function u(g){const d=g.relatedTarget;g.currentTarget.contains(d)}function P(g){const d=g.relatedTarget;g.currentTarget.contains(d)||(p.value=null)}function f(g){if(g.preventDefault(),V.value===null||!p.value){N();return}const d=y.value[V.value],_=y.value[p.value.index];if(!d||!_||d.id===_.id){N();return}const B=[...s.modelValue],M=B.indexOf(d.id);if(M===-1){N();return}const[O]=B.splice(M,1);let A=B.indexOf(_.id);if(A===-1){N();return}p.value.position==="after"&&A++,B.splice(A,0,O),i("update:modelValue",B),N()}function b(){N()}function N(){V.value=null,p.value=null}return(g,d)=>(e.openBlock(),e.createElementBlock("div",pn,[e.createElementVNode("div",un,[d[3]||(d[3]=e.createElementVNode("label",{class:"sources-label"},"Sources",-1)),e.createElementVNode("div",fn,[e.createElementVNode("button",{onClick:d[0]||(d[0]=_=>c.value=!c.value),disabled:l.disabled||n.value.length===0,class:"add-source-btn"},[...d[2]||(d[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.createElementVNode("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1),e.createTextVNode(" Add Source ",-1)])],8,gn),c.value?(e.openBlock(),e.createElementBlock("div",hn,[n.value.length===0?(e.openBlock(),e.createElementBlock("div",Nn," No more sources available ")):(e.openBlock(),e.createElementBlock("div",En,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(_,B)=>(e.openBlock(),e.createElementBlock("div",{key:B},[_.type==="parallel"?(e.openBlock(),e.createElementBlock("div",kn,e.toDisplayString(_.label),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.sources,M=>(e.openBlock(),e.createElementBlock("button",{key:M.id,onClick:O=>w(M.id),class:"w-full text-left px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center justify-between group"},[e.createElementVNode("span",Vn,e.toDisplayString(M.branchLabel||M.label),1),e.createElementVNode("span",wn,e.toDisplayString(M.type),1)],8,yn))),128))]))),128))]))])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:d[1]||(d[1]=_=>c.value=!1),class:"fixed inset-0 z-40"})):e.createCommentVNode("",!0)])]),y.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"space-y-2 relative",onDragleave:P},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(_,B)=>{var M,O;return e.openBlock(),e.createElementBlock("div",{key:_.id,draggable:"true",onDragstart:A=>k(A,B),onDragover:A=>D(A,B),onDragleave:u,onDrop:f,onDragend:b,class:e.normalizeClass(["source-card group",{"is-dragging":V.value===B}])},[((M=p.value)==null?void 0:M.index)===B&&p.value.position==="before"?(e.openBlock(),e.createElementBlock("div",Bn)):e.createCommentVNode("",!0),((O=p.value)==null?void 0:O.index)===B&&p.value.position==="after"?(e.openBlock(),e.createElementBlock("div",_n)):e.createCommentVNode("",!0),d[5]||(d[5]=e.createStaticVNode('<div class="drag-handle" title="Drag to reorder" data-v-82c6b2ea><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-82c6b2ea><line x1="8" y1="6" x2="21" y2="6" data-v-82c6b2ea></line><line x1="8" y1="12" x2="21" y2="12" data-v-82c6b2ea></line><line x1="8" y1="18" x2="21" y2="18" data-v-82c6b2ea></line><line x1="3" y1="6" x2="3.01" y2="6" data-v-82c6b2ea></line><line x1="3" y1="12" x2="3.01" y2="12" data-v-82c6b2ea></line><line x1="3" y1="18" x2="3.01" y2="18" data-v-82c6b2ea></line></svg></div>',1)),e.createElementVNode("div",xn,[e.createElementVNode("div",Cn,e.toDisplayString(_.branchLabel||_.label),1),_.parallelParentId?(e.openBlock(),e.createElementBlock("div",Sn," from "+e.toDisplayString(_.label),1)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{onClick:A=>E(_.id),class:"remove-btn",title:"Remove source"},[...d[4]||(d[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,Dn)],42,bn)}),128))],32)):(e.openBlock(),e.createElementBlock("div",$n,[...d[6]||(d[6]=[e.createTextVNode(" No sources selected. ",-1),e.createElementVNode("br",null,null,-1),e.createElementVNode("span",{class:"text-xs"},"Output will be empty.",-1)])]))]))}}),[["__scopeId","data-v-82c6b2ea"]]),Mn={class:"preview-card"},Tn={class:"preview-header"},Ln={key:0,class:"preview-status"},On={key:1,class:"preview-empty"},Pn={key:0,class:"preview-footer"},Rn=H(e.defineComponent({__name:"OutputPreview",props:{previewData:{},maxHeight:{}},setup(l){const r=l,s=e.computed(()=>({maxHeight:r.maxHeight?`${r.maxHeight}px`:"200px"}));return(i,a)=>(e.openBlock(),e.createElementBlock("div",Mn,[e.createElementVNode("div",Tn,[a[1]||(a[1]=e.createElementVNode("span",{class:"preview-label"},"Preview",-1)),l.previewData.isComplete?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Ln,[...a[0]||(a[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.createElementVNode("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})],-1),e.createTextVNode(" Incomplete ",-1)])]))]),e.createElementVNode("div",{class:"preview-body",style:e.normalizeStyle(s.value)},[l.previewData.assembledPreview?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(l.previewData.assembledPreview),1)],64)):(e.openBlock(),e.createElementBlock("div",On,"(Empty output)"))],4),l.previewData.modeHint?(e.openBlock(),e.createElementBlock("div",Pn,[a[2]||(a[2]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.createElementVNode("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})],-1)),e.createTextVNode(" "+e.toDisplayString(l.previewData.modeHint),1)])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-a248a951"]]);function Ye(l,r){const s=()=>typeof r=="string"?r:r.value,i=e.ref(0);let a=null;const y=n=>{if(a&&(a(),a=null),n){const c=n.on;if(typeof c=="function"){const w=c.call(n,"update",()=>{i.value++});a=typeof w=="function"?w:null}}};return e.watch(()=>l.value,n=>{y(n),i.value++},{immediate:!0}),e.onScopeDispose(()=>{a&&(a(),a=null)}),e.computed(()=>{var P,f,b;if(i.value,!l.value)return[];const n=s();if(!n)return[];const c=l.value.nodes,w=l.value.edges;if(!c.find(N=>N.id===n))return[];const p=[...w.filter(N=>N.target===n)].sort((N,g)=>{const d=c.find(B=>B.id===N.source),_=c.find(B=>B.id===g.source);return((d==null?void 0:d.position.y)||0)-((_==null?void 0:_.position.y)||0)}),k=[];for(let N=0;N<p.length;N++){const g=p[N],d=c.find(B=>B.id===g.source);if(!d)continue;if(d.type==="parallel"&&d.data.mergeEnabled===!1&&g.sourceHandle){const M=(P=d.data.branches)==null?void 0:P.find(O=>O.id===g.sourceHandle);k.push({id:`${d.id}:${g.sourceHandle}`,label:d.data.label||d.id,type:"parallel-branch",parallelParentId:d.id,branchLabel:(M==null?void 0:M.label)||g.sourceHandle,executionIndex:N})}else{const B=zn(d,c,w);k.push({id:d.id,label:d.data.label||d.id,type:d.type,parallelParentId:B==null?void 0:B.parentId,branchLabel:B==null?void 0:B.branchLabel,executionIndex:N})}}const D=[],u=new Set;for(const N of k)if(!u.has(N.id))if(N.parallelParentId){const g=k.filter(O=>O.parallelParentId===N.parallelParentId),d=c.find(O=>O.id===N.parallelParentId),_=(d==null?void 0:d.data.label)||"Parallel Group",B=((b=(f=d==null?void 0:d.data)==null?void 0:f.branches)==null?void 0:b.map(O=>O.id))||[],M=[...g].sort((O,A)=>{const R=O.id.includes(":")?O.id.split(":")[1]:O.id,X=A.id.includes(":")?A.id.split(":")[1]:A.id,v=B.indexOf(R),oe=B.indexOf(X);return(v===-1?1/0:v)-(oe===-1?1/0:oe)});D.push({type:"parallel",label:_,sources:M}),g.forEach(O=>u.add(O.id))}else D.push({type:"single",sources:[N]}),u.add(N.id);return D})}function zn(l,r,s){var y;const i=[l.id],a=new Set;for(;i.length>0;){const n=i.shift();if(a.has(n))continue;a.add(n);const c=r.find(E=>E.id===n);if(!c)continue;if(c.type==="parallel"){const E=s.filter(p=>p.source===c.id),V=c.data;for(const p of E)if(Hn(p.target,l.id,s)){const k=p.sourceHandle,D=(y=V.branches)==null?void 0:y.find(u=>u.id===k);return{parentId:c.id,branchLabel:(D==null?void 0:D.label)||k||"Unknown Branch"}}}const w=s.filter(E=>E.target===n);for(const E of w)i.push(E.source)}return null}function Hn(l,r,s){if(l===r)return!0;const i=[l],a=new Set;for(;i.length>0;){const y=i.shift();if(a.has(y))continue;if(a.add(y),y===r)return!0;const n=s.filter(c=>c.source===y);for(const c of n)i.push(c.target)}return!1}function An(l,r,s){const{getOutput:i}=Ie(),a=Ye(l,s),y=e.computed(()=>{const w=e.unref(r),V=e.unref(a).flatMap(f=>f.sources);let p=V;w.sources&&w.sources.length>0&&(p=w.sources.map(f=>V.find(b=>b.id===f)).filter(f=>!!f));const k=new Map;let D=!0;for(const f of p){const b=i(f.id);k.set(f.id,b||null),b||(D=!1)}let u="",P="";if(w.mode==="synthesis"){P="AI will synthesize these inputs into a final document";const f=p.map(b=>{const N=k.get(b.id),g=b.branchLabel||b.label,d=N?N.length>100?N.slice(0,100)+"...":N:"(Waiting for output...)";return`• ${g}: ${d}`});f.length>0?u=`Inputs to AI:
|
|
2
|
+
|
|
3
|
+
`+f.join(`
|
|
4
|
+
`):u="(No inputs selected)"}else{const f=[];if(w.introText&&f.push(w.introText),p.length>0)for(const b of p){const N=k.get(b.id);N?f.push(N):f.push(`[Output from ${b.branchLabel||b.label} will appear here]`)}else f.push("[No sources selected]");w.outroText&&f.push(w.outroText),u=f.join(`
|
|
5
|
+
|
|
6
|
+
`)}return{assembledPreview:u,isComplete:D,modeHint:P}}),n=e.ref(y.value);let c=null;return e.watch(y,w=>{c&&clearTimeout(c),c=setTimeout(()=>{n.value=w},50)},{immediate:!0}),e.onScopeDispose(()=>{c&&clearTimeout(c)}),e.computed(()=>n.value)}const vn={key:0,class:"node-inspector"},Fn={class:"inspector-header"},jn={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Un={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Wn={key:2,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Kn={key:3,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},qn=["value"],Gn={key:0,class:"description-section"},Yn=["value"],Xn={key:1,class:"tabs"},Jn={class:"tool-count"},Qn={class:"tool-count"},Zn={key:0,class:"tool-count"},el={key:0,class:"hitl-badge"},tl={key:2,class:"tab-content"},ol={key:0,class:"prompt-tab"},nl={class:"field-group"},ll={class:"mode-buttons"},al={class:"field-hint"},sl={key:0,class:"field-group"},rl=["value"],il={class:"grid loop-grid"},dl={class:"field-group"},cl={class:"field-label"},ml=["value"],pl={class:"field-group"},ul=["value"],fl={class:"field-group",style:{"margin-top":"var(--or3-spacing-md)"}},gl=["value"],hl={class:"field-group",style:{"margin-top":"var(--or3-spacing-lg)"}},Nl={class:"mode-buttons"},El={class:"toggle-group"},kl=["checked"],yl=["checked"],Vl={class:"advanced-section"},wl={class:"advanced-content"},bl={class:"field-group"},Bl=["value"],_l={class:"field-label"},xl=["value","placeholder"],Cl={class:"field-hint"},Sl={key:1,class:"model-tab"},Dl={class:"field-label"},$l=["value"],Il=["value"],Ml={class:"model-id"},Tl={key:2,class:"routes-tab"},Ll={class:"routes-list"},Ol={class:"route-inputs"},Pl=["value","onInput"],Rl={class:"route-id"},zl=["onClick"],Hl={key:3,class:"branches-tab"},Al={class:"branches-list"},vl=["onClick"],Fl={class:"branch-inputs"},jl=["value","onInput"],Ul={class:"branch-badges"},Wl={key:0,class:"branch-badge model"},Kl={class:"branch-actions"},ql=["onClick"],Gl={key:0,class:"branch-config"},Yl={class:"branch-field"},Xl=["value","onChange"],Jl=["value"],Ql={class:"branch-field"},Zl=["value","onInput"],ea={key:0,class:"branch-field"},ta={class:"branch-tools"},oa=["checked","onChange"],na={class:"tool-name-sm"},la={class:"merge-section"},aa={class:"merge-header"},sa={class:"toggle-label"},ra=["checked"],ia={class:"merge-field"},da=["value"],ca=["value"],ma={class:"merge-field"},pa=["value"],ua={key:4,class:"tools-tab"},fa={class:"tools-list"},ga=["checked","onChange"],ha={class:"tool-info"},Na={class:"tool-name"},Ea={class:"tool-description"},ka={key:0,class:"selected-tools"},ya={class:"field-label"},Va={class:"tool-chips"},wa=["onClick"],ba={key:1,class:"tools-empty"},Ba={key:5,class:"errors-tab"},_a={class:"mode-buttons"},xa={class:"retry-grid"},Ca={class:"field-group"},Sa=["value"],Da={class:"field-group"},$a=["value"],Ia={class:"field-group"},Ma=["value"],Ta={class:"checkbox-group"},La={class:"checkboxes"},Oa=["checked","onChange"],Pa={key:6,class:"hitl-tab"},Ra={class:"hitl-toggle"},za={class:"toggle-label"},Ha=["checked"],Aa={class:"hitl-section"},va={class:"mode-buttons"},Fa=["onClick","title"],ja={class:"field-hint"},Ua={class:"hitl-section"},Wa=["value"],Ka={class:"hitl-grid"},qa={class:"field-group"},Ga=["value"],Ya={class:"field-group"},Xa=["value"],Ja=["value"],Qa={key:7,class:"subflow-tab"},Za={class:"field-group"},es=["value","disabled"],ts={value:""},os=["value"],ns={key:0,class:"field-hint"},ls={key:1,class:"field-hint"},as={key:2,class:"field-hint"},ss={key:3,class:"field-hint"},rs={key:4,class:"model-id"},is={key:0,class:"field-group"},ds=["value"],cs={class:"subflow-toggle"},ms={class:"toggle-label"},ps=["checked"],us={key:1,class:"input-mappings-section"},fs={class:"mappings-list"},gs={class:"mapping-key"},hs=["value","onInput"],Ns=["onClick"],Es={key:8,class:"output-tab"},ks={key:0,class:"synthesis-config"},ys={class:"field-group"},Vs=["value"],ws=["value"],bs={class:"field-group"},Bs=["value"],_s={class:"field-group"},xs=["value"],Cs={class:"field-group"},Ss=["value"],Ds={class:"advanced-settings"},$s={key:0,class:"advanced-content"},Is={class:"toggle-group"},Ms={class:"tool-item"},Ts=["checked"],Ls={class:"tool-item"},Os=["checked"],Ps={key:0,class:"field-group"},Rs=["value"],zs={key:3,class:"inspector-content"},Hs={key:1,class:"node-inspector empty"},As=H(e.defineComponent({__name:"NodeInspector",props:{editor:{},availableTools:{},availableSubflows:{},subflowListLoading:{type:Boolean},subflowListError:{}},emits:["delete","close"],setup(l,{emit:r}){function s(o){return typeof o=="object"&&o!==null&&"label"in o&&typeof o.label=="string"}function i(o){return s(o)?Array.isArray(o.tools)?o.tools:[]:[]}const a=l,y=r,n=e.ref(null),c=e.ref("prompt"),w=e.computed(()=>a.availableTools??p),E=e.computed(()=>a.availableSubflows??[]);Y.modelRegistry.size===0&&Y.registerDefaultModels();const V=e.computed(()=>Y.modelRegistry.getAllInfo().map(o=>({id:o.id,name:o.name,provider:o.provider}))),p=[{id:"web_search",name:"Web Search",description:"Search the web for information"},{id:"calculator",name:"Calculator",description:"Perform mathematical calculations"},{id:"code_interpreter",name:"Code Interpreter",description:"Execute Python code"},{id:"file_reader",name:"File Reader",description:"Read file contents"},{id:"api_call",name:"API Call",description:"Make HTTP API requests"},{id:"database_query",name:"Database Query",description:"Query a database"}],k=e.ref([]),D=()=>{var t;const o=a.editor.getSelected().nodes;if(o.length===1){const $=a.editor.getNodes().find(Q=>Q.id===o[0])||null,L=(t=n.value)==null?void 0:t.id;n.value=$,$&&(k.value=i($.data),L!==$.id&&(c.value=$.type==="output"?"output":$.type==="parallel"?"branches":"prompt"))}else n.value=null,k.value=[]};e.watch(()=>{var o;return(o=n.value)==null?void 0:o.data},o=>{o&&(k.value=i(o))},{deep:!0}),e.watchEffect(o=>{if(a.editor.isDestroyed()){n.value=null,k.value=[];return}D();const t=a.editor.on("selectionUpdate",D),$=a.editor.on("update",D);o(()=>{t(),$()})});const u=e.computed(()=>{var o;return((o=n.value)==null?void 0:o.type)==="agent"}),P=e.computed(()=>{var o;return((o=n.value)==null?void 0:o.type)==="router"}),f=e.computed(()=>{var o;return((o=n.value)==null?void 0:o.type)==="parallel"}),b=e.computed(()=>{var o;return((o=n.value)==null?void 0:o.type)==="whileLoop"}),N=e.computed(()=>{var o;return((o=n.value)==null?void 0:o.type)==="start"}),g=e.computed(()=>{var o;return((o=n.value)==null?void 0:o.type)==="subflow"}),d=e.computed(()=>{var o;return((o=n.value)==null?void 0:o.type)==="output"}),_=e.computed(()=>n.value&&n.value.type!=="start"),B=e.computed(()=>u.value||P.value||f.value||b.value||g.value||d.value),M=e.computed(()=>u.value||P.value),O=e.computed(()=>u.value||P.value),A=e.computed(()=>{var t;const o=(t=n.value)==null?void 0:t.data;return s(o)?o:{label:"Unknown"}}),R=e.computed(()=>{var t;return((t=n.value)==null?void 0:t.data)||{}}),X=e.ref(!1),v=e.computed(()=>{var t;const o=(t=n.value)==null?void 0:t.data;return o?Y.migrateOutputNodeData(o):{}}),oe=e.computed(()=>{var o;return((o=n.value)==null?void 0:o.id)||""}),ke=Ye(e.computed(()=>a.editor),oe),ye=An(e.computed(()=>a.editor),v,oe),Ve=o=>{n.value&&a.editor.commands.updateNodeData(n.value.id,{mode:o})},we=o=>{n.value&&a.editor.commands.updateNodeData(n.value.id,{sources:o})},be=o=>{if(!n.value)return;const t=o.target.value;a.editor.commands.updateNodeData(n.value.id,{introText:t})},Be=o=>{if(!n.value)return;const t=o.target.value;a.editor.commands.updateNodeData(n.value.id,{outroText:t})},_e=o=>{if(!n.value)return;const t=o.target.value;a.editor.commands.updateNodeData(n.value.id,{synthesis:{...v.value.synthesis,prompt:t}})},me=o=>{if(!n.value)return;const t=o.target.value;a.editor.commands.updateNodeData(n.value.id,{synthesis:{...v.value.synthesis,model:t}})},pe=()=>{n.value&&a.editor.commands.updateNodeData(n.value.id,{useRawTemplate:!v.value.useRawTemplate})},xe=()=>{n.value&&a.editor.commands.updateNodeData(n.value.id,{includeMetadata:!v.value.includeMetadata})},h=o=>{if(!n.value)return;const t=o.target.value;a.editor.commands.updateNodeData(n.value.id,{template:t})};e.watch(()=>{var o;return{fmt:v.value.format,nodeId:(o=n.value)==null?void 0:o.id}},({fmt:o,nodeId:t})=>{t&&o&&o!=="markdown"&&a.editor.commands.updateNodeData(t,{format:"markdown",schema:void 0})},{immediate:!0});const S=e.computed(()=>{var t;const o=(t=n.value)==null?void 0:t.data;return{subflowId:(o==null?void 0:o.subflowId)??"",inputMappings:(o==null?void 0:o.inputMappings)??{},shareSession:(o==null?void 0:o.shareSession)??!0}}),x=e.computed(()=>{const o=[...E.value],t=S.value.subflowId;return t&&!o.some($=>$.id===t)&&o.unshift({id:t,name:"Custom ID",description:"Not in your workflow list."}),o}),W=e.computed(()=>{const o=S.value.subflowId;return o&&x.value.find(t=>t.id===o)||null}),F=e.ref(!1);e.watch(()=>[S.value.subflowId,E.value.length],([o])=>{o&&(E.value.some(t=>t.id===o)||(F.value=!0))},{immediate:!0});const K=e.computed(()=>{var t;const o=(t=n.value)==null?void 0:t.data;return{routes:Array.isArray(o==null?void 0:o.routes)?o.routes:[]}}),U=e.computed(()=>{var t;const o=(t=n.value)==null?void 0:t.data;return{branches:Array.isArray(o==null?void 0:o.branches)?o.branches:[],mergeModel:(o==null?void 0:o.model)||"",mergePrompt:(o==null?void 0:o.prompt)||"",mergeEnabled:o==null?void 0:o.mergeEnabled}}),ae=()=>{if(!n.value)return;const o=[...U.value.branches],t=`branch-${Date.now()}`;o.push({id:t,label:`Branch ${o.length+1}`}),a.editor.commands.updateNodeData(n.value.id,{branches:o})},Z=o=>{if(!n.value)return;const t=n.value.id,L=a.editor.getEdges().filter(j=>j.source===t&&j.sourceHandle===o);for(const j of L)a.editor.commands.deleteEdge(j.id);const Q=U.value.branches.filter(j=>j.id!==o);a.editor.commands.updateNodeData(t,{branches:Q})},J=(o,t)=>{if(!n.value)return;const $=U.value.branches.map(L=>L.id===o?{...L,label:t}:L);a.editor.commands.updateNodeData(n.value.id,{branches:$})},ue=(o,t)=>{if(!n.value)return;const $=U.value.branches.map(L=>L.id===o?{...L,model:t||void 0}:L);a.editor.commands.updateNodeData(n.value.id,{branches:$})},fe=(o,t)=>{if(!n.value)return;const $=U.value.branches.map(L=>L.id===o?{...L,prompt:t||void 0}:L);a.editor.commands.updateNodeData(n.value.id,{branches:$})},ge=(o,t)=>{if(!n.value)return;const $=U.value.branches.map(L=>L.id===o?{...L,tools:t}:L);a.editor.commands.updateNodeData(n.value.id,{branches:$})},he=(o,t)=>{const $=U.value.branches.find(m=>m.id===o);if(!$)return;const L=$.tools||[],Q=L.indexOf(t);let j;Q===-1?j=[...L,t]:(j=[...L],j.splice(Q,1)),ge(o,j)},ne=e.ref(null),Ne=o=>{ne.value=ne.value===o?null:o},Ee=()=>{if(!n.value)return;const o=[...K.value.routes],t=`route-${Date.now()}`;o.push({id:t,label:`Route ${o.length+1}`}),a.editor.commands.updateNodeData(n.value.id,{routes:o})},C=o=>{if(!n.value)return;const t=n.value.id,L=a.editor.getEdges().filter(j=>j.source===t&&j.sourceHandle===o);for(const j of L)a.editor.commands.deleteEdge(j.id);const Q=K.value.routes.filter(j=>j.id!==o);a.editor.commands.updateNodeData(t,{routes:Q})},q=(o,t)=>{if(!n.value)return;const $=K.value.routes.map(L=>L.id===o?{...L,label:t}:L);a.editor.commands.updateNodeData(n.value.id,{routes:$})},G=e.computed(()=>{var t;const o=(t=n.value)==null?void 0:t.data;return(o==null?void 0:o.errorHandling)??{mode:"stop"}}),se=e.computed(()=>{const o=G.value.retry;return{maxRetries:(o==null?void 0:o.maxRetries)??0,baseDelay:(o==null?void 0:o.baseDelay)??1e3,maxDelay:o==null?void 0:o.maxDelay,retryOn:(o==null?void 0:o.retryOn)??[],skipOn:o==null?void 0:o.skipOn}}),ee=e.computed(()=>{var t;const o=(t=n.value)==null?void 0:t.data;return(o==null?void 0:o.hitl)??{enabled:!1,mode:"approval"}}),Xe=[{id:"approval",label:"Approval",description:"Pause before execution for approve/reject"},{id:"input",label:"Input",description:"Collect human input before execution"},{id:"review",label:"Review",description:"Pause after execution to review output"}],Ir=[{id:"approve",label:"Approve"},{id:"reject",label:"Reject"},{id:"skip",label:"Skip"}],Mr=[{id:"RATE_LIMIT",label:"Rate Limit"},{id:"TIMEOUT",label:"Timeout"},{id:"NETWORK",label:"Network"},{id:"LLM_ERROR",label:"LLM Error"},{id:"VALIDATION",label:"Validation"}];let re=null;const te=(o,t)=>{n.value&&(re&&clearTimeout(re),re=setTimeout(()=>{a.editor.commands.updateNodeData(n.value.id,{[o]:t})},200))},Tr=o=>{te("label",o.target.value)},Lr=o=>{te("description",o.target.value)},Or=o=>{const t=o.target.value;a.editor.commands.updateNodeData(n.value.id,{...b.value?{conditionModel:t}:{model:t}})},Je=o=>{const t=o.target.value,$=b.value?"conditionPrompt":"prompt";te($,t)},Qe=o=>{if(!n.value)return;const t=k.value.indexOf(o);t===-1?k.value.push(o):k.value.splice(t,1),a.editor.commands.updateNodeData(n.value.id,{tools:[...k.value]})},Ze=o=>{if(!n.value)return;const t=G.value;a.editor.commands.updateNodeData(n.value.id,{errorHandling:{...t,...o}})},et=o=>{Ze({retry:{...se.value,...o}})},Ce=o=>{Ze({mode:o})},Pr=o=>{const t=se.value.retryOn||[],$=t.includes(o)?t.filter(L=>L!==o):[...t,o];et({retryOn:$})},Se=(o,t)=>{const $=Number(t.target.value);et({[o]:Number.isFinite($)?$:void 0})},Rr=o=>{const t=Number(o.target.value);te("maxIterations",Number.isFinite(t)?t:1)},zr=o=>{te("onMaxIterations",o.target.value)},Hr=o=>{te("customEvaluator",o.target.value)},tt=o=>{te("loopMode",o.target.value)},ot=o=>{n.value&&a.editor.commands.updateNodeData(n.value.id,{outputMode:o})},Ar=()=>{if(!n.value)return;const o=R.value.includePreviousOutputs!==!1;a.editor.commands.updateNodeData(n.value.id,{includePreviousOutputs:!o})},vr=()=>{if(!n.value)return;const o=R.value.includeIterationContext!==!1;a.editor.commands.updateNodeData(n.value.id,{includeIterationContext:!o})},Fr=o=>{te("loopPrompt",o.target.value)},de=o=>{if(!n.value)return;const t=ee.value;a.editor.commands.updateNodeData(n.value.id,{hitl:{...t,...o}})},jr=()=>{de({enabled:!ee.value.enabled})},Ur=o=>{de({mode:o})},Wr=o=>{if(!n.value)return;const t=o.target.value;re&&clearTimeout(re),re=setTimeout(()=>{de({prompt:t})},200)},Kr=o=>{const t=Number(o.target.value);de({timeout:Number.isFinite(t)&&t>0?t:void 0})},qr=o=>{const t=o.target.value;de({defaultAction:t})},nt=o=>{te("subflowId",o)},Gr=o=>{nt(o.target.value)},Yr=o=>{const t=o.target.value;nt(t),t&&E.value.some($=>$.id===t)&&(F.value=!1)},Xr=()=>{F.value=!F.value},Jr=()=>{n.value&&a.editor.commands.updateNodeData(n.value.id,{shareSession:!S.value.shareSession})},Qr=(o,t)=>{if(!n.value)return;const $=S.value.inputMappings||{};a.editor.commands.updateNodeData(n.value.id,{inputMappings:{...$,[o]:t}})},Zr=o=>{if(!n.value)return;const t={...S.value.inputMappings};delete t[o],a.editor.commands.updateNodeData(n.value.id,{inputMappings:t})},ei=()=>{if(!n.value||!_.value)return;const o=n.value.id,t=A.value.label;confirm(`Delete "${t}"?`)&&(n.value=null,a.editor.commands.deleteNode(o),y("delete",o))};return(o,t)=>{var $,L,Q,j;return n.value?(e.openBlock(),e.createElementBlock("div",vn,[e.createElementVNode("div",Fn,[e.createElementVNode("div",{class:e.normalizeClass(["header-icon",n.value.type])},[u.value?(e.openBlock(),e.createElementBlock("svg",jn,[...t[25]||(t[25]=[e.createElementVNode("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"5",r:"2"},null,-1),e.createElementVNode("path",{d:"M12 7v4"},null,-1)])])):P.value?(e.openBlock(),e.createElementBlock("svg",Un,[...t[26]||(t[26]=[e.createElementVNode("line",{x1:"6",y1:"3",x2:"6",y2:"15"},null,-1),e.createElementVNode("circle",{cx:"18",cy:"6",r:"3"},null,-1),e.createElementVNode("circle",{cx:"6",cy:"18",r:"3"},null,-1),e.createElementVNode("path",{d:"M18 9a9 9 0 0 1-9 9"},null,-1)])])):f.value?(e.openBlock(),e.createElementBlock("svg",Wn,[...t[27]||(t[27]=[e.createElementVNode("circle",{cx:"18",cy:"18",r:"3"},null,-1),e.createElementVNode("circle",{cx:"6",cy:"6",r:"3"},null,-1),e.createElementVNode("path",{d:"M6 21V9a9 9 0 0 0 9 9"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",Kn,[...t[28]||(t[28]=[e.createElementVNode("polygon",{points:"5 3 19 12 5 21 5 3"},null,-1)])]))],2),e.createElementVNode("input",{class:"label-input",value:A.value.label,onInput:Tr,placeholder:"Node name"},null,40,qn),_.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"delete-btn",onClick:ei,title:"Delete node"},[...t[29]||(t[29]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"3 6 5 6 21 6"}),e.createElementVNode("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"close-btn",onClick:t[0]||(t[0]=m=>y("close")),title:"Close inspector"},[...t[30]||(t[30]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])]),B.value?(e.openBlock(),e.createElementBlock("div",Gn,[t[31]||(t[31]=e.createStaticVNode('<label class="description-label" data-v-2de5c749><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-2de5c749><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-v-2de5c749></path><polyline points="14 2 14 8 20 8" data-v-2de5c749></polyline><line x1="16" y1="13" x2="8" y2="13" data-v-2de5c749></line><line x1="16" y1="17" x2="8" y2="17" data-v-2de5c749></line><polyline points="10 9 9 9 8 9" data-v-2de5c749></polyline></svg> Description <span class="description-hint" data-v-2de5c749>(used by router for decisions)</span></label>',1)),e.createElementVNode("textarea",{class:"description-textarea",value:A.value.description||"",placeholder:"Describe what this node does... e.g., 'Handles complex math problems and coding questions'",onInput:Lr},null,40,Yn)])):e.createCommentVNode("",!0),B.value||M.value?(e.openBlock(),e.createElementBlock("div",Xn,[B.value&&!d.value&&!f.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["tab",{active:c.value==="prompt"}]),onClick:t[1]||(t[1]=m=>c.value="prompt")},[t[32]||(t[32]=e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2"}),e.createElementVNode("circle",{cx:"12",cy:"5",r:"2"}),e.createElementVNode("path",{d:"M12 7v4"})],-1)),e.createTextVNode(" "+e.toDisplayString(P.value?"Instructions":b.value?"Condition":"Instructions"),1)],2)):e.createCommentVNode("",!0),B.value&&!d.value&&!f.value?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(["tab",{active:c.value==="model"}]),onClick:t[2]||(t[2]=m=>c.value="model")},[...t[33]||(t[33]=[e.createStaticVNode('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-2de5c749><rect x="4" y="4" width="16" height="16" rx="2" ry="2" data-v-2de5c749></rect><rect x="9" y="9" width="6" height="6" data-v-2de5c749></rect><line x1="9" y1="1" x2="9" y2="4" data-v-2de5c749></line><line x1="15" y1="1" x2="15" y2="4" data-v-2de5c749></line><line x1="9" y1="20" x2="9" y2="23" data-v-2de5c749></line><line x1="15" y1="20" x2="15" y2="23" data-v-2de5c749></line><line x1="20" y1="9" x2="23" y2="9" data-v-2de5c749></line><line x1="20" y1="14" x2="23" y2="14" data-v-2de5c749></line><line x1="1" y1="9" x2="4" y2="9" data-v-2de5c749></line><line x1="1" y1="14" x2="4" y2="14" data-v-2de5c749></line></svg> Model ',2)])],2)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("button",{key:2,class:e.normalizeClass(["tab",{active:c.value==="routes"}]),onClick:t[3]||(t[3]=m=>c.value="routes")},[t[34]||(t[34]=e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M9 18l6-6-6-6"})],-1)),t[35]||(t[35]=e.createTextVNode(" Routes ",-1)),e.createElementVNode("span",Jn,e.toDisplayString(K.value.routes.length),1)],2)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(["tab",{active:c.value==="branches"}]),onClick:t[4]||(t[4]=m=>c.value="branches")},[t[36]||(t[36]=e.createStaticVNode('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-2de5c749><circle cx="18" cy="18" r="3" data-v-2de5c749></circle><circle cx="6" cy="6" r="3" data-v-2de5c749></circle><circle cx="18" cy="6" r="3" data-v-2de5c749></circle><path d="M6 9v12" data-v-2de5c749></path><path d="M18 9v6" data-v-2de5c749></path></svg> Branches ',2)),e.createElementVNode("span",Qn,e.toDisplayString(U.value.branches.length),1)],2)):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("button",{key:4,class:e.normalizeClass(["tab",{active:c.value==="tools"}]),onClick:t[5]||(t[5]=m=>c.value="tools")},[t[37]||(t[37]=e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})],-1)),t[38]||(t[38]=e.createTextVNode(" Tools ",-1)),k.value.length?(e.openBlock(),e.createElementBlock("span",Zn,e.toDisplayString(k.value.length),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),M.value?(e.openBlock(),e.createElementBlock("button",{key:5,class:e.normalizeClass(["tab",{active:c.value==="errors"}]),onClick:t[6]||(t[6]=m=>c.value="errors")},[...t[39]||(t[39]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.createElementVNode("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.createElementVNode("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})],-1),e.createTextVNode(" Errors ",-1)])],2)):e.createCommentVNode("",!0),O.value?(e.openBlock(),e.createElementBlock("button",{key:6,class:e.normalizeClass(["tab",{active:c.value==="hitl"}]),onClick:t[7]||(t[7]=m=>c.value="hitl")},[t[40]||(t[40]=e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),e.createElementVNode("circle",{cx:"12",cy:"7",r:"4"})],-1)),t[41]||(t[41]=e.createTextVNode(" HITL ",-1)),ee.value.enabled?(e.openBlock(),e.createElementBlock("span",el,"ON")):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("button",{key:7,class:e.normalizeClass(["tab",{active:c.value==="subflow"}]),onClick:t[8]||(t[8]=m=>c.value="subflow")},[...t[42]||(t[42]=[e.createStaticVNode('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-2de5c749><rect x="3" y="3" width="7" height="7" rx="1" data-v-2de5c749></rect><rect x="14" y="3" width="7" height="7" rx="1" data-v-2de5c749></rect><rect x="8.5" y="14" width="7" height="7" rx="1" data-v-2de5c749></rect><path d="M6.5 10v2a2 2 0 002 2h1" data-v-2de5c749></path><path d="M17.5 10v2a2 2 0 01-2 2h-1" data-v-2de5c749></path></svg> Subflow ',2)])],2)):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("button",{key:8,class:e.normalizeClass(["tab",{active:c.value==="output"}]),onClick:t[9]||(t[9]=m=>c.value="output")},[...t[43]||(t[43]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"}),e.createElementVNode("line",{x1:"4",y1:"22",x2:"4",y2:"15"})],-1),e.createTextVNode(" Output ",-1)])],2)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),B.value||M.value||O.value||g.value||d.value?(e.openBlock(),e.createElementBlock("div",tl,[c.value==="prompt"&&B.value&&!d.value&&!f.value?(e.openBlock(),e.createElementBlock("div",ol,[b.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",nl,[t[44]||(t[44]=e.createElementVNode("label",{class:"field-label"},"Loop Strategy",-1)),e.createElementVNode("div",ll,[e.createElementVNode("button",{class:e.normalizeClass(["mode-button",{active:R.value.loopMode!=="fixed"}]),onClick:t[10]||(t[10]=m=>tt({target:{value:"while"}}))}," Smart Loop (AI) ",2),e.createElementVNode("button",{class:e.normalizeClass(["mode-button",{active:R.value.loopMode==="fixed"}]),onClick:t[11]||(t[11]=m=>tt({target:{value:"fixed"}}))}," Fixed Count ",2)]),e.createElementVNode("p",al,e.toDisplayString(R.value.loopMode==="fixed"?"Runs exactly N times. Good for batch processing.":"AI evaluates results to decide when to stop."),1)]),R.value.loopMode!=="fixed"?(e.openBlock(),e.createElementBlock("div",sl,[t[45]||(t[45]=e.createElementVNode("label",{class:"field-label"},"Stop Condition",-1)),e.createElementVNode("textarea",{value:R.value.conditionPrompt||"",class:"prompt-textarea condition-prompt",placeholder:'Example: "If the summary is concise and covers all points, respond DONE. Otherwise respond CONTINUE."',onInput:Je,rows:"4"},null,40,rl)])):e.createCommentVNode("",!0),e.createElementVNode("div",il,[e.createElementVNode("div",dl,[e.createElementVNode("label",cl,e.toDisplayString(R.value.loopMode==="fixed"?"Run Count":"Max Limit"),1),e.createElementVNode("input",{type:"number",min:"1",class:"text-input",value:R.value.maxIterations??10,onInput:Rr},null,40,ml)]),e.createElementVNode("div",pl,[t[47]||(t[47]=e.createElementVNode("label",{class:"field-label"},"On Limit Reached",-1)),e.createElementVNode("select",{class:"model-select",value:R.value.onMaxIterations||"warning",onChange:zr},[...t[46]||(t[46]=[e.createElementVNode("option",{value:"warning"}," Warn & Continue ",-1),e.createElementVNode("option",{value:"continue"}," Silent Continue ",-1),e.createElementVNode("option",{value:"error"},"Stop with Error",-1)])],40,ul)])]),e.createElementVNode("div",fl,[t[48]||(t[48]=e.createElementVNode("label",{class:"field-label"},"Loop Instructions",-1)),e.createElementVNode("textarea",{value:R.value.loopPrompt||"",class:"prompt-textarea loop-prompt",placeholder:`Tell the AI what to do each time.
|
|
7
|
+
|
|
8
|
+
Example: "Improve this text, making it clearer and more engaging."`,onInput:Fr,rows:"3"},null,40,gl),t[49]||(t[49]=e.createElementVNode("p",{class:"field-hint"}," These instructions are added to the input at the start of each run. ",-1))]),e.createElementVNode("div",hl,[t[50]||(t[50]=e.createElementVNode("label",{class:"field-label"},"Output Handling",-1)),e.createElementVNode("div",Nl,[e.createElementVNode("button",{class:e.normalizeClass(["mode-button",{active:(R.value.outputMode||"last")==="last"}]),onClick:t[12]||(t[12]=m=>ot("last"))}," Last Result Only ",2),e.createElementVNode("button",{class:e.normalizeClass(["mode-button",{active:R.value.outputMode==="accumulate"}]),onClick:t[13]||(t[13]=m=>ot("accumulate"))}," Collect All ",2)])]),t[57]||(t[57]=e.createElementVNode("div",{class:"section-divider"},null,-1)),t[58]||(t[58]=e.createElementVNode("label",{class:"field-label section-title"},"Context Visibility",-1)),t[59]||(t[59]=e.createElementVNode("p",{class:"section-subtitle"}," Choose what information is available to nodes inside the loop. ",-1)),e.createElementVNode("div",El,[e.createElementVNode("label",{class:e.normalizeClass(["tool-item",{enabled:R.value.includePreviousOutputs!==!1}])},[e.createElementVNode("input",{type:"checkbox",checked:R.value.includePreviousOutputs!==!1,onChange:Ar},null,40,kl),t[51]||(t[51]=e.createElementVNode("div",{class:"tool-info"},[e.createElementVNode("span",{class:"tool-name"},"Previous Iterations"),e.createElementVNode("span",{class:"tool-description"},"Let the AI see results from earlier runs")],-1))],2),e.createElementVNode("label",{class:e.normalizeClass(["tool-item",{enabled:R.value.includeIterationContext!==!1}])},[e.createElementVNode("input",{type:"checkbox",checked:R.value.includeIterationContext!==!1,onChange:vr},null,40,yl),t[52]||(t[52]=e.createElementVNode("div",{class:"tool-info"},[e.createElementVNode("span",{class:"tool-name"},"Loop Counter"),e.createElementVNode("span",{class:"tool-description"},"Show current iteration number (1/10)")],-1))],2)]),R.value.loopMode!=="fixed"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t[56]||(t[56]=e.createElementVNode("div",{class:"section-divider"},null,-1)),e.createElementVNode("details",Vl,[t[55]||(t[55]=e.createElementVNode("summary",{class:"advanced-toggle"}," Advanced: Custom Evaluator ",-1)),e.createElementVNode("div",wl,[e.createElementVNode("div",bl,[t[53]||(t[53]=e.createElementVNode("label",{class:"field-label"},"Function Name",-1)),e.createElementVNode("input",{type:"text",class:"text-input",value:R.value.customEvaluator||"",placeholder:"e.g. checkQualityScore",onInput:Hr},null,40,Bl),t[54]||(t[54]=e.createElementVNode("p",{class:"field-hint"}," Bypass AI evaluation and use a registered function to decide when to stop. ",-1))])])])],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("label",_l,e.toDisplayString(P.value?"Routing Instructions":f.value?"Merge Instructions":"Instructions"),1),e.createElementVNode("textarea",{value:A.value.prompt||"",class:"prompt-textarea",placeholder:P.value?`Instructions for routing decisions...
|
|
9
|
+
|
|
10
|
+
Example:
|
|
11
|
+
Route to Technical if the user mentions bugs, errors, or technical issues.
|
|
12
|
+
Route to Sales for pricing or product inquiries.`:f.value?"Instructions for merging parallel outputs...":`Enter the system prompt for this agent...
|
|
13
|
+
|
|
14
|
+
Example:
|
|
15
|
+
You are a helpful technical support specialist. Help users troubleshoot issues with their software.`,onInput:Je},null,40,xl),e.createElementVNode("p",Cl,e.toDisplayString(P.value?"These instructions help the router decide which branch to take. Edge labels are used to make decisions.":f.value?"This prompt is used to merge/summarize outputs from all parallel branches.":"This prompt defines the agent's behavior and personality."),1)],64))])):e.createCommentVNode("",!0),c.value==="model"&&!f.value?(e.openBlock(),e.createElementBlock("div",Sl,[e.createElementVNode("label",Dl,e.toDisplayString(b.value?"Condition Model":"Select Model"),1),e.createElementVNode("select",{class:"model-select",value:b.value?R.value.conditionModel||"z-ai/glm-4.6:exacto":A.value.model||"z-ai/glm-4.6:exacto",onChange:Or},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,m=>(e.openBlock(),e.createElementBlock("option",{key:m.id,value:m.id},e.toDisplayString(m.name)+" ("+e.toDisplayString(m.provider)+") ",9,Il))),128))],40,$l),e.createElementVNode("div",Ml,[t[60]||(t[60]=e.createElementVNode("span",{class:"model-id-label"},"Model ID:",-1)),e.createElementVNode("code",null,e.toDisplayString(b.value?R.value.conditionModel||"z-ai/glm-4.6:exacto":A.value.model||"z-ai/glm-4.6:exacto"),1)])])):e.createCommentVNode("",!0),c.value==="routes"&&P.value?(e.openBlock(),e.createElementBlock("div",Tl,[e.createElementVNode("div",{class:"routes-header"},[t[62]||(t[62]=e.createElementVNode("label",{class:"field-label"},"Defined Routes",-1)),e.createElementVNode("button",{class:"add-btn with-label",onClick:Ee},[...t[61]||(t[61]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.createElementVNode("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1),e.createTextVNode(" Add Route ",-1)])])]),t[64]||(t[64]=e.createElementVNode("p",{class:"field-hint"}," Define the possible routes for this node. Each route creates an output handle. ",-1)),e.createElementVNode("div",Ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value.routes,m=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:"route-item"},[e.createElementVNode("div",Ol,[e.createElementVNode("input",{type:"text",class:"text-input route-label",value:m.label,onInput:z=>q(m.id,z.target.value),placeholder:"Route Label"},null,40,Pl),e.createElementVNode("code",Rl,e.toDisplayString(m.id),1)]),e.createElementVNode("button",{class:"delete-btn",onClick:z=>C(m.id),title:"Remove route"},[...t[63]||(t[63]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,zl)]))),128))])])):e.createCommentVNode("",!0),c.value==="branches"&&f.value?(e.openBlock(),e.createElementBlock("div",Hl,[e.createElementVNode("div",{class:"branches-header"},[t[66]||(t[66]=e.createElementVNode("label",{class:"field-label"},"Parallel Branches",-1)),e.createElementVNode("button",{class:"add-btn",onClick:ae,"aria-label":"Add Branch"},[...t[65]||(t[65]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.createElementVNode("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])])]),t[78]||(t[78]=e.createElementVNode("p",{class:"field-hint"}," Each branch runs in parallel. Connect nodes to each branch's output handle. Optionally set a model and system prompt per branch. ",-1)),e.createElementVNode("div",Al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value.branches,m=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(["branch-item",{expanded:ne.value===m.id}])},[e.createElementVNode("div",{class:"branch-header",onClick:z=>Ne(m.id)},[e.createElementVNode("div",Fl,[e.createElementVNode("input",{type:"text",class:"text-input branch-label",value:m.label,onInput:z=>J(m.id,z.target.value),onClick:t[14]||(t[14]=e.withModifiers(()=>{},["stop"])),placeholder:"Branch Label"},null,40,jl),e.createElementVNode("div",Ul,[m.model?(e.openBlock(),e.createElementBlock("span",Wl,e.toDisplayString(m.model.split("/").pop()),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Kl,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["expand-icon",{rotated:ne.value===m.id}]),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[...t[67]||(t[67]=[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2)),e.createElementVNode("button",{class:"delete-btn",onClick:e.withModifiers(z=>Z(m.id),["stop"]),title:"Remove branch"},[...t[68]||(t[68]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,ql)])],8,vl),ne.value===m.id?(e.openBlock(),e.createElementBlock("div",Gl,[e.createElementVNode("div",Yl,[t[70]||(t[70]=e.createElementVNode("label",{class:"field-label-sm"},"Model (optional)",-1)),e.createElementVNode("select",{class:"model-select-sm",value:m.model||"",onChange:z=>ue(m.id,z.target.value)},[t[69]||(t[69]=e.createElementVNode("option",{value:""},"Use default",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,z=>(e.openBlock(),e.createElementBlock("option",{key:z.id,value:z.id},e.toDisplayString(z.name),9,Jl))),128))],40,Xl)]),e.createElementVNode("div",Ql,[t[71]||(t[71]=e.createElementVNode("label",{class:"field-label-sm"},"System Prompt (optional)",-1)),e.createElementVNode("textarea",{class:"prompt-textarea-sm",value:m.prompt||"",onInput:z=>fe(m.id,z.target.value),placeholder:"Override system prompt for this branch...",rows:"3"},null,40,Zl)]),w.value.length>0?(e.openBlock(),e.createElementBlock("div",ea,[t[72]||(t[72]=e.createElementVNode("label",{class:"field-label-sm"},"Tools (optional)",-1)),e.createElementVNode("div",ta,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,z=>(e.openBlock(),e.createElementBlock("label",{key:z.id,class:e.normalizeClass(["branch-tool-item",{enabled:(m.tools||[]).includes(z.id)}])},[e.createElementVNode("input",{type:"checkbox",checked:(m.tools||[]).includes(z.id),onChange:ie=>he(m.id,z.id)},null,40,oa),e.createElementVNode("span",na,e.toDisplayString(z.name),1)],2))),128))])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),128))]),e.createElementVNode("div",la,[e.createElementVNode("div",aa,[t[74]||(t[74]=e.createElementVNode("label",{class:"field-label"},"Merge Configuration",-1)),e.createElementVNode("div",sa,[e.createElementVNode("input",{type:"checkbox",checked:U.value.mergeEnabled!==!1,onChange:t[15]||(t[15]=m=>a.editor.commands.updateNodeData(n.value.id,{mergeEnabled:m.target.checked}))},null,40,ra),t[73]||(t[73]=e.createElementVNode("span",{class:"toggle-text"},"Enable Merge",-1))])]),U.value.mergeEnabled!==!1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t[77]||(t[77]=e.createElementVNode("p",{class:"field-hint"}," After all branches complete, results are merged using this prompt. ",-1)),e.createElementVNode("div",ia,[t[75]||(t[75]=e.createElementVNode("label",{class:"field-label-sm"},"Merge Model",-1)),e.createElementVNode("select",{class:"model-select",value:U.value.mergeModel||"z-ai/glm-4.6:exacto",onChange:t[16]||(t[16]=m=>a.editor.commands.updateNodeData(n.value.id,{model:m.target.value}))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,m=>(e.openBlock(),e.createElementBlock("option",{key:m.id,value:m.id},e.toDisplayString(m.name)+" ("+e.toDisplayString(m.provider)+") ",9,ca))),128))],40,da)]),e.createElementVNode("div",ma,[t[76]||(t[76]=e.createElementVNode("label",{class:"field-label-sm"},"Merge Prompt",-1)),e.createElementVNode("textarea",{class:"prompt-textarea",value:U.value.mergePrompt,onInput:t[17]||(t[17]=m=>te("prompt",m.target.value)),placeholder:"Instructions for merging branch outputs...",rows:"4"},null,40,pa)])],64)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),c.value==="tools"&&u.value?(e.openBlock(),e.createElementBlock("div",ua,[w.value.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t[80]||(t[80]=e.createElementVNode("label",{class:"field-label"},"Available Tools",-1)),t[81]||(t[81]=e.createElementVNode("p",{class:"field-hint"}," Select which tools this agent can use during execution. ",-1)),e.createElementVNode("div",fa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,m=>(e.openBlock(),e.createElementBlock("label",{key:m.id,class:e.normalizeClass(["tool-item",{enabled:k.value.includes(m.id)}])},[e.createElementVNode("input",{type:"checkbox",checked:k.value.includes(m.id),onChange:z=>Qe(m.id)},null,40,ga),e.createElementVNode("div",ha,[e.createElementVNode("span",Na,e.toDisplayString(m.name),1),e.createElementVNode("span",Ea,e.toDisplayString(m.description),1)])],2))),128))]),k.value.length>0?(e.openBlock(),e.createElementBlock("div",ka,[e.createElementVNode("label",ya,"Enabled Tools ("+e.toDisplayString(k.value.length)+")",1),e.createElementVNode("div",Va,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,m=>{var z;return e.openBlock(),e.createElementBlock("span",{key:m,class:"tool-chip"},[e.createTextVNode(e.toDisplayString((z=w.value.find(ie=>ie.id===m))==null?void 0:z.name)+" ",1),e.createElementVNode("button",{class:"chip-remove",onClick:ie=>Qe(m)},[...t[79]||(t[79]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,wa)])}),128))])])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",ba,[...t[82]||(t[82]=[e.createElementVNode("label",{class:"field-label"},"Available Tools",-1),e.createElementVNode("p",{class:"field-hint"}," No tools are registered. Add tools in or3-chat to enable selections here. ",-1)])]))])):e.createCommentVNode("",!0),c.value==="errors"&&M.value?(e.openBlock(),e.createElementBlock("div",Ba,[t[87]||(t[87]=e.createElementVNode("label",{class:"field-label"},"Error handling mode",-1)),e.createElementVNode("div",_a,[e.createElementVNode("button",{class:e.normalizeClass(["mode-button",{active:G.value.mode==="stop"}]),onClick:t[18]||(t[18]=m=>Ce("stop"))}," Stop on error ",2),e.createElementVNode("button",{class:e.normalizeClass(["mode-button",{active:G.value.mode==="continue"}]),onClick:t[19]||(t[19]=m=>Ce("continue"))}," Continue ",2),e.createElementVNode("button",{class:e.normalizeClass(["mode-button",{active:G.value.mode==="branch"}]),onClick:t[20]||(t[20]=m=>Ce("branch"))}," Branch to error ",2)]),e.createElementVNode("div",xa,[e.createElementVNode("div",Ca,[t[83]||(t[83]=e.createElementVNode("label",{class:"field-label"},"Max retries",-1)),e.createElementVNode("input",{type:"number",min:"0",class:"text-input",value:se.value.maxRetries,onInput:t[21]||(t[21]=m=>Se("maxRetries",m))},null,40,Sa)]),e.createElementVNode("div",Da,[t[84]||(t[84]=e.createElementVNode("label",{class:"field-label"},"Base delay (ms)",-1)),e.createElementVNode("input",{type:"number",min:"0",class:"text-input",value:se.value.baseDelay,onInput:t[22]||(t[22]=m=>Se("baseDelay",m))},null,40,$a)]),e.createElementVNode("div",Ia,[t[85]||(t[85]=e.createElementVNode("label",{class:"field-label"},"Max delay (ms)",-1)),e.createElementVNode("input",{type:"number",min:"0",class:"text-input",value:se.value.maxDelay??"",onInput:t[23]||(t[23]=m=>Se("maxDelay",m))},null,40,Ma)])]),e.createElementVNode("div",Ta,[t[86]||(t[86]=e.createElementVNode("label",{class:"field-label"},"Retry on codes",-1)),e.createElementVNode("div",La,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(Mr,m=>e.createElementVNode("label",{key:m.id,class:"checkbox-item"},[e.createElementVNode("input",{type:"checkbox",checked:(se.value.retryOn||[]).includes(m.id),onChange:z=>Pr(m.id)},null,40,Oa),e.createElementVNode("span",null,e.toDisplayString(m.label),1)])),64))])]),t[88]||(t[88]=e.createElementVNode("p",{class:"field-hint"},' Branch mode sends errors to the "error" handle if connected. Continue mode logs the error and moves forward. ',-1))])):e.createCommentVNode("",!0),c.value==="hitl"&&O.value?(e.openBlock(),e.createElementBlock("div",Pa,[e.createElementVNode("div",Ra,[e.createElementVNode("label",za,[e.createElementVNode("input",{type:"checkbox",checked:ee.value.enabled,onChange:jr},null,40,Ha),t[89]||(t[89]=e.createElementVNode("span",{class:"toggle-text"},"Enable Human Review",-1))]),t[90]||(t[90]=e.createElementVNode("p",{class:"field-hint",style:{"margin-top":"4px"}}," Pause execution for human approval, input, or review. ",-1))]),ee.value.enabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Aa,[t[91]||(t[91]=e.createElementVNode("label",{class:"field-label"},"Review Mode",-1)),e.createElementVNode("div",va,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(Xe,m=>e.createElementVNode("button",{key:m.id,class:e.normalizeClass(["mode-button hitl-mode",{active:ee.value.mode===m.id}]),onClick:z=>Ur(m.id),title:m.description},e.toDisplayString(m.label),11,Fa)),64))]),e.createElementVNode("p",ja,e.toDisplayString(($=Xe.find(m=>m.id===ee.value.mode))==null?void 0:$.description),1)]),e.createElementVNode("div",Ua,[t[92]||(t[92]=e.createElementVNode("label",{class:"field-label"},"Prompt",-1)),e.createElementVNode("textarea",{value:ee.value.prompt||"",class:"prompt-textarea hitl-prompt",placeholder:"Message to show the reviewer...",onInput:Wr},null,40,Wa)]),e.createElementVNode("div",Ka,[e.createElementVNode("div",qa,[t[93]||(t[93]=e.createElementVNode("label",{class:"field-label"},"Timeout (ms)",-1)),e.createElementVNode("input",{type:"number",min:"0",class:"text-input",value:ee.value.timeout||"",placeholder:"No timeout",onInput:Kr},null,40,Ga)]),e.createElementVNode("div",Ya,[t[94]||(t[94]=e.createElementVNode("label",{class:"field-label"},"Default Action",-1)),e.createElementVNode("select",{class:"model-select",value:ee.value.defaultAction||"reject",onChange:qr},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(Ir,m=>e.createElementVNode("option",{key:m.id,value:m.id},e.toDisplayString(m.label),9,Ja)),64))],40,Xa)])]),t[95]||(t[95]=e.createElementVNode("p",{class:"field-hint"},' When timeout is set, the default action is taken automatically. Connect the "Rejected" handle to route rejected items. ',-1))],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value==="subflow"&&g.value?(e.openBlock(),e.createElementBlock("div",Qa,[e.createElementVNode("div",Za,[t[97]||(t[97]=e.createElementVNode("label",{class:"field-label"},"Subflow",-1)),e.createElementVNode("select",{class:"model-select",value:S.value.subflowId,disabled:l.subflowListLoading,onChange:Yr},[e.createElementVNode("option",ts,e.toDisplayString(l.subflowListLoading?"Loading workflows...":"Select a workflow..."),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,m=>(e.openBlock(),e.createElementBlock("option",{key:m.id,value:m.id},e.toDisplayString(m.name)+" ("+e.toDisplayString(m.id)+") ",9,os))),128))],40,es),l.subflowListLoading?(e.openBlock(),e.createElementBlock("p",ns," Loading available workflows... ")):l.subflowListError?(e.openBlock(),e.createElementBlock("p",ls," Unable to load workflows. You can still enter a subflow ID manually. ")):E.value.length===0?(e.openBlock(),e.createElementBlock("p",as," No workflows found yet. Create one in the Workflows tab or enter an ID manually. ")):(e.openBlock(),e.createElementBlock("p",ss,e.toDisplayString(((L=W.value)==null?void 0:L.description)||"Choose a workflow to run inside this node."),1)),S.value.subflowId?(e.openBlock(),e.createElementBlock("div",rs,[t[96]||(t[96]=e.createElementVNode("span",{class:"model-id-label"},"Workflow ID:",-1)),e.createElementVNode("code",null,e.toDisplayString(S.value.subflowId),1)])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"subflow-manual-toggle",type:"button",onClick:Xr},e.toDisplayString(F.value?"Hide manual entry":"Enter ID manually"),1)]),F.value?(e.openBlock(),e.createElementBlock("div",is,[t[98]||(t[98]=e.createElementVNode("label",{class:"field-label"},"Subflow ID",-1)),e.createElementVNode("input",{type:"text",class:"text-input",value:S.value.subflowId,placeholder:"e.g., email-composer",onInput:Gr},null,40,ds),t[99]||(t[99]=e.createElementVNode("p",{class:"field-hint"}," Use this only if the workflow isn't listed. ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",cs,[e.createElementVNode("label",ms,[e.createElementVNode("input",{type:"checkbox",checked:S.value.shareSession,onChange:Jr},null,40,ps),t[100]||(t[100]=e.createElementVNode("span",{class:"toggle-text"},"Share Session",-1))]),t[101]||(t[101]=e.createElementVNode("p",{class:"field-hint",style:{"margin-top":"4px"}}," When enabled, the subflow shares conversation history with the parent workflow. ",-1))]),Object.keys(S.value.inputMappings).length>0?(e.openBlock(),e.createElementBlock("div",us,[t[102]||(t[102]=e.createElementVNode("label",{class:"field-label"},"Input Mappings",-1)),e.createElementVNode("div",fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value.inputMappings,(m,z)=>(e.openBlock(),e.createElementBlock("div",{key:z,class:"mapping-item"},[e.createElementVNode("span",gs,e.toDisplayString(z),1),e.createElementVNode("input",{type:"text",class:"text-input mapping-value",value:String(m),onInput:ie=>Qr(String(z),ie.target.value)},null,40,hs),e.createElementVNode("button",{class:"remove-mapping-btn",onClick:ie=>Zr(String(z)),title:"Remove mapping"}," × ",8,Ns)]))),128))])])):e.createCommentVNode("",!0),t[103]||(t[103]=e.createElementVNode("div",{class:"info-box"},[e.createElementVNode("p",null,[e.createElementVNode("strong",null,"Expressions:")]),e.createElementVNode("ul",{class:"expression-hints"},[e.createElementVNode("li",null,[e.createElementVNode("code",null,"{{ output }}"),e.createTextVNode(" - Current input/output ")]),e.createElementVNode("li",null,[e.createElementVNode("code",null,"{{ outputs.nodeId }}"),e.createTextVNode(" - Output from a specific node ")]),e.createElementVNode("li",null,[e.createElementVNode("code",null,'"literal"'),e.createTextVNode(" - Static value")])])],-1))])):e.createCommentVNode("",!0),c.value==="output"&&d.value?(e.openBlock(),e.createElementBlock("div",Es,[e.createVNode(mn,{modelValue:v.value.mode||"combine","onUpdate:modelValue":Ve},null,8,["modelValue"]),e.createVNode(In,{modelValue:v.value.sources||[],availableGroups:e.unref(ke),"onUpdate:modelValue":we},null,8,["modelValue","availableGroups"]),v.value.mode==="synthesis"?(e.openBlock(),e.createElementBlock("div",ks,[e.createElementVNode("div",ys,[t[104]||(t[104]=e.createElementVNode("label",{class:"field-label"},"Synthesis Model",-1)),e.createElementVNode("select",{class:"model-select",value:((Q=v.value.synthesis)==null?void 0:Q.model)||"z-ai/glm-4.6:exacto",onChange:me},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,m=>(e.openBlock(),e.createElementBlock("option",{key:m.id,value:m.id},e.toDisplayString(m.name)+" ("+e.toDisplayString(m.provider)+") ",9,ws))),128))],40,Vs)]),e.createElementVNode("div",bs,[t[105]||(t[105]=e.createElementVNode("label",{class:"field-label"},"Synthesis Prompt",-1)),e.createElementVNode("textarea",{class:"prompt-textarea",value:((j=v.value.synthesis)==null?void 0:j.prompt)||"",placeholder:"Instructions for synthesizing the final output...",rows:"4",onInput:_e},null,40,Bs)])])):e.createCommentVNode("",!0),e.createElementVNode("div",_s,[t[106]||(t[106]=e.createElementVNode("label",{class:"field-label"},"Introduction",-1)),e.createElementVNode("textarea",{class:"text-input",value:v.value.introText||"",placeholder:"Optional text to prepend...",rows:"2",onInput:be},null,40,xs)]),e.createElementVNode("div",Cs,[t[107]||(t[107]=e.createElementVNode("label",{class:"field-label"},"Conclusion",-1)),e.createElementVNode("textarea",{class:"text-input",value:v.value.outroText||"",placeholder:"Optional text to append...",rows:"2",onInput:Be},null,40,Ss)]),e.createVNode(Rn,{previewData:e.unref(ye)},null,8,["previewData"]),e.createElementVNode("div",Ds,[e.createElementVNode("button",{class:"advanced-toggle",onClick:t[24]||(t[24]=m=>X.value=!X.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["expand-icon",{rotated:X.value}]),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[...t[108]||(t[108]=[e.createElementVNode("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2)),t[109]||(t[109]=e.createTextVNode(" Advanced Settings ",-1))]),X.value?(e.openBlock(),e.createElementBlock("div",$s,[e.createElementVNode("div",Is,[e.createElementVNode("label",Ms,[e.createElementVNode("input",{type:"checkbox",checked:v.value.useRawTemplate,onChange:pe},null,40,Ts),t[110]||(t[110]=e.createElementVNode("div",{class:"tool-info"},[e.createElementVNode("span",{class:"tool-name"},"Use Raw Template"),e.createElementVNode("span",{class:"tool-description"},"Override all settings with a custom template")],-1))]),e.createElementVNode("label",Ls,[e.createElementVNode("input",{type:"checkbox",checked:v.value.includeMetadata,onChange:xe},null,40,Os),t[111]||(t[111]=e.createElementVNode("div",{class:"tool-info"},[e.createElementVNode("span",{class:"tool-name"},"Include Metadata"),e.createElementVNode("span",{class:"tool-description"},"Add execution stats to output")],-1))])]),v.value.useRawTemplate?(e.openBlock(),e.createElementBlock("div",Ps,[t[112]||(t[112]=e.createElementVNode("label",{class:"field-label"},"Raw Template",-1)),e.createElementVNode("textarea",{class:"textarea-input",value:v.value.template,placeholder:"e.g., Final result: {{outputs.nodeId}}",onInput:h,rows:"4"},null,40,Rs)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("div",zs,[...t[113]||(t[113]=[e.createElementVNode("div",{class:"info-box"}," The Start node is the entry point for workflow execution. Connect it to other nodes to define your workflow. ",-1)])])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Hs,[...t[114]||(t[114]=[e.createElementVNode("div",{class:"empty-icon"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"},[e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m12 18l-2-4l-7-3.5a.55.55 0 0 1 0-1L21 3l-3.14 8.697M17.001 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0m2-3.5V17m0 4v1.5m3.031-5.25l-1.299.75m-3.463 2l-1.3.75m0-3.5l1.3.75m3.463 2l1.3.75"})])],-1),e.createElementVNode("p",null,"Select a node to edit its properties",-1)])]))}}}),[["__scopeId","data-v-2de5c749"]]),vs={class:"chat-panel"},Fs={key:0,class:"empty-state"},js={class:"message-avatar"},Us={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ws={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ks={class:"message-body"},qs={key:0,class:"tool-calls"},Gs={class:"tool-name"},Ys={key:1,class:"message-content"},Xs={key:2,class:"message-meta"},Js={key:1,class:"message assistant streaming"},Qs={class:"message-body"},Zs={class:"message-content"},er={class:"input-area"},tr=["disabled"],or=["disabled"],nr={key:0,class:"spinner",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},lr={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},ar=H(e.defineComponent({__name:"ChatPanel",props:{messages:{},streamingContent:{},executionState:{}},emits:["send","clear"],setup(l,{emit:r}){const s=l,i=r;let a=null;const y=()=>s.executionState?s.executionState:(a||(a=Te()),a),n=e.computed(()=>y()),c=e.computed(()=>n.value.state),w=()=>n.value.reset(),E=e.ref(""),V=e.ref(null);e.watch(()=>{var P;return(P=s.messages)==null?void 0:P.length},async()=>{await e.nextTick(),p()}),e.watch(()=>s.streamingContent,async()=>{await e.nextTick(),p()});const p=()=>{V.value&&(V.value.scrollTop=V.value.scrollHeight)},k=()=>{!E.value.trim()||c.value.value.isRunning||(i("send",E.value.trim()),E.value="")},D=()=>{w(),i("clear")},u=P=>{P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),k())};return(P,f)=>{var b;return e.openBlock(),e.createElementBlock("div",vs,[e.createElementVNode("div",{class:"chat-header"},[f[1]||(f[1]=e.createElementVNode("div",{class:"header-title"},[e.createElementVNode("svg",{class:"sparkle-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707"}),e.createElementVNode("circle",{cx:"12",cy:"12",r:"4"})]),e.createElementVNode("span",null,"Workflow Chat")],-1)),e.createElementVNode("button",{onClick:D,class:"clear-btn"},"Clear")]),e.createElementVNode("div",{class:"messages",ref_key:"messagesContainer",ref:V},[(b=l.messages)!=null&&b.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Fs,[...f[2]||(f[2]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e.createElementVNode("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2"}),e.createElementVNode("circle",{cx:"12",cy:"5",r:"2"}),e.createElementVNode("path",{d:"M12 7v4"})],-1),e.createElementVNode("p",null,"Send a message to start the workflow",-1)])])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.messages,(N,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:e.normalizeClass(["message",N.role])},[e.createElementVNode("div",js,[N.role==="user"?(e.openBlock(),e.createElementBlock("svg",Us,[...f[3]||(f[3]=[e.createElementVNode("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"7",r:"4"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",Ws,[...f[4]||(f[4]=[e.createElementVNode("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"5",r:"2"},null,-1),e.createElementVNode("path",{d:"M12 7v4"},null,-1)])]))]),e.createElementVNode("div",Ks,[N.toolCalls&&N.toolCalls.length>0?(e.openBlock(),e.createElementBlock("div",qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.toolCalls,(d,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"tool-call"},[f[5]||(f[5]=e.createElementVNode("span",{class:"tool-icon"},"🛠️",-1)),e.createElementVNode("span",Gs,"Used "+e.toDisplayString(d.function.name),1)]))),128))])):e.createCommentVNode("",!0),N.content?(e.openBlock(),e.createElementBlock("div",Ys,e.toDisplayString(N.content),1)):e.createCommentVNode("",!0),N.nodeId?(e.openBlock(),e.createElementBlock("div",Xs,"via "+e.toDisplayString(N.nodeId),1)):e.createCommentVNode("",!0)])],2))),128)),l.streamingContent||c.value.value.streamingContent?(e.openBlock(),e.createElementBlock("div",Js,[f[7]||(f[7]=e.createStaticVNode('<div class="message-avatar" data-v-c2838e84><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-c2838e84><rect x="3" y="11" width="18" height="10" rx="2" data-v-c2838e84></rect><circle cx="12" cy="5" r="2" data-v-c2838e84></circle><path d="M12 7v4" data-v-c2838e84></path></svg></div>',1)),e.createElementVNode("div",Qs,[e.createElementVNode("div",Zs,[e.createTextVNode(e.toDisplayString(l.streamingContent||c.value.value.streamingContent),1),f[6]||(f[6]=e.createElementVNode("span",{class:"cursor"},"|",-1))])])])):e.createCommentVNode("",!0)],512),e.createElementVNode("div",er,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":f[0]||(f[0]=N=>E.value=N),onKeydown:u,placeholder:"Type a message...",disabled:c.value.value.isRunning,rows:"1"},null,40,tr),[[e.vModelText,E.value]]),e.createElementVNode("button",{class:"send-btn",onClick:k,disabled:!E.value.trim()||c.value.value.isRunning},[c.value.value.isRunning?(e.openBlock(),e.createElementBlock("svg",nr,[...f[8]||(f[8]=[e.createElementVNode("path",{d:"M21 12a9 9 0 11-6.219-8.56"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",lr,[...f[9]||(f[9]=[e.createElementVNode("line",{x1:"22",y1:"2",x2:"11",y2:"13"},null,-1),e.createElementVNode("polygon",{points:"22 2 15 22 11 13 2 9 22 2"},null,-1)])]))],8,or)])])}}}),[["__scopeId","data-v-c2838e84"]]),sr=e.defineComponent({__name:"Controls",setup(l){return(r,s)=>(e.openBlock(),e.createBlock(e.unref(De.Controls)))}}),rr=e.defineComponent({__name:"MiniMap",setup(l){return(r,s)=>(e.openBlock(),e.createBlock(e.unref(at.MiniMap)))}}),ir={class:"edge-editor"},dr={class:"editor-header"},cr={class:"editor-content"},mr={key:0,class:"delete-confirm"},pr=H(e.defineComponent({__name:"EdgeLabelEditor",props:{edge:{},show:{type:Boolean}},emits:["close","update","delete"],setup(l,{emit:r}){const s=l,i=r,a=e.ref(""),y=e.ref(null),n=e.ref(!1);e.watch(()=>s.edge,p=>{p&&(a.value=p.label||"")},{immediate:!0}),e.watch(()=>s.show,p=>{p&&(n.value=!1,e.nextTick(()=>{var k,D;(k=y.value)==null||k.focus(),(D=y.value)==null||D.select()}))});function c(){s.edge&&i("update",s.edge.id,a.value)}function w(p){p.key==="Enter"?(c(),i("close")):p.key==="Escape"&&i("close")}function E(){s.edge&&(n.value?(i("delete",s.edge.id),n.value=!1):n.value=!0)}function V(){n.value=!1}return(p,k)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[l.show&&l.edge?(e.openBlock(),e.createElementBlock("div",{key:0,class:"edge-editor-overlay",onClick:k[2]||(k[2]=e.withModifiers(D=>i("close"),["self"]))},[e.createElementVNode("div",ir,[e.createElementVNode("div",dr,[k[4]||(k[4]=e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"header-icon"},[e.createElementVNode("path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z"}),e.createElementVNode("path",{d:"M7 7h.01"})],-1)),k[5]||(k[5]=e.createElementVNode("span",null,"Edge Label",-1)),e.createElementVNode("button",{class:"close-btn",onClick:k[0]||(k[0]=D=>i("close"))},[...k[3]||(k[3]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])]),e.createElementVNode("div",cr,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:y,"onUpdate:modelValue":k[1]||(k[1]=D=>a.value=D),type:"text",class:"label-input",placeholder:"Enter edge label (e.g., 'Technical', 'Sales')",onInput:c,onKeydown:w},null,544),[[e.vModelText,a.value]]),k[8]||(k[8]=e.createElementVNode("p",{class:"hint"}," This label is shown on the connection line and helps the router make decisions. ",-1)),n.value?(e.openBlock(),e.createElementBlock("div",mr,[k[6]||(k[6]=e.createElementVNode("span",null,"Delete this connection?",-1)),e.createElementVNode("div",{class:"confirm-actions"},[e.createElementVNode("button",{class:"confirm-btn confirm-yes",onClick:E}," Yes, delete "),e.createElementVNode("button",{class:"confirm-btn confirm-no",onClick:V}," Cancel ")])])):(e.openBlock(),e.createElementBlock("button",{key:1,class:"delete-btn",onClick:E},[...k[7]||(k[7]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("polyline",{points:"3 6 5 6 21 6"}),e.createElementVNode("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})],-1),e.createTextVNode(" Delete Connection ",-1)])]))])])])):e.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-ad20c837"]]),ur={class:"title"},fr={class:"header-actions"},gr={key:1,class:"header-count error"},hr={key:2,class:"header-count warning"},Nr={key:3,class:"header-count ok"},Er={class:"collapsible-inner"},kr={class:"summary"},yr={key:0,class:"count error"},Vr={key:1,class:"count warning"},wr={key:2,class:"count ok"},br={key:3,class:"timestamp"},Br={key:0,class:"issue-list"},_r={class:"badge"},xr={class:"details"},Cr={class:"message"},Sr={key:0,class:"meta"},Dr={key:1,class:"meta"},$r=H(e.defineComponent({__name:"ValidationOverlay",props:{editor:{}},setup(l){const r=l,s=e.ref({isValid:!0,errors:[],warnings:[]}),i=e.ref(null),a=e.ref(!0);let y=null,n=null;const c=()=>{s.value=Y.validateWorkflow([...r.editor.getNodes()],[...r.editor.getEdges()]),i.value=Date.now()},w=()=>{n&&clearTimeout(n),n=setTimeout(c,120)};e.onMounted(()=>{c(),y=r.editor.on("update",w)}),e.onUnmounted(()=>{y==null||y(),n&&clearTimeout(n)});const E=e.computed(()=>[...s.value.errors,...s.value.warnings]),V=e.computed(()=>E.value.length===0),p=e.computed(()=>i.value?new Date(i.value).toLocaleTimeString():"");return(k,D)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["validation-overlay",{"has-issues":!V.value}])},[e.createElementVNode("div",{class:"overlay-header",onClick:D[0]||(D[0]=u=>a.value=!a.value)},[e.createElementVNode("div",ur,[e.createElementVNode("span",{class:e.normalizeClass(["status-dot",V.value?"ok":"warn"])},null,2),D[1]||(D[1]=e.createElementVNode("span",null,"Validation",-1))]),e.createElementVNode("div",fr,[a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"refresh",onClick:e.withModifiers(c,["stop"])}," Re-run ")),a.value&&s.value.errors.length?(e.openBlock(),e.createElementBlock("span",gr,e.toDisplayString(s.value.errors.length)+" error"+e.toDisplayString(s.value.errors.length===1?"":"s"),1)):e.createCommentVNode("",!0),a.value&&s.value.warnings.length?(e.openBlock(),e.createElementBlock("span",hr,e.toDisplayString(s.value.warnings.length)+" warning"+e.toDisplayString(s.value.warnings.length===1?"":"s"),1)):e.createCommentVNode("",!0),a.value&&V.value?(e.openBlock(),e.createElementBlock("span",Nr,"All clear")):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["collapse-chevron",{expanded:!a.value}]),width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},[...D[2]||(D[2]=[e.createElementVNode("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],2))])]),e.createElementVNode("div",{class:e.normalizeClass(["collapsible-content",{collapsed:a.value}])},[e.createElementVNode("div",Er,[e.createElementVNode("div",kr,[s.value.errors.length?(e.openBlock(),e.createElementBlock("span",yr,e.toDisplayString(s.value.errors.length)+" error"+e.toDisplayString(s.value.errors.length===1?"":"s"),1)):e.createCommentVNode("",!0),s.value.warnings.length?(e.openBlock(),e.createElementBlock("span",Vr,e.toDisplayString(s.value.warnings.length)+" warning"+e.toDisplayString(s.value.warnings.length===1?"":"s"),1)):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("span",wr,"All clear")):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("span",br," Updated "+e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)]),E.value.length?(e.openBlock(),e.createElementBlock("div",Br,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,u=>(e.openBlock(),e.createElementBlock("div",{key:u.code+(u.nodeId||"")+(u.edgeId||"")+u.message,class:e.normalizeClass(["issue",u.type])},[e.createElementVNode("span",_r,e.toDisplayString(u.type==="error"?"Error":"Warning"),1),e.createElementVNode("div",xr,[e.createElementVNode("div",Cr,e.toDisplayString(u.message),1),u.nodeId?(e.openBlock(),e.createElementBlock("div",Sr," Node: "+e.toDisplayString(u.nodeId),1)):u.edgeId?(e.openBlock(),e.createElementBlock("div",Dr," Edge: "+e.toDisplayString(u.edgeId),1)):e.createCommentVNode("",!0)])],2))),128))])):e.createCommentVNode("",!0)])],2)],2))}}),[["__scopeId","data-v-849827fb"]]);Object.defineProperty(T,"isAgentNodeData",{enumerable:!0,get:()=>Y.isAgentNodeData}),Object.defineProperty(T,"isOutputNodeData",{enumerable:!0,get:()=>Y.isOutputNodeData}),Object.defineProperty(T,"isParallelNodeData",{enumerable:!0,get:()=>Y.isParallelNodeData}),Object.defineProperty(T,"isRouterNodeData",{enumerable:!0,get:()=>Y.isRouterNodeData}),Object.defineProperty(T,"isStartNodeData",{enumerable:!0,get:()=>Y.isStartNodeData}),T.ChatPanel=ar,T.Controls=sr,T.EdgeLabelEditor=pr,T.MiniMap=rr,T.NodeInspector=As,T.NodePalette=sn,T.NodeWrapper=le,T.ValidationOverlay=$r,T.WorkflowCanvas=zo,T.createExecutionState=Me,T.createNodeRegistry=Le,T.defaultNodeRegistry=Oe,T.useEditor=st,T.useExecutionState=Te,T.useNodeState=dt,T.useWorkflowEditor=$e,T.useWorkflowExecution=rt,T.useWorkflowStorage=it,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.start-node[data-v-740a3c44]{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--or3-color-success, #22c55e),#16a34a);border:1px solid transparent;border-radius:var(--or3-radius-full, 9999px);padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-lg, 24px);box-shadow:var(--or3-shadow-md, 0 4px 12px rgba(0, 0, 0, .4));transition:all .25s ease;min-width:100px}.start-content[data-v-740a3c44]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px);color:#fff;font-weight:600;font-size:13px}.play-icon[data-v-740a3c44]{width:16px;height:16px}.start-node[data-v-740a3c44]:hover{transform:translateY(-1px);box-shadow:0 0 20px #22c55e66}.status-active[data-v-740a3c44]{animation:pulse-glow-740a3c44 1.5s ease-in-out infinite}.status-completed[data-v-740a3c44]{opacity:.7}.selected[data-v-740a3c44]{box-shadow:0 0 0 2px var(--or3-color-accent, #8b5cf6),var(--or3-shadow-md, 0 4px 12px rgba(0, 0, 0, .4))}.handle[data-v-740a3c44]{background:var(--or3-color-bg-elevated, #22222e)!important;border:2px solid rgba(255,255,255,.3)!important}@keyframes pulse-glow-740a3c44{0%,to{box-shadow:0 0 10px #22c55e66}50%{box-shadow:0 0 25px #22c55e99}}.node-wrapper[data-v-aac8cd21]{background:var(--or3-color-bg-elevated, #22222e);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-lg, 16px);padding:var(--or3-spacing-md, 16px);min-width:200px;box-shadow:var(--or3-shadow-md, 0 4px 12px rgba(0, 0, 0, .4));transition:all .25s ease;position:relative}.node-wrapper[data-v-aac8cd21]:before{content:"";position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border-radius:inherit;padding:1px;background:transparent;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;transition:background .25s ease}.status-idle[data-v-aac8cd21]{border-color:var(--or3-color-border, rgba(255, 255, 255, .08))}.status-active[data-v-aac8cd21]{border-color:var(--or3-color-accent, #8b5cf6);box-shadow:var(--or3-shadow-glow, 0 0 20px rgba(139, 92, 246, .3))}.status-active[data-v-aac8cd21]:before{background:linear-gradient(135deg,var(--or3-color-accent, #8b5cf6),transparent)}.status-completed[data-v-aac8cd21]{border-color:var(--or3-color-success, #22c55e)}.status-completed[data-v-aac8cd21]:before{background:linear-gradient(135deg,var(--or3-color-success, #22c55e),transparent)}.status-error[data-v-aac8cd21]{border-color:var(--or3-color-error, #ef4444)}.status-error[data-v-aac8cd21]:before{background:linear-gradient(135deg,var(--or3-color-error, #ef4444),transparent)}.selected[data-v-aac8cd21]{border-color:var(--or3-color-accent, #8b5cf6);border-width:2px;box-shadow:0 0 0 3px #8b5cf640,var(--or3-shadow-md, 0 4px 12px rgba(0, 0, 0, .4))}@media (max-width: 768px){.selected[data-v-aac8cd21]{border-width:3px;box-shadow:0 0 0 4px #8b5cf64d,var(--or3-shadow-glow, 0 0 20px rgba(139, 92, 246, .4))}}.node-wrapper[data-v-aac8cd21]:hover{border-color:var(--or3-color-border-hover, rgba(255, 255, 255, .15))}.status-active[data-v-aac8cd21]:hover{border-color:var(--or3-color-accent, #8b5cf6)}.status-completed[data-v-aac8cd21]:hover{border-color:var(--or3-color-success, #22c55e)}.status-error[data-v-aac8cd21]:hover{border-color:var(--or3-color-error, #ef4444)}.variant-secondary[data-v-aac8cd21]{border-color:var(--or3-color-secondary, #64748b)}.variant-secondary.status-active[data-v-aac8cd21]{box-shadow:var(--or3-shadow-glow, 0 0 20px rgba(100, 116, 139, .3))}.node-meta-container[data-v-aac8cd21]{position:absolute;top:8px;right:8px;display:flex;align-items:center;gap:4px;opacity:0;transition:opacity .2s ease;z-index:10}.node-wrapper:hover .node-meta-container[data-v-aac8cd21],.node-wrapper.selected .node-meta-container[data-v-aac8cd21]{opacity:1}.node-id[data-v-aac8cd21]{font-size:10px;font-family:monospace;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));background:var(--or3-color-bg-tertiary, #18181d);padding:2px 6px;height:20px;display:flex;align-items:center;border-radius:4px;border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));pointer-events:none}.inspect-btn[data-v-aac8cd21]{font-size:10px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));background:var(--or3-color-bg-tertiary, #18181d);width:20px;height:20px;display:flex;align-items:center;justify-content:center;border-radius:4px;border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));cursor:pointer;transition:all .2s ease}.inspect-btn[data-v-aac8cd21]:hover{color:var(--or3-color-text-primary, #ffffff);background:var(--or3-color-bg-hover, rgba(255, 255, 255, .05));border-color:var(--or3-color-accent, #8b5cf6)}.agent-node[data-v-47d0bb13]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.node-header[data-v-47d0bb13]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px)}.icon-wrapper[data-v-47d0bb13]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--or3-color-accent-muted, rgba(139, 92, 246, .2));border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-accent, #8b5cf6)}.bot-icon[data-v-47d0bb13]{width:18px;height:18px}.node-label[data-v-47d0bb13]{flex:1;font-weight:600;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-size:13px}.status-spinner[data-v-47d0bb13]{width:16px;height:16px;border:2px solid var(--or3-color-accent-muted, rgba(139, 92, 246, .2));border-top-color:var(--or3-color-accent, #8b5cf6);border-radius:50%;animation:spin-47d0bb13 1s linear infinite}.model-badge[data-v-47d0bb13]{display:inline-flex;align-items:center;padding:2px 8px;background:var(--or3-color-surface-glass, rgba(255, 255, 255, .03));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-full, 9999px);width:fit-content}.model-name[data-v-47d0bb13]{font-size:11px;font-family:var(--or3-font-mono, monospace);color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65))}.handle[data-v-47d0bb13]{background:var(--or3-color-bg-elevated, #22222e)!important;border:2px solid var(--or3-color-border-hover, rgba(255, 255, 255, .15))!important;width:12px!important;height:12px!important}.handle[data-v-47d0bb13]:hover{background:var(--or3-color-accent, #8b5cf6)!important;border-color:var(--or3-color-accent, #8b5cf6)!important}.error-handle[data-v-47d0bb13]{border-color:var(--or3-color-error, #ef4444)!important}.error-handle[data-v-47d0bb13]:hover{background:var(--or3-color-error, #ef4444)!important;border-color:var(--or3-color-error, #ef4444)!important}@keyframes spin-47d0bb13{to{transform:rotate(360deg)}}.router-node[data-v-36dffe57]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.node-header[data-v-36dffe57]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px)}.icon-wrapper[data-v-36dffe57]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--or3-color-warning-muted, rgba(245, 158, 11, .2));border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-warning, #f59e0b)}.branch-icon[data-v-36dffe57]{width:18px;height:18px}.node-label[data-v-36dffe57]{flex:1;font-weight:600;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-size:13px}.status-spinner[data-v-36dffe57]{width:16px;height:16px;border:2px solid var(--or3-color-warning-muted, rgba(245, 158, 11, .2));border-top-color:var(--or3-color-warning, #f59e0b);border-radius:50%;animation:spin-36dffe57 1s linear infinite}.router-badge[data-v-36dffe57]{display:inline-flex;align-items:center;padding:2px 8px;background:var(--or3-color-warning-muted, rgba(245, 158, 11, .2));border:1px solid rgba(245,158,11,.3);border-radius:var(--or3-radius-full, 9999px);width:fit-content}.router-badge span[data-v-36dffe57]{font-size:11px;font-weight:500;color:var(--or3-color-warning, #f59e0b)}.handle[data-v-36dffe57]{background:var(--or3-color-bg-elevated, #22222e)!important;border:2px solid var(--or3-color-border-hover, rgba(255, 255, 255, .15))!important;width:12px!important;height:12px!important}.route-handle[data-v-36dffe57]:after{content:attr(data-route-label);position:absolute;top:16px;left:50%;transform:translate(-50%);background:var(--or3-color-bg-elevated, #22222e);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));color:var(--or3-color-text-primary, rgba(255, 255, 255, .9));font-size:10px;padding:2px 6px;border-radius:var(--or3-radius-sm, 6px);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:5}.route-handle[data-v-36dffe57]:hover:after,.route-handle[data-v-36dffe57]:focus-visible:after{opacity:1}.handle[data-v-36dffe57]:hover{background:var(--or3-color-warning, #f59e0b)!important;border-color:var(--or3-color-warning, #f59e0b)!important}.error-handle[data-v-36dffe57]{border-color:var(--or3-color-error, #ef4444)!important}.error-handle[data-v-36dffe57]:hover{background:var(--or3-color-error, #ef4444)!important;border-color:var(--or3-color-error, #ef4444)!important}@keyframes spin-36dffe57{to{transform:rotate(360deg)}}.parallel-node[data-v-fe2a1cc4]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.node-header[data-v-fe2a1cc4]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px)}.icon-wrapper[data-v-fe2a1cc4]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--or3-color-info-muted, rgba(59, 130, 246, .2));border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-info, #3b82f6)}.merge-icon[data-v-fe2a1cc4]{width:18px;height:18px}.node-label[data-v-fe2a1cc4]{flex:1;font-weight:600;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-size:13px}.status-spinner[data-v-fe2a1cc4]{width:16px;height:16px;border:2px solid var(--or3-color-info-muted, rgba(59, 130, 246, .2));border-top-color:var(--or3-color-info, #3b82f6);border-radius:50%;animation:spin-fe2a1cc4 1s linear infinite}.parallel-badge[data-v-fe2a1cc4]{display:inline-flex;align-items:center;padding:2px 8px;background:var(--or3-color-info-muted, rgba(59, 130, 246, .2));border:1px solid rgba(59,130,246,.3);border-radius:var(--or3-radius-full, 9999px);width:fit-content}.parallel-badge span[data-v-fe2a1cc4]{font-size:11px;font-weight:500;color:var(--or3-color-info, #3b82f6)}.handle[data-v-fe2a1cc4]{background:var(--or3-color-bg-elevated, #22222e)!important;border:2px solid var(--or3-color-border-hover, rgba(255, 255, 255, .15))!important;width:12px!important;height:12px!important}.handle[data-v-fe2a1cc4]:hover{background:var(--or3-color-info, #3b82f6)!important;border-color:var(--or3-color-info, #3b82f6)!important}@keyframes spin-fe2a1cc4{to{transform:rotate(360deg)}}.while-node[data-v-e439cd33]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px);position:relative}.node-header[data-v-e439cd33]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px)}.icon-wrapper[data-v-e439cd33]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--or3-color-info-muted, rgba(59, 130, 246, .2));border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-info, #3b82f6);flex-shrink:0}.loop-icon[data-v-e439cd33]{width:18px;height:18px}.node-label[data-v-e439cd33]{flex:1;font-weight:600;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pill[data-v-e439cd33]{font-size:11px;text-transform:uppercase;padding:2px 8px;background:var(--or3-color-surface-glass, rgba(59, 130, 246, .15));border:1px solid var(--or3-color-info, #3b82f6);border-radius:var(--or3-radius-full, 9999px);color:var(--or3-color-info, #3b82f6);letter-spacing:.5px;position:absolute;top:0;right:0}.pill.fixed[data-v-e439cd33]{background:#a855f726;border-color:#a855f7;color:#a855f7}.meta[data-v-e439cd33]{display:flex;gap:var(--or3-spacing-xs, 4px);font-size:11px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .5));align-items:center}.meta-item strong[data-v-e439cd33]{color:var(--or3-color-text-secondary, rgba(255, 255, 255, .7));font-weight:600}.accumulate-badge[data-v-e439cd33]{font-size:12px;margin-left:auto}.port-labels[data-v-e439cd33]{display:flex;justify-content:space-between;padding:0 8px;margin-top:4px}.port-label[data-v-e439cd33]{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;letter-spacing:.3px}.body-label[data-v-e439cd33]{color:var(--or3-color-warning, #f59e0b);background:#f59e0b26}.done-label[data-v-e439cd33]{color:var(--or3-color-success, #22c55e);background:#22c55e26}.handle[data-v-e439cd33]{background:var(--or3-color-bg-elevated, #22222e)!important;border:2px solid var(--or3-color-info, #3b82f6)!important;width:12px!important;height:12px!important}.body-handle[data-v-e439cd33]{border-color:var(--or3-color-warning, #f59e0b)!important}.done-handle[data-v-e439cd33]{border-color:var(--or3-color-success, #22c55e)!important}.subflow-node[data-v-d5994547]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.node-header[data-v-d5994547]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px)}.icon-wrapper[data-v-d5994547]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--or3-color-secondary-muted, rgba(100, 116, 139, .2));border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-secondary, #64748b)}.subflow-icon[data-v-d5994547]{width:18px;height:18px}.node-label[data-v-d5994547]{flex:1;font-weight:600;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-size:13px}.status-spinner[data-v-d5994547]{width:16px;height:16px;border:2px solid var(--or3-color-secondary-muted, rgba(100, 116, 139, .2));border-top-color:var(--or3-color-secondary, #64748b);border-radius:50%;animation:spin-d5994547 .8s linear infinite}@keyframes spin-d5994547{to{transform:rotate(360deg)}}.subflow-info[data-v-d5994547]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 4px)}.subflow-badge[data-v-d5994547]{display:flex;align-items:center;gap:var(--or3-spacing-xs, 4px);padding:4px 8px;background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));border-radius:var(--or3-radius-sm, 6px);font-size:11px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .7))}.subflow-badge.empty[data-v-d5994547]{opacity:.5;font-style:italic}.link-icon[data-v-d5994547]{width:12px;height:12px;flex-shrink:0}.meta-row[data-v-d5994547]{display:flex;align-items:center;gap:var(--or3-spacing-md, 12px)}.meta-item[data-v-d5994547]{display:flex;align-items:center;gap:4px;font-size:10px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .7))}.meta-item.muted[data-v-d5994547]{opacity:.5}.meta-icon[data-v-d5994547]{width:12px;height:12px;flex-shrink:0}.handle[data-v-d5994547]{width:10px;height:10px;background:var(--or3-color-bg-tertiary, rgba(255, 255, 255, .1));border:2px solid var(--or3-color-border-secondary, rgba(255, 255, 255, .15));border-radius:50%}.error-handle[data-v-d5994547]{top:50%;transform:translateY(-50%);background:var(--or3-color-error, #ef4444);border-color:var(--or3-color-error, #ef4444)}.output-node[data-v-94e60a57]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.node-header[data-v-94e60a57]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px)}.icon-wrapper[data-v-94e60a57]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--or3-color-info-muted, rgba(59, 130, 246, .2));border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-info, #3b82f6)}.output-icon[data-v-94e60a57]{width:18px;height:18px}.node-label[data-v-94e60a57]{flex:1;font-weight:600;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-size:13px}.status-spinner[data-v-94e60a57]{width:16px;height:16px;border:2px solid var(--or3-color-info-muted, rgba(59, 130, 246, .2));border-top-color:var(--or3-color-info, #3b82f6);border-radius:50%;animation:spin-94e60a57 .8s linear infinite}@keyframes spin-94e60a57{to{transform:rotate(360deg)}}.output-info[data-v-94e60a57]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 4px)}.format-badge[data-v-94e60a57]{display:flex;align-items:center;gap:var(--or3-spacing-xs, 4px);padding:4px 8px;background:var(--or3-color-info-muted, rgba(59, 130, 246, .2));border-radius:var(--or3-radius-sm, 6px);font-size:11px;font-weight:600;color:var(--or3-color-info, #3b82f6)}.format-icon[data-v-94e60a57]{width:12px;height:12px;flex-shrink:0}.meta-row[data-v-94e60a57]{display:flex;align-items:center;gap:var(--or3-spacing-md, 12px)}.meta-item[data-v-94e60a57]{display:flex;align-items:center;gap:4px;font-size:10px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .7))}.meta-icon[data-v-94e60a57]{width:12px;height:12px;flex-shrink:0}.terminal-indicator[data-v-94e60a57]{display:flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px;background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));border-radius:var(--or3-radius-sm, 6px);font-size:10px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .5));border:1px dashed var(--or3-color-border, rgba(255, 255, 255, .1))}.terminal-indicator svg[data-v-94e60a57]{width:12px;height:12px}.handle[data-v-94e60a57]{width:10px;height:10px;background:var(--or3-color-bg-tertiary, rgba(255, 255, 255, .1));border:2px solid var(--or3-color-border-secondary, rgba(255, 255, 255, .15));border-radius:50%}.workflow-canvas[data-v-149e9faf]{width:100%;height:100%;background:var(--or3-color-bg-primary, #0a0a0f);outline:none;touch-action:none}.edge-label[data-v-149e9faf]{background:var(--or3-color-bg-elevated, #22222e);padding:2px 8px;border-radius:var(--or3-radius-sm, 6px);font-size:11px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.vue-flow{background:var(--or3-color-bg-primary, #0a0a0f)!important}.workflow-canvas-select .vue-flow__pane{touch-action:none}.vue-flow__edge-path{stroke:var(--or3-color-border-hover, rgba(255, 255, 255, .15))!important;stroke-width:2px!important}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:hover .vue-flow__edge-path{stroke:var(--or3-color-accent, #8b5cf6)!important}.vue-flow__edge.animated .vue-flow__edge-path{stroke:var(--or3-color-accent, #8b5cf6)!important;stroke-dasharray:5;animation:dash .5s linear infinite}@keyframes dash{to{stroke-dashoffset:-10}}.vue-flow__handle{width:12px!important;height:12px!important;background:var(--or3-color-bg-elevated, #22222e)!important;border:2px solid var(--or3-color-border-hover, rgba(255, 255, 255, .15))!important;border-radius:50%!important;transition:all .15s ease!important}.vue-flow__handle:hover{background:var(--or3-color-accent, #8b5cf6)!important;border-color:var(--or3-color-accent, #8b5cf6)!important}.vue-flow__controls{background:var(--or3-color-surface, rgba(26, 26, 36, .8))!important;border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))!important;border-radius:var(--or3-radius-md, 10px)!important;box-shadow:var(--or3-shadow-md, 0 4px 12px rgba(0, 0, 0, .4))!important}.vue-flow__controls-button{background:transparent!important;border:none!important;color:var( --or3-color-text-secondary, rgba(255, 255, 255, .65) )!important;transition:all .15s ease!important}.vue-flow__controls-button:hover{background:var( --or3-color-surface-hover, rgba(34, 34, 46, .9) )!important;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))!important}.vue-flow__controls-button:active,.vue-flow__controls-button.active{background:var(--or3-color-accent-muted, rgba(139, 92, 246, .15))!important;color:var(--or3-color-accent, #8b5cf6)!important}@media (max-width: 768px){.vue-flow__controls-button{min-width:32px!important;min-height:32px!important;font-size:16px!important}}.vue-flow__controls-button svg{fill:currentColor!important}.vue-flow__node{background:transparent!important;border:none!important;box-shadow:none!important;padding:0!important}.node-palette[data-v-958e336f]{display:flex;flex-direction:column;gap:var(--or3-spacing-md, 12px)}.palette-header[data-v-958e336f]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px);font-size:var(--or3-text-xs, 11px);font-weight:var(--or3-font-semibold, 600);color:var(--or3-color-text-muted, rgba(255, 255, 255, .5));text-transform:uppercase;letter-spacing:.5px;padding:0 var(--or3-spacing-xs, 4px)}.plus-icon[data-v-958e336f]{width:14px;height:14px;color:var(--or3-color-accent, #8b5cf6)}.palette-nodes[data-v-958e336f]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 4px)}.palette-node[data-v-958e336f]{display:flex;align-items:center;gap:var(--or3-spacing-md, 12px);padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 12px);background:var(--or3-color-bg-tertiary, #18181d);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .12));border-radius:var(--or3-radius-md, 8px);cursor:grab;transition:all var(--or3-transition-fast, .12s)}.palette-node[data-v-958e336f]:hover{border-color:var(--or3-color-border-hover, rgba(255, 255, 255, .12));background:var(--or3-color-surface-hover, rgba(31, 31, 38, .95));transform:translate(2px)}.palette-node:hover .drag-handle[data-v-958e336f]{opacity:.5}.palette-node[data-v-958e336f]:active{cursor:grabbing;transform:scale(.98)}.palette-node.dragging-touch[data-v-958e336f]{opacity:.7;transform:scale(1.05);box-shadow:0 4px 12px #8b5cf666;border-color:var(--or3-color-accent, #8b5cf6)}@media (max-width: 768px){.palette-nodes[data-v-958e336f]{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:var(--or3-spacing-sm, 8px)}.palette-node[data-v-958e336f]{padding:var(--or3-spacing-md, 12px);touch-action:none;user-select:none;-webkit-user-select:none;min-height:64px;cursor:pointer}.node-icon[data-v-958e336f]{width:40px;height:40px}.node-icon svg[data-v-958e336f]{width:20px;height:20px}.drag-handle[data-v-958e336f]{display:none}}.node-icon[data-v-958e336f]{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:var(--or3-radius-sm, 6px);flex-shrink:0;background:color-mix(in srgb,var(--node-color) 12%,transparent);color:var(--node-color);transition:all var(--or3-transition-fast, .12s)}.palette-node:hover .node-icon[data-v-958e336f]{background:color-mix(in srgb,var(--node-color) 16%,transparent);box-shadow:0 0 8px color-mix(in srgb,var(--node-color) 15%,transparent)}.node-icon svg[data-v-958e336f]{width:18px;height:18px}.node-info[data-v-958e336f]{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.node-name[data-v-958e336f]{font-weight:var(--or3-font-medium, 500);font-size:var(--or3-text-sm, 12px);color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))}.node-desc[data-v-958e336f]{font-size:var(--or3-text-xs, 11px);color:var(--or3-color-text-muted, rgba(255, 255, 255, .5));line-height:var(--or3-leading-normal, 1.5)}.drag-handle[data-v-958e336f]{width:14px;height:14px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .5));flex-shrink:0;opacity:0;transition:opacity var(--or3-transition-fast, .12s)}.palette-hint[data-v-958e336f]{display:flex;align-items:flex-start;gap:var(--or3-spacing-sm, 8px);padding:var(--or3-spacing-md, 12px);background:var(--or3-color-surface-glass, rgba(255, 255, 255, .06));border:1px solid var(--or3-color-border-subtle, rgba(255, 255, 255, .03));border-radius:var(--or3-radius-md, 8px);margin-top:var(--or3-spacing-sm, 8px)}.hint-icon[data-v-958e336f]{width:18px;height:18px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .5));flex-shrink:0;margin-top:1px}.palette-hint p[data-v-958e336f]{margin:0;font-size:var(--or3-text-xs, 11px);color:var(--or3-color-text-muted, rgba(255, 255, 255, .5));line-height:var(--or3-leading-relaxed, 1.65)}.mode-selector[data-v-080a00d4]{display:flex;gap:4px;padding:4px;background:var( --or3-color-bg-secondary, rgba(15, 23, 42, .04) );border-radius:var(--or3-radius-md, 8px);border:1px solid var(--or3-color-border, rgba(15, 23, 42, .08))}.mode-btn[data-v-080a00d4]{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px;border:none;border-radius:var(--or3-radius-sm, 6px);background:transparent;color:var(--or3-color-text-secondary, #475569);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s}.mode-btn[data-v-080a00d4]:hover{color:var(--or3-color-text-primary, #0f172a);background:var(--or3-color-surface-hover, rgba(15, 23, 42, .06))}.mode-btn.active[data-v-080a00d4]{background:var(--or3-color-accent-muted, rgba(37, 99, 235, .12));color:var(--or3-color-text-primary, #0f172a);box-shadow:inset 0 0 0 1px var(--or3-color-accent, #2563eb)}.mode-icon[data-v-080a00d4]{display:flex;align-items:center;justify-content:center}.mode-icon[data-v-080a00d4] svg{width:16px;height:16px}.source-picker[data-v-82c6b2ea]{--sp-accent: var(--or3-color-accent, #2563eb);--sp-surface: var(--or3-color-surface, #ffffff);--sp-surface-hover: var(--or3-color-surface-hover, rgba(15, 23, 42, .06));--sp-border: var(--or3-color-border, rgba(15, 23, 42, .12));--sp-text: var(--or3-color-text-primary, #0f172a);--sp-text-strong: var(--or3-color-text-primary, #0f172a);--sp-text-muted: var(--or3-color-text-secondary, #475569);--sp-button-bg: rgba(37, 99, 235, .15);--sp-button-border: rgba(37, 99, 235, .4);--sp-button-text: #1e40af}@media (prefers-color-scheme: dark){.source-picker[data-v-82c6b2ea]{--sp-surface: var(--or3-color-surface, #0b1220);--sp-surface-hover: var( --or3-color-surface-hover, rgba(255, 255, 255, .08) );--sp-border: var(--or3-color-border, rgba(255, 255, 255, .16));--sp-text: var(--or3-color-text-primary, #e2e8f0);--sp-text-strong: var(--or3-color-text-primary, #f8fafc);--sp-text-muted: var(--or3-color-text-secondary, #cbd5e1);--sp-button-bg: rgba(59, 130, 246, .25);--sp-button-border: rgba(59, 130, 246, .6);--sp-button-text: #dbeafe}}.add-source-btn[data-v-82c6b2ea]{font-size:12px;display:flex;align-items:center;gap:6px;padding:8px 10px;border-radius:8px;background:var(--sp-button-bg);color:var(--sp-button-text);border:1px solid var(--sp-button-border);transition:all .15s ease}.add-source-btn[data-v-82c6b2ea]:hover:not(:disabled){background:#2563eb2e;box-shadow:0 2px 6px #2563eb33}.add-source-btn[data-v-82c6b2ea]:disabled{opacity:.5;cursor:not-allowed}.source-card[data-v-82c6b2ea]{position:relative;display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--sp-surface);border:1px solid var(--sp-border);border-radius:10px;transition:border-color .15s ease,box-shadow .15s ease,opacity .15s ease;color:var(--sp-text);-webkit-user-select:none;user-select:none}.source-card[data-v-82c6b2ea]:hover{border-color:#2563eb73;box-shadow:0 4px 12px #0000000d}.source-card.is-dragging[data-v-82c6b2ea]{opacity:.3;border-style:dashed;background:transparent}.drop-indicator[data-v-82c6b2ea]{position:absolute;left:0;right:0;height:3px;background:var(--sp-accent);border-radius:2px;pointer-events:none;z-index:10;box-shadow:0 0 8px #2563eb80}.drop-indicator.before[data-v-82c6b2ea]{top:-5px}.drop-indicator.after[data-v-82c6b2ea]{bottom:-5px}.drop-indicator[data-v-82c6b2ea]:before,.drop-indicator[data-v-82c6b2ea]:after{content:"";position:absolute;top:50%;width:5px;height:5px;background:var(--sp-accent);border-radius:50%;transform:translateY(-50%)}.drop-indicator[data-v-82c6b2ea]:before{left:-2px}.drop-indicator[data-v-82c6b2ea]:after{right:-2px}.drag-handle[data-v-82c6b2ea]{color:var(--sp-text-muted);cursor:grab;padding:6px;border-radius:6px;transition:all .15s ease}.drag-handle[data-v-82c6b2ea]:hover{color:var(--sp-accent);background:var(--sp-surface-hover)}.drag-handle[data-v-82c6b2ea]:active{cursor:grabbing}.source-subtext[data-v-82c6b2ea]{color:var(--sp-text-muted)}.remove-btn[data-v-82c6b2ea]{color:var(--sp-text-muted);padding:6px;border-radius:6px;transition:all .15s ease}.remove-btn[data-v-82c6b2ea]:hover{color:#ef4444;background:#ef44441f}.empty-state[data-v-82c6b2ea]{padding:16px;border:2px dashed var(--sp-border);border-radius:10px;text-align:center;font-size:14px;color:var(--sp-text-muted);background:#ffffff05}.sources-label[data-v-82c6b2ea]{font-size:14px;font-weight:700;color:var(--sp-text-strong)}.preview-card[data-v-a248a951]{border:1px solid var(--or3-color-border, rgba(15, 23, 42, .12));border-radius:10px;overflow:hidden;background:var(--or3-color-surface, #ffffff);color:var(--or3-color-text-primary, #0f172a);box-shadow:0 8px 24px #00000014}@media (prefers-color-scheme: dark){.preview-card[data-v-a248a951]{border:1px solid var(--or3-color-border, rgba(255, 255, 255, .14));background:var(--or3-color-surface, #0b1220);color:var(--or3-color-text-primary, #e2e8f0);box-shadow:0 12px 30px #00000059}}.preview-header[data-v-a248a951]{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:var(--or3-color-surface-hover, rgba(15, 23, 42, .04));border-bottom:1px solid var(--or3-color-border, rgba(15, 23, 42, .12))}@media (prefers-color-scheme: dark){.preview-header[data-v-a248a951]{background:var(--or3-color-surface-hover, rgba(255, 255, 255, .06));border-bottom:1px solid var(--or3-color-border, rgba(255, 255, 255, .12))}}.preview-label[data-v-a248a951]{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--or3-color-text-secondary, #475569)}@media (prefers-color-scheme: dark){.preview-label[data-v-a248a951]{color:var(--or3-color-text-secondary, #cbd5e1)}}.preview-status[data-v-a248a951]{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#f59e0b}.preview-body[data-v-a248a951]{padding:12px;overflow-y:auto;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;line-height:1.5;background:var(--or3-color-surface, #ffffff);color:var(--or3-color-text-primary, #0f172a)}@media (prefers-color-scheme: dark){.preview-body[data-v-a248a951]{background:var(--or3-color-surface, #0b1220);color:var(--or3-color-text-primary, #e2e8f0)}}.preview-empty[data-v-a248a951]{color:var(--or3-color-text-muted, #94a3b8);text-align:center;font-style:italic;padding:8px 0}.preview-footer[data-v-a248a951]{display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:12px;background:#2563eb14;color:#2563eb;border-top:1px solid rgba(37,99,235,.18)}@media (prefers-color-scheme: dark){.preview-footer[data-v-a248a951]{background:#3b82f62e;color:#cfe1ff;border-top:1px solid rgba(59,130,246,.35)}}.node-inspector[data-v-2de5c749]{display:flex;flex-direction:column;height:100%}.node-inspector.empty[data-v-2de5c749]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--or3-spacing-sm, 8px);padding:var(--or3-spacing-xl, 32px);color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));text-align:center}.empty-icon svg[data-v-2de5c749]{width:48px;height:48px;opacity:.3}.empty p[data-v-2de5c749]{font-size:14px;margin:0}.inspector-header[data-v-2de5c749]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px);padding:var(--or3-spacing-md, 16px);padding-bottom:var(--or3-spacing-md, 16px);border-bottom:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));margin-bottom:var(--or3-spacing-md, 16px)}.header-icon[data-v-2de5c749]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--or3-radius-sm, 6px);flex-shrink:0}.header-icon svg[data-v-2de5c749]{width:18px;height:18px}.header-icon.agent[data-v-2de5c749]{background:var(--or3-color-accent-muted, rgba(139, 92, 246, .2));color:var(--or3-color-accent, #8b5cf6)}.header-icon.router[data-v-2de5c749]{background:var(--or3-color-warning-muted, rgba(245, 158, 11, .2));color:var(--or3-color-warning, #f59e0b)}.header-icon.parallel[data-v-2de5c749]{background:var(--or3-color-info-muted, rgba(59, 130, 246, .2));color:var(--or3-color-info, #3b82f6)}.header-icon.start[data-v-2de5c749]{background:var(--or3-color-success-muted, rgba(34, 197, 94, .2));color:var(--or3-color-success, #22c55e)}.label-input[data-v-2de5c749]{flex:1;background:transparent;border:none;font-size:15px;font-weight:600;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));padding:var(--or3-spacing-xs, 4px) 0;min-width:0}.label-input[data-v-2de5c749]:focus{outline:none}.delete-btn[data-v-2de5c749],.close-btn[data-v-2de5c749]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));transition:all .15s ease;flex-shrink:0}.delete-btn[data-v-2de5c749]:hover{background:var(--or3-color-error-muted, rgba(239, 68, 68, .2));color:var(--or3-color-error, #ef4444)}.close-btn[data-v-2de5c749]:hover{background:var(--or3-color-surface-hover, rgba(255, 255, 255, .05));color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))}.delete-btn svg[data-v-2de5c749],.close-btn svg[data-v-2de5c749]{width:16px;height:16px}.description-section[data-v-2de5c749]{padding:0 var(--or3-spacing-md, 16px) var(--or3-spacing-md, 16px);margin-bottom:var(--or3-spacing-sm, 8px)}.description-label[data-v-2de5c749]{display:flex;align-items:center;gap:var(--or3-spacing-xs, 4px);font-size:12px;font-weight:500;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .7));margin-bottom:var(--or3-spacing-xs, 4px)}.description-label svg[data-v-2de5c749]{width:14px;height:14px;opacity:.6}.description-hint[data-v-2de5c749]{font-weight:400;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));font-size:11px}.description-textarea[data-v-2de5c749]{width:100%;min-height:60px;max-height:100px;padding:var(--or3-spacing-sm, 8px);background:var(--or3-color-surface, rgba(255, 255, 255, .03));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-sm, 6px);font-size:13px;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));resize:vertical;font-family:inherit;line-height:1.5}.description-textarea[data-v-2de5c749]::placeholder{color:var(--or3-color-text-muted, rgba(255, 255, 255, .3))}.description-textarea[data-v-2de5c749]:focus{outline:none;border-color:var(--or3-color-accent, #3b82f6);background:var(--or3-color-surface-hover, rgba(255, 255, 255, .05))}.tabs[data-v-2de5c749]{display:flex;flex-wrap:wrap;gap:var(--or3-spacing-xs, 4px);padding:0 var(--or3-spacing-md, 16px) var(--or3-spacing-md, 16px);border-bottom:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));margin-bottom:var(--or3-spacing-md, 16px)}.tab[data-v-2de5c749]{display:flex;align-items:center;gap:var(--or3-spacing-xs, 4px);padding:var(--or3-spacing-xs, 4px) var(--or3-spacing-sm, 8px);font-size:12px;font-weight:500;color:var(--or3-color-text-muted, #64748b);border-radius:var(--or3-radius-sm, 6px);transition:all .15s ease}.tab svg[data-v-2de5c749]{width:14px;height:14px}.tab[data-v-2de5c749]:hover{color:var(--or3-color-text-primary, #0f172a);background:var(--or3-color-surface-hover, rgba(15, 23, 42, .06))}.tab.active[data-v-2de5c749]{color:var(--or3-color-text-primary, #0f172a);background:var(--or3-color-accent-muted, rgba(37, 99, 235, .14));box-shadow:inset 0 0 0 1px var(--or3-color-accent, #2563eb)}.tool-count[data-v-2de5c749]{background:var(--or3-color-accent, #8b5cf6);color:#fff;font-size:10px;font-weight:600;padding:1px 6px;border-radius:10px;margin-left:2px}.tab-content[data-v-2de5c749]{flex:1;overflow-y:auto;padding:0}.tab-content>div[data-v-2de5c749]{padding:0 var(--or3-spacing-md, 16px) var(--or3-spacing-md, 16px)}.tab-content[data-v-2de5c749]::-webkit-scrollbar{width:6px}.tab-content[data-v-2de5c749]::-webkit-scrollbar-track{background:transparent}.tab-content[data-v-2de5c749]::-webkit-scrollbar-thumb{background:var(--or3-color-border, rgba(255, 255, 255, .15));border-radius:3px}.tab-content[data-v-2de5c749]::-webkit-scrollbar-thumb:hover{background:var(--or3-color-text-muted, rgba(255, 255, 255, .25))}.grid[data-v-2de5c749]{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:var(--or3-spacing-sm, 8px)}.field-label[data-v-2de5c749]{display:block;font-size:11px;font-weight:600;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));text-transform:uppercase;letter-spacing:.5px;margin-bottom:var(--or3-spacing-sm, 8px)}.field-hint[data-v-2de5c749]{font-size:12px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));margin-top:var(--or3-spacing-sm, 8px);line-height:1.4}.prompt-textarea[data-v-2de5c749]{width:100%;min-height:180px;resize:vertical;font-family:inherit;font-size:13px;line-height:1.6;padding:var(--or3-spacing-md, 16px);background:var(--or3-color-bg-tertiary, #1a1a24);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-md, 10px);color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))}.prompt-textarea[data-v-2de5c749]:focus{outline:none;border-color:var(--or3-color-accent, #8b5cf6)}.model-select[data-v-2de5c749]{width:100%;padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 16px);background:var(--or3-color-bg-tertiary, #1a1a24);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-md, 10px);color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-size:13px;cursor:pointer}.model-select[data-v-2de5c749]:focus{outline:none;border-color:var(--or3-color-accent, #8b5cf6)}.model-id[data-v-2de5c749]{margin-top:var(--or3-spacing-md, 16px);padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 16px);background:var(--or3-color-surface-glass, rgba(255, 255, 255, .03));border-radius:var(--or3-radius-md, 10px);font-size:12px}.model-id-label[data-v-2de5c749]{color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));margin-right:var(--or3-spacing-xs, 4px)}.model-id code[data-v-2de5c749]{color:var(--or3-color-accent, #8b5cf6);font-family:monospace}.tools-list[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 4px);margin-top:var(--or3-spacing-md, 16px)}.tool-item[data-v-2de5c749]{display:flex;align-items:flex-start;gap:var(--or3-spacing-sm, 8px);padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 16px);background:var(--or3-color-bg-tertiary, #1a1a24);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-md, 10px);cursor:pointer;transition:all .15s ease}.tool-item[data-v-2de5c749]:hover{border-color:var(--or3-color-border-hover, rgba(255, 255, 255, .15))}.tool-item.enabled[data-v-2de5c749]{border-color:var(--or3-color-accent, #8b5cf6);background:var(--or3-color-accent-muted, rgba(139, 92, 246, .1))}.tool-item input[type=checkbox][data-v-2de5c749]{margin-top:2px;accent-color:var(--or3-color-accent, #8b5cf6)}.tool-info[data-v-2de5c749]{display:flex;flex-direction:column;gap:2px}.tool-name[data-v-2de5c749]{font-weight:600;font-size:13px;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))}.tool-description[data-v-2de5c749]{font-size:11px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4))}.selected-tools[data-v-2de5c749]{margin-top:var(--or3-spacing-lg, 24px);padding-top:var(--or3-spacing-md, 16px);border-top:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.tool-chips[data-v-2de5c749]{display:flex;flex-wrap:wrap;gap:var(--or3-spacing-xs, 4px)}.tool-chip[data-v-2de5c749]{display:inline-flex;align-items:center;gap:var(--or3-spacing-xs, 4px);padding:var(--or3-spacing-xs, 4px) var(--or3-spacing-sm, 8px);background:var(--or3-color-accent-muted, rgba(139, 92, 246, .2));color:var(--or3-color-accent, #8b5cf6);border-radius:var(--or3-radius-sm, 6px);font-size:12px;font-weight:500}.errors-tab[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-md, 16px)}.mode-buttons[data-v-2de5c749]{display:flex;gap:var(--or3-spacing-xs, 4px);flex-wrap:wrap}.mode-button[data-v-2de5c749]{padding:6px 10px;border-radius:var(--or3-radius-sm, 6px);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));background:var(--or3-color-surface-glass, rgba(255, 255, 255, .03));color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));font-size:12px;cursor:pointer;transition:all .15s ease}.mode-button.active[data-v-2de5c749]{border-color:var(--or3-color-warning, #f59e0b);color:var(--or3-color-warning, #f59e0b);background:color-mix(in srgb,var(--or3-color-warning, #f59e0b) 12%,transparent)}.retry-grid[data-v-2de5c749]{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:var(--or3-spacing-sm, 8px)}.field-group[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 4px)}.text-input[data-v-2de5c749]{width:100%;padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 12px);background:var(--or3-color-bg-tertiary, #1a1a24);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-md, 10px);color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-size:13px}.text-input[data-v-2de5c749]:focus{outline:none;border-color:var(--or3-color-warning, #f59e0b)}.checkbox-group .checkboxes[data-v-2de5c749]{display:flex;flex-wrap:wrap;gap:var(--or3-spacing-xs, 4px)}.checkbox-item[data-v-2de5c749]{display:flex;align-items:center;gap:6px;padding:6px 10px;background:var(--or3-color-bg-tertiary, #1a1a24);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-sm, 6px);font-size:12px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65))}.chip-remove[data-v-2de5c749]{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;color:var(--or3-color-accent, #8b5cf6);transition:all .15s ease}.chip-remove[data-v-2de5c749]:hover{background:var(--or3-color-accent, #8b5cf6);color:#fff}.chip-remove svg[data-v-2de5c749]{width:10px;height:10px}.inspector-content[data-v-2de5c749]{padding-top:var(--or3-spacing-md, 16px)}.branch-tools[data-v-2de5c749]{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.branch-tool-item[data-v-2de5c749]{display:flex;align-items:center;gap:4px;padding:2px 6px;background:var(--or3-color-bg-tertiary, #1a1a24);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:4px;cursor:pointer;transition:all .15s ease}.branch-tool-item[data-v-2de5c749]:hover{border-color:var(--or3-color-border-hover, rgba(255, 255, 255, .15))}.branch-tool-item.enabled[data-v-2de5c749]{border-color:var(--or3-color-accent, #8b5cf6);background:var(--or3-color-accent-muted, rgba(139, 92, 246, .1))}.branch-tool-item input[data-v-2de5c749]{margin:0}.tool-name-sm[data-v-2de5c749]{font-size:11px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .7))}.info-box[data-v-2de5c749]{padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 16px);background:var(--or3-color-surface-glass, rgba(255, 255, 255, .03));border-radius:var(--or3-radius-md, 10px);font-size:12px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));line-height:1.5}.hitl-tab[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-md, 16px)}.hitl-toggle[data-v-2de5c749]{padding:var(--or3-spacing-md, 16px);background:var(--or3-color-surface-glass, rgba(255, 255, 255, .03));border-radius:var(--or3-radius-md, 10px);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.toggle-label[data-v-2de5c749]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px);cursor:pointer}.toggle-label input[type=checkbox][data-v-2de5c749]{width:18px;height:18px;accent-color:var(--or3-color-info, #3b82f6)}.toggle-text[data-v-2de5c749]{font-weight:600;font-size:14px;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))}.hitl-section[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.hitl-grid[data-v-2de5c749]{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:var(--or3-spacing-sm, 8px)}.hitl-prompt[data-v-2de5c749]{min-height:80px}.hitl-badge[data-v-2de5c749]{background:var(--or3-color-info, #3b82f6);color:#fff;font-size:9px;font-weight:700;padding:2px 5px;border-radius:4px;margin-left:4px}.mode-button.hitl-mode.active[data-v-2de5c749]{border-color:var(--or3-color-info, #3b82f6);color:var(--or3-color-info, #3b82f6);background:color-mix(in srgb,var(--or3-color-info, #3b82f6) 12%,transparent)}.subflow-tab[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-md, 16px)}.subflow-toggle[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 4px)}.subflow-manual-toggle[data-v-2de5c749]{align-self:flex-start;margin-top:var(--or3-spacing-xs, 4px);padding:0;border:none;background:transparent;color:var(--or3-color-info, #3b82f6);font-size:12px;font-weight:600;cursor:pointer}.subflow-manual-toggle[data-v-2de5c749]:hover{text-decoration:underline}.input-mappings-section[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.mappings-list[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 4px)}.mapping-item[data-v-2de5c749]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px);background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));padding:8px 10px;border-radius:var(--or3-radius-sm, 6px)}.mapping-key[data-v-2de5c749]{font-family:monospace;font-size:12px;color:var(--or3-color-secondary, #64748b);min-width:80px}.mapping-value[data-v-2de5c749]{flex:1}.remove-mapping-btn[data-v-2de5c749]{width:24px;height:24px;padding:0;display:flex;align-items:center;justify-content:center;background:transparent;border:none;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));border-radius:50%;cursor:pointer;font-size:16px}.remove-mapping-btn[data-v-2de5c749]:hover{background:var(--or3-color-error, #ef4444);color:#fff}.expression-hints[data-v-2de5c749]{margin:8px 0 0;padding-left:16px;font-size:12px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65))}.expression-hints li[data-v-2de5c749]{margin-bottom:4px}.expression-hints code[data-v-2de5c749]{font-family:monospace;background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));padding:1px 4px;border-radius:3px}.output-tab[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-md, 16px)}.pill-display[data-v-2de5c749]{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:var(--or3-radius-sm, 6px);background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .12));font-weight:600;color:var(--or3-color-text, rgba(255, 255, 255, .95));width:fit-content}.output-toggle[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 4px)}.output-advanced[data-v-2de5c749]{border:1px solid var(--or3-color-border, rgba(255, 255, 255, .1));border-radius:var(--or3-radius-md, 8px);overflow:hidden}.output-advanced-body[data-v-2de5c749]{padding:12px;border-top:1px solid var(--or3-color-border, rgba(255, 255, 255, .1));background:var(--or3-color-bg-primary, rgba(0, 0, 0, .08))}.schema-section[data-v-2de5c749]{border:1px solid var(--or3-color-border, rgba(255, 255, 255, .1));border-radius:var(--or3-radius-md, 8px);overflow:hidden}.schema-toggle[data-v-2de5c749]{width:100%;display:flex;align-items:center;gap:8px;padding:10px 12px;background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));border:none;color:var(--or3-color-text, rgba(255, 255, 255, .95));font-size:13px;font-weight:500;cursor:pointer;text-align:left;transition:background .15s}.schema-toggle[data-v-2de5c749]:hover{background:var(--or3-color-bg-tertiary, rgba(255, 255, 255, .08))}.toggle-chevron[data-v-2de5c749]{width:16px;height:16px;transition:transform .2s ease}.toggle-chevron.expanded[data-v-2de5c749]{transform:rotate(90deg)}.schema-badge[data-v-2de5c749]{margin-left:auto;background:var(--or3-color-success, #22c55e);color:#fff;font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px}.schema-editor[data-v-2de5c749]{padding:12px;display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--or3-color-border, rgba(255, 255, 255, .1))}.schema-toolbar[data-v-2de5c749]{display:flex;align-items:center;gap:6px}.toolbar-label[data-v-2de5c749]{font-size:11px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));margin-right:4px}.toolbar-spacer[data-v-2de5c749]{flex:1}.preset-btn[data-v-2de5c749]{padding:4px 8px;background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .1));border-radius:4px;color:var(--or3-color-text, rgba(255, 255, 255, .95));font-family:monospace;font-size:12px;cursor:pointer;transition:all .15s}.preset-btn[data-v-2de5c749]:hover{background:var(--or3-color-bg-tertiary, rgba(255, 255, 255, .1));border-color:var(--or3-color-accent, #8b5cf6)}.action-btn[data-v-2de5c749]{padding:4px 10px;background:transparent;border:1px solid var(--or3-color-border, rgba(255, 255, 255, .1));border-radius:4px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));font-size:11px;cursor:pointer;transition:all .15s}.action-btn[data-v-2de5c749]:hover{background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));color:var(--or3-color-text, rgba(255, 255, 255, .95))}.action-btn.danger[data-v-2de5c749]:hover{background:color-mix(in srgb,var(--or3-color-error, #ef4444) 15%,transparent);border-color:var(--or3-color-error, #ef4444);color:var(--or3-color-error, #ef4444)}.schema-textarea[data-v-2de5c749]{width:100%;min-height:120px;padding:10px;background:var(--or3-color-bg-primary, rgba(0, 0, 0, .3));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .1));border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-text, rgba(255, 255, 255, .95));font-family:SF Mono,Monaco,Cascadia Code,monospace;font-size:12px;line-height:1.5;resize:vertical;transition:border-color .15s}.schema-textarea[data-v-2de5c749]:focus{outline:none;border-color:var(--or3-color-accent, #8b5cf6)}.schema-textarea.has-error[data-v-2de5c749]{border-color:var(--or3-color-error, #ef4444)}.schema-textarea[data-v-2de5c749]::placeholder{color:var(--or3-color-text-tertiary, rgba(255, 255, 255, .5))}.schema-error[data-v-2de5c749]{margin:0;padding:8px 10px;background:color-mix(in srgb,var(--or3-color-error, #ef4444) 12%,transparent);border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-error, #ef4444);font-size:12px}.schema-editor .field-hint a[data-v-2de5c749]{color:var(--or3-color-accent, #8b5cf6);text-decoration:none}.schema-editor .field-hint a[data-v-2de5c749]:hover{text-decoration:underline}.routes-tab[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-md, 16px)}.routes-header[data-v-2de5c749]{display:flex;align-items:center;justify-content:space-between}.add-btn[data-v-2de5c749]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:var(--or3-color-primary, #6366f1);color:#fff;border:none;border-radius:var(--or3-radius-sm, 6px);cursor:pointer;transition:background .15s}.add-btn[data-v-2de5c749]:hover{background:var(--or3-color-primary-hover, #4f46e5)}.add-btn svg[data-v-2de5c749]{width:14px;height:14px}.add-btn.with-label[data-v-2de5c749]{width:auto;height:auto;padding:6px 10px;gap:6px;white-space:nowrap;font-size:12px;line-height:1}.add-btn.with-label svg[data-v-2de5c749]{width:12px;height:12px}.routes-list[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.route-item[data-v-2de5c749]{display:flex;align-items:center;gap:10px;padding:10px;background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-md, 8px)}.route-inputs[data-v-2de5c749]{flex:1;display:flex;flex-direction:column;gap:4px}.route-label[data-v-2de5c749]{font-weight:500}.route-id[data-v-2de5c749]{font-size:10px;font-family:monospace;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4))}.delete-btn[data-v-2de5c749]{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));border-radius:6px;cursor:pointer;transition:all .15s}.delete-btn[data-v-2de5c749]:hover{background:var(--or3-color-error-bg, rgba(239, 68, 68, .1));color:var(--or3-color-error, #ef4444)}.delete-btn svg[data-v-2de5c749]{width:16px;height:16px}.branches-tab[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-lg, 20px);padding-bottom:var(--or3-spacing-lg, 20px)}.branches-header[data-v-2de5c749]{display:flex;align-items:center;justify-content:space-between;gap:var(--or3-spacing-md, 16px)}.branches-header .field-label[data-v-2de5c749]{margin-bottom:0}.branches-list[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-md, 12px)}.branch-item[data-v-2de5c749]{background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-lg, 10px);overflow:hidden;transition:border-color .15s}.branch-item.expanded[data-v-2de5c749]{border-color:var(--or3-color-primary, #6366f1)}.branch-header[data-v-2de5c749]{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;cursor:pointer;transition:background .15s;gap:var(--or3-spacing-sm, 8px)}.branch-header[data-v-2de5c749]:hover{background:var(--or3-color-bg-tertiary, rgba(255, 255, 255, .03))}.branch-inputs[data-v-2de5c749]{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}.branch-label[data-v-2de5c749]{width:100%;min-width:0;font-weight:500;background:transparent;border:1px solid transparent;padding:2px 6px;margin:0 -6px;border-radius:4px;transition:all .15s;font-size:13px}.branch-label[data-v-2de5c749]:hover{background:var(--or3-color-bg-tertiary, rgba(255, 255, 255, .05))}.branch-label[data-v-2de5c749]:focus{background:var(--or3-color-bg-primary, #0a0a0f);border-color:var(--or3-color-primary, #6366f1);outline:none}.branch-badges[data-v-2de5c749]{display:flex;flex-wrap:wrap;gap:6px;flex-shrink:0}.branch-badge[data-v-2de5c749]{padding:3px 8px;font-size:10px;font-weight:600;border-radius:4px;text-transform:uppercase;letter-spacing:.03em}.branch-badge.model[data-v-2de5c749]{background:var(--or3-color-info-bg, rgba(59, 130, 246, .15));color:var(--or3-color-info, #3b82f6)}.branch-badge.prompt[data-v-2de5c749]{background:var(--or3-color-success-bg, rgba(34, 197, 94, .15));color:var(--or3-color-success, #22c55e)}.branch-actions[data-v-2de5c749]{display:flex;align-items:center;gap:4px}.expand-icon[data-v-2de5c749]{width:16px;height:16px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));transition:transform .2s}.expand-icon.rotated[data-v-2de5c749]{transform:rotate(180deg)}.branch-config[data-v-2de5c749]{padding:var(--or3-spacing-md, 16px);border-top:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));background:var(--or3-color-bg-tertiary, rgba(255, 255, 255, .02));display:flex;flex-direction:column;gap:var(--or3-spacing-md, 16px)}.branch-field[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 6px)}.field-label-sm[data-v-2de5c749]{font-size:11px;font-weight:500;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));text-transform:uppercase;letter-spacing:.03em}.model-select-sm[data-v-2de5c749]{width:100%;padding:10px 12px;background:var(--or3-color-bg-primary, #0a0a0f);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-text-primary, rgba(255, 255, 255, .92));font-size:13px;cursor:pointer;transition:border-color .15s}.model-select-sm[data-v-2de5c749]:hover{border-color:var(--or3-color-border-hover, rgba(255, 255, 255, .15))}.model-select-sm[data-v-2de5c749]:focus{outline:none;border-color:var(--or3-color-primary, #6366f1)}.prompt-textarea-sm[data-v-2de5c749]{width:100%;padding:12px;background:var(--or3-color-bg-primary, #0a0a0f);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-text-primary, rgba(255, 255, 255, .92));font-size:13px;font-family:inherit;line-height:1.5;resize:vertical;min-height:80px;transition:border-color .15s}.prompt-textarea-sm[data-v-2de5c749]:hover{border-color:var(--or3-color-border-hover, rgba(255, 255, 255, .15))}.prompt-textarea-sm[data-v-2de5c749]:focus{outline:none;border-color:var(--or3-color-primary, #6366f1)}.prompt-textarea-sm[data-v-2de5c749]::placeholder{color:var(--or3-color-text-muted, rgba(255, 255, 255, .4))}.merge-section[data-v-2de5c749]{margin-top:var(--or3-spacing-lg, 24px);padding-top:var(--or3-spacing-lg, 24px);border-top:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.merge-section .field-label[data-v-2de5c749]{margin-bottom:var(--or3-spacing-xs, 4px)}.merge-field[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 6px);margin-top:var(--or3-spacing-md, 12px)}.loop-intro[data-v-2de5c749]{margin-bottom:var(--or3-spacing-md, 16px);padding:var(--or3-spacing-md, 14px);background:var(--or3-color-surface-glass, rgba(255, 255, 255, .03));border-radius:var(--or3-radius-md, 10px);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.intro-text[data-v-2de5c749]{font-size:13px;line-height:1.5;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .7));margin:0}.condition-prompt[data-v-2de5c749]{min-height:120px}.loop-prompt[data-v-2de5c749]{min-height:80px}.loop-grid[data-v-2de5c749]{margin-top:var(--or3-spacing-md, 16px)}.section-divider[data-v-2de5c749]{height:1px;background:var(--or3-color-border, rgba(255, 255, 255, .08));margin:var(--or3-spacing-lg, 20px) 0 var(--or3-spacing-md, 16px)}.section-title[data-v-2de5c749]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .5));margin-bottom:var(--or3-spacing-xs, 4px)}.section-subtitle[data-v-2de5c749]{font-size:12px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));margin:0 0 var(--or3-spacing-md, 14px);line-height:1.4}.toggle-group[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.toggle-row[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-xs, 4px)}.toggle-row .toggle-label[data-v-2de5c749]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px);cursor:pointer}.toggle-row .toggle-label input[type=checkbox][data-v-2de5c749]{width:18px;height:18px;accent-color:var(--or3-color-info, #3b82f6)}.toggle-row .toggle-label .toggle-text[data-v-2de5c749]{font-weight:600;font-size:14px;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))}.advanced-section[data-v-2de5c749]{margin-top:var(--or3-spacing-sm, 8px)}.advanced-toggle[data-v-2de5c749]{font-size:12px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .5));cursor:pointer;padding:var(--or3-spacing-xs, 6px) 0;-webkit-user-select:none;user-select:none}.advanced-toggle[data-v-2de5c749]:hover{color:var(--or3-color-text-secondary, rgba(255, 255, 255, .7))}.advanced-content[data-v-2de5c749]{margin-top:var(--or3-spacing-md, 12px)}.output-tab[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-lg, 20px)}.synthesis-config[data-v-2de5c749]{display:flex;flex-direction:column;gap:var(--or3-spacing-md, 16px);padding:var(--or3-spacing-md, 16px);background:var(--or3-color-bg-secondary, rgba(255, 255, 255, .05));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-md, 8px)}.advanced-settings[data-v-2de5c749]{border-top:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));padding-top:var(--or3-spacing-md, 16px)}.advanced-toggle[data-v-2de5c749]{display:flex;align-items:center;gap:8px;background:none;border:none;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));font-size:12px;font-weight:500;cursor:pointer;padding:0;transition:color .15s}.advanced-toggle[data-v-2de5c749]:hover{color:var(--or3-color-text, rgba(255, 255, 255, .95))}.advanced-content[data-v-2de5c749]{margin-top:var(--or3-spacing-md, 16px);display:flex;flex-direction:column;gap:var(--or3-spacing-md, 16px)}.chat-panel[data-v-c2838e84]{display:flex;flex-direction:column;height:100%}.chat-header[data-v-c2838e84]{display:flex;align-items:center;justify-content:space-between;padding:var(--or3-spacing-md, 16px);border-bottom:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.header-title[data-v-c2838e84]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px);font-weight:600;font-size:15px}.sparkle-icon[data-v-c2838e84]{width:18px;height:18px;color:var(--or3-color-accent, #8b5cf6)}.clear-btn[data-v-c2838e84]{font-size:12px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));padding:var(--or3-spacing-xs, 4px) var(--or3-spacing-sm, 8px);border-radius:var(--or3-radius-sm, 6px);transition:all .15s ease}.clear-btn[data-v-c2838e84]:hover{color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));background:var(--or3-color-surface-hover, rgba(34, 34, 46, .9))}.messages[data-v-c2838e84]{flex:1;overflow-y:auto;padding:var(--or3-spacing-md, 16px);display:flex;flex-direction:column;gap:var(--or3-spacing-md, 16px)}.empty-state[data-v-c2838e84]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--or3-spacing-sm, 8px);color:var(--or3-color-text-muted, rgba(255, 255, 255, .4))}.empty-state svg[data-v-c2838e84]{width:32px;height:32px;opacity:.5}.empty-state p[data-v-c2838e84]{font-size:14px}.message[data-v-c2838e84]{display:flex;gap:var(--or3-spacing-sm, 8px);animation:slideUp-c2838e84 .25s ease}.message-avatar[data-v-c2838e84]{flex-shrink:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:var(--or3-radius-sm, 6px);background:var(--or3-color-surface, rgba(26, 26, 36, .8))}.message-avatar svg[data-v-c2838e84]{width:16px;height:16px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65))}.message.user .message-avatar[data-v-c2838e84]{background:var(--or3-color-accent-muted, rgba(139, 92, 246, .2))}.message.user .message-avatar svg[data-v-c2838e84]{color:var(--or3-color-accent, #8b5cf6)}.message.assistant .message-avatar[data-v-c2838e84]{background:var(--or3-color-success-muted, rgba(34, 197, 94, .2))}.message.assistant .message-avatar svg[data-v-c2838e84]{color:var(--or3-color-success, #22c55e)}.message-body[data-v-c2838e84]{flex:1;min-width:0}.message-content[data-v-c2838e84]{background:var(--or3-color-surface, rgba(26, 26, 36, .8));padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 16px);border-radius:var(--or3-radius-md, 10px);font-size:14px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.message.user .message-content[data-v-c2838e84]{background:var(--or3-color-accent-muted, rgba(139, 92, 246, .2))}.message-meta[data-v-c2838e84]{margin-top:var(--or3-spacing-xs, 4px);font-size:11px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4))}.tool-calls[data-v-c2838e84]{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}.tool-call[data-v-c2838e84]{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));background:var(--or3-color-surface-hover, rgba(34, 34, 46, .5));padding:4px 8px;border-radius:4px;border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.tool-icon[data-v-c2838e84]{font-size:10px}.tool-name[data-v-c2838e84]{font-family:monospace}.cursor[data-v-c2838e84]{animation:blink-c2838e84 1s step-end infinite}.input-area[data-v-c2838e84]{display:flex;gap:var(--or3-spacing-sm, 8px);padding:var(--or3-spacing-md, 16px);border-top:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.input-area textarea[data-v-c2838e84]{flex:1;min-height:40px;max-height:120px;resize:none;background:var(--or3-color-bg-tertiary, #1a1a24);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-md, 10px);color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 16px);font-size:14px;font-family:inherit}.input-area textarea[data-v-c2838e84]:focus{outline:none;border-color:var(--or3-color-accent, #8b5cf6)}.send-btn[data-v-c2838e84]{width:40px;height:40px;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:var(--or3-color-accent, #8b5cf6);border-radius:var(--or3-radius-md, 10px);transition:all .15s ease}.send-btn[data-v-c2838e84]:hover:not(:disabled){background:var(--or3-color-accent-hover, #a78bfa)}.send-btn[data-v-c2838e84]:disabled{background:var(--or3-color-bg-tertiary, #1a1a24);cursor:not-allowed}.send-btn svg[data-v-c2838e84]{width:18px;height:18px;color:#fff}.send-btn:disabled svg[data-v-c2838e84]{color:var(--or3-color-text-muted, rgba(255, 255, 255, .4))}.spinner[data-v-c2838e84]{animation:spin-c2838e84 1s linear infinite}@keyframes spin-c2838e84{to{transform:rotate(360deg)}}@keyframes blink-c2838e84{50%{opacity:0}}@keyframes slideUp-c2838e84{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.vue-flow__controls{background:#333;border:1px solid #555;border-radius:4px;overflow:hidden}.vue-flow__controls-button{background:transparent;border:none;border-bottom:1px solid #555;color:#ddd;width:24px;height:24px;cursor:pointer}.vue-flow__controls-button:last-child{border-bottom:none}.vue-flow__controls-button:hover{background:#444}.vue-flow__controls-button svg{fill:currentColor}.vue-flow__minimap{background:#252525;border:1px solid #444;border-radius:4px}.vue-flow__minimap-mask{fill:#00000080}.vue-flow__minimap-node{fill:#444;stroke:none}.edge-editor-overlay[data-v-ad20c837]{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.edge-editor[data-v-ad20c837]{background:var(--or3-color-surface, rgba(26, 26, 36, .95));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-lg, 16px);padding:var(--or3-spacing-lg, 24px);min-width:320px;max-width:90vw;box-shadow:var(--or3-shadow-xl, 0 25px 50px rgba(0, 0, 0, .5))}.editor-header[data-v-ad20c837]{display:flex;align-items:center;gap:var(--or3-spacing-sm, 8px);margin-bottom:var(--or3-spacing-md, 16px);color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-weight:600;font-size:15px}.header-icon[data-v-ad20c837]{width:18px;height:18px;color:var(--or3-color-accent, #8b5cf6)}.close-btn[data-v-ad20c837]{margin-left:auto;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--or3-radius-sm, 6px);color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));transition:all .15s ease}.close-btn[data-v-ad20c837]:hover{background:var(--or3-color-surface-hover, rgba(255, 255, 255, .05));color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))}.close-btn svg[data-v-ad20c837]{width:16px;height:16px}.editor-content[data-v-ad20c837]{display:flex;flex-direction:column;gap:var(--or3-spacing-sm, 8px)}.label-input[data-v-ad20c837]{width:100%;padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 16px);background:var(--or3-color-bg-tertiary, #1a1a24);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-md, 10px);color:var(--or3-color-text-primary, rgba(255, 255, 255, .95));font-size:14px}.label-input[data-v-ad20c837]:focus{outline:none;border-color:var(--or3-color-accent, #8b5cf6);box-shadow:0 0 0 2px var(--or3-color-accent-muted, rgba(139, 92, 246, .2))}.hint[data-v-ad20c837]{font-size:12px;color:var(--or3-color-text-muted, rgba(255, 255, 255, .4));margin:0;line-height:1.4}.delete-btn[data-v-ad20c837]{display:flex;align-items:center;justify-content:center;gap:var(--or3-spacing-sm, 8px);margin-top:var(--or3-spacing-md, 16px);padding:var(--or3-spacing-sm, 8px) var(--or3-spacing-md, 16px);background:transparent;border:1px solid var(--or3-color-error, #ef4444);color:var(--or3-color-error, #ef4444);border-radius:var(--or3-radius-md, 10px);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s ease}.delete-btn[data-v-ad20c837]:hover{background:var(--or3-color-error-muted, rgba(239, 68, 68, .2))}.delete-btn svg[data-v-ad20c837]{width:14px;height:14px}.delete-confirm[data-v-ad20c837]{margin-top:var(--or3-spacing-md, 16px);padding:var(--or3-spacing-md, 16px);background:var(--or3-color-error-muted, rgba(239, 68, 68, .1));border:1px solid var(--or3-color-error, #ef4444);border-radius:var(--or3-radius-md, 10px);text-align:center}.delete-confirm span[data-v-ad20c837]{display:block;font-size:14px;font-weight:500;color:var(--or3-color-error, #ef4444);margin-bottom:var(--or3-spacing-sm, 8px)}.confirm-actions[data-v-ad20c837]{display:flex;gap:var(--or3-spacing-sm, 8px);justify-content:center}.confirm-btn[data-v-ad20c837]{padding:var(--or3-spacing-xs, 4px) var(--or3-spacing-md, 16px);border-radius:var(--or3-radius-sm, 6px);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s ease}.confirm-yes[data-v-ad20c837]{background:var(--or3-color-error, #ef4444);color:#fff;border:none}.confirm-yes[data-v-ad20c837]:hover{background:#dc2626}.confirm-no[data-v-ad20c837]{background:transparent;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.confirm-no[data-v-ad20c837]:hover{background:var(--or3-color-surface-hover, rgba(255, 255, 255, .05))}.modal-enter-active[data-v-ad20c837],.modal-leave-active[data-v-ad20c837]{transition:opacity .2s ease}.modal-enter-active .edge-editor[data-v-ad20c837],.modal-leave-active .edge-editor[data-v-ad20c837]{transition:transform .2s ease,opacity .2s ease}.modal-enter-from[data-v-ad20c837],.modal-leave-to[data-v-ad20c837]{opacity:0}.modal-enter-from .edge-editor[data-v-ad20c837],.modal-leave-to .edge-editor[data-v-ad20c837]{transform:scale(.95);opacity:0}.validation-overlay[data-v-849827fb]{position:absolute;right:16px;top:16px;width:min(360px,calc(100vw - 32px));max-height:calc(100vh - 96px);background:var(--or3-color-surface, rgba(20, 20, 28, .9));border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08));border-radius:var(--or3-radius-md, 10px);padding:12px;box-shadow:var(--or3-shadow-lg, 0 10px 30px rgba(0, 0, 0, .35));color:var(--or3-color-text-primary, rgba(255, 255, 255, .92));-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.validation-overlay.has-issues[data-v-849827fb]{border-color:var(--or3-color-accent, #ff6b6b)}.overlay-header[data-v-849827fb]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;-webkit-user-select:none;user-select:none}.title[data-v-849827fb]{display:flex;align-items:center;gap:8px;font-weight:600;letter-spacing:.2px}.header-actions[data-v-849827fb]{display:flex;align-items:center;gap:8px}.collapse-chevron[data-v-849827fb]{color:var(--or3-color-text-secondary, rgba(255, 255, 255, .6));transition:transform .25s ease;flex-shrink:0}.collapse-chevron.expanded[data-v-849827fb]{transform:rotate(180deg)}.header-count[data-v-849827fb]{font-size:12px;padding:2px 8px;border-radius:999px;border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.header-count.error[data-v-849827fb]{color:#ff8a8a;border-color:#ff8a8a4d}.header-count.warning[data-v-849827fb]{color:#facc15;border-color:#facc154d}.header-count.ok[data-v-849827fb]{color:#4ade80;border-color:#4ade804d}.collapsible-content[data-v-849827fb]{display:grid;grid-template-rows:1fr;overflow:hidden;transition:grid-template-rows .25s ease}.collapsible-content.collapsed[data-v-849827fb]{grid-template-rows:0fr}.collapsible-inner[data-v-849827fb]{min-height:0;overflow:hidden}.collapsible-content:not(.collapsed) .collapsible-inner[data-v-849827fb]{padding-top:10px;overflow-y:auto;max-height:min(60vh,520px);scrollbar-width:thin}.status-dot[data-v-849827fb]{width:10px;height:10px;border-radius:50%;display:inline-block;background:var(--or3-color-border, rgba(255, 255, 255, .5));box-shadow:0 0 0 4px #ffffff14}.status-dot.ok[data-v-849827fb]{background:#4ade80;box-shadow:0 0 0 4px #4ade801f}.status-dot.warn[data-v-849827fb]{background:#fbbf24;box-shadow:0 0 0 4px #fbbf241f}.refresh[data-v-849827fb]{background:var(--or3-color-bg-elevated, #1c1c27);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .12));color:var(--or3-color-text-secondary, rgba(255, 255, 255, .75));border-radius:var(--or3-radius-sm, 6px);padding:4px 10px;font-size:12px;cursor:pointer;transition:all .15s ease}.refresh[data-v-849827fb]:hover{border-color:var(--or3-color-accent, #8b5cf6);color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))}.summary[data-v-849827fb]{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:12px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .7));margin-bottom:8px}.count[data-v-849827fb]{padding:2px 8px;border-radius:999px;border:1px solid var(--or3-color-border, rgba(255, 255, 255, .08))}.count.error[data-v-849827fb]{color:#ff8a8a;border-color:#ff8a8a4d}.count.warning[data-v-849827fb]{color:#facc15;border-color:#facc154d}.count.ok[data-v-849827fb]{color:#4ade80;border-color:#4ade804d}.timestamp[data-v-849827fb]{margin-left:auto;font-style:italic}.issue-list[data-v-849827fb]{display:flex;flex-direction:column;gap:8px}.issue[data-v-849827fb]{display:grid;grid-template-columns:auto 1fr;gap:8px;padding:8px;border-radius:var(--or3-radius-sm, 6px);border:1px solid var(--or3-color-border, rgba(255, 255, 255, .1));background:var(--or3-color-bg-elevated, rgba(22, 22, 30, .85))}.issue.error[data-v-849827fb]{border-color:#ff8a8a40}.issue.warning[data-v-849827fb]{border-color:#facc1540}.badge[data-v-849827fb]{align-self:start;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:600;color:#0a0a0f;background:#facc15}.issue.error .badge[data-v-849827fb]{background:#ff8a8a}.details[data-v-849827fb]{display:flex;flex-direction:column;gap:4px}.message[data-v-849827fb]{font-size:13px;color:var(--or3-color-text-primary, rgba(255, 255, 255, .95))}.meta[data-v-849827fb]{font-size:11px;color:var(--or3-color-text-secondary, rgba(255, 255, 255, .65))}@media (max-width: 768px){.validation-overlay[data-v-849827fb]{left:16px;right:16px;top:12px;width:auto;max-width:none}.collapsible-content:not(.collapsed) .collapsible-inner[data-v-849827fb]{max-height:min(50vh,420px)}}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "or3-workflow-vue",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Vue 3 components for visual workflow editing with drag-and-drop canvas",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"*.css"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./style.css": "./dist/style.css"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "vite build",
|
|
24
|
+
"dev": "vite build --watch",
|
|
25
|
+
"typecheck": "vue-tsc --noEmit",
|
|
26
|
+
"prepublishOnly": "bun run build"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"workflow",
|
|
30
|
+
"vue",
|
|
31
|
+
"vue3",
|
|
32
|
+
"canvas",
|
|
33
|
+
"drag-drop",
|
|
34
|
+
"ai",
|
|
35
|
+
"agent",
|
|
36
|
+
"visual-editor"
|
|
37
|
+
],
|
|
38
|
+
"author": "Brendon",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/or3/or3-workflows"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"or3-workflow-core": "workspace:*",
|
|
46
|
+
"@vue-flow/background": "^1.3.0",
|
|
47
|
+
"@vue-flow/controls": "^1.1.1",
|
|
48
|
+
"@vue-flow/core": "^1.33.2",
|
|
49
|
+
"@vue-flow/minimap": "^1.5.4",
|
|
50
|
+
"@vueuse/core": "^10.0.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"vue": "^3.4.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
57
|
+
"typescript": "^5.0.0",
|
|
58
|
+
"vite": "^5.0.0",
|
|
59
|
+
"vite-plugin-dts": "^3.0.0",
|
|
60
|
+
"vue": "^3.4.0",
|
|
61
|
+
"vue-tsc": "^2.0.0"
|
|
62
|
+
}
|
|
63
|
+
}
|