@@ -18,7 +18,7 @@ Defaulting to \`null\`.`),null)}function TS(e){return CS(e)&&!Number.isNaN(e)&&e
` )}),a=null):a=[];continue}if(a){a.push(c);continue}let l=jE(c),u=e+1<n.length?jE(n[e+1]):null;if(l&&u&&ME(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=jE(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>kE(e)),rows:r.map(e=>e.map(e=>kE(e)))});continue}if(!c.trim()){o(),s();continue}let d=c.match(/^(#{1,3}) \s +(.+) $ /);if(d){o(),s(),t.push({kind: ` h$ { d [ 1 ] . length } ` ,inline:kE(d[2])});continue}let f=c.match(/^ \s *[-*] \s +(.+) $ /),p=c.match(/^ \s * \d +[.)] \s +(.+) $ /);if(f||p){o();let e=p? ` ol ` : ` ul ` ;(!i||i.tag!==e)&&(s(),i={tag:e,items:[]}),i.items.push((f||p)[1]);continue}if(c.startsWith( ` > ` )){o(),s(),t.push({kind: ` blockquote ` ,inline:kE(c.replace(/^> \s ?/, ` ` ))});continue}r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function jE(e){let t=String(e|| ` ` ).trim();if(!t.includes( ` | ` ))return null;let n=t.replace(/^ \| /, ` ` ).replace(/ \| $ /, ` ` ).split( ` | ` ).map(e=>e.trim());return n.length>1&&n.every(e=>e!== ` ` )?n:null}function ME(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var NE={class: ` [ overflow - wrap : anywhere ] ` },PE={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },FE={class: ` font - mono text - [ 0.85 em ] ` },IE={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },LE={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },RE={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },zE={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },BE={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },VE={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },Ree={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },zee={key:8,class: ` mb - 2.5 last : mb - 0 ` },Bee=L({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=Y(()=>AE(t.text));return(e,t)=>(V(),H( ` div ` ,NE,[(V(!0),H(B,null,R(n.value,(e,t)=>(V(),H(B,{key:t},[e.kind=== ` pre ` ?(V(),H( ` pre ` ,PE,[W( ` code ` ,FE,M(e.code),1)])):e.kind=== ` table ` ?(V(),H( ` table ` ,IE,[W( ` thead ` ,null,[W( ` tr ` ,null,[(V(!0),H(B,null,R(e.head,(e,t)=>(V(),H( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[G(DE,{inline:e},null,8,[ ` inline ` ])]))),128))])]),W( ` tbody ` ,null,[(V(!0),H(B,null,R(e.rows,(e,t)=>(V(),H( ` tr ` ,{key:t},[(V(!0),H(B,null,R(e,(e,t)=>(V(),H( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[G(DE,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(V(),H( ` blockquote ` ,LE,[G(DE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(V(),H( ` h1 ` ,RE,[G(DE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(V(),H( ` h2 ` ,zE,[G(DE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(V(),H( ` h3 ` ,BE,[G(DE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(V(),H( ` ul ` ,VE,[(V(!0),H(B,null,R(e.items,(e,t)=>(V(),H( ` li ` ,{key:t},[G(DE,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(V(),H( ` ol ` ,Ree,[(V(!0),H(B,null,R(e.items,(e,t)=>(V(),H( ` li ` ,{key:t},[G(DE,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(V(),H( ` p ` ,zee,[G(DE,{inline:e.inline},null,8,[ ` inline ` ])])):q( ` ` ,!0)],64))),128))]))}}),Vee={class: ` truncate ` },Hee=L({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Qi( ` RouterLink ` );return V(),U(r,{to:e.path,title: ` Go to $ { e . label || e . path } ` ,class: ` inline - flex max - w - full items - center gap - 1.5 rounded - full border border - primary / 45 bg - primary - soft px - 2.5 py - 1 text - xs font - semibold text - link transition - colors hover : border - primary hover : bg - primary / 15 focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary ` },{default:F(()=>[G(P(Xu),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),W( ` span ` ,Vee,M(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),Uee={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },Wee={class: ` font - semibold text - foreground ` },Gee={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },Kee=L({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=Y(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=Y(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=Y(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=Y(()=>t.tool.summary||t.tool.Summary||t.tool.text||t.tool.err||t.tool.Err||(t.streaming?i.value? ` failed ` : ` running … ` : ` done ` ));return(t,o)=>e.tool.path?(V(),U(Hee,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(V(),H( ` div ` ,Uee,[G(P(Zd),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),W( ` span ` ,Wee,M(n.value),1),r.value?(V(),H( ` code ` ,Gee,M(r.value),1)):q( ` ` ,!0),W( ` span ` ,{class:j(P(X)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},M(a.value),3)]))}}),qee={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },Jee={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },Yee={key:3,class: ` whitespace - pre - wrap ` },HE=L({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(V(),H( ` div ` ,{class:j([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[W( ` div ` ,{class:j(P(X)( ` max - w - [ min ( 78 ch , 86 % ) ] rounded - [ 0.85 rem ] px - 4 py - 3 leading - normal [ overflow - wrap : anywhere ] ` ,e.assistant? ` bg - muted ` : ` bg - primary / 15 ` ))},[e.assistant&&e.tools.length?(V(),H( ` div ` ,qee,[(V(!0),H(B,null,R(e.tools,(t,n)=>(V(),U(Kee,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):q( ` ` ,!0),e.media.length?(V(),H( ` div ` ,Jee,[(V(!0),H(B,null,R(e.media,(e,t)=>(V(),U(bE,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):q( ` ` ,!0),e.assistant?(V(),U(Bee,{key:2,text:e.text},null,8,[ ` text ` ])):(V(),H( ` div ` ,Yee,M(e.text),1)),z(t. $ slots, ` default ` )],2)],2))}}),Xee={class: ` w - full self - center justify - self - center py - 6 text - center ` },Zee={class: ` grid gap - 2 ` },Qee=[ ` onClick ` ], $ ee=L({__name:
Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>Rj? ` $ { n . slice ( 0 , Rj ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var Bj=[ ` title ` ],Vj=L({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=Y(()=>uj(n.event)),a=Y(()=>zj(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=Y(()=>n.event.at?vA(n.event.at): ` — ` );return(e,t)=>(V(),U(P(Fj),{class:j(i.value>0? ` cursor - pointer ` : ` ` ),role:i.value>0? ` link ` :void 0,tabindex:i.value>0?0:void 0,title:i.value>0? ` Open task details ` :void 0,onClick:o,onKeydown:[Hl(Bl(o,[ ` prevent ` ]),[ ` enter ` ]),Hl(Bl(o,[ ` prevent ` ]),[ ` space ` ])]},{default:F(()=>[G(P(Pj),{class: ` font - medium ` },{default:F(()=>[K(M(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),G(P(Pj),{class: ` font - mono ` },{default:F(()=>[K(M(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),G(P(Pj),{class: ` w - [ 55 % ] max - w - 0 ` },{default:F(()=>[W( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},M(a.value.text),9,Bj)]),_:1}),G(P(Pj),null,{default:F(()=>[K(M(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),Hj=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function Uj(e){return(Number(e?.task_id)||0)>0}function Wj(e,t){return t=== ` tasks ` ?Uj(e):t!== ` system ` ||!Uj(e)}function Gj(e,t){return e.filter(e=>Wj(e,t))}function Kj(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function qj(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function Jj(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=qj(zj(n).text,r),a=t[t.length-1];if(a&&a.key===i){a.count+=1,a.events.push(n);continue}t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var Yj={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },Xj={class: ` max - h - [ 28 rem ] overflow - y - auto ` },Zj=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],Qj=[ ` title ` ], $ j=L({__name: ` LiveActivityCard ` ,setup(e){let t=rD(),{activity:n,streamKind:r,streamState:i}=Fu(xk()),a=N( ` all ` ),o=Y(()=>Gj(n.value,a.value)),s=Y(()=>Kj(o.value.length,a.value)),c=qt(new Set),l=Y(()=>Jj(o.value));function u(e){c.has(e)?c.delete(e):c.add(e)}function d(e){return c.has(e.key)}function f(e){return zj(e.representative)}function p(e){return e.representative.at?vA(e.representative.at): ` — ` }function m(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(V(),U(P(dA),null,{default:F(()=>[G(P(gA),null,{default:F(()=>[G(P(_A),null,{default:F(()=>[...t[1]||=[K( ` Live activity ` ,-1)]]),_:1}),G(P(fA),{class: ` flex items - center gap - 2 ` },{default:F(()=>[G(P(Aj),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:P(Hj)},null,8,[ ` modelValue ` , ` options ` ]),G(P(cA),{variant:P(r)},{default:F(()=>[K(M(P(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),G(P(pA),null,{default:F(()=>[W( ` div ` ,Yj,[W( ` div ` ,Xj,[G(P(Mj),null,{default:F(()=>[G(P(Lj),{class: ` sticky top - 0 z - 10 bg - card ` },{default:F(()=>[G(P(Fj),null,{default:F(()=>[G(P(Ij),null,{default:F(()=>[...t[2]||=[K( ` Event ` ,-1)]]),_:1}),G(P(Ij),null,{default:F(()=>[...t[3]||=[K( ` Task ` ,-1)]]),_:1}),G(P(Ij),null,{default:F(()=>[...t[4]||=[K( ` Detail ` ,-1)]]),_:1}),G(P(Ij),null,{default:F(()=>[...t[5]||=[K( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),G(P(Nj),null,{default:F(()=>[o.value.length?q( ` ` ,!0):(V(),U(P(Fj),{key:0},{default:F(()=>[G(P(Pj),{colspan: ` 4 ` },{default:F(()=>[G(P(eA),null,{default:F(()=>[G(P(rA),null,{default:F(()=>[G(P(oA),null,{default:F(()=>[K(M(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(V(!0),H(B,{key:1},R(l.value,e=>(V(),H(B,{key:e.key},[e.count===1?(V(),U(Vj,{key:0,event:e.representative,onOpen:m},null,8,[ ` event ` ])):(V(),H(B,{key:1},[G(P(Fj),{class:j(e.taskID>0? ` cursor - pointer ` : ` ` ),role:e.taskID>0? ` link ` :void 0,tabindex:e.taskID>0?0:void 0,title:e.taskID>0? ` Open task details ` :void 0,onClick:t=>e.taskID>0&&m(e.taskID),onKeydown:[Hl(Bl(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),Hl(Bl(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:F(()=>[G(P(Pj),{class: ` font - medium ` },{default:F(()=>[W( ` button ` ,{type: ` button ` ,class: ` inline - flex items - center gap - 1 rounded hover : opacity - 80 ` ,"aria-expanded":d(e),"aria-label": ` $ { d ( e ) ? ` Hide ` : ` Show ` } $ { e . count } $ { e . label } events ` ,onClick:Bl(t=>u(e.key),[ ` stop ` ])},[d(e)?(V(),U(P(rd),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(V(),U(P(id),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),K( ` ` +M(e.label)+ ` ` ,1),G(P(cA),{variant: ` idle ` },{default:F(()=>[K( ` × ` +M(e.count),1)]),_:2},1024)],8,Zj)]),_:2},1024),G(P(Pj),{class: ` font - mono ` },{default:F(()=>[K(M(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),G(P(Pj),{class: ` w - [ 55 % ] max - w - 0 ` },{default:F(()=>[W( ` span ` ,{class: ` block truncate ` ,title:f(e).truncated?f(e).full:void 0},M(f(e).text),9,Qj)]),_:2},1024),G(P(Pj),null,{default:F(()=>[K(M(p(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),d(e)?(V(!0),H(B,{key:0},R(e.events,(t,n)=>(V(),U(Vj,{key: ` $ { e . key } : $ { n } ` ,ev
Line truncated
` )){let e=n.indexOf( ` : ` );if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function bN(e,t){if(!e.event_type)return{label: ` Unidentified ` ,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name: ` Deleted type ` ,identified:!0}}function xN(e,t){if(!e)return ` No event type ` ;let n=t.find(t=>t.id===e);return n? ` $ { n . source } / $ { n . name } ` : ` Deleted type ` }function SN(e){let t=[...(e.headers||[]).map(e=> ` $ { e . name } = $ { e . value } ` ),...(e.payload||[]).map(e=>e.op=== ` present ` ? ` $ { e . path } present ` : ` $ { e . path } = $ { e . value ? ? ` ` } ` )];return t.length?t.join( ` · ` ): ` any event ` }function CN(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!== ` ` ).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!== ` ` ).map(e=>e.op=== ` present ` ?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value?? ` ` })}}var wN=N([]),TN=N([]),EN=N(!0),DN=N(null),ON=N(null),kN=N(!1),AN=N(null);async function jN(){try{let e=await Z.eventTypes();EN.value=e.enabled!==!1,wN.value=e.event_types||[],TN.value=e.proposals||[],DN.value=null}catch(e){DN.value=e.message||String(e)}}function MN(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function NN(e){AN.value=null,ON.value=e}function PN(e){let t=HN.value.find(t=>String(t.id)===e.sample_id);NN({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:MN(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function FN(e= ` ` ){NN({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function IN(e){NN({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:MN(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function LN(){ON.value=null}async function RN(){let e=ON.value;if(e){kN.value=!0;try{if(e.mode=== ` edit ` &&e.id)await Z.eventTypeUpdate(e.id,{name:e.name,rule:CN(e.rule)});else{let t=e.mode=== ` paste ` ?yN(e.headersText):e.exampleHeaders;await Z.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:CN(e.rule),example:{headers:t,body:e.body}})}ON.value=null,await jN()}catch(e){AN.value=e.message||String(e)}finally{kN.value=!1}}}var zN=N(null);async function BN(){let e=zN.value;if(zN.value=null,e)try{await Z.eventTypeDelete(e.id),await jN()}catch(e){DN.value=e.message||String(e)}}var VN=100,HN=N([]),UN=N(!0),WN=N(null),GN=N(!0),KN=N(null);async function qN(){try{let e=await Z.captures(VN);UN.value=e.enabled!==!1,HN.value=e.captures||[],WN.value=null}catch(e){WN.value=e.message||String(e)}finally{GN.value=!1}}function JN(e){let t=HN.value.find(t=>t.id===e);return t&&(KN.value=t),!!t}function YN(){HN.value.length&&(KN.value=HN.value[0])}function XN(){Sk( ` captures ` ,()=>{qN(),jN()})}var ZN= ` archie . theme ` ,QN= ` archie . density ` , $ N= ` archie . motion ` ,eP= ` archie . tooltips ` ;function tP(e,t,n){try{let r=localStorage.getItem(e);return t.includes(r)?r:n}catch{return n}}function nP(e,t){try{localStorage.setItem(e,t)}catch{}}function rP(e){if(e!== ` system ` )return e;try{return matchMedia( ` ( prefers - color - scheme : dark ) ` ).matches? ` dark ` : ` light ` }catch{return ` dark ` }}var iP=Pu( ` appearance ` ,()=>{let e=N(tP(ZN,[ ` system ` , ` dark ` , ` light ` ], ` dark ` )),t=N(tP(QN,[ ` comfortable ` , ` compact ` ], ` comfortable ` )),n=N(tP( $ N,[ ` system ` , ` reduced ` ], ` system ` )),r=N(tP(eP,[ ` on ` , ` off ` ], ` on ` )=== ` on ` ),i=!1;function a(){document.documentElement.dataset.theme=rP(e.value)}function o(t){e.value=t,a(),nP(ZN,t)}function s(e){t.value=e,document.documentElement.dataset.density=e,nP(QN,e)}function c(e){n.value=e,document.documentElement.dataset.motion=e,nP( $ N,e)}function l(e){r.value=e,nP(eP,e? ` on ` : ` off ` )}function u(){if(!i){i=!0,a(),document.documentElement.dataset.density=t.value,document.documentElement.dataset.motion=n.value;try{matchMedia( ` ( prefers - color - scheme : dark ) ` ).addEventListener( ` change ` ,()=>{e.value=== ` system ` &&a()})}catch{}}}return{theme:e,density:t,motion:n,tooltipsEnabled:r,initialize:u,setTheme:o,setDensity:s,setMotion:c,setTooltips:l}}),aP=L({__name: ` Tooltip ` ,props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:[ ` update : open ` ],setup(e,{emit:t}){let n=e,r=Xh(n,t),{tooltipsEnabled:i}=Fu(iP());return(e,t)=>(V(),U(P(ZC),J({"data-slot": ` tooltip ` },P(r),{disabled:n.disabled||!P(i)}),{default:F(t=>[z(e. $ slots, ` default ` ,ve(cs(t)))]),_:3},16,[ ` disabled ` ]))}}),oP=L({inheritAttrs:!1,__name: ` TooltipContent ` ,props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:0},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[ ` escapeKeyDown ` , ` pointerDownOutside ` ],setup(e,{emit:t}){let n=e,r=t,i=Xh(_w(n, ` class ` ),r);return(e,t)=>(V(),U(P(tw),null,{default:F(
Line truncated
` )){let e=n.indexOf( ` : ` );if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function bN(e,t){if(!e.event_type)return{label: ` Unidentified ` ,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name: ` Deleted type ` ,identified:!0}}function xN(e,t){if(!e)return ` No event type ` ;let n=t.find(t=>t.id===e);return n? ` $ { n . source } / $ { n . name } ` : ` Deleted type ` }function SN(e){let t=[...(e.headers||[]).map(e=> ` $ { e . name } = $ { e . value } ` ),...(e.payload||[]).map(e=>e.op=== ` present ` ? ` $ { e . path } present ` : ` $ { e . path } = $ { e . value ? ? ` ` } ` )];return t.length?t.join( ` · ` ): ` any event ` }function CN(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!== ` ` ).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!== ` ` ).map(e=>e.op=== ` present ` ?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value?? ` ` })}}var wN=N([]),TN=N([]),EN=N(!0),DN=N(null),ON=N(null),kN=N(!1),AN=N(null);async function jN(){try{let e=await Z.eventTypes();EN.value=e.enabled!==!1,wN.value=e.event_types||[],TN.value=e.proposals||[],DN.value=null}catch(e){DN.value=e.message||String(e)}}function MN(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function NN(e){AN.value=null,ON.value=e}function PN(e){let t=HN.value.find(t=>String(t.id)===e.sample_id);NN({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:MN(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function FN(e= ` ` ){NN({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function IN(e){NN({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:MN(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function LN(){ON.value=null}async function RN(){let e=ON.value;if(e){kN.value=!0;try{if(e.mode=== ` edit ` &&e.id)await Z.eventTypeUpdate(e.id,{name:e.name,rule:CN(e.rule)});else{let t=e.mode=== ` paste ` ?yN(e.headersText):e.exampleHeaders;await Z.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:CN(e.rule),example:{headers:t,body:e.body}})}ON.value=null,await jN()}catch(e){AN.value=e.message||String(e)}finally{kN.value=!1}}}var zN=N(null);async function BN(){let e=zN.value;if(zN.value=null,e)try{await Z.eventTypeDelete(e.id),await jN()}catch(e){DN.value=e.message||String(e)}}var VN=100,HN=N([]),UN=N(!0),WN=N(null),GN=N(!0),KN=N(null);async function qN(){try{let e=await Z.captures(VN);UN.value=e.enabled!==!1,HN.value=e.captures||[],WN.value=null}catch(e){WN.value=e.message||String(e)}finally{GN.value=!1}}function JN(e){let t=HN.value.find(t=>t.id===e);return t&&(KN.value=t),!!t}function YN(){HN.value.length&&(KN.value=HN.value[0])}function XN(){Sk( ` captures ` ,()=>{qN(),jN()})}var ZN= ` archie . theme ` ,QN= ` archie . density ` , $ N= ` archie . motion ` ,eP= ` archie . tooltips ` ;function tP(e,t,n){try{let r=localStorage.getItem(e);return t.includes(r)?r:n}catch{return n}}function nP(e,t){try{localStorage.setItem(e,t)}catch{}}function rP(e){if(e!== ` system ` )return e;try{return matchMedia( ` ( prefers - color - scheme : dark ) ` ).matches? ` dark ` : ` light ` }catch{return ` dark ` }}var iP=Pu( ` appearance ` ,()=>{let e=N(tP(ZN,[ ` system ` , ` dark ` , ` light ` ], ` dark ` )),t=N(tP(QN,[ ` comfortable ` , ` compact ` ], ` comfortable ` )),n=N(tP( $ N,[ ` system ` , ` reduced ` ], ` system ` )),r=N(tP(eP,[ ` on ` , ` off ` ], ` on ` )=== ` on ` ),i=!1;function a(){document.documentElement.dataset.theme=rP(e.value)}function o(t){e.value=t,a(),nP(ZN,t)}function s(e){t.value=e,document.documentElement.dataset.density=e,nP(QN,e)}function c(e){n.value=e,document.documentElement.dataset.motion=e,nP( $ N,e)}function l(e){r.value=e,nP(eP,e? ` on ` : ` off ` )}function u(){if(!i){i=!0,a(),document.documentElement.dataset.density=t.value,document.documentElement.dataset.motion=n.value;try{matchMedia( ` ( prefers - color - scheme : dark ) ` ).addEventListener( ` change ` ,()=>{e.value=== ` system ` &&a()})}catch{}}}return{theme:e,density:t,motion:n,tooltipsEnabled:r,initialize:u,setTheme:o,setDensity:s,setMotion:c,setTooltips:l}}),aP=L({__name: ` Tooltip ` ,props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:[ ` update : open ` ],setup(e,{emit:t}){let n=e,r=Xh(n,t),{tooltipsEnabled:i}=Fu(iP());return(e,t)=>(V(),U(P(ZC),J({"data-slot": ` tooltip ` },P(r),{disabled:n.disabled||!P(i)}),{default:F(t=>[z(e. $ slots, ` default ` ,ve(cs(t)))]),_:3},16,[ ` disabled ` ]))}}),oP=L({inheritAttrs:!1,__name: ` TooltipContent ` ,props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:0},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[ ` escapeKeyDown ` , ` pointerDownOutside ` ],setup(e,{emit:t}){let n=e,r=t,i=Xh(_w(n, ` class ` ),r);return(e,t)=>(V(),U(P(tw),null,{default:F(
Line truncated
` )}};iJ.defaultYaml={explicit:!1,version: ` 1.2 ` },iJ.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function aJ(e){if(/[ \x 00- \x 19 \s ,[ \] {}]/.test(e)){let t= ` Anchor must not contain whitespace or control characters : $ { JSON . stringify ( e ) } ` ;throw Error(t)}return!0}function oJ(e){let t=new Set;return Zq(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function sJ(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function cJ(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=oJ(e);let a=sJ(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(Uq(t.node)||Gq(t.node)))t.node.anchor=t.anchor;else{let t=Error( ` Failed to resolve repeated object ( this should not happen ) ` );throw t.source=e,t}}},sourceObjects:r}}function lJ(e,t,n,r){if(r&&typeof r== ` object ` ){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=lJ(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=lJ(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=lJ(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=lJ(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function uJ(e,t,n){if(Array.isArray(e))return e.map((e,t)=>uJ(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!qq(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e== ` bigint ` &&!n?.keep?Number(e):e}var dJ=class{constructor(e){Object.defineProperty(this,Rq,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Bq(e))throw TypeError( ` A document argument is required ` );let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n== ` number ` ?n:100},o=uJ(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?lJ(i,{"":o}, ` ` ,o):o}},fJ=class extends dJ{constructor(e){super(Mq),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error( ` Alias nodes cannot have tags ` )}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError( ` Alias resolution is disabled ` );let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Zq(e,{Node:(e,t)=>{(zq(t)||qq(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(uJ(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError( ` This should not happen : Alias anchor was not resolved ? ` );if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=pJ(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError( ` Excessive alias count indicates a resource exhaustion attack ` )}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e= ` Unresolved alias ( the anchor must be set before the alias ) : $ { this . source } ` ;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r= ` * $ { this . source } ` ;if(e){if(aJ(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e= ` Unresolved alias ( the anchor must be set before the alias ) : $ { this . source } ` ;throw Error(e)}if(e.implicitKey)return ` $ { r } ` }return r}};function pJ(e,t,n){if(zq(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Gq(t)){let r=0;for(let i of t.items){let t=pJ(e,i,n);t>r&&(r=t)}return r}if(Hq(t)){let r=pJ(e,t.key,n),i=pJ(e,t.value,n);return Math.max(r,i)}return 1}var mJ=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,hJ=class extends dJ{constructor(e){super(Iq),this.value=e}toJSON(e,t){return t?.keep?this.value:uJ(this.value,e,t)}toString(){return String(this.value)}};hJ.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,hJ.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,hJ.PLAIN= ` PLAIN ` ,hJ.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,hJ.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var gJ= ` tag : yaml . org , 2002 : ` ;function _J(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error( ` Tag $ { t } not found ` );return r}return n.find(t=>t.identify?.(e)&&!t.format)}function vJ(e,t,n){if(Bq(e)&&(e=e.contents),Kq(e))return e;if(Hq(e)){let t=n.schema[Pq].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt< ` u ` &&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e== ` object ` ){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new fJ(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=gJ+t.slice(2));let l=_J(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new hJ(e);return c&&(c.node=t),t
Line truncated
` )?CJ(n,t):n.includes( `
` )? `
@@ -153,4 +153,4 @@ Edge: ${e}
Source : $ { t }
Target : $ { n } ` ,EDGE_ORPHANED:e=> ` Edge was orphaned ( suddenly missing source or target ) and has been removed
Edge : $ { e } ` ,EDGE_NOT_FOUND:e=> ` Edge not found
Edge : $ { e } ` ,USEVUEFLOW_OPTIONS:()=> ` The options parameter is deprecated and will be removed in the next major version . Please use the id parameter instead ` },j7=class extends Error{constructor(e,...t){super(A7[e]?.call(A7,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function M7(e){return ` clientX ` in e}function Ate(e){return ` sourceEvent ` in e}function N7(e,t){let n=M7(e),r,i;return n?(r=e.clientX,i=e.clientY): ` touches ` in e&&e.touches.length>0?(r=e.touches[0].clientX,i=e.touches[0].clientY): ` changedTouches ` in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(r=0,i=0),{x:r-(t?.left??0),y:i-(t?.top??0)}}var P7=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function jte(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function F7(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var Mte=()=>!0;function I7(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function Nte(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())D5(i,E5(e))>0&&r.push(e);return r}var Pte=250;function Fte(e,t,n,r){let i=[],a=1/0,o=Nte(e,n,t+Pte);for(let n of o){let o=[...n.handleBounds?.source??[],...n.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=T7(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type=== ` source ` ? ` target ` : ` source ` ;return i.find(t=>t.type===e)??i[0]}return i[0]}function L7(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=Mte},u,d,f,p){let m=a=== ` target ` ,h=t?o.querySelector( ` . $ { s } - flow _ _handle [ data - id = "${c}-${t?.nodeId}-${t?.id}-${t?.type}" ] ` ):null,{x:g,y:_}=N7(e),v=o.elementFromPoint(g,_),y=v?.classList.contains( ` $ { s } - flow _ _handle ` )?v:h,b={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){let e=R7(void 0,y),t=y.getAttribute( ` data - nodeid ` ),a=y.getAttribute( ` data - handleid ` ),o=y.classList.contains( ` connectable ` ),s=y.classList.contains( ` connectableend ` );if(!t||!e)return b;let c={source:m?t:r,sourceHandle:m?a:i,target:m?r:t,targetHandle:m?i:a};b.connection=c,b.isValid=o&&s&&(n===l5.Strict?m&&e=== ` source ` ||!m&&e=== ` target ` :t!==r||a!==i)&&l(c,{nodes:d,edges:u,sourceNode:f(c.source),targetNode:f(c.target)}),b.toHandle=z7(t,e,a,p,n,!0)}return b}function R7(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function Ite(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function Lte(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function z7(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===l5.Strict?o.handleBounds?.[t]:[...o.handleBounds?.source??[],...o.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...T7(o,c,c.position,!0)}:c}var B7={[o5.Left]:o5.Right,[o5.Right]:o5.Left,[o5.Top]:o5.Bottom,[o5.Bottom]:o5.Top},Rte=[ ` production ` , ` prod ` ];function V7(e,...t){H7()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function H7(){return!Rte.includes( ` production ` )}function U7(e,t,n,r,i){let a=t.querySelectorAll( ` . vue - flow _ _handle . $ { e } ` );return a?.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute( ` data - handleid ` ),type:e,nodeId:i,position:t.getAttribute( ` data - handlepos ` ),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...O5(t)}}):null}function W7(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),Kn(()=>{o.blur()})):n([e])}function G7(e){return P(e)!==void 0}function zte(e,t,n,r){if(!e||!e.source||!e.target)return n(new j7(k7.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=M5(e)?e:{...e,id:H5(e)},i=R5(i,void 0,r),!U5(i,t)&&i}function Bte(e,t,n,r,i){if(!t.source||!t.target)return i(new j7(k7.EDGE_INVALID,e.id)),!1;if(!n)return i(new j7(k7.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?H5(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function K7(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!N5(o)){n(new j7(k7.NODE_INVALID,o?.id));continue}let s=L5(o,t(o.id),o.parentNode);o.parentNode&&(r[o.parentNode]=!0),i[a]=s}for(let e of i){let a=t(e.parentNode)||i.find(t=>t.id===e.parentNode);e.parentNode&&!a&&n(new j7(k7.NODE_MISSING_PARENT,e.id,e.parentNode)),(e.parentNode||r[e.id])&&(r[e.id]&&(e.isParent=!0),a&&(a.isParent=!0))}return i}function q7(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o= ` $ { i } - $ { e } ` ;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o= ` $ { i } - $ { e } - $ { a } ` ;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function J7(e,t,n){e.clear();for(let t of n){let{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=t,o={edgeId:t.id,source:n,target:r,sourceHandle:i,targetHandle:a},s= ` $ { n } - $ { i } -- $ { r } - $ { a } ` ;q7( ` source ` Line truncated
Edge : $ { e } ` ,USEVUEFLOW_OPTIONS:()=> ` The options parameter is deprecated and will be removed in the next major version . Please use the id parameter instead ` },j7=class extends Error{constructor(e,...t){super(A7[e]?.call(A7,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function M7(e){return ` clientX ` in e}function Ate(e){return ` sourceEvent ` in e}function N7(e,t){let n=M7(e),r,i;return n?(r=e.clientX,i=e.clientY): ` touches ` in e&&e.touches.length>0?(r=e.touches[0].clientX,i=e.touches[0].clientY): ` changedTouches ` in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(r=0,i=0),{x:r-(t?.left??0),y:i-(t?.top??0)}}var P7=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function jte(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function F7(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var Mte=()=>!0;function I7(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function Nte(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())D5(i,E5(e))>0&&r.push(e);return r}var Pte=250;function Fte(e,t,n,r){let i=[],a=1/0,o=Nte(e,n,t+Pte);for(let n of o){let o=[...n.handleBounds?.source??[],...n.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=T7(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type=== ` source ` ? ` target ` : ` source ` ;return i.find(t=>t.type===e)??i[0]}return i[0]}function L7(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=Mte},u,d,f,p){let m=a=== ` target ` ,h=t?o.querySelector( ` . $ { s } - flow _ _handle [ data - id = "${c}-${t?.nodeId}-${t?.id}-${t?.type}" ] ` ):null,{x:g,y:_}=N7(e),v=o.elementFromPoint(g,_),y=v?.classList.contains( ` $ { s } - flow _ _handle ` )?v:h,b={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){let e=R7(void 0,y),t=y.getAttribute( ` data - nodeid ` ),a=y.getAttribute( ` data - handleid ` ),o=y.classList.contains( ` connectable ` ),s=y.classList.contains( ` connectableend ` );if(!t||!e)return b;let c={source:m?t:r,sourceHandle:m?a:i,target:m?r:t,targetHandle:m?i:a};b.connection=c,b.isValid=o&&s&&(n===l5.Strict?m&&e=== ` source ` ||!m&&e=== ` target ` :t!==r||a!==i)&&l(c,{nodes:d,edges:u,sourceNode:f(c.source),targetNode:f(c.target)}),b.toHandle=z7(t,e,a,p,n,!0)}return b}function R7(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function Ite(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function Lte(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function z7(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===l5.Strict?o.handleBounds?.[t]:[...o.handleBounds?.source??[],...o.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...T7(o,c,c.position,!0)}:c}var B7={[o5.Left]:o5.Right,[o5.Right]:o5.Left,[o5.Top]:o5.Bottom,[o5.Bottom]:o5.Top},Rte=[ ` production ` , ` prod ` ];function V7(e,...t){H7()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function H7(){return!Rte.includes( ` production ` )}function U7(e,t,n,r,i){let a=t.querySelectorAll( ` . vue - flow _ _handle . $ { e } ` );return a?.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute( ` data - handleid ` ),type:e,nodeId:i,position:t.getAttribute( ` data - handlepos ` ),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...O5(t)}}):null}function W7(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),Kn(()=>{o.blur()})):n([e])}function G7(e){return P(e)!==void 0}function zte(e,t,n,r){if(!e||!e.source||!e.target)return n(new j7(k7.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=M5(e)?e:{...e,id:H5(e)},i=R5(i,void 0,r),!U5(i,t)&&i}function Bte(e,t,n,r,i){if(!t.source||!t.target)return i(new j7(k7.EDGE_INVALID,e.id)),!1;if(!n)return i(new j7(k7.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?H5(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function K7(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!N5(o)){n(new j7(k7.NODE_INVALID,o?.id));continue}let s=L5(o,t(o.id),o.parentNode);o.parentNode&&(r[o.parentNode]=!0),i[a]=s}for(let e of i){let a=t(e.parentNode)||i.find(t=>t.id===e.parentNode);e.parentNode&&!a&&n(new j7(k7.NODE_MISSING_PARENT,e.id,e.parentNode)),(e.parentNode||r[e.id])&&(r[e.id]&&(e.isParent=!0),a&&(a.isParent=!0))}return i}function q7(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o= ` $ { i } - $ { e } ` ;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o= ` $ { i } - $ { e } - $ { a } ` ;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function J7(e,t,n){e.clear();for(let t of n){let{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=t,o={edgeId:t.id,source:n,target:r,sourceHandle:i,targetHandle:a},s= ` $ { n } - $ { i } -- $ { r } - $ { a } ` ;q7( ` source ` Line truncated