@@ -14,57 +14,57 @@ Defaulting to \`null\`.`),null)}function op(e){return ip(e)&&!Number.isNaN(e)&&e
` )}),a=null):a=[];continue}if(a){a.push(c);continue}let l=Wg(c),u=e+1<n.length?Wg(n[e+1]):null;if(l&&u&&Gg(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=Wg(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>Hg(e)),rows:r.map(e=>e.map(e=>Hg(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:Hg(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:Hg(c.replace(/^> \s ?/, ` ` ))});continue}r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function Wg(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 Gg(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var Kg={class: ` [ overflow - wrap : anywhere ] ` },qg={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },Jg={class: ` font - mono text - [ 0.85 em ] ` },Yg={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Xg={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Zg={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Qg={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` }, $ g={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },e_={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },t_={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },n_={key:8,class: ` mb - 2.5 last : mb - 0 ` },r_=n({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=M(()=>Ug(t.text));return(e,t)=>(P(),V( ` div ` ,Kg,[(P(!0),V(R,null,H(n.value,(e,t)=>(P(),V(R,{key:t},[e.kind=== ` pre ` ?(P(),V( ` pre ` ,qg,[B( ` code ` ,Jg,L(e.code),1)])):e.kind=== ` table ` ?(P(),V( ` table ` ,Yg,[B( ` thead ` ,null,[B( ` tr ` ,null,[(P(!0),V(R,null,H(e.head,(e,t)=>(P(),V( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[O(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))])]),B( ` tbody ` ,null,[(P(!0),V(R,null,H(e.rows,(e,t)=>(P(),V( ` tr ` ,{key:t},[(P(!0),V(R,null,H(e,(e,t)=>(P(),V( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[O(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(P(),V( ` blockquote ` ,Xg,[O(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(P(),V( ` h1 ` ,Zg,[O(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(P(),V( ` h2 ` ,Qg,[O(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(P(),V( ` h3 ` , $ g,[O(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(P(),V( ` ul ` ,e_,[(P(!0),V(R,null,H(e.items,(e,t)=>(P(),V( ` li ` ,{key:t},[O(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(P(),V( ` ol ` ,t_,[(P(!0),V(R,null,H(e.items,(e,t)=>(P(),V( ` li ` ,{key:t},[O(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(P(),V( ` p ` ,n_,[O(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):N( ` ` ,!0)],64))),128))]))}}),i_={class: ` truncate ` },a_=n({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=c( ` RouterLink ` );return P(),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:C(()=>[O(F(ir),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),B( ` span ` ,i_,L(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),o_={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },s_={class: ` font - semibold text - foreground ` },c_={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },l_=n({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=M(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=M(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=M(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=M(()=>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?(P(),U(a_,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(P(),V( ` div ` ,o_,[O(F(ai),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),B( ` span ` ,s_,L(n.value),1),r.value?(P(),V( ` code ` ,c_,L(r.value),1)):N( ` ` ,!0),B( ` span ` ,{class:k(F(G)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},L(a.value),3)]))}}),u_={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },d_={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },f_={key:3,class: ` whitespace - pre - wrap ` },p_=n({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(P(),V( ` div ` ,{class:k([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[B( ` div ` ,{class:k(F(G)( ` 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?(P(),V( ` div ` ,u_,[(P(!0),V(R,null,H(e.tools,(t,n)=>(P(),U(l_,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):N( ` ` ,!0),e.media.length?(P(),V( ` div ` ,d_,[(P(!0),V(R,null,H(e.media,(e,t)=>(P(),U(Ng,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):N( ` ` ,!0),e.assistant?(P(),U(r_,{key:2,text:e.text},null,8,[ ` text ` ])):(P(),V( ` div ` ,f_,L(e.text),1)),A(t. $ slots, ` default ` )],2)],2))}}),m_={class: ` text - sm ` },h_={class: ` font - medium ` },g_={key:0,class: ` mt - 1 text - fg - muted ` },__={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },v_=n({__name: ` ChatCho Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>CS? ` $ { n . slice ( 0 , CS ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var TS=[ ` title ` ],ES=n({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=M(()=>Zx(n.event)),a=M(()=>wS(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=M(()=>n.event.at? $ b(n.event.at): ` — ` );return(e,t)=>(P(),U(F(xS),{class:k(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:[dn(un(o,[ ` prevent ` ]),[ ` enter ` ]),dn(un(o,[ ` prevent ` ]),[ ` space ` ])]},{default:C(()=>[O(F(Z),{class: ` font - medium ` },{default:C(()=>[l(L(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),O(F(Z),{class: ` font - mono ` },{default:C(()=>[l(L(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),O(F(Z),{class: ` w - [ 55 % ] max - w - 0 ` },{default:C(()=>[B( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},L(a.value.text),9,TS)]),_:1}),O(F(Z),null,{default:C(()=>[l(L(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),DS=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function OS(e){return(Number(e?.task_id)||0)>0}function kS(e,t){return t=== ` tasks ` ?OS(e):t!== ` system ` ||!OS(e)}function AS(e,t){return e.filter(e=>kS(e,t))}function jS(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function MS(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function NS(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=MS(wS(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 PS={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },FS={class: ` max - h - [ 28 rem ] overflow - y - auto ` },IS=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],LS=[ ` title ` ],RS=n({__name: ` LiveActivityCard ` ,setup(e){let t=rv(),{activity:n,streamKind:r,streamState:i}=kn(An()),a=W( ` all ` ),o=M(()=>AS(n.value,a.value)),s=M(()=>jS(o.value.length,a.value)),c=je(new Set),u=M(()=>NS(o.value));function d(e){c.has(e)?c.delete(e):c.add(e)}function f(e){return c.has(e.key)}function p(e){return wS(e.representative)}function m(e){return e.representative.at? $ b(e.representative.at): ` — ` }function h(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(P(),U(F(Kb),null,{default:C(()=>[O(F(Zb),null,{default:C(()=>[O(F(Qb),null,{default:C(()=>[...t[1]||=[l( ` Live activity ` ,-1)]]),_:1}),O(F(qb),{class: ` flex items - center gap - 2 ` },{default:C(()=>[O(F(_S),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:F(DS)},null,8,[ ` modelValue ` , ` options ` ]),O(F(xn),{variant:F(r)},{default:C(()=>[l(L(F(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),O(F(Jb),null,{default:C(()=>[B( ` div ` ,PS,[B( ` div ` ,FS,[O(F(yS),null,{default:C(()=>[O(F(SS),{class: ` sticky top - 0 z - 10 bg - card ` },{default:C(()=>[O(F(xS),null,{default:C(()=>[O(F(Q),null,{default:C(()=>[...t[2]||=[l( ` Event ` ,-1)]]),_:1}),O(F(Q),null,{default:C(()=>[...t[3]||=[l( ` Task ` ,-1)]]),_:1}),O(F(Q),null,{default:C(()=>[...t[4]||=[l( ` Detail ` ,-1)]]),_:1}),O(F(Q),null,{default:C(()=>[...t[5]||=[l( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),O(F(bS),null,{default:C(()=>[o.value.length?N( ` ` ,!0):(P(),U(F(xS),{key:0},{default:C(()=>[O(F(Z),{colspan: ` 4 ` },{default:C(()=>[O(F(Lb),null,{default:C(()=>[O(F(Bb),null,{default:C(()=>[O(F(Ub),null,{default:C(()=>[l(L(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(P(!0),V(R,{key:1},H(u.value,e=>(P(),V(R,{key:e.key},[e.count===1?(P(),U(ES,{key:0,event:e.representative,onOpen:h},null,8,[ ` event ` ])):(P(),V(R,{key:1},[O(F(xS),{class:k(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&&h(e.taskID),onKeydown:[dn(un(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),dn(un(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:C(()=>[O(F(Z),{class: ` font - medium ` },{default:C(()=>[B( ` button ` ,{type: ` button ` ,class: ` inline - flex items - center gap - 1 rounded hover : opacity - 80 ` ,"aria-expanded":f(e),"aria-label": ` $ { f ( e ) ? ` Hide ` : ` Show ` } $ { e . count } $ { e . label } events ` ,onClick:un(t=>d(e.key),[ ` stop ` ])},[f(e)?(P(),U(F(dr),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(P(),U(F(fr),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),l( ` ` +L(e.label)+ ` ` ,1),O(F(xn),{variant: ` idle ` },{default:C(()=>[l( ` × ` +L(e.count),1)]),_:2},1024)],8,IS)]),_:2},1024),O(F(Z),{class: ` font - mono ` },{default:C(()=>[l(L(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),O(F(Z),{class: ` w - [ 55 % ] max - w - 0 ` },{default:C(()=>[B( ` span ` ,{class: ` block truncate ` ,title:p(e).truncated?p(e).full:void 0},L(p(e).text),9,LS)]),_:2},1024),O(F(Z),null,{default:C(()=>[l(L(m(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),f(e)?(P(!0),V(R,{key:0},H(e.events,(t,n)=>(P(),U(ES,{key: ` $ { e . key } : $ { n } ` ,event:t,onOpen:
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 iw(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 aw(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 ow(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 sw(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 cw=W([]),lw=W([]),uw=W(!0),dw=W(null),fw=W(null),pw=W(!1),mw=W(null);async function hw(){try{let e=await K.eventTypes();uw.value=e.enabled!==!1,cw.value=e.event_types||[],lw.value=e.proposals||[],dw.value=null}catch(e){dw.value=e.message||String(e)}}function gw(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function _w(e){mw.value=null,fw.value=e}function vw(e){let t=Ew.value.find(t=>String(t.id)===e.sample_id);_w({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:gw(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function yw(e= ` ` ){_w({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function bw(e){_w({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:gw(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function xw(){fw.value=null}async function Sw(){let e=fw.value;if(e){pw.value=!0;try{if(e.mode=== ` edit ` &&e.id)await K.eventTypeUpdate(e.id,{name:e.name,rule:sw(e.rule)});else{let t=e.mode=== ` paste ` ?rw(e.headersText):e.exampleHeaders;await K.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:sw(e.rule),example:{headers:t,body:e.body}})}fw.value=null,await hw()}catch(e){mw.value=e.message||String(e)}finally{pw.value=!1}}}var Cw=W(null);async function ww(){let e=Cw.value;if(Cw.value=null,e)try{await K.eventTypeDelete(e.id),await hw()}catch(e){dw.value=e.message||String(e)}}var Tw=100,Ew=W([]),Dw=W(!0),Ow=W(null),kw=W(!0),Aw=W(null);async function jw(){try{let e=await K.captures(Tw);Dw.value=e.enabled!==!1,Ew.value=e.captures||[],Ow.value=null}catch(e){Ow.value=e.message||String(e)}finally{kw.value=!1}}function Mw(e){let t=Ew.value.find(t=>t.id===e);return t&&(Aw.value=t),!!t}function Nw(){Ew.value.length&&(Aw.value=Ew.value[0])}function Pw(){In( ` captures ` ,()=>{jw(),hw()})}var Fw={key:0,class: ` text - xs text - fg - muted ` },Iw={key:1,class: ` flex flex - col gap - 1 text - xs ` },Lw={key:1},Rw={key:2,class: ` text - xs text - fg - muted ` },zw=n({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=W([]),r=W(!1);j(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await K.dispatches(t.kind,t.id)}catch{n.value=[],r.value=!0}},{immediate:!0});let i=e=>({path: ` / events ` ,query:{tab: ` inspector ` ,capture:e}});return(e,a)=>{let o=c( ` RouterLink ` );return r.value?(P(),V( ` p ` ,Fw, ` Dispatches unavailable . ` )):n.value.length?(P(),V( ` ul ` ,Iw,[(P(!0),V(R,null,H(n.value,e=>(P(),V( ` li ` ,{key:e.binding_id+e.capture_id,class: ` flex flex - wrap items - center gap - x - 2 font - mono text - fg - muted ` },[t.kind=== ` bindings ` ?N( ` ` ,!0):(P(),U(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:C(()=>[l( ` binding ` +L(e.binding_id.slice(0,8))+ ` v ` +L(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?N( ` ` ,!0):(P(),U(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:C(()=>[l( ` capture ` +L(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?N( ` ` ,!0):(P(),V(R,{key:2},[e.task_id?(P(),U(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:C(()=>[l( ` task # ` +L(e.task_id),1)]),_:2},1032,[ ` to ` ])):(P(),V( ` span ` ,Lw,L(e.reason|| ` claimed , no task recorded ` ),1))],64)),B( ` span ` ,null,L(F( $ b)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?N( ` ` ,!0):(P(),V( ` p ` ,Rw, ` No dispatches yet . ` ))}}}),Bw=n({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(P(),U(F(Er),{role: ` status ` ,"aria-label": ` Loading ` ,class:k(F(G)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function Vw(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function Hw(e){return(e?.repository?? ` required ` )!== ` none ` }function Uw(e,t){return e.filter(e=>t=== ` any ` ||e.type=== ` any ` ||e.type===t)}function Ww(e,t){switch(t){case ` string ` :return e;case ` number ` :return e.trim()!== ` ` &&!Number.isNaN(Number(e))?Number(e):e;case ` bool ` :return e=== ` true ` ||e!== ` false ` &&e;default:try{return JSON.parse(e)}catch{return e}}}var Gw={pending_approval: ` pending approval ` ,armed: ` armed ` ,paused: ` paused ` },Kw={pending_approval: ` warn ` ,armed: ` ok ` ,paused: ` idle ` };function qw(e){
Line truncated
` )}};oB.defaultYaml={explicit:!1,version: ` 1.2 ` },oB.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function sB(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 cB(e){let t=new Set;return $ z(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function lB(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function uB(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=cB(e);let a=lB(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(Gz(t.node)||qz(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 dB(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=dB(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=dB(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=dB(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=dB(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function fB(e,t,n){if(Array.isArray(e))return e.map((e,t)=>fB(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!Yz(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 pB=class{constructor(e){Object.defineProperty(this,Bz,{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(!Hz(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=fB(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?dB(i,{"":o}, ` ` ,o):o}},mB=class extends pB{constructor(e){super(Pz),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=[], $ z(e,{Node:(e,t)=>{(Vz(t)||Yz(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||=(fB(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=hB(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(sB(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 hB(e,t,n){if(Vz(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(qz(t)){let r=0;for(let i of t.items){let t=hB(e,i,n);t>r&&(r=t)}return r}if(Wz(t)){let r=hB(e,t.key,n),i=hB(e,t.value,n);return Math.max(r,i)}return 1}var gB=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,_B=class extends pB{constructor(e){super(Rz),this.value=e}toJSON(e,t){return t?.keep?this.value:fB(this.value,e,t)}toString(){return String(this.value)}};_B.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,_B.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,_B.PLAIN= ` PLAIN ` ,_B.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,_B.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var vB= ` tag : yaml . org , 2002 : ` ;function yB(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 bB(e,t,n){if(Hz(e)&&(e=e.contents),Jz(e))return e;if(Wz(e)){let t=n.schema[Iz].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 mB(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=vB+t.slice(2));let l=yB(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new _B(e);return c&&(c.node=t),t
Line truncated
` )?T B(n,t):n.includes( `
` )){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 iw(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 aw(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 ow(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 sw(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 cw=W([]),lw=W([]),uw=W(!0),dw=W(null),fw=W(null),pw=W(!1),mw=W(null);async function hw(){try{let e=await K.eventTypes();uw.value=e.enabled!==!1,cw.value=e.event_types||[],lw.value=e.proposals||[],dw.value=null}catch(e){dw.value=e.message||String(e)}}function gw(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function _w(e){mw.value=null,fw.value=e}function vw(e){let t=Ew.value.find(t=>String(t.id)===e.sample_id);_w({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:gw(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function yw(e= ` ` ){_w({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function bw(e){_w({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:gw(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function xw(){fw.value=null}async function Sw(){let e=fw.value;if(e){pw.value=!0;try{if(e.mode=== ` edit ` &&e.id)await K.eventTypeUpdate(e.id,{name:e.name,rule:sw(e.rule)});else{let t=e.mode=== ` paste ` ?rw(e.headersText):e.exampleHeaders;await K.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:sw(e.rule),example:{headers:t,body:e.body}})}fw.value=null,await hw()}catch(e){mw.value=e.message||String(e)}finally{pw.value=!1}}}var Cw=W(null);async function ww(){let e=Cw.value;if(Cw.value=null,e)try{await K.eventTypeDelete(e.id),await hw()}catch(e){dw.value=e.message||String(e)}}var Tw=100,Ew=W([]),Dw=W(!0),Ow=W(null),kw=W(!0),Aw=W(null);async function jw(){try{let e=await K.captures(Tw);Dw.value=e.enabled!==!1,Ew.value=e.captures||[],Ow.value=null}catch(e){Ow.value=e.message||String(e)}finally{kw.value=!1}}function Mw(e){let t=Ew.value.find(t=>t.id===e);return t&&(Aw.value=t),!!t}function Nw(){Ew.value.length&&(Aw.value=Ew.value[0])}function Pw(){In( ` captures ` ,()=>{jw(),hw()})}var Fw={key:0,class: ` text - xs text - fg - muted ` },Iw={key:1,class: ` flex flex - col gap - 1 text - xs ` },Lw={key:1},Rw={key:2,class: ` text - xs text - fg - muted ` },zw=n({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=W([]),r=W(!1);j(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await K.dispatches(t.kind,t.id)}catch{n.value=[],r.value=!0}},{immediate:!0});let i=e=>({path: ` / events ` ,query:{tab: ` inspector ` ,capture:e}});return(e,a)=>{let o=c( ` RouterLink ` );return r.value?(P(),V( ` p ` ,Fw, ` Dispatches unavailable . ` )):n.value.length?(P(),V( ` ul ` ,Iw,[(P(!0),V(R,null,H(n.value,e=>(P(),V( ` li ` ,{key:e.binding_id+e.capture_id,class: ` flex flex - wrap items - center gap - x - 2 font - mono text - fg - muted ` },[t.kind=== ` bindings ` ?N( ` ` ,!0):(P(),U(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:C(()=>[l( ` binding ` +L(e.binding_id.slice(0,8))+ ` v ` +L(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?N( ` ` ,!0):(P(),U(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:C(()=>[l( ` capture ` +L(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?N( ` ` ,!0):(P(),V(R,{key:2},[e.task_id?(P(),U(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:C(()=>[l( ` task # ` +L(e.task_id),1)]),_:2},1032,[ ` to ` ])):(P(),V( ` span ` ,Lw,L(e.reason|| ` claimed , no task recorded ` ),1))],64)),B( ` span ` ,null,L(F( $ b)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?N( ` ` ,!0):(P(),V( ` p ` ,Rw, ` No dispatches yet . ` ))}}}),Bw=n({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(P(),U(F(Er),{role: ` status ` ,"aria-label": ` Loading ` ,class:k(F(G)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function Vw(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function Hw(e){return(e?.repository?? ` required ` )!== ` none ` }function Uw(e,t){return e.filter(e=>t=== ` any ` ||e.type=== ` any ` ||e.type===t)}function Ww(e,t){switch(t){case ` string ` :return e;case ` number ` :return e.trim()!== ` ` &&!Number.isNaN(Number(e))?Number(e):e;case ` bool ` :return e=== ` true ` ||e!== ` false ` &&e;default:try{return JSON.parse(e)}catch{return e}}}var Gw={pending_approval: ` pending approval ` ,armed: ` armed ` ,paused: ` paused ` },Kw={pending_approval: ` warn ` ,armed: ` ok ` ,paused: ` idle ` };function qw(e){
Line truncated
` )}};uB.defaultYaml={explicit:!1,version: ` 1.2 ` },uB.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function dB(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 fB(e){let t=new Set;return rB(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function pB(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function mB(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=fB(e);let a=pB(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(Yz(t.node)||Zz(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 hB(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=hB(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=hB(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=hB(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=hB(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function gB(e,t,n){if(Array.isArray(e))return e.map((e,t)=>gB(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||! $ z(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 _B=class{constructor(e){Object.defineProperty(this,Wz,{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(!Kz(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=gB(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?hB(i,{"":o}, ` ` ,o):o}},vB=class extends _B{constructor(e){super(Rz),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=[],rB(e,{Node:(e,t)=>{(Gz(t)|| $ z(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||=(gB(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=yB(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(dB(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 yB(e,t,n){if(Gz(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Zz(t)){let r=0;for(let i of t.items){let t=yB(e,i,n);t>r&&(r=t)}return r}if(Jz(t)){let r=yB(e,t.key,n),i=yB(e,t.value,n);return Math.max(r,i)}return 1}var bB=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,xB=class extends _B{constructor(e){super(Hz),this.value=e}toJSON(e,t){return t?.keep?this.value:gB(this.value,e,t)}toString(){return String(this.value)}};xB.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,xB.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,xB.PLAIN= ` PLAIN ` ,xB.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,xB.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var SB= ` tag : yaml . org , 2002 : ` ;function CB(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 wB(e,t,n){if(Kz(e)&&(e=e.contents),Qz(e))return e;if(Jz(e)){let t=n.schema[Bz].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 vB(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=SB+t.slice(2));let l=CB(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new xB(e);return c&&(c.node=t),t
Line truncated
` )?k B(n,t):n.includes( `
` )? `
` +T B(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,D B= ` flow ` ,O B= ` block ` ,k B= ` quoted ` ;function A B(e,t,n= ` flow ` ,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r== ` number ` &&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n=== ` block ` &&(h=j B(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n=== ` quoted ` &&r=== ` \ \ ` ){switch(g=h,e[h+1]){case ` x ` :h+=3;break;case ` u ` :h+=5;break;case ` U ` :h+=9;break;default:h+=1}_=h}if(r=== `
` )n=== ` block ` &&(h=j B(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` +k B(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,j B= ` flow ` ,M B= ` block ` ,N B= ` quoted ` ;function P B(e,t,n= ` flow ` ,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r== ` number ` &&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n=== ` block ` &&(h=F B(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n=== ` quoted ` &&r=== ` \ \ ` ){switch(g=h,e[h+1]){case ` x ` :h+=3;break;case ` u ` :h+=5;break;case ` U ` :h+=9;break;default:h+=1}_=h}if(r=== `
` )n=== ` block ` &&(h=F B(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` &&p!== ` ` ){let t=e[h+1];t&&t!== ` ` &&t!== `
` &&t!== ` ` &&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n=== ` quoted ` ){for(;p=== ` ` ||p=== ` ` ;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v= ` \ n$ { t } $ { e . slice ( 0 , a ) } ` :(n=== ` quoted ` &&u[i]&&(v+= ` $ { e [ i ] } \ \ ` ),v+= ` \ n$ { t } $ { e . slice ( i + 1 , a ) } ` )}return v}function j B(e,t,n){let r=t,i=t+1,a=e[i];for(;a=== ` ` ||a=== ` ` ;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!== `
` );r=t,i=t+1,a=e[i]}return r}var M B=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),N B=e=>/^(%|---| \. \. \. )/m.test(e);function P B(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]=== `
` ){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function F B(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(N B(e)? ` ` : ` ` ),o= ` ` ,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t=== ` ` &&n[e+1]=== ` \ \ ` &&n[e+2]=== ` n ` &&(o+=n.slice(s,e)+ ` \ \ ` ,e+=1,s=e,t= ` \ \ ` ),t=== ` \ \ ` )switch(n[e+1]){case ` u ` :{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case ` 0000 ` :o+= ` \ \ 0 ` ;break;case ` 0007 ` :o+= ` \ \ a ` ;break;case ` 000 b ` :o+= ` \ \ v ` ;break;case ` 001 b ` :o+= ` \ \ e ` ;break;case ` 0085 ` :o+= ` \ \ N ` ;break;case ` 00 a0 ` :o+= ` \ \ _ ` ;break;case ` 2028 ` :o+= ` \ \ L ` ;break;case ` 2029 ` :o+= ` \ \ P ` ;break;default:t.substr(0,2)=== ` 00 ` ?o+= ` \ \ x ` +t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case ` n ` :if(r||n[e+2]=== ` " ` ||n.length<i)e+=1;else{for(o+=n.slice(s,e)+ `
` &&t!== ` ` &&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n=== ` quoted ` ){for(;p=== ` ` ||p=== ` ` ;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v= ` \ n$ { t } $ { e . slice ( 0 , a ) } ` :(n=== ` quoted ` &&u[i]&&(v+= ` $ { e [ i ] } \ \ ` ),v+= ` \ n$ { t } $ { e . slice ( i + 1 , a ) } ` )}return v}function F B(e,t,n){let r=t,i=t+1,a=e[i];for(;a=== ` ` ||a=== ` ` ;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!== `
` );r=t,i=t+1,a=e[i]}return r}var I B=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),L B=e=>/^(%|---| \. \. \. )/m.test(e);function R B(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]=== `
` ){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function z B(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(L B(e)? ` ` : ` ` ),o= ` ` ,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t=== ` ` &&n[e+1]=== ` \ \ ` &&n[e+2]=== ` n ` &&(o+=n.slice(s,e)+ ` \ \ ` ,e+=1,s=e,t= ` \ \ ` ),t=== ` \ \ ` )switch(n[e+1]){case ` u ` :{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case ` 0000 ` :o+= ` \ \ 0 ` ;break;case ` 0007 ` :o+= ` \ \ a ` ;break;case ` 000 b ` :o+= ` \ \ v ` ;break;case ` 001 b ` :o+= ` \ \ e ` ;break;case ` 0085 ` :o+= ` \ \ N ` ;break;case ` 00 a0 ` :o+= ` \ \ _ ` ;break;case ` 2028 ` :o+= ` \ \ L ` ;break;case ` 2029 ` :o+= ` \ \ P ` ;break;default:t.substr(0,2)=== ` 00 ` ?o+= ` \ \ x ` +t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case ` n ` :if(r||n[e+2]=== ` " ` ||n.length<i)e+=1;else{for(o+=n.slice(s,e)+ `
` ;n[e+2]=== ` \ \ ` &&n[e+3]=== ` n ` &&n[e+4]!== ` " ` ;)o+= `
` ,e+=2;o+=a,n[e+2]=== ` ` &&(o+= ` \ \ ` ),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:A B(o,a,k B,M B(t,!1))}function I B(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return F B(e,t);let n=t.indent||(N B(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : AB ( r , n , DB , MB ( t , ! 1 ) ) } function LB ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = FB ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? IB : i && ! t ? FB : n ? IB : FB } return r ( e , t ) } var RB ; try { RB = RegExp ( ` (^|(?<!
` ,e+=2;o+=a,n[e+2]=== ` ` &&(o+= ` \ \ ` ),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:P B(o,a,N B,I B(t,!1))}function B B(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return z B(e,t);let n=t.indent||(L B(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : PB ( r , n , jB , IB ( t , ! 1 ) ) } function VB ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = zB ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? BB : i && ! t ? zB : n ? BB : zB } return r ( e , t ) } var HB ; try { HB = RegExp ( ` (^|(?<!
) )
+ ( ? !
| $ ) ` , ` g ` )}catch{R B=/ \n +(?! \n | $ )/g}function z B({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/ \n [ \t ]+ $ /.test(n))return L B(n,r);let l=r.indent||(r.forceBlockIndent||N B(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===_ B.BLOCK_FOLDED?!1:t===_ B.BLOCK_LITERAL||!P B(n,c,l.length);if(!n)return u? ` |
| $ ) ` , ` g ` )}catch{H B=/ \n +(?! \n | $ )/g}function U B({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/ \n [ \t ]+ $ /.test(n))return V B(n,r);let l=r.indent||(r.forceBlockIndent||L B(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===x B.BLOCK_FOLDED?!1:t===x B.BLOCK_LITERAL||!R B(n,c,l.length);if(!n)return u? ` |
` : ` >
` ;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!== `
` &&e!== ` ` &&e!== ` ` )break}let p=n.substring(f),m=p.indexOf( `
` );m===-1?d= ` - ` :n===p||m!==p.length-1?(d= ` + ` ,a&&a()):d= ` ` ,p&&=(n=n.slice(0,-p.length),p[p.length-1]=== `
` &&(p=p.slice(0,-1)),p.replace(R B, ` $ & $ { l } ` ));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e=== ` ` )h=!0;else if(e=== `
` &&(p=p.slice(0,-1)),p.replace(H B, ` $ & $ { l } ` ));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e=== ` ` )h=!0;else if(e=== `
` )_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/ \n +/g, ` $ & $ { l } ` ));let y=(h?l? ` 2 ` : ` 1 ` : ` ` )+d;if(e&&(y+= ` ` +s(e.replace(/ ?[ \r \n ]+/g, ` ` )),i&&i()),!u){let e=n.replace(/ \n +/g, `
$ & ` ).replace(/(?:^| \n )([ \t ].*)(?:([ \n \t ]*) \n (?![ \n \t ]))?/g, ` $1$2 ` ).replace(/ \n +/g, ` $ & $ { l } ` ),i=!1,a=M B(r,!0);o!== ` folded ` &&t!==_ B.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=A B( ` $ { v } $ { e } $ { p } ` ,l,O B,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function B B(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes( `
` )||u&&/[[ \] {},]/.test(a))return L B(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?L B(a,t):z B(e,t,n,r);if(!s&&!u&&i!==_ B.PLAIN&&a.includes( `
` ))return z B(e,t,n,r);if(N B(a)){if(c=== ` ` )return t.forceBlockIndent=!0,z B(e,t,n,r);if(s&&c===l)return L B(a,t)}let d=a.replace(/ \n +/g, ` $ & \ n$ { c } ` );if(o){let e=e=>e.default&&e.tag!== ` tag : yaml . org , 2002 : str ` &&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return L B(a,t)}return s?d:A B(d,c,D B,M B(t,!1))}function V B(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value== ` string ` ?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==_ B.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=_ B.QUOTE_DOUBLE);let c=e=>{switch(e){case _ B.BLOCK_FOLDED:case _ B.BLOCK_LITERAL:return i||a?L B(o.value,t):z B(o,t,n,r);case _ B.QUOTE_DOUBLE:return F B(o.value,t);case _ B.QUOTE_SINGLE:return I B(o.value,t);case _ B.PLAIN:return B B(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error( ` Unsupported default string type $ { r } ` )}return l}function H B(e,t){let n=Object.assign({blockQuote:!0,commentString:w B,defaultKeyType:null,defaultStringType: ` PLAIN ` ,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr: ` false ` ,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr: ` null ` ,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr: ` true ` ,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case ` block ` :r=!1;break;case ` flow ` :r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding? ` ` : ` ` ,indent: ` ` ,indentStep:typeof n.indent== ` number ` ? ` ` .repeat(n.indent): ` ` ,inFlow:r,options:n}}function U B(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(G z(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null? ` null ` :typeof r);throw Error( ` Tag not resolved for $ { e } value ` )}return n}function W B(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(G z(e)||q z(e))&&e.anchor;a&&s B(a)&&(n.add(a),i.push( ` & $ { a } ` ));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join( ` ` )}function G B(e,t,n,r){if(W z(e))return e.toString(t,n,r);if(V z(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError( ` Cannot stringify circular structure without alias nodes ` );t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=J z(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=U B(t.doc.schema.tags,a);let o=W B(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify== ` function ` ?i.stringify(a,t,n,r):G z(a)?V B(a,t,n,r):a.toString(t,n,r);return o?G z(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function K B({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=J z(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(q z(e)||!J z(e)&&typeof e== ` object ` )throw Error( ` With simple keys , collection cannot be used as a key value ` )}let p=!d&&(!e||f&&t==null&&!n.inFlow||q z(e)||(G z(e)?e.type===_ B.BLOCK_FOLDED||e.type===_ B.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=G B(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error( ` With simple keys , single line scalar must not span more than 1024 characters ` );p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g=== ` ` ? ` ? ` :p? ` ? $ { g } ` :g}else if(a&&!d||t==null&&p)return g= ` ? $ { g } ` ,f&&!m?g+=E B(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=E B(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=E B(g,n.indent,l(f))));let _,v,y;J z(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t== ` object ` &&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&G z(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&K z(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=G B(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { TB ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
$ & ` ).replace(/(?:^| \n )([ \t ].*)(?:([ \n \t ]*) \n (?![ \n \t ]))?/g, ` $1$2 ` ).replace(/ \n +/g, ` $ & $ { l } ` ),i=!1,a=I B(r,!0);o!== ` folded ` &&t!==x B.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=P B( ` $ { v } $ { e } $ { p } ` ,l,M B,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function W B(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes( `
` )||u&&/[[ \] {},]/.test(a))return V B(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?V B(a,t):U B(e,t,n,r);if(!s&&!u&&i!==x B.PLAIN&&a.includes( `
` ))return U B(e,t,n,r);if(L B(a)){if(c=== ` ` )return t.forceBlockIndent=!0,U B(e,t,n,r);if(s&&c===l)return V B(a,t)}let d=a.replace(/ \n +/g, ` $ & \ n$ { c } ` );if(o){let e=e=>e.default&&e.tag!== ` tag : yaml . org , 2002 : str ` &&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return V B(a,t)}return s?d:P B(d,c,j B,I B(t,!1))}function G B(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value== ` string ` ?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==x B.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=x B.QUOTE_DOUBLE);let c=e=>{switch(e){case x B.BLOCK_FOLDED:case x B.BLOCK_LITERAL:return i||a?V B(o.value,t):U B(o,t,n,r);case x B.QUOTE_DOUBLE:return z B(o.value,t);case x B.QUOTE_SINGLE:return B B(o.value,t);case x B.PLAIN:return W B(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error( ` Unsupported default string type $ { r } ` )}return l}function K B(e,t){let n=Object.assign({blockQuote:!0,commentString:O B,defaultKeyType:null,defaultStringType: ` PLAIN ` ,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr: ` false ` ,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr: ` null ` ,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr: ` true ` ,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case ` block ` :r=!1;break;case ` flow ` :r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding? ` ` : ` ` ,indent: ` ` ,indentStep:typeof n.indent== ` number ` ? ` ` .repeat(n.indent): ` ` ,inFlow:r,options:n}}function q B(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(Y z(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null? ` null ` :typeof r);throw Error( ` Tag not resolved for $ { e } value ` )}return n}function J B(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(Y z(e)||Z z(e))&&e.anchor;a&&d B(a)&&(n.add(a),i.push( ` & $ { a } ` ));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join( ` ` )}function Y B(e,t,n,r){if(J z(e))return e.toString(t,n,r);if(G z(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError( ` Cannot stringify circular structure without alias nodes ` );t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=Q z(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=q B(t.doc.schema.tags,a);let o=J B(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify== ` function ` ?i.stringify(a,t,n,r):Y z(a)?G B(a,t,n,r):a.toString(t,n,r);return o?Y z(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function X B({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=Q z(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(Z z(e)||!Q z(e)&&typeof e== ` object ` )throw Error( ` With simple keys , collection cannot be used as a key value ` )}let p=!d&&(!e||f&&t==null&&!n.inFlow||Z z(e)||(Y z(e)?e.type===x B.BLOCK_FOLDED||e.type===x B.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Y B(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error( ` With simple keys , single line scalar must not span more than 1024 characters ` );p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g=== ` ` ? ` ? ` :p? ` ? $ { g } ` :g}else if(a&&!d||t==null&&p)return g= ` ? $ { g } ` ,f&&!m?g+=A B(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=A B(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=A B(g,n.indent,l(f))));let _,v,y;Q z(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t== ` object ` &&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&Y z(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&X z(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Y B(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { kB ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
` &&y&&(S= `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&q z(t)){let e=x[0],r=x.indexOf( `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&Z z(t)){let e=x[0],r=x.indexOf( `
` ),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e=== ` & ` ||e=== ` ! ` )){let n=x.indexOf( ` ` );e=== ` & ` &&n!==-1&&n<r&&x[n+1]=== ` ! ` &&(n=x.indexOf( ` ` ,n+1)),(n===-1||r<n)&&(t=!0)}t||(S= ` \ n$ { n . indent } ` )}}else(x=== ` ` ||x[0]=== `
` )&&(S= ` ` );return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=E B(g,n.indent,l(y)):h&&i&&i(),g}function q B(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var J B= ` << ` ,Y B={identify:e=>e===J B||typeof e== ` symbol ` &&e.description===J B,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new _ B(Symbol(J B)),{addToJSMap:ZB }),stringify:()=>J B},XB =(e,t)=>(Y B.identify(t)||G z(t)&&(!t.type||t.type===_ B.PLAIN)&&Y B.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Y B.tag&&e.default);function ZB (e,t,n){let r= $ B (e,n);if(K z(r))for(let n of r.items)QB (e,t,n);else if(Array.isArray(r))for(let n of r)QB (e,t,n);else QB (e,t,r)}function QB (e,t,n){let r=$ B (e,n);if(!U z(r))throw Error(` Merge sources must be maps or map aliases ` );let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function $ B (e,t){return e&&V z(t)?t.resolve(e.doc,e):t}function e V(e,t,{key:n,value:r}){if(J z(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(XB (e,n))ZB (e,t,r);else{let i=f B(n,` ` ,e);if(t instanceof Map)t.set(i,f B(r,i,e));else if(t instanceof Set)t.add(i);else{let a=t V(n,i,e),o=f B(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function t V(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(J z(e)&&n?.doc){let t=H B(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+ ` ... " ` ),q B(n.doc.options.logLevel, ` Keys with collection values will be stringified due to JS Object restrictions : $ { e } . Set mapAsMap : true to use object keys . ` ),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function n V(e,t,n){return new r V(b B(e,void 0,n),b B(t,void 0,n))}var r V=class e{constructor(e,t=null){Object.defineProperty(this,B z,{value:L z}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return J z(n)&&(n=n.clone(t)),J z(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return e V(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?K B(this,e,t,n):JSON.stringify(this)}};function i V(e,t,n){return(t.inFlow??e.flow?o V:a V)(e,t,n)}function a V({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(J z(i))!d&&i.spaceBefore&&f.push( ` ` ),s V(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(W z(i)){let e=J z(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),s V(n,f,e.commentBefore,d))}d=!1;let s=G B(i,u,()=>o=null,()=>d=!0);o&&(s+=E B(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t? ` \ n$ { c } $ { t } ` : `
` )&&(S= ` ` );return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=A B(g,n.indent,l(y)):h&&i&&i(),g}function Z B(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var Q B= ` << ` , $ B={identify:e=>e===Q B||typeof e== ` symbol ` &&e.description===Q B,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new x B(Symbol(Q B)),{addToJSMap:tV }),stringify:()=>Q B},eV =(e,t)=>( $ B.identify(t)||Y z(t)&&(!t.type||t.type===x B.PLAIN)&& $ B.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag=== $ B.tag&&e.default);function tV (e,t,n){let r=rV (e,n);if(X z(r))for(let n of r.items)nV (e,t,n);else if(Array.isArray(r))for(let n of r)nV (e,t,n);else nV (e,t,r)}function nV (e,t,n){let r=rV (e,n);if(!q z(r))throw Error( ` Merge sources must be maps or map aliases ` );let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function rV (e,t){return e&&G z(t)?t.resolve(e.doc,e):t}function i V(e,t,{key:n,value:r}){if(Q z(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(eV (e,n))tV (e,t,r);else{let i=g B(n, ` ` ,e);if(t instanceof Map)t.set(i,g B(r,i,e));else if(t instanceof Set)t.add(i);else{let a=a V(n,i,e),o=g B(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function a V(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(Q z(e)&&n?.doc){let t=K B(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+ ` ... " ` ),Z B(n.doc.options.logLevel, ` Keys with collection values will be stringified due to JS Object restrictions : $ { e } . Set mapAsMap : true to use object keys . ` ),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function o V(e,t,n){return new s V(w B(e,void 0,n),w B(t,void 0,n))}var s V=class e{constructor(e,t=null){Object.defineProperty(this,W z,{value:V z}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return Q z(n)&&(n=n.clone(t)),Q z(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return i V(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?X B(this,e,t,n):JSON.stringify(this)}};function c V(e,t,n){return(t.inFlow??e.flow?u V:l V)(e,t,n)}function l V({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(Q z(i))!d&&i.spaceBefore&&f.push( ` ` ),d V(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(J z(i)){let e=Q z(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),d V(n,f,e.commentBefore,d))}d=!1;let s=Y B(i,u,()=>o=null,()=>d=!0);o&&(s+=A B(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t? ` \ n$ { c } $ { t } ` : `
` }}return e?(p+= `
` +T B(l(e),c),s&&s()):d&&o&&o(),p}function o V({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(J z(i))i.spaceBefore&&d.push( ` ` ),s V(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(W z(i)){let e=J z(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),s V(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=J z(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=G B(i,c,()=>a=null);l||=d.length>u||o.includes( `
` ),n<e.length-1?o+= ` , ` :t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+= ` , ` )),a&&(o+=E B(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t? ` \ n$ { a } $ { i } $ { t } ` : `
` ;return ` $ { e } \ n$ { i } $ { p } ` }return ` $ { f } $ { o } $ { d . join ( ` ` ) } $ { o } $ { p } ` }function sV({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=TB(t(r),e);n.push(i.trimStart())}}function cV(e,t){let n=Gz(t)?t.value:t;for(let r of e)if(Wz(r)&&(r.key===t||r.key===n||Gz(r.key)&&r.key.value===n))return r}var lV=class extends CB{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(Iz,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i== ` function ` )o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(nV(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t== ` object ` )for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries== ` function ` &&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=Wz(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new rV(e,e?.value):new rV(e.key,e.value);let r=cV(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );Gz(r.value)&&gB(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=cV(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=cV(this.items,e)?.value;return(!t&&Gz(n)?n.value:n)??void 0}has(e){return!!cV(this.items,e)}set(e,t){this.add(new rV(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)eV(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Wz(e))throw Error( ` Map items must all be pairs ; found $ { JSON . stringify ( e ) } instead ` );return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),iV(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},uV={collection: ` map ` ,default:!0,nodeClass:lV,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return Uz(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>lV.from(e,t,n)},dV=class extends CB{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(zz,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=fV(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=fV(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&Gz(r)?r.value:r}has(e){let t=fV(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=fV(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];Gz(r)&&gB(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(fB(e,String(r++),t));return n}toString(e,t,n){return e?iV(this,e,{blockItemPrefix: ` - ` ,flowChars:{start: ` [ ` ,end: ` ] ` },itemIndent:(e.indent|| ` ` )+ ` ` ,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r== ` function ` ){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(bB(a,void 0,n))}}return i}};function fV(e){let t=Gz(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var pV={collection: ` seq ` ,default:!0,nodeClass:dV,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return Kz(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>dV.from(e,t,n)},mV={identify:e=>typeof e== ` string ` ,default:!0,tag: ` tag : yaml . org , 2002 : str ` ,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),VB(e,t,n,r)}},hV={identify:e=>e==null,createNode:()=>new _B(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new _B(null),stringify:({source:e},t)=>typeof e== ` string ` &&hV.test.test(e)?e:t.options.nullStr},gV={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new _B(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&gV.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function _V({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r== ` bigint ` )return String(r);let i=typeof r== ` number ` ?r:Number(r);if(!isFinite(i))return isNaN(i)? ` . nan ` :i<0? ` - . inf ` : ` . inf ` ;let a=Object.is(r,-0)? ` - 0 ` :JSON.stringify(r);if(!e&&t&&(!n||n=== ` tag : yaml . org , 2002 : float ` )&&/^-? \d /.test(a)&&!a.includes( ` e ` )){let e=a.indexOf( ` . ` );e<0&&(e=a.length,a+= ` . ` );let n=t-(a.length-e-1);for(;n-->0;)a+= ` 0 ` }return a}var vV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:_V},yV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?: \. [0-9]+|[0-9]+(?: \. [0-9]*)?)[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e),string
Line truncated
` : ` ` )}return VB({comment:e,type:t,value:s},r,i,a)}};function NV(e,t){if(Kz(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Wz(r)){if(Uz(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new rV(new _B(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore? ` $ { r . commentBefore } \ n$ { e . key . commentBefore } ` :r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment? ` $ { r . comment } \ n$ { t . comment } ` :r.comment}r=e}e.items[n]=Wz(r)?r:new rV(r)}}else t( ` Expected a sequence for this tag ` );return e}function PV(e,t,n){let{replacer:r}=n,i=new dV(e);i.tag= ` tag : yaml . org , 2002 : pairs ` ;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r== ` function ` &&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError( ` Expected [ key , value ] tuple : $ { e } ` )}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError( ` Expected tuple with one key , not $ { t . length } keys ` )}else o=e;i.items.push(nV(o,s,n))}return i}var FV={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:NV,createNode:PV},IV=class e extends dV{constructor(){super(),this.add=lV.prototype.add.bind(this),this.delete=lV.prototype.delete.bind(this),this.get=lV.prototype.get.bind(this),this.has=lV.prototype.has.bind(this),this.set=lV.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(Wz(e)?(r=fB(e.key, ` ` ,t),i=fB(e.value,r,t)):r=fB(e, ` ` ,t),n.has(r))throw Error( ` Ordered maps must not include duplicate keys ` );n.set(r,i)}return n}static from(e,t,n){let r=PV(e,t,n),i=new this;return i.items=r.items,i}};IV.tag= ` tag : yaml . org , 2002 : omap ` ;var LV={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:IV,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=NV(e,t),r=[];for(let{key:e}of n.items)Gz(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new IV,n)},createNode:(e,t,n)=>IV.from(e,t,n)};function RV({value:e,source:t},n){return t&&(e?zV:BV).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var zV={identify:e=>e===!0,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON) $ /,resolve:()=>new _B(!0),stringify:RV},BV={identify:e=>e===!1,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF) $ /,resolve:()=>new _B(!1),stringify:RV},VV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:_V},HV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?:[0-9][0-9_]*)?(?: \. [0-9_]*)?[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e.replace(/_/g, ` ` )),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():_V(e)}},UV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^[-+]?(?:[0-9][0-9_]*)? \. [0-9_]* $ /,resolve(e){let t=new _B(parseFloat(e.replace(/_/g, ` ` ))),n=e.indexOf( ` . ` );if(n!==-1){let r=e.substring(n+1).replace(/_/g, ` ` );r[r.length-1]=== ` 0 ` &&(t.minFractionDigits=r.length)}return t},stringify:_V},WV=e=>typeof e== ` bigint ` ||Number.isInteger(e);function GV(e,t,n,{intAsBigInt:r}){let i=e[0];if((i=== ` - ` ||i=== ` + ` )&&(t+=1),e=e.substring(t).replace(/_/g, ` ` ),r){switch(n){case 2:e= ` 0 b$ { e } ` ;break;case 8:e= ` 0 o$ { e } ` ;break;case 16:e= ` 0 x$ { e } ` }let t=BigInt(e);return i=== ` - ` ?BigInt(-1)*t:t}let a=parseInt(e,n);return i=== ` - ` ?-1*a:a}function KV(e,t,n){let{value:r}=e;if(WV(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return _V(e)}var qV={identify:WV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>GV(e,2,2,n),stringify:e=>KV(e,2, ` 0 b ` )},JV={identify:WV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>GV(e,1,8,n),stringify:e=>KV(e,8, ` 0 ` )},YV={identify:WV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>GV(e,0,10,n),stringify:_V},XV={identify:WV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>GV(e,2,16,n),stringify:e=>KV(e,16, ` 0 x ` )},ZV=class e extends lV{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Wz(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new rV(e.key,null):new rV(e,null),cV(this.items,t.key)||this.items.push(t)}get(e,t){let n=cV(this.items,e);return!t&&Wz(n)?Gz(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!= ` boolean ` )throw Error( ` Expected boolean value for set ( key , value ) in a YAML set , not $ { typeof t } ` );let n=cV(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new rV(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return s
Line truncated
` )?(n.push( ` ... ` ),n.push(T B(t, ` ` ))):n.push( ` ... $ { t } ` )}else n.push( ` ... ` )}else{let t=e.comment;t&&o&&(t=t.replace(/^ \n +/, ` ` )),t&&((!o||s)&&n[n.length-1]!== ` ` &&n.push( ` ` ),n.push(T B(a(t), ` ` )))}return n.join( `
` +k B(l(e),c),s&&s()):d&&o&&o(),p}function u V({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(Q z(i))i.spaceBefore&&d.push( ` ` ),d V(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(J z(i)){let e=Q z(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),d V(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=Q z(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=Y B(i,c,()=>a=null);l||=d.length>u||o.includes( `
` ),n<e.length-1?o+= ` , ` :t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+= ` , ` )),a&&(o+=A B(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t? ` \ n$ { a } $ { i } $ { t } ` : `
` ;return ` $ { e } \ n$ { i } $ { p } ` }return ` $ { f } $ { o } $ { d . join ( ` ` ) } $ { o } $ { p } ` }function dV({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=kB(t(r),e);n.push(i.trimStart())}}function fV(e,t){let n=Yz(t)?t.value:t;for(let r of e)if(Jz(r)&&(r.key===t||r.key===n||Yz(r.key)&&r.key.value===n))return r}var pV=class extends DB{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(Bz,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i== ` function ` )o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(oV(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t== ` object ` )for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries== ` function ` &&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=Jz(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new sV(e,e?.value):new sV(e.key,e.value);let r=fV(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );Yz(r.value)&&bB(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=fV(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=fV(this.items,e)?.value;return(!t&&Yz(n)?n.value:n)??void 0}has(e){return!!fV(this.items,e)}set(e,t){this.add(new sV(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)iV(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Jz(e))throw Error( ` Map items must all be pairs ; found $ { JSON . stringify ( e ) } instead ` );return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),cV(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},mV={collection: ` map ` ,default:!0,nodeClass:pV,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return qz(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>pV.from(e,t,n)},hV=class extends DB{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(Uz,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=gV(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=gV(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&Yz(r)?r.value:r}has(e){let t=gV(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=gV(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];Yz(r)&&bB(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(gB(e,String(r++),t));return n}toString(e,t,n){return e?cV(this,e,{blockItemPrefix: ` - ` ,flowChars:{start: ` [ ` ,end: ` ] ` },itemIndent:(e.indent|| ` ` )+ ` ` ,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r== ` function ` ){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(wB(a,void 0,n))}}return i}};function gV(e){let t=Yz(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var _V={collection: ` seq ` ,default:!0,nodeClass:hV,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return Xz(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>hV.from(e,t,n)},vV={identify:e=>typeof e== ` string ` ,default:!0,tag: ` tag : yaml . org , 2002 : str ` ,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),GB(e,t,n,r)}},yV={identify:e=>e==null,createNode:()=>new xB(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new xB(null),stringify:({source:e},t)=>typeof e== ` string ` &&yV.test.test(e)?e:t.options.nullStr},bV={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new xB(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&bV.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function xV({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r== ` bigint ` )return String(r);let i=typeof r== ` number ` ?r:Number(r);if(!isFinite(i))return isNaN(i)? ` . nan ` :i<0? ` - . inf ` : ` . inf ` ;let a=Object.is(r,-0)? ` - 0 ` :JSON.stringify(r);if(!e&&t&&(!n||n=== ` tag : yaml . org , 2002 : float ` )&&/^-? \d /.test(a)&&!a.includes( ` e ` )){let e=a.indexOf( ` . ` );e<0&&(e=a.length,a+= ` . ` );let n=t-(a.length-e-1);for(;n-->0;)a+= ` 0 ` }return a}var SV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:xV},CV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?: \. [0-9]+|[0-9]+(?: \. [0-9]*)?)[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e),string
Line truncated
` : ` ` )}return GB({comment:e,type:t,value:s},r,i,a)}};function LV(e,t){if(Xz(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Jz(r)){if(qz(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new sV(new xB(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore? ` $ { r . commentBefore } \ n$ { e . key . commentBefore } ` :r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment? ` $ { r . comment } \ n$ { t . comment } ` :r.comment}r=e}e.items[n]=Jz(r)?r:new sV(r)}}else t( ` Expected a sequence for this tag ` );return e}function RV(e,t,n){let{replacer:r}=n,i=new hV(e);i.tag= ` tag : yaml . org , 2002 : pairs ` ;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r== ` function ` &&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError( ` Expected [ key , value ] tuple : $ { e } ` )}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError( ` Expected tuple with one key , not $ { t . length } keys ` )}else o=e;i.items.push(oV(o,s,n))}return i}var zV={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:LV,createNode:RV},BV=class e extends hV{constructor(){super(),this.add=pV.prototype.add.bind(this),this.delete=pV.prototype.delete.bind(this),this.get=pV.prototype.get.bind(this),this.has=pV.prototype.has.bind(this),this.set=pV.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(Jz(e)?(r=gB(e.key, ` ` ,t),i=gB(e.value,r,t)):r=gB(e, ` ` ,t),n.has(r))throw Error( ` Ordered maps must not include duplicate keys ` );n.set(r,i)}return n}static from(e,t,n){let r=RV(e,t,n),i=new this;return i.items=r.items,i}};BV.tag= ` tag : yaml . org , 2002 : omap ` ;var VV={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:BV,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=LV(e,t),r=[];for(let{key:e}of n.items)Yz(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new BV,n)},createNode:(e,t,n)=>BV.from(e,t,n)};function HV({value:e,source:t},n){return t&&(e?UV:WV).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var UV={identify:e=>e===!0,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON) $ /,resolve:()=>new xB(!0),stringify:HV},WV={identify:e=>e===!1,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF) $ /,resolve:()=>new xB(!1),stringify:HV},GV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:xV},KV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?:[0-9][0-9_]*)?(?: \. [0-9_]*)?[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e.replace(/_/g, ` ` )),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():xV(e)}},qV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^[-+]?(?:[0-9][0-9_]*)? \. [0-9_]* $ /,resolve(e){let t=new xB(parseFloat(e.replace(/_/g, ` ` ))),n=e.indexOf( ` . ` );if(n!==-1){let r=e.substring(n+1).replace(/_/g, ` ` );r[r.length-1]=== ` 0 ` &&(t.minFractionDigits=r.length)}return t},stringify:xV},JV=e=>typeof e== ` bigint ` ||Number.isInteger(e);function YV(e,t,n,{intAsBigInt:r}){let i=e[0];if((i=== ` - ` ||i=== ` + ` )&&(t+=1),e=e.substring(t).replace(/_/g, ` ` ),r){switch(n){case 2:e= ` 0 b$ { e } ` ;break;case 8:e= ` 0 o$ { e } ` ;break;case 16:e= ` 0 x$ { e } ` }let t=BigInt(e);return i=== ` - ` ?BigInt(-1)*t:t}let a=parseInt(e,n);return i=== ` - ` ?-1*a:a}function XV(e,t,n){let{value:r}=e;if(JV(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return xV(e)}var ZV={identify:JV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>YV(e,2,2,n),stringify:e=>XV(e,2, ` 0 b ` )},QV={identify:JV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>YV(e,1,8,n),stringify:e=>XV(e,8, ` 0 ` )}, $ V={identify:JV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>YV(e,0,10,n),stringify:xV},eH={identify:JV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>YV(e,2,16,n),stringify:e=>XV(e,16, ` 0 x ` )},tH=class e extends pV{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Jz(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new sV(e.key,null):new sV(e,null),fV(this.items,t.key)||this.items.push(t)}get(e,t){let n=fV(this.items,e);return!t&&Jz(n)?Yz(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!= ` boolean ` )throw Error( ` Expected boolean value for set ( key , value ) in a YAML set , not $ { typeof t } ` );let n=fV(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new sV(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return s
Line truncated
` )?(n.push( ` ... ` ),n.push(k B(t, ` ` ))):n.push( ` ... $ { t } ` )}else n.push( ` ... ` )}else{let t=e.comment;t&&o&&(t=t.replace(/^ \n +/, ` ` )),t&&((!o||s)&&n[n.length-1]!== ` ` &&n.push( ` ` ),n.push(k B(a(t), ` ` )))}return n.join( `
` )+ `
` }var f H=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,B z,{value:F z});let r=null;typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel: ` warn ` ,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version: ` 1.2 ` },n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new o B({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[B z]:{value:F z}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=J z(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){p H(this.contents)&&this.contents.add(e)}addIn(e,t){p H(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=c B(this);e.anchor=!t||n.has(t)?l B(t|| ` a ` ,n):t}return new m B(e.anchor)}createNode(e,t,n){let r;if(typeof t== ` function ` )e=t.call({"":e}, ` ` ,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e== ` number ` ||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=u B(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=b B(e,l,p);return o&&q z(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new r V(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return p H(this.contents)?this.contents.delete(e):!1}deleteIn(e){return S B(e)?this.contents!=null&&(this.contents=null,!0):p H(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return q z(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return S B(e)?!t&&G z(this.contents)?this.contents.value:this.contents:q z(this.contents)?this.contents.getIn(e,t):void 0}has(e){return q z(this.contents)?this.contents.has(e):!1}hasIn(e){return S B(e)?this.contents!==void 0:q z(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=x B(this.schema,[e],t):p H(this.contents)&&this.contents.set(e,t)}setIn(e,t){S B(e)?this.contents=t:this.contents==null?this.contents=x B(this.schema,Array.from(e),t):p H(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e== ` number ` &&(e=String(e));let n;switch(e){case ` 1.1 ` :this.directives?this.directives.yaml.version= ` 1.1 ` :this.directives=new o B({version: ` 1.1 ` }),n={resolveKnownTags:!1,schema: ` yaml - 1.1 ` };break;case ` 1.2 ` :case ` next ` :this.directives?this.directives.yaml.version=e:this.directives=new o B({version:e}),n={resolveKnownTags:!0,schema: ` core ` };break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error( ` Expected '1.1' , '1.2' or null as first argument , but found : $ { t } ` )}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new u H(Object.assign(n,t));else throw Error( ` With a null YAML version , the { schema : Schema } option is required ` )}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r== ` number ` ?r:100},s=f B(this.contents,t?? ` ` ,o);if(typeof i== ` function ` )for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a== ` function ` ?d B(a,{"":s}, ` ` ,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error( ` Document with errors cannot be stringified ` );if( ` indent ` in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error( ` "indent" option must be a positive integer , not $ { t } ` )}return d H(this,e)}};function p H(e){if(q z(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var m H=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},h H=class extends m H{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},g H=class extends m H{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},_ H=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+= ` at line $ { r } , column $ { i } ` ;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[ \n \r ]+ $ /, ` ` );if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o= ` … ` +o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+ ` … ` ),r>1&&/^ * $ /.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+ ` …
` ),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s= ` ` .repeat(a)+ ` ^ ` .repeat(e);n.message+= ` : \ n \ n$ { o } \ n$ { s } \ n ` }};function v H(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d= ` ` ,f= ` ` ,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!== ` space ` &&i.type!== ` newline ` &&i.type!== ` comma ` &&a(i.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),!1),h&&=(l&&i.type!== ` comment ` &&i.type!== ` newline ` &&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),null),i.type){case ` space ` :!t&&(n!== ` doc - start ` ||r?.type!== ` flow - collection ` )&&i.source.includes( ` ` )&&(h=i),u=!0;break;case ` comment ` :{u||a(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let e=i.source.substring(1)|| ` ` ;d?d+=f+e:d=e,f= ` ` ,l=!1;break}case ` newline ` :l?d?d+=i.source:(!b||n!== ` seq - item - ind ` )&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case ` anchor ` :g&&a(i, ` MULTIPLE _ANCHORS ` , ` A node can have at most one anchor ` ),i.source.endsWith( ` : ` )&&a(i.offset+i.source.length-1, ` BAD _ALIAS ` , ` Anchor ending in : is ambiguous ` ,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case ` tag ` :_&&a(i, ` MULTIPLE _TAGS ` , ` A node can have at most one tag ` ),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i, ` BAD _PROP _ORDER ` , ` Anchors and tags must be after the $ { i . source } indicator ` ),b&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . source } in $ { t ? ? ` collection ` } ` ),b=i,l=n=== ` seq - item - ind ` ||n=== ` explicit - key - ind ` ,u=!1;break;case ` comma ` :if(t){y&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { t } ` ),y=i,l=!1,u=!1;break}default:a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . type } token ` ),l=!1,u=!1}let S=e[e.length-1],ee=S?S.offset+S.source.length:i;return m&&r&&r.type!== ` space ` &&r.type!== ` newline ` &&r.type!== ` comma ` &&(r.type!== ` scalar ` ||r.source!== ` ` )&&a(r.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),h&&(l&&h.indent<=o||r?.type=== ` block - map ` ||r?.type=== ` block - seq ` )&&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:ee,start:x??ee}}function y H(e){if(!e)return null;switch(e.type){case ` alias ` :case ` scalar ` :case ` double - quoted - scalar ` :case ` single - quoted - scalar ` :if(e.source.includes( `
` ))return!0;if(e.end){for(let t of e.end)if(t.type=== ` newline ` )return!0}return!1;case ` flow - collection ` :for(let t of e.items){for(let e of t.start)if(e.type=== ` newline ` )return!0;if(t.sep){for(let e of t.sep)if(e.type=== ` newline ` )return!0}if(y H(t.key)||y H(t.value))return!0}return!1;default:return!0}}function b H(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&y H(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function x H(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||G z(e)&&G z(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var S H= ` All mapping items must start at the same column ` ;function C H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??l V)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=v H(l,{indicator: ` explicit - key - ind ` ,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type=== ` block - seq ` ?i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` A block sequence may not be used as an implicit map key ` ): ` indent ` in u&&u.indent!==r.indent&&i(s, ` BAD _INDENT ` ,S H)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||y H(u))&&i(u??l[l.length-1], ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys need to be on a single line ` )}else p.found?.indent!==r.indent&&i(s, ` BAD _INDENT ` ,S H);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&b H(r.indent,u,i),n.atKey=!1,x H(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=v H(d??[],{indicator: ` map - value - ind ` ,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type=== ` block - scalar ` });if(s=_.end,_.found){m&&(f?.type=== ` block - map ` &&!_.hasNewline&&i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` Nested mappings are not allowed in compact mappings ` ),n.options.strict&&p.start<_.found.offset-1024&&i(g.range, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit block mapping key ` ));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&b H(r.indent,f,i),s=c.range[2];let l=new r V(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range, ` MISSING _CHAR ` , ` Implicit map keys need to be followed by map values ` ),_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let e=new r V(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c, ` IMPOSSIBLE ` , ` Map comment with trailing content ` ),o.range=[r.offset,s,c??s],o}function w H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??d V)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=v H(a,{indicator: ` seq - item - ind ` ,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type=== ` block - seq ` ?i(u.end, ` BAD _INDENT ` , ` All sequence items must start at the same column ` ):i(s, ` MISSING _CHAR ` , ` Sequence item without - indicator ` );else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&b H(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function T H(e,t,n,r){let i= ` ` ;if(e){let a=!1,o= ` ` ;for(let s of e){let{source:e,type:c}=s;switch(c){case ` space ` :a=!0;break;case ` comment ` :{n&&!a&&r(s, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let t=e.substring(1)|| ` ` ;i?i+=o+t:i=t,o= ` ` ;break}case ` newline ` :i&&(o+=e),a=!0;break;default:r(s, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { c } at node end ` )}t+=e.length}}return{comment:i,offset:t}}var E H= ` Block collections are not allowed within flow collections ` ,D H=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function O H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?l V:d V))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=v H(d,{flow:s,indicator: ` explicit - key - ind ` ,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` ):a<r.items.length-1&&i(h.start, ` UNEXPECTED _TOKEN ` , ` Unexpected empty item in $ { s } ` ),h.comment&&(c.comment?c.comment+= `
` +h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&y H(f)&&i(f, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` )}if(a===0)h.comma&&i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` );else if(h.comma||i(h.start, ` MISSING _CHAR ` , ` Missing , between $ { s } items ` ),h.comment){let e= ` ` ;loop:for(let t of d)switch(t.type){case ` comma ` :case ` space ` :break;case ` comment ` :e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];W z(t)&&(t=t.value??t.key),t.comment?t.comment+= `
` +e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],D H(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,E H)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);D H(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,E H),n.atKey=!1;let _=v H(p??[],{flow:s,indicator: ` map - value - ind ` ,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type=== ` newline ` ){i(e, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` );break}}h.start<_.found.offset-1024&&i(_.found, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit flow sequence key ` )}}else m&&( ` source ` in m&&m.source?.[0]=== ` : ` ?i(m, ` MISSING _CHAR ` , ` Missing space after : in $ { s } ` ):i(_.start, ` MISSING _CHAR ` , ` Missing , or : between $ { s } items ` ));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?D H(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,E H):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new r V(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;x H(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new l V(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o? ` } ` : ` ] ` ,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l? ` $ { e } must end with a $ { d } ` : ` $ { e } in block collection must be sufficiently indented and end with a $ { d } ` ;i(u,l? ` MISSING _CHAR ` : ` BAD _INDENT ` ,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=T H(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+= `
` +e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function k H(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?C H(e,t,n,r,a):n.type=== ` block - seq ` ?w H(e,t,n,r,a):O H(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function A H(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e)):null;if(n.type=== ` block - seq ` ){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n, ` MISSING _CHAR ` , ` Missing newline after block sequence props ` )}let s=n.type=== ` block - map ` ? ` map ` :n.type=== ` block - seq ` ? ` seq ` :n.start.source=== ` { ` ? ` map ` : ` seq ` ;if(!a||!o||o=== ` ! ` ||o===l V.tagName&&s=== ` map ` ||o===d V.tagName&&s=== ` seq ` )return k H(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a, ` BAD _COLLECTION _TYPE ` , ` $ { r . tag } used for $ { s } collection , but expects $ { r . collection ? ? ` scalar ` } ` ,!0):i(a, ` TAG _RESOLVE _FAILED ` , ` Unresolved tag : $ { o } ` ,!0),k H(e,t,n,i,o)}let l=k H(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=J z(u)?u:new _ B(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function j H(e,t,n){let r=t.offset,i=M H(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?_ B.BLOCK_FOLDED:_ B.BLOCK_LITERAL,o=t.source?N H(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t=== ` ` ||t=== ` \ r ` )s=e;else break}if(s===0){let e=i.chomp=== ` + ` &&o.length>0? `
` }var g H=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,W z,{value:z z});let r=null;typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel: ` warn ` ,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version: ` 1.2 ` },n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new u B({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[W z]:{value:z z}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Q z(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){_ H(this.contents)&&this.contents.add(e)}addIn(e,t){_ H(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=f B(this);e.anchor=!t||n.has(t)?p B(t|| ` a ` ,n):t}return new v B(e.anchor)}createNode(e,t,n){let r;if(typeof t== ` function ` )e=t.call({"":e}, ` ` ,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e== ` number ` ||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=m B(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=w B(e,l,p);return o&&Z z(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new s V(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return _ H(this.contents)?this.contents.delete(e):!1}deleteIn(e){return E B(e)?this.contents!=null&&(this.contents=null,!0):_ H(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Z z(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return E B(e)?!t&&Y z(this.contents)?this.contents.value:this.contents:Z z(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Z z(this.contents)?this.contents.has(e):!1}hasIn(e){return E B(e)?this.contents!==void 0:Z z(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=T B(this.schema,[e],t):_ H(this.contents)&&this.contents.set(e,t)}setIn(e,t){E B(e)?this.contents=t:this.contents==null?this.contents=T B(this.schema,Array.from(e),t):_ H(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e== ` number ` &&(e=String(e));let n;switch(e){case ` 1.1 ` :this.directives?this.directives.yaml.version= ` 1.1 ` :this.directives=new u B({version: ` 1.1 ` }),n={resolveKnownTags:!1,schema: ` yaml - 1.1 ` };break;case ` 1.2 ` :case ` next ` :this.directives?this.directives.yaml.version=e:this.directives=new u B({version:e}),n={resolveKnownTags:!0,schema: ` core ` };break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error( ` Expected '1.1' , '1.2' or null as first argument , but found : $ { t } ` )}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new m H(Object.assign(n,t));else throw Error( ` With a null YAML version , the { schema : Schema } option is required ` )}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r== ` number ` ?r:100},s=g B(this.contents,t?? ` ` ,o);if(typeof i== ` function ` )for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a== ` function ` ?h B(a,{"":s}, ` ` ,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error( ` Document with errors cannot be stringified ` );if( ` indent ` in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error( ` "indent" option must be a positive integer , not $ { t } ` )}return h H(this,e)}};function _ H(e){if(Z z(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var v H=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},y H=class extends v H{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},b H=class extends v H{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},x H=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+= ` at line $ { r } , column $ { i } ` ;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[ \n \r ]+ $ /, ` ` );if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o= ` … ` +o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+ ` … ` ),r>1&&/^ * $ /.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+ ` …
` ),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s= ` ` .repeat(a)+ ` ^ ` .repeat(e);n.message+= ` : \ n \ n$ { o } \ n$ { s } \ n ` }};function S H(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d= ` ` ,f= ` ` ,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!== ` space ` &&i.type!== ` newline ` &&i.type!== ` comma ` &&a(i.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),!1),h&&=(l&&i.type!== ` comment ` &&i.type!== ` newline ` &&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),null),i.type){case ` space ` :!t&&(n!== ` doc - start ` ||r?.type!== ` flow - collection ` )&&i.source.includes( ` ` )&&(h=i),u=!0;break;case ` comment ` :{u||a(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let e=i.source.substring(1)|| ` ` ;d?d+=f+e:d=e,f= ` ` ,l=!1;break}case ` newline ` :l?d?d+=i.source:(!b||n!== ` seq - item - ind ` )&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case ` anchor ` :g&&a(i, ` MULTIPLE _ANCHORS ` , ` A node can have at most one anchor ` ),i.source.endsWith( ` : ` )&&a(i.offset+i.source.length-1, ` BAD _ALIAS ` , ` Anchor ending in : is ambiguous ` ,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case ` tag ` :_&&a(i, ` MULTIPLE _TAGS ` , ` A node can have at most one tag ` ),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i, ` BAD _PROP _ORDER ` , ` Anchors and tags must be after the $ { i . source } indicator ` ),b&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . source } in $ { t ? ? ` collection ` } ` ),b=i,l=n=== ` seq - item - ind ` ||n=== ` explicit - key - ind ` ,u=!1;break;case ` comma ` :if(t){y&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { t } ` ),y=i,l=!1,u=!1;break}default:a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . type } token ` ),l=!1,u=!1}let S=e[e.length-1],ee=S?S.offset+S.source.length:i;return m&&r&&r.type!== ` space ` &&r.type!== ` newline ` &&r.type!== ` comma ` &&(r.type!== ` scalar ` ||r.source!== ` ` )&&a(r.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),h&&(l&&h.indent<=o||r?.type=== ` block - map ` ||r?.type=== ` block - seq ` )&&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:ee,start:x??ee}}function C H(e){if(!e)return null;switch(e.type){case ` alias ` :case ` scalar ` :case ` double - quoted - scalar ` :case ` single - quoted - scalar ` :if(e.source.includes( `
` ))return!0;if(e.end){for(let t of e.end)if(t.type=== ` newline ` )return!0}return!1;case ` flow - collection ` :for(let t of e.items){for(let e of t.start)if(e.type=== ` newline ` )return!0;if(t.sep){for(let e of t.sep)if(e.type=== ` newline ` )return!0}if(C H(t.key)||C H(t.value))return!0}return!1;default:return!0}}function w H(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&C H(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function T H(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||Y z(e)&&Y z(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var E H= ` All mapping items must start at the same column ` ;function D H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??p V)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=S H(l,{indicator: ` explicit - key - ind ` ,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type=== ` block - seq ` ?i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` A block sequence may not be used as an implicit map key ` ): ` indent ` in u&&u.indent!==r.indent&&i(s, ` BAD _INDENT ` ,E H)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||C H(u))&&i(u??l[l.length-1], ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys need to be on a single line ` )}else p.found?.indent!==r.indent&&i(s, ` BAD _INDENT ` ,E H);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&w H(r.indent,u,i),n.atKey=!1,T H(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=S H(d??[],{indicator: ` map - value - ind ` ,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type=== ` block - scalar ` });if(s=_.end,_.found){m&&(f?.type=== ` block - map ` &&!_.hasNewline&&i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` Nested mappings are not allowed in compact mappings ` ),n.options.strict&&p.start<_.found.offset-1024&&i(g.range, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit block mapping key ` ));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&w H(r.indent,f,i),s=c.range[2];let l=new s V(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range, ` MISSING _CHAR ` , ` Implicit map keys need to be followed by map values ` ),_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let e=new s V(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c, ` IMPOSSIBLE ` , ` Map comment with trailing content ` ),o.range=[r.offset,s,c??s],o}function O H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??h V)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=S H(a,{indicator: ` seq - item - ind ` ,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type=== ` block - seq ` ?i(u.end, ` BAD _INDENT ` , ` All sequence items must start at the same column ` ):i(s, ` MISSING _CHAR ` , ` Sequence item without - indicator ` );else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&w H(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function k H(e,t,n,r){let i= ` ` ;if(e){let a=!1,o= ` ` ;for(let s of e){let{source:e,type:c}=s;switch(c){case ` space ` :a=!0;break;case ` comment ` :{n&&!a&&r(s, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let t=e.substring(1)|| ` ` ;i?i+=o+t:i=t,o= ` ` ;break}case ` newline ` :i&&(o+=e),a=!0;break;default:r(s, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { c } at node end ` )}t+=e.length}}return{comment:i,offset:t}}var A H= ` Block collections are not allowed within flow collections ` ,j H=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function M H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?p V:h V))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=S H(d,{flow:s,indicator: ` explicit - key - ind ` ,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` ):a<r.items.length-1&&i(h.start, ` UNEXPECTED _TOKEN ` , ` Unexpected empty item in $ { s } ` ),h.comment&&(c.comment?c.comment+= `
` +h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&C H(f)&&i(f, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` )}if(a===0)h.comma&&i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` );else if(h.comma||i(h.start, ` MISSING _CHAR ` , ` Missing , between $ { s } items ` ),h.comment){let e= ` ` ;loop:for(let t of d)switch(t.type){case ` comma ` :case ` space ` :break;case ` comment ` :e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];J z(t)&&(t=t.value??t.key),t.comment?t.comment+= `
` +e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],j H(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,A H)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);j H(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,A H),n.atKey=!1;let _=S H(p??[],{flow:s,indicator: ` map - value - ind ` ,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type=== ` newline ` ){i(e, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` );break}}h.start<_.found.offset-1024&&i(_.found, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit flow sequence key ` )}}else m&&( ` source ` in m&&m.source?.[0]=== ` : ` ?i(m, ` MISSING _CHAR ` , ` Missing space after : in $ { s } ` ):i(_.start, ` MISSING _CHAR ` , ` Missing , or : between $ { s } items ` ));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?j H(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,A H):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new s V(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;T H(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new p V(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o? ` } ` : ` ] ` ,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l? ` $ { e } must end with a $ { d } ` : ` $ { e } in block collection must be sufficiently indented and end with a $ { d } ` ;i(u,l? ` MISSING _CHAR ` : ` BAD _INDENT ` ,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=k H(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+= `
` +e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function N H(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?D H(e,t,n,r,a):n.type=== ` block - seq ` ?O H(e,t,n,r,a):M H(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function P H(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e)):null;if(n.type=== ` block - seq ` ){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n, ` MISSING _CHAR ` , ` Missing newline after block sequence props ` )}let s=n.type=== ` block - map ` ? ` map ` :n.type=== ` block - seq ` ? ` seq ` :n.start.source=== ` { ` ? ` map ` : ` seq ` ;if(!a||!o||o=== ` ! ` ||o===p V.tagName&&s=== ` map ` ||o===h V.tagName&&s=== ` seq ` )return N H(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a, ` BAD _COLLECTION _TYPE ` , ` $ { r . tag } used for $ { s } collection , but expects $ { r . collection ? ? ` scalar ` } ` ,!0):i(a, ` TAG _RESOLVE _FAILED ` , ` Unresolved tag : $ { o } ` ,!0),N H(e,t,n,i,o)}let l=N H(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=Q z(u)?u:new x B(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function F H(e,t,n){let r=t.offset,i=I H(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?x B.BLOCK_FOLDED:x B.BLOCK_LITERAL,o=t.source?L H(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t=== ` ` ||t=== ` \ r ` )s=e;else break}if(s===0){let e=i.chomp=== ` + ` &&o.length>0? `
` .repeat(Math.max(1,o.length-1)): ` ` ,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a=== ` ` ||a=== ` \ r ` )i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length, ` MISSING _CHAR ` , ` Block scalars with more - indented leading empty lines must use an explicit indentation indicator ` ),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l, ` BAD _INDENT ` , ` Block scalar values in collections must be indented ` );break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d= ` ` ,f= ` ` ,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+ `
` ;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]=== ` \ r ` ;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e= ` Block scalar lines must not be less indented than their $ { i . indent ? ` explicit indentation indicator ` : ` first line ` } ` ;n(l-r.length-(s?2:1), ` BAD _INDENT ` ,e),t= ` ` }a===_ B.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f= `
` ;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]=== ` \ r ` ;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e= ` Block scalar lines must not be less indented than their $ { i . indent ? ` explicit indentation indicator ` : ` first line ` } ` ;n(l-r.length-(s?2:1), ` BAD _INDENT ` ,e),t= ` ` }a===x B.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f= `
` ):t.length>c||r[0]=== ` ` ?(f=== ` ` ?f= `
` :!p&&f=== `
` &&(f= `
@@ -77,59 +77,59 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
` +o[e][0].slice(c);d[d.length-1]!== `
` &&(d+= `
` );break;default:d+= `
` }let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function M H({offset:e,props:t},n,r){if(t[0].type!== ` block - scalar - header ` )return r(t[0], ` IMPOSSIBLE ` , ` Block scalar header not found ` ),null;let{source:i}=t[0],a=i[0],o=0,s= ` ` ,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n=== ` - ` ||n=== ` + ` ))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c, ` UNEXPECTED _TOKEN ` , ` Block scalar header includes extra characters : $ { i } ` );let l=!1,u= ` ` ,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case ` space ` :l=!0;case ` newline ` :d+=i.source.length;break;case ` comment ` :n&&!l&&r(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` ),d+=i.source.length,u=i.source.substring(1);break;case ` error ` :r(i, ` UNEXPECTED _TOKEN ` ,i.message),d+=i.source.length;break;default:{r(i, ` UNEXPECTED _TOKEN ` , ` Unexpected token in block scalar header : $ { i . type } ` );let e=i.source;e&&typeof e== ` string ` &&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function N H(e){let t=e.split(/ \n ( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[ ` ` ,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function P H(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case ` scalar ` :s=_ B.PLAIN,c=F H(a,l);break;case ` single - quoted - scalar ` :s=_ B.QUOTE_SINGLE,c=I H(a,l);break;case ` double - quoted - scalar ` :s=_ B.QUOTE_DOUBLE,c=R H(a,l);break;default:return n(e, ` UNEXPECTED _TOKEN ` , ` Expected a flow scalar value , but found : $ { i } ` ),{value: ` ` ,type:null,comment: ` ` ,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=T H(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function F H(e,t){let n= ` ` ;switch(e[0]){case ` ` :n= ` a tab character ` ;break;case ` , ` :n= ` flow indicator character , ` ;break;case ` % ` :n= ` directive indicator character % ` ;break;case ` | ` :case ` > ` :n= ` block scalar indicator $ { e [ 0 ] } ` ;break;case ` @ ` :case" ` " : n = ` reserved character ${ e [ 0 ] } ` } return n && t ( 0 , ` BAD_SCALAR_START ` , ` Plain value cannot start with ${ n } ` ) , LH ( e ) } function IH ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , LH ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function LH ( e ) { let t = / ( . * ? ) \ r ? \ n / s y , n = t . e x e c ( e ) ; i f ( ! n ) r e t u r n e ; l e t r , i ; t r y { r = R e g E x p ( ` ( ? < ! [ ] ) [ ] + $ ` ) , i = R e g E x p ( ` ^ [ ] + | ( ? < ! [ ] ) [ ] + $ ` , ` g ` ) } c a t c h { r = / [ \ t ] + $ / , i = / ^ [ \ t ] + | [ \ t ] + $ / g } l e t a = n [ 1 ] . r e p l a c e ( r , ` ` ) , o = ` ` , s = t . l a s t I n d e x ; f o r ( ; n = t . e x e c ( e ) ; ) { l e t e = n [ 1 ] . r e p l a c e ( i , ` ` ) ; e = = = ` ` ? o = = = `
` }let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function I H({offset:e,props:t},n,r){if(t[0].type!== ` block - scalar - header ` )return r(t[0], ` IMPOSSIBLE ` , ` Block scalar header not found ` ),null;let{source:i}=t[0],a=i[0],o=0,s= ` ` ,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n=== ` - ` ||n=== ` + ` ))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c, ` UNEXPECTED _TOKEN ` , ` Block scalar header includes extra characters : $ { i } ` );let l=!1,u= ` ` ,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case ` space ` :l=!0;case ` newline ` :d+=i.source.length;break;case ` comment ` :n&&!l&&r(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` ),d+=i.source.length,u=i.source.substring(1);break;case ` error ` :r(i, ` UNEXPECTED _TOKEN ` ,i.message),d+=i.source.length;break;default:{r(i, ` UNEXPECTED _TOKEN ` , ` Unexpected token in block scalar header : $ { i . type } ` );let e=i.source;e&&typeof e== ` string ` &&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function L H(e){let t=e.split(/ \n ( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[ ` ` ,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function R H(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case ` scalar ` :s=x B.PLAIN,c=z H(a,l);break;case ` single - quoted - scalar ` :s=x B.QUOTE_SINGLE,c=B H(a,l);break;case ` double - quoted - scalar ` :s=x B.QUOTE_DOUBLE,c=H H(a,l);break;default:return n(e, ` UNEXPECTED _TOKEN ` , ` Expected a flow scalar value , but found : $ { i } ` ),{value: ` ` ,type:null,comment: ` ` ,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=k H(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function z H(e,t){let n= ` ` ;switch(e[0]){case ` ` :n= ` a tab character ` ;break;case ` , ` :n= ` flow indicator character , ` ;break;case ` % ` :n= ` directive indicator character % ` ;break;case ` | ` :case ` > ` :n= ` block scalar indicator $ { e [ 0 ] } ` ;break;case ` @ ` :case" ` " : n = ` reserved character ${ e [ 0 ] } ` } return n && t ( 0 , ` BAD_SCALAR_START ` , ` Plain value cannot start with ${ n } ` ) , VH ( e ) } function BH ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , VH ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function VH ( e ) { let t = / ( . * ? ) \ r ? \ n / s y , n = t . e x e c ( e ) ; i f ( ! n ) r e t u r n e ; l e t r , i ; t r y { r = R e g E x p ( ` ( ? < ! [ ] ) [ ] + $ ` ) , i = R e g E x p ( ` ^ [ ] + | ( ? < ! [ ] ) [ ] + $ ` , ` g ` ) } c a t c h { r = / [ \ t ] + $ / , i = / ^ [ \ t ] + | [ \ t ] + $ / g } l e t a = n [ 1 ] . r e p l a c e ( r , ` ` ) , o = ` ` , s = t . l a s t I n d e x ; f o r ( ; n = t . e x e c ( e ) ; ) { l e t e = n [ 1 ] . r e p l a c e ( i , ` ` ) ; e = = = ` ` ? o = = = `
` ?a+=o:o= `
` :(a+=o+e,o= ` ` ),s=t.lastIndex}let c=/[ \t ]*(.*)/sy;return c.lastIndex=s,n=c.exec(e),a+o+(n?.[1]?? ` ` )}function R H(e,t){let n= ` ` ;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!== ` \ r ` ||e[r+1]!== `
` :(a+=o+e,o= ` ` ),s=t.lastIndex}let c=/[ \t ]*(.*)/sy;return c.lastIndex=s,n=c.exec(e),a+o+(n?.[1]?? ` ` )}function H H(e,t){let n= ` ` ;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!== ` \ r ` ||e[r+1]!== `
` ){if(i=== `
` ){let{fold:t,offset:i}=z H(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=B H[i];if(a)n+=a;else if(i=== `
` ){let{fold:t,offset:i}=U H(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=W H[i];if(a)n+=a;else if(i=== `
` )for(i=e[r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` \ r ` &&e[r+1]=== `
` )for(i=e[++r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` x ` ||i=== ` u ` ||i=== ` U ` ){let a=i=== ` x ` ?2:i=== ` u ` ?4:8;n+=V H(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1, ` BAD _DQ _ESCAPE ` , ` Invalid escape sequence $ { i } ` ),n+=i}}else if(i=== ` ` ||i=== ` ` ){let t=r,a=e[r+1];for(;a=== ` ` ||a=== ` ` ;)a=e[++r+1];a!== `
` )for(i=e[++r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` x ` ||i=== ` u ` ||i=== ` U ` ){let a=i=== ` x ` ?2:i=== ` u ` ?4:8;n+=G H(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1, ` BAD _DQ _ESCAPE ` , ` Invalid escape sequence $ { i } ` ),n+=i}}else if(i=== ` ` ||i=== ` ` ){let t=r,a=e[r+1];for(;a=== ` ` ||a=== ` ` ;)a=e[++r+1];a!== `
` &&(a!== ` \ r ` ||e[r+2]!== `
` )&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!== ` "`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing " quote ` ),n}function z H(e,t){let n= ` ` ,r=e[t+1];for(;(r=== ` ` ||r=== ` ` ||r=== `
` )&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!== ` "`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing " quote ` ),n}function U H(e,t){let n= ` ` ,r=e[t+1];for(;(r=== ` ` ||r=== ` ` ||r=== `
` ||r=== ` \ r ` )&&(r!== ` \ r ` ||e[t+2]=== `
` );)r=== `
` &&(n+= `
` ),t+=1,r=e[t+1];return n||= ` ` ,{fold:n,offset:t}}var B H={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function VH ( e , t , n , r ) { let i = e . substr ( t , n ) , a = i . length === n && /^[0-9a-fA-F]+$/ . test ( i ) ? parseInt ( i , 16 ) : NaN ; try { return String . fromCodePoint ( a ) } catch { let i = e . substr ( t - 2 , n + 2 ) ; return r ( t - 2 , ` BAD_DQ_ESCAPE ` , ` Invalid escape sequence ${ i } ` ) , i } } function HH ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? jH ( e , t , r ) : PH ( t , e . options . strict , r ) , c = n ? e . directives . tagName ( n . source , e => r ( n , ` TAG_RESOLVE_FAILED ` , e ) ) : null , l ; l = e . options . stringKeys && e . atKey ? e . schema [ Rz ] : c ? UH ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? WH ( e , i , t , r ) : e . schema [ Rz ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = Gz ( a ) ? a : new _B ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new _B ( i ) } return u . range = s , u . source = i , a && ( u . type = a ) , c && ( u . tag = c ) , l . format && ( u . format = l . format ) , o && ( u . comment = o ) , u } function UH ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ Rz ] ; let a = [ ] ; for ( let t of e . tags ) if ( ! t . collection && t . tag === n ) { if ( t . default && t . test ) a . push ( t ) ; else return t } for ( let e of a ) if ( e . test ? . test ( t ) ) return e ; let o = e . knownTags [ n ] ; return o && ! o . collection ? ( e . tags . push ( Object . assign ( { } , o , { default : ! 1 , test : void 0 } ) ) , o ) : ( i ( r , ` TAG_RESOLVE_FAILED ` , ` Unresolved tag: ${ n } ` , n !== ` tag:yaml.org,2002:str ` ) , e [ Rz ] ) } function WH ( { atKey : e , directives : t , schema : n } , r , i , a ) { let o = n . tags . find ( t => ( t . default === ! 0 || e && t . default === ` key ` ) && t . test ? . test ( r ) ) || n [ Rz ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ Rz ] ; o . tag !== e . tag && a ( i , ` TAG_RESOLVE_FAILED ` , ` Value may be parsed as either ${ t . tagString ( o . tag ) } or ${ t . tagString ( e . tag ) } ` , ! 0 ) } return o } function GH ( e , t , n ) { if ( t ) { n ? ? = t . length ; for ( let r = n - 1 ; r >= 0 ; -- r ) { let n = t [ r ] ; switch ( n . type ) { case ` space ` : case ` comment ` : case ` newline ` : e -= n . source . length ; continue } for ( n = t [ ++ r ] ; n ? . type === ` space ` ; ) e += n . source . length , n = t [ ++ r ] ; break } } return e } var KH = { composeNode : qH , composeEmptyNode : JH } ; function qH ( e , t , n , r ) { let i = e . atKey , { spaceBefore : a , comment : o , anchor : s , tag : c } = n , l , u = ! 0 ; switch ( t . type ) { case ` alias ` : l = YH ( e , t , r ) , ( s || c ) && r ( t , ` ALIAS_PROPS ` , ` An alias node must not specify any properties ` ) ; break ; case ` scalar ` : case ` single-quoted-scalar ` : case ` double-quoted-scalar ` : case ` block-scalar ` : l = HH ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = AH ( KH , e , t , n , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) } catch ( e ) { r ( t , ` RESOURCE_EXHAUSTION ` , e instanceof Error ? e . message : String ( e ) ) } break ; default : r ( t , ` UNEXPECTED_TOKEN ` , t . type === ` error ` ? t . message : ` Unsupported token (type: ${ t . type } ) ` ) , u = ! 1 } return l ? ? = JH ( e , t . offset , void 0 , null , n , r ) , s && l . anchor === ` ` && r ( s , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) , i && e . options . stringKeys && ( ! Gz ( l ) || typeof l . value != ` string ` || l . tag && l . tag !== ` tag:yaml.org,2002:str ` ) && r ( c ? ? t , ` NON_STRING_KEY ` , ` With stringKeys, all keys must be strings ` ) , a && ( l . spaceBefore = ! 0 ) , o && ( t . type === ` scalar ` && t . source === ` ` ? l . comment = o : l . commentBefore = o ) , e . options . keepSourceTokens && u && ( l . srcToken = t ) , l } function JH ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = HH ( e , { type : ` scalar ` , offset : GH ( t , n , r ) , indent : - 1 , source : ` ` } , s , l ) ; return o && ( u . anchor = o . source . substring ( 1 ) , u . anchor === ` ` && l ( o , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) ) , i && ( u . spaceBefore = ! 0 ) , a && ( u . comment = a , u . range [ 2 ] = c ) , u } function YH ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new mB ( n . substring ( 1 ) ) ; a . source === ` ` && i ( t , ` BAD_ALIAS ` , ` Alias cannot be an empty string ` ) , a . source . endsWith ( ` : ` ) && i ( t + n . length - 1 , ` BAD_ALIAS ` , ` Alias ending in : is ambiguous ` , ! 0 ) ; let o = t + n . length , s = TH ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function XH ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new fH ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = vH ( r , { indicator : ` doc-start ` , next : i ? ? a ? . [ 0 ] , offset : n , onError : o , parentIndent : 0 , startOnNewline : ! 0 } ) ; l . found && ( s . directives . docStart = ! 0 , i && ( i . type === ` block-map ` || i . type === ` block-seq ` ) && ! l . hasNewline && o ( l . end , ` MISSING_CHAR ` , ` Block collection cannot start on same line with directives-end marker ` ) ) , s . contents = i ? qH ( c , i , l , o ) : JH ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = TH ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function ZH ( e ) { if ( typeof e == ` number ` ) return [ e , e + 1 ] ; if ( Array . isArray ( e ) ) return e . length === 2 ? e : [ e [ 0 ] , e [ 1 ] ] ; let { offset : t , source : n } = e ; return [ t , t + ( typeof n == ` string ` ? n . length : 1 ) ] } function QH ( e ) { let t = ` ` , n = ! 1 , r = ! 1 ; for ( let i = 0 ; i < e . length ; ++ i ) { let a = e [ i ] ; switch ( a [ 0 ] ) { case ` # ` : t += ( t === ` ` ? ` ` : r ? `
` ),t+=1,r=e[t+1];return n||= ` ` ,{fold:n,offset:t}}var W H={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function GH ( e , t , n , r ) { let i = e . substr ( t , n ) , a = i . length === n && /^[0-9a-fA-F]+$/ . test ( i ) ? parseInt ( i , 16 ) : NaN ; try { return String . fromCodePoint ( a ) } catch { let i = e . substr ( t - 2 , n + 2 ) ; return r ( t - 2 , ` BAD_DQ_ESCAPE ` , ` Invalid escape sequence ${ i } ` ) , i } } function KH ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? FH ( e , t , r ) : RH ( t , e . options . strict , r ) , c = n ? e . directives . tagName ( n . source , e => r ( n , ` TAG_RESOLVE_FAILED ` , e ) ) : null , l ; l = e . options . stringKeys && e . atKey ? e . schema [ Hz ] : c ? qH ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? JH ( e , i , t , r ) : e . schema [ Hz ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = Yz ( a ) ? a : new xB ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new xB ( i ) } return u . range = s , u . source = i , a && ( u . type = a ) , c && ( u . tag = c ) , l . format && ( u . format = l . format ) , o && ( u . comment = o ) , u } function qH ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ Hz ] ; let a = [ ] ; for ( let t of e . tags ) if ( ! t . collection && t . tag === n ) { if ( t . default && t . test ) a . push ( t ) ; else return t } for ( let e of a ) if ( e . test ? . test ( t ) ) return e ; let o = e . knownTags [ n ] ; return o && ! o . collection ? ( e . tags . push ( Object . assign ( { } , o , { default : ! 1 , test : void 0 } ) ) , o ) : ( i ( r , ` TAG_RESOLVE_FAILED ` , ` Unresolved tag: ${ n } ` , n !== ` tag:yaml.org,2002:str ` ) , e [ Hz ] ) } function JH ( { atKey : e , directives : t , schema : n } , r , i , a ) { let o = n . tags . find ( t => ( t . default === ! 0 || e && t . default === ` key ` ) && t . test ? . test ( r ) ) || n [ Hz ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ Hz ] ; o . tag !== e . tag && a ( i , ` TAG_RESOLVE_FAILED ` , ` Value may be parsed as either ${ t . tagString ( o . tag ) } or ${ t . tagString ( e . tag ) } ` , ! 0 ) } return o } function YH ( e , t , n ) { if ( t ) { n ? ? = t . length ; for ( let r = n - 1 ; r >= 0 ; -- r ) { let n = t [ r ] ; switch ( n . type ) { case ` space ` : case ` comment ` : case ` newline ` : e -= n . source . length ; continue } for ( n = t [ ++ r ] ; n ? . type === ` space ` ; ) e += n . source . length , n = t [ ++ r ] ; break } } return e } var XH = { composeNode : ZH , composeEmptyNode : QH } ; function ZH ( e , t , n , r ) { let i = e . atKey , { spaceBefore : a , comment : o , anchor : s , tag : c } = n , l , u = ! 0 ; switch ( t . type ) { case ` alias ` : l = $H ( e , t , r ) , ( s || c ) && r ( t , ` ALIAS_PROPS ` , ` An alias node must not specify any properties ` ) ; break ; case ` scalar ` : case ` single-quoted-scalar ` : case ` double-quoted-scalar ` : case ` block-scalar ` : l = KH ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = PH ( XH , e , t , n , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) } catch ( e ) { r ( t , ` RESOURCE_EXHAUSTION ` , e instanceof Error ? e . message : String ( e ) ) } break ; default : r ( t , ` UNEXPECTED_TOKEN ` , t . type === ` error ` ? t . message : ` Unsupported token (type: ${ t . type } ) ` ) , u = ! 1 } return l ? ? = QH ( e , t . offset , void 0 , null , n , r ) , s && l . anchor === ` ` && r ( s , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) , i && e . options . stringKeys && ( ! Yz ( l ) || typeof l . value != ` string ` || l . tag && l . tag !== ` tag:yaml.org,2002:str ` ) && r ( c ? ? t , ` NON_STRING_KEY ` , ` With stringKeys, all keys must be strings ` ) , a && ( l . spaceBefore = ! 0 ) , o && ( t . type === ` scalar ` && t . source === ` ` ? l . comment = o : l . commentBefore = o ) , e . options . keepSourceTokens && u && ( l . srcToken = t ) , l } function QH ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = KH ( e , { type : ` scalar ` , offset : YH ( t , n , r ) , indent : - 1 , source : ` ` } , s , l ) ; return o && ( u . anchor = o . source . substring ( 1 ) , u . anchor === ` ` && l ( o , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) ) , i && ( u . spaceBefore = ! 0 ) , a && ( u . comment = a , u . range [ 2 ] = c ) , u } function $H ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new vB ( n . substring ( 1 ) ) ; a . source === ` ` && i ( t , ` BAD_ALIAS ` , ` Alias cannot be an empty string ` ) , a . source . endsWith ( ` : ` ) && i ( t + n . length - 1 , ` BAD_ALIAS ` , ` Alias ending in : is ambiguous ` , ! 0 ) ; let o = t + n . length , s = kH ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function eU ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new gH ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = SH ( r , { indicator : ` doc-start ` , next : i ? ? a ? . [ 0 ] , offset : n , onError : o , parentIndent : 0 , startOnNewline : ! 0 } ) ; l . found && ( s . directives . docStart = ! 0 , i && ( i . type === ` block-map ` || i . type === ` block-seq ` ) && ! l . hasNewline && o ( l . end , ` MISSING_CHAR ` , ` Block collection cannot start on same line with directives-end marker ` ) ) , s . contents = i ? ZH ( c , i , l , o ) : QH ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = kH ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function tU ( e ) { if ( typeof e == ` number ` ) return [ e , e + 1 ] ; if ( Array . isArray ( e ) ) return e . length === 2 ? e : [ e [ 0 ] , e [ 1 ] ] ; let { offset : t , source : n } = e ; return [ t , t + ( typeof n == ` string ` ? n . length : 1 ) ] } function nU ( e ) { let t = ` ` , n = ! 1 , r = ! 1 ; for ( let i = 0 ; i < e . length ; ++ i ) { let a = e [ i ] ; switch ( a [ 0 ] ) { case ` # ` : t += ( t === ` ` ? ` ` : r ? `
` : `
` )+(a.substring(1)|| ` ` ),n=!0,r=!1;break;case ` % ` :e[i+1]?.[0]!== ` # ` &&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var $ H =class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=ZH (e);r?this.warnings.push(new g H(i,t,n)):this.errors.push(new h H(i,t,n))},this.directives=new o B({version:e.version||` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=QH (this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment? ` $ { e . comment } \ n$ { n } ` :n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(q z(i)&&!i.flow&&i.items.length>0){let e=i.items[0];W z(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t? ` $ { n } \ n$ { t } ` :n}else{let e=i.commentBefore;i.commentBefore=e? ` $ { n } \ n$ { e } ` :n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:QH (this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case ` directive ` :this.directives.add(e.source,(t,n,r)=>{let i=ZH (e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=XH (this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e, ` MISSING _CHAR ` , ` Missing directives - end / doc - start indicator line ` ),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case ` byte - order - mark ` :case ` space ` :break;case ` comment ` :case ` newline ` :this.prelude.push(e.source);break;case ` error ` :{let t=e.source? ` $ { e . message } : $ { JSON . stringify ( e . source ) } ` :e.message,n=new h H(ZH (e), ` UNEXPECTED _TOKEN ` ,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case ` doc - end ` :{if(!this.doc){this.errors.push(new h H(ZH (e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=T H(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e? ` $ { e } \ n$ { t . comment } ` :t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new h H(ZH (e), ` UNEXPECTED _TOKEN ` , ` Unsupported token $ { e . type } ` ))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new f H(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t, ` MISSING _CHAR ` , ` Missing directives - end indicator line ` ),e.range=[0,t,t],this.decorate(e,!1),yield e}}},e U=Symbol( ` break visit ` ),t U=Symbol( ` skip children ` ),n U=Symbol( ` remove item ` );function r U(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),i U(Object.freeze([]),e,t)}r U.BREAK=e U,r U.SKIP=t U,r U.REMOVE=n U,r U.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&& ` items ` in t)n=t.items[r];else return}return n},r U.parentCollection=(e,t)=>{let n=r U.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&& ` items ` in i)return i;throw Error( ` Parent collection not found ` )};function i U(e,t,n){let r=n(t,e);if(typeof r== ` symbol ` )return r;for(let i of[ ` key ` , ` value ` ]){let a=t[i];if(a&& ` items ` in a){for(let t=0;t<a.items.length;++t){let r=i U(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===e U)return e U;else r===n U&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function a U(e){switch(e){case ` ` :return ` byte - order - mark ` ;case ` ` :return ` doc - mode ` ;case ` ` :return ` flow - error - end ` ;case ` ` :return ` scalar ` ;case ` -- - ` :return ` doc - start ` ;case ` ... ` :return ` doc - end ` ;case ` ` :case `
` )+(a.substring(1)|| ` ` ),n=!0,r=!1;break;case ` % ` :e[i+1]?.[0]!== ` # ` &&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var rU =class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=tU (e);r?this.warnings.push(new b H(i,t,n)):this.errors.push(new y H(i,t,n))},this.directives=new u B({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=nU (this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment? ` $ { e . comment } \ n$ { n } ` :n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(Z z(i)&&!i.flow&&i.items.length>0){let e=i.items[0];J z(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t? ` $ { n } \ n$ { t } ` :n}else{let e=i.commentBefore;i.commentBefore=e? ` $ { n } \ n$ { e } ` :n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:nU (this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case ` directive ` :this.directives.add(e.source,(t,n,r)=>{let i=tU (e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=eU (this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e, ` MISSING _CHAR ` , ` Missing directives - end / doc - start indicator line ` ),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case ` byte - order - mark ` :case ` space ` :break;case ` comment ` :case ` newline ` :this.prelude.push(e.source);break;case ` error ` :{let t=e.source? ` $ { e . message } : $ { JSON . stringify ( e . source ) } ` :e.message,n=new y H(tU (e), ` UNEXPECTED _TOKEN ` ,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case ` doc - end ` :{if(!this.doc){this.errors.push(new y H(tU (e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=k H(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e? ` $ { e } \ n$ { t . comment } ` :t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new y H(tU (e), ` UNEXPECTED _TOKEN ` , ` Unsupported token $ { e . type } ` ))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new g H(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t, ` MISSING _CHAR ` , ` Missing directives - end indicator line ` ),e.range=[0,t,t],this.decorate(e,!1),yield e}}},i U=Symbol( ` break visit ` ),a U=Symbol( ` skip children ` ),o U=Symbol( ` remove item ` );function s U(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),c U(Object.freeze([]),e,t)}s U.BREAK=i U,s U.SKIP=a U,s U.REMOVE=o U,s U.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&& ` items ` in t)n=t.items[r];else return}return n},s U.parentCollection=(e,t)=>{let n=s U.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&& ` items ` in i)return i;throw Error( ` Parent collection not found ` )};function c U(e,t,n){let r=n(t,e);if(typeof r== ` symbol ` )return r;for(let i of[ ` key ` , ` value ` ]){let a=t[i];if(a&& ` items ` in a){for(let t=0;t<a.items.length;++t){let r=c U(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===i U)return i U;else r===o U&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function l U(e){switch(e){case ` ` :return ` byte - order - mark ` ;case ` ` :return ` doc - mode ` ;case ` ` :return ` flow - error - end ` ;case ` ` :return ` scalar ` ;case ` -- - ` :return ` doc - start ` ;case ` ... ` :return ` doc - end ` ;case ` ` :case `
` :case ` \ r
` :return ` newline ` ;case ` - ` :return ` seq - item - ind ` ;case ` ? ` :return ` explicit - key - ind ` ;case ` : ` :return ` map - value - ind ` ;case ` { ` :return ` flow - map - start ` ;case ` } ` :return ` flow - map - end ` ;case ` [ ` :return ` flow - seq - start ` ;case ` ] ` :return ` flow - seq - end ` ;case ` , ` :return ` comma ` }switch(e[0]){case ` ` :case ` ` :return ` space ` ;case ` # ` :return ` comment ` ;case ` % ` :return ` directive - line ` ;case ` * ` :return ` alias ` ;case ` & ` :return ` anchor ` ;case ` ! ` :return ` tag ` ;case ` ' ` :return ` single - quoted - scalar ` ;case ` " ` :return ` double - quoted - scalar ` ;case ` | ` :case ` > ` :return ` block - scalar - header ` }return null}function o U(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var s U=new Set( ` 0123456789 ABCDEFabcdef ` ),c U=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , l U = n e w S e t ( ` , [ ] { } ` ) , u U = n e w S e t ( ` , [ ] { }
\ r ` ),d U=e=>!e||u U.has(e),f U=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer= ` ` ,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!= ` string ` )throw TypeError( ` source is not a string ` );this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next?? ` stream ` ;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t=== ` ` ||t=== ` ` ;)t=this.buffer[++e];return!t||t=== ` # ` ||t=== `
` :return ` newline ` ;case ` - ` :return ` seq - item - ind ` ;case ` ? ` :return ` explicit - key - ind ` ;case ` : ` :return ` map - value - ind ` ;case ` { ` :return ` flow - map - start ` ;case ` } ` :return ` flow - map - end ` ;case ` [ ` :return ` flow - seq - start ` ;case ` ] ` :return ` flow - seq - end ` ;case ` , ` :return ` comma ` }switch(e[0]){case ` ` :case ` ` :return ` space ` ;case ` # ` :return ` comment ` ;case ` % ` :return ` directive - line ` ;case ` * ` :return ` alias ` ;case ` & ` :return ` anchor ` ;case ` ! ` :return ` tag ` ;case ` ' ` :return ` single - quoted - scalar ` ;case ` " ` :return ` double - quoted - scalar ` ;case ` | ` :case ` > ` :return ` block - scalar - header ` }return null}function u U(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var d U=new Set( ` 0123456789 ABCDEFabcdef ` ),f U=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , p U = n e w S e t ( ` , [ ] { } ` ) , m U = n e w S e t ( ` , [ ] { }
\ r ` ),h U=e=>!e||m U.has(e),g U=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer= ` ` ,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!= ` string ` )throw TypeError( ` source is not a string ` );this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next?? ` stream ` ;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t=== ` ` ||t=== ` ` ;)t=this.buffer[++e];return!t||t=== ` # ` ||t=== `
` ||t=== ` \ r ` &&this.buffer[e+1]=== `
` }charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t=== ` ` ;)t=this.buffer[++n+e];if(t=== ` \ r ` ){let t=this.buffer[n+e+1];if(t=== `
` ||!t&&!this.atEnd)return e+n+1}return t=== `
` ||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t=== ` - ` ||t=== ` . ` ){let t=this.buffer.substr(e,3);if((t=== ` -- - ` ||t=== ` ... ` )&&o U(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!= ` number ` ||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf( `
` ,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]=== ` \ r ` &&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case ` stream ` :return yield*this.parseStream();case ` line - start ` :return yield*this.parseLineStart();case ` block - start ` :return yield*this.parseBlockStart();case ` doc ` :return yield*this.parseDocument();case ` flow ` :return yield*this.parseFlowCollection();case ` quoted - scalar ` :return yield*this.parseQuotedScalar();case ` block - scalar ` :return yield*this.parseBlockScalar();case ` plain - scalar ` :return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext( ` stream ` );if(e[0]=== ` ` &&(yield*this.pushCount(1),e=e.substring(1)),e[0]=== ` % ` ){let t=e.length,n=e.indexOf( ` # ` );for(;n!==-1;){let r=e[n-1];if(r=== ` ` ||r=== ` ` ){t=n-1;break}n=e.indexOf( ` # ` ,n+1)}for(;;){let n=e[t-1];if(n=== ` ` ||n=== ` ` )--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(), ` stream ` }if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(), ` stream ` }return yield ` ` ,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext( ` line - start ` );if(e=== ` - ` ||e=== ` . ` ){if(!this.atEnd&&!this.hasChars(4))return this.setNext( ` line - start ` );let e=this.peek(3);if((e=== ` -- - ` ||e=== ` ... ` )&&o U(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e=== ` -- - ` ? ` doc ` : ` stream ` }return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!o U(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext( ` block - start ` );if((e=== ` - ` ||e=== ` ? ` ||e=== ` : ` )&&o U(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e, ` block - start ` }return ` doc ` }*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext( ` doc ` );let t=yield*this.pushIndicators();switch(e[t]){case ` # ` :yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case ` { ` :case ` [ ` :return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1, ` flow ` ;case ` } ` :case ` ] ` :return yield*this.pushCount(1), ` doc ` ;case ` * ` :return yield*this.pushUntil(d U), ` doc ` ;case ` "`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&o U(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield` `,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(d U),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||o U(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`' ` )for(;t!==-1&&this.buffer[t+1]=== ` '`;)t=this.buffer.indexOf(`' ` ,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]=== ` \ \ ` ;)e+=1;if(e%2==0)break;t=this.buffer.indexOf( ` " ` ,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf( `
` ||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t=== ` - ` ||t=== ` . ` ){let t=this.buffer.substr(e,3);if((t=== ` -- - ` ||t=== ` ... ` )&&u U(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!= ` number ` ||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf( `
` ,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]=== ` \ r ` &&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case ` stream ` :return yield*this.parseStream();case ` line - start ` :return yield*this.parseLineStart();case ` block - start ` :return yield*this.parseBlockStart();case ` doc ` :return yield*this.parseDocument();case ` flow ` :return yield*this.parseFlowCollection();case ` quoted - scalar ` :return yield*this.parseQuotedScalar();case ` block - scalar ` :return yield*this.parseBlockScalar();case ` plain - scalar ` :return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext( ` stream ` );if(e[0]=== ` ` &&(yield*this.pushCount(1),e=e.substring(1)),e[0]=== ` % ` ){let t=e.length,n=e.indexOf( ` # ` );for(;n!==-1;){let r=e[n-1];if(r=== ` ` ||r=== ` ` ){t=n-1;break}n=e.indexOf( ` # ` ,n+1)}for(;;){let n=e[t-1];if(n=== ` ` ||n=== ` ` )--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(), ` stream ` }if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(), ` stream ` }return yield ` ` ,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext( ` line - start ` );if(e=== ` - ` ||e=== ` . ` ){if(!this.atEnd&&!this.hasChars(4))return this.setNext( ` line - start ` );let e=this.peek(3);if((e=== ` -- - ` ||e=== ` ... ` )&&u U(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e=== ` -- - ` ? ` doc ` : ` stream ` }return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!u U(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext( ` block - start ` );if((e=== ` - ` ||e=== ` ? ` ||e=== ` : ` )&&u U(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e, ` block - start ` }return ` doc ` }*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext( ` doc ` );let t=yield*this.pushIndicators();switch(e[t]){case ` # ` :yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case ` { ` :case ` [ ` :return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1, ` flow ` ;case ` } ` :case ` ] ` :return yield*this.pushCount(1), ` doc ` ;case ` * ` :return yield*this.pushUntil(h U), ` doc ` ;case ` "`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&u U(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield` `,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(h U),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||u U(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`' ` )for(;t!==-1&&this.buffer[t+1]=== ` '`;)t=this.buffer.indexOf(`' ` ,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]=== ` \ \ ` ;)e+=1;if(e%2==0)break;t=this.buffer.indexOf( ` " ` ,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf( `
` ,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf( `
` ,e)}r!==-1&&(t=r-(n[r-1]=== ` \ r ` ?2:1))}if(t===-1){if(!this.atEnd)return this.setNext( ` quoted - scalar ` );t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel? ` flow ` : ` doc ` }*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t=== ` + ` )this.blockScalarKeep=!0;else if(t> ` 0 ` &&t<= ` 9 ` )this.blockScalarIndent=Number(t)-1;else if(t!== ` - ` )break}return yield*this.pushUntil(e=>o U(e)||e=== ` # ` )}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case ` ` :t+=1;break;case `
` ,e)}r!==-1&&(t=r-(n[r-1]=== ` \ r ` ?2:1))}if(t===-1){if(!this.atEnd)return this.setNext( ` quoted - scalar ` );t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel? ` flow ` : ` doc ` }*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t=== ` + ` )this.blockScalarKeep=!0;else if(t> ` 0 ` &&t<= ` 9 ` )this.blockScalarIndent=Number(t)-1;else if(t!== ` - ` )break}return yield*this.pushUntil(e=>u U(e)||e=== ` # ` )}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case ` ` :t+=1;break;case `
` :e=r,t=0;break;case ` \ r ` :{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext( ` block - scalar ` );if(e=== `
` )break}default:break loop}if(!n&&!this.atEnd)return this.setNext( ` block - scalar ` );if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf( `
` ,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext( ` block - scalar ` );e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n=== ` ` ;)n=this.buffer[++r];if(n=== ` ` ){for(;n=== ` ` ||n=== ` ` ||n=== ` \ r ` ||n=== `
` ;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r=== ` \ r ` &&(r=this.buffer[--n]);let i=n;for(;r=== ` ` ;)r=this.buffer[--n];if(r=== `
` &&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield ` ` ,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r=== ` : ` ){let r=this.buffer[n+1];if(o U(r)||e&&l U.has(r))break;t=n}else if(o U(r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` &&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield ` ` ,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r=== ` : ` ){let r=this.buffer[n+1];if(u U(r)||e&&p U.has(r))break;t=n}else if(u U(r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` ?(n+=1,r= `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&l U.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&l U.has(r))break;t=n}return!r&&!this.atEnd?this.setNext( ` plain - scalar ` ):(yield ` ` ,yield*this.pushToIndex(t+1,!0),e? ` flow ` : ` doc ` )}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield ` ` ),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case ` ! ` :e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case ` & ` :e+=yield*this.pushUntil(d U),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(o U(n)||t&&l U.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)=== ` < ` ){let e=this.pos+2,t=this.buffer[e];for(;!o U(t)&&t!== ` > ` ;)t=this.buffer[++e];return yield*this.pushToIndex(t=== ` > ` ?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(c U.has(t))t=this.buffer[++e];else if(t=== ` % ` &&s U.has(this.buffer[e+1])&&s U.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e=== `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&p U.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&p U.has(r))break;t=n}return!r&&!this.atEnd?this.setNext( ` plain - scalar ` ):(yield ` ` ,yield*this.pushToIndex(t+1,!0),e? ` flow ` : ` doc ` )}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield ` ` ),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case ` ! ` :e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case ` & ` :e+=yield*this.pushUntil(h U),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(u U(n)||t&&p U.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)=== ` < ` ){let e=this.pos+2,t=this.buffer[e];for(;!u U(t)&&t!== ` > ` ;)t=this.buffer[++e];return yield*this.pushToIndex(t=== ` > ` ?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(f U.has(t))t=this.buffer[++e];else if(t=== ` % ` &&d U.has(this.buffer[e+1])&&d U.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e=== `
` ?yield*this.pushCount(1):e=== ` \ r ` &&this.charAt(1)=== `
` ?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n=== ` ` ||e&&n=== ` ` );let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},pU=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function mU(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function hU(e){for(let t=0;t<e.length;++t)switch(e[t].type){case ` space ` :case ` comment ` :case ` newline ` :break;default:return t}return-1}function gU(e){switch(e?.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :case ` flow - collection ` :return!0;default:return!1}}function _U(e){switch(e.type){case ` document ` :return e.start;case ` block - map ` :{let t=e.items[e.items.length-1];return t.sep??t.start}case ` block - seq ` :return e.items[e.items.length-1].start;default:return[]}}function vU(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case ` doc - start ` :case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :case ` newline ` :break loop}for(;e[++t]?.type=== ` space ` ;);return e.splice(t,e.length)}function yU(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function bU(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!mU(t.start, ` explicit - key - ind ` )&&!mU(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,gU(t.value)?t.value.end?yU(t.value.end,t.sep):t.value.end=t.sep:yU(t.start,t.sep),delete t.sep)}var xU=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source= ` ` ,this.type= ` ` ,this.lexer=new fU,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=aU(e);if(!t){let t= ` Not a YAML token : $ { e } ` ;yield*this.pop({type: ` error ` ,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t=== ` scalar ` )this.atNewLine=!1,this.atScalar=!0,this.type= ` scalar ` ;else{switch(this.type=t,yield*this.step(),t){case ` newline ` :this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case ` space ` :this.atNewLine&&e[0]=== ` ` &&(this.indent+=e.length);break;case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :this.atNewLine&&(this.indent+=e.length);break;case ` doc - mode ` :case ` flow - error - end ` :return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type=== ` doc - end ` &&e?.type!== ` doc - end ` ){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type: ` doc - end ` ,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case ` document ` :return yield*this.document(e);case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return yield*this.scalar(e);case ` block - scalar ` :return yield*this.blockScalar(e);case ` block - map ` :return yield*this.blockMap(e);case ` block - seq ` :return yield*this.blockSequence(e);case ` flow - collection ` :return yield*this.flowCollection(e);case ` doc - end ` :return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type: ` error ` ,offset:this.offset,source: ` ` ,message: ` Tried to pop an empty stack ` };else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type=== ` block - scalar ` ?t.indent= ` indent ` in e?e.indent:0:t.type=== ` flow - collection ` &&e.type=== ` document ` &&(t.indent=0),t.type=== ` flow - collection ` &&bU(t),e.type){case ` document ` :e.value=t;break;case ` block - scalar ` :e.props.push(t);break;case ` block - map ` :{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case ` block - seq ` :{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case ` flow - collection ` :{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type=== ` document ` ||e.type=== ` block - map ` ||e.type=== ` block - seq ` )&&(t.type=== ` block - map ` ||t.type=== ` block - seq ` )){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&hU(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.i
Line truncated
` ?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n=== ` ` ||e&&n=== ` ` );let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},_U=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function vU(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function yU(e){for(let t=0;t<e.length;++t)switch(e[t].type){case ` space ` :case ` comment ` :case ` newline ` :break;default:return t}return-1}function bU(e){switch(e?.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :case ` flow - collection ` :return!0;default:return!1}}function xU(e){switch(e.type){case ` document ` :return e.start;case ` block - map ` :{let t=e.items[e.items.length-1];return t.sep??t.start}case ` block - seq ` :return e.items[e.items.length-1].start;default:return[]}}function SU(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case ` doc - start ` :case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :case ` newline ` :break loop}for(;e[++t]?.type=== ` space ` ;);return e.splice(t,e.length)}function CU(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function wU(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!vU(t.start, ` explicit - key - ind ` )&&!vU(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,bU(t.value)?t.value.end?CU(t.value.end,t.sep):t.value.end=t.sep:CU(t.start,t.sep),delete t.sep)}var TU=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source= ` ` ,this.type= ` ` ,this.lexer=new gU,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=lU(e);if(!t){let t= ` Not a YAML token : $ { e } ` ;yield*this.pop({type: ` error ` ,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t=== ` scalar ` )this.atNewLine=!1,this.atScalar=!0,this.type= ` scalar ` ;else{switch(this.type=t,yield*this.step(),t){case ` newline ` :this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case ` space ` :this.atNewLine&&e[0]=== ` ` &&(this.indent+=e.length);break;case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :this.atNewLine&&(this.indent+=e.length);break;case ` doc - mode ` :case ` flow - error - end ` :return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type=== ` doc - end ` &&e?.type!== ` doc - end ` ){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type: ` doc - end ` ,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case ` document ` :return yield*this.document(e);case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return yield*this.scalar(e);case ` block - scalar ` :return yield*this.blockScalar(e);case ` block - map ` :return yield*this.blockMap(e);case ` block - seq ` :return yield*this.blockSequence(e);case ` flow - collection ` :return yield*this.flowCollection(e);case ` doc - end ` :return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type: ` error ` ,offset:this.offset,source: ` ` ,message: ` Tried to pop an empty stack ` };else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type=== ` block - scalar ` ?t.indent= ` indent ` in e?e.indent:0:t.type=== ` flow - collection ` &&e.type=== ` document ` &&(t.indent=0),t.type=== ` flow - collection ` &&wU(t),e.type){case ` document ` :e.value=t;break;case ` block - scalar ` :e.props.push(t);break;case ` block - map ` :{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case ` block - seq ` :{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case ` flow - collection ` :{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type=== ` document ` ||e.type=== ` block - map ` ||e.type=== ` block - seq ` )&&(t.type=== ` block - map ` ||t.type=== ` block - seq ` )){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&yU(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.i
Line truncated
` )+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf( `
` ,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(this.onKeyLine=!1,t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){yU(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!== ` seq - item - ind ` ,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case ` newline ` :n.push(r);break;case ` space ` :break;case ` comment ` :i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case ` anchor ` :case ` tag ` :r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` explicit - key - ind ` :!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case ` map - value - ind ` :if(t.explicitKey){if(!t.sep){if(mU(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=vU(t.start);this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(mU(t.sep, ` map - value - ind ` ))this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(gU(t.key)&&!mU(t.sep, ` newline ` )){let e=vU(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):mU(t.sep, ` map - value - ind ` )?this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type=== ` block - seq ` ){if(!t.explicitKey&&t.sep&&!mU(t.sep, ` newline ` )){yield*this.pop({type: ` error ` ,offset:this.offset,message: ` Unexpected block - seq - ind on same line with key ` ,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){yU(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case ` anchor ` :case ` tag ` :if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case ` seq - item - ind ` :if(this.indent!==e.indent)break;t.value||mU(t.start, ` seq - item - ind ` )?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type=== ` flow - error - end ` ){let e;do yield*this.pop(),e=this.peek(1);while(e?.type=== ` flow - collection ` )}else if(e.end.length===0){switch(this.type){case ` comma ` :case ` explicit - key - ind ` :!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case ` map - value - ind ` :!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case ` space ` :case ` comment ` :case ` newline ` :case ` anchor ` :case ` tag ` :!t||t.value?e.ite
Line truncated
` ,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(this.onKeyLine=!1,t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){CU(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!== ` seq - item - ind ` ,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case ` newline ` :n.push(r);break;case ` space ` :break;case ` comment ` :i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case ` anchor ` :case ` tag ` :r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` explicit - key - ind ` :!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case ` map - value - ind ` :if(t.explicitKey){if(!t.sep){if(vU(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=SU(t.start);this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(vU(t.sep, ` map - value - ind ` ))this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(bU(t.key)&&!vU(t.sep, ` newline ` )){let e=SU(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):vU(t.sep, ` map - value - ind ` )?this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type=== ` block - seq ` ){if(!t.explicitKey&&t.sep&&!vU(t.sep, ` newline ` )){yield*this.pop({type: ` error ` ,offset:this.offset,message: ` Unexpected block - seq - ind on same line with key ` ,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){CU(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case ` anchor ` :case ` tag ` :if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case ` seq - item - ind ` :if(this.indent!==e.indent)break;t.value||vU(t.start, ` seq - item - ind ` )?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type=== ` flow - error - end ` ){let e;do yield*this.pop(),e=this.peek(1);while(e?.type=== ` flow - collection ` )}else if(e.end.length===0){switch(this.type){case ` comma ` :case ` explicit - key - ind ` :!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case ` map - value - ind ` :!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case ` space ` :case ` comment ` :case ` newline ` :case ` anchor ` :case ` tag ` :!t||t.value?e.ite
Line truncated
` )+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf( `
` ,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return this.flowScalar(this.type);case ` block - scalar - header ` :return{type: ` block - scalar ` ,offset:this.offset,indent:this.indent,props:[this.sourceToken],source: ` ` };case ` flow - map - start ` :case ` flow - seq - start ` :return{type: ` flow - collection ` ,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case ` seq - item - ind ` :return{type: ` block - seq ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case ` explicit - key - ind ` :{this.onKeyLine=!0;let t=v U(_ U(e));return t.push(this.sourceToken),{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case ` map - value - ind ` :{this.onKeyLine=!0;let t=v U(_ U(e));return{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!== ` comment ` ||this.indent<=t?!1:e.every(e=>e.type=== ` newline ` ||e.type=== ` space ` )}*documentEnd(e){this.type!== ` doc - mode ` &&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop()))}*lineEnd(e){switch(this.type){case ` comma ` :case ` doc - start ` :case ` doc - end ` :case ` flow - seq - end ` :case ` flow - map - end ` :case ` map - value - ind ` :yield*this.pop(),yield*this.step();break;case ` newline ` :this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop())}}};function S U(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new p U||null,prettyErrors:t}}function C U(e,t={}){let{lineCounter:n,prettyErrors:r}=S U(t),i=new x U(n?.addNewLine),a=new $ H (t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==` silent ` ){o.errors.push(new h H(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(_ H(e,n)),o.warnings.forEach(_ H(e,n))),o}function w U(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=C U(e,n);if(!i)return null;if(i.warnings.forEach(e=>q B(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!== ` silent ` )throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function T U(e,t,n){let r=null;if(typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n== ` string ` &&(n=n.length),typeof n== ` number ` ){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return H z(e)&&!r?e.toString(n):new f H(e,r,n).toString(n)}function E U(e,t){let n=new Map;for(let e of t)n.set(e.name,[...n.get(e.name)??[],e]);return{edges:e.edges,nodes:e.nodes.map(e=>{let{stage:t,occurrence:r}=e.data,i=t===void 0?void 0:n.get(t)?.[r??0];return i?{...e,data:{...e.data,run:i}}:e})}}function D U(e,t){let n=e=>e.path&&e.path.length>=2?Number(e.path[1]):-1,r=e.nodes.find(e=>JSON.stringify(e.data.path)===JSON.stringify(t))?.data,i=r?.resume??r?.stage;if(!r||!i)return null;let a=Math.max(-1,...e.nodes.filter(e=>e.data.run).map(e=>n(e.data))),o=n(r);if(o<0||o>a)return null;let s=e.nodes.filter(e=>e.data.path?.length===2).sort((e,t)=>n(e.data)-n(t.data)).map(e=>e.data.resume??e.data.stage?? ` ` ),c=e=>!!e&&s.filter(t=>t===e).length>1;return c(i)||o>0&&c(s[o-1])?{label: ` Add an id to resume here ` ,from:i,blocked:!0}:{label:o===a? ` Resume from here ` : ` Re - run from here ` ,from:i}}var O U=140,k U=280,A U={"agent.run": ` Agent ` ,"command.run": ` Run commands ` ,"repo.prepare": ` Prepare worktree ` ,"repo.commit": ` Commit ` ,"repo.open-pr": ` Open pull request ` ,"gate.repository": ` Repository gate ` ,"gate.diff-size": ` Diff size gate ` ,"gate.diff-rules": ` Diff rules gate ` ,"forge.comment": ` Comment ` ,"forge.close-issue": ` Close issue ` ,"human.approve": ` Human approval ` ,"workflow.call": ` Call workflow ` ,"workflow.handoff": ` Hand off ` ,"workflow.finish": ` Finish ` ,"review.pr": ` Review pull request ` ,"review.start-round": ` Start review round ` ,"review.reply": ` Reply to review ` };function j U(e){return A U[e]??e}var M U=/ \{ \{ \s *steps \. ([A-Za-z0-9_-]+) \. [^}]* \} \} /g;function N U(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function P U(e,t){let n=e=>typeof t[e]== ` string ` ?t[e]: ` ` ;switch(e){case ` agent . run ` :return[n( ` role ` )|| ` builder ` ,t.read_only? ` read - only ` :n( ` gate ` )? ` gated : $ { n ( ` gate ` ) } ` : ` ` ].filter(Boolean).join( ` · ` );case ` repo . commit ` :return[n( ` message ` ),t.push? ` push ` : ` ` ].filter(Boolean).join( ` · ` );case ` workflow . call ` :case ` workflow . handoff ` :return n( ` workflow ` );case ` workflow . finish ` :return n( ` status ` )|| ` completed ` ;case ` human . approve ` :return n( ` then ` )? ` then $ { n ( ` then ` ) } ` : ` ` ;case ` gate . repository ` :return n( ` expect ` )=== ` test - failure ` ? ` tests must fail ` :t.repair? ` repair if red ` : ` ` }return ` ` }function F U(e){for(let t of[ ` mission ` , ` message ` , ` body ` , ` plan ` , ` detail ` ]){let n=e[t];if(typeof n== ` string ` &&n.trim())return n.replace(/ \{ \{ \s *([^}]+?) \s * \} \} /g, ` ‹ $1 › ` ).split( `
` ).find(e=>e.trim())?.trim()}}function IU(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(MU)].map(e=>e[1]))]}function LU(e){let t=CU(e).toJS(),n=NU(t)&&Array.isArray(t.steps)?t.steps:[],r=[],i=[],a=new Map,o=[],s= ` start ` ;r.push({id:s,type: ` step ` ,position:{x:0,y:0},data:{kind: ` start ` ,key: ` start ` ,title: ` Starts when ` ,type: ` ` ,detail: ` ` }});let c=[s],l=1,u=new Map,d=e=>{let t=u.get(e)??0;return u.set(e,t+1),t},f=(e,t,n,i,s,c,l)=>{let u=NU(e)?e:{},f=typeof u.type== ` string ` ?u.type: ` ` ,p=NU(u.settings)?u.settings:{},m=typeof u.id== ` string ` ?u.id: ` ` ,h= ` step - $ { t } ` ,g=s? ` $ { s } / $ { m || f } ` :m||f;r.push({id:h,type: ` step ` ,position:{x:n,y:i},data:{kind: ` step ` ,key:m||t,title:m||jU(f),type:f,detail:PU(f,p),summary:FU(p),when:typeof u.when== ` string ` ?u.when:void 0,retry:NU(u.retry)&&typeof u.retry.attempts== ` number ` ?u.retry.attempts:void 0,continues:u.on_failure=== ` continue ` ,branch:s,path:l,stage:g,occurrence:d(g),...c?{resume:c}:{}}}),m&&a.set(m,h);for(let e of IU(u.settings,u.when))o.push({from:e,to:h});return h},p=(e,t,n)=>{e.forEach((r,a)=>i.push({id: ` flow - $ { r } - $ { t } ` ,source:r,target:t,kind: ` flow ` ,insertAfter:a===e.length-1?n:void 0}))};for(let[e,t]of n.entries()){if(NU(t)&&NU(t.parallel)){let n=Object.entries(t.parallel),r=typeof t.id== ` string ` ?t.id: ` parallel ` ,i=[],a=0;n.forEach(([t,o],s)=>{let u=(s-(n.length-1)/2)*kU,d=c,m=c;(Array.isArray(o)?o:[]).forEach((i,o)=>{let c=f(i, ` $ { e + 1 } - $ { t } - $ { o + 1 } ` ,u,(l+o)*OU,t,r,[ ` steps ` ,e, ` parallel ` ,t,o]);p(d,c,d===m&&s===n.length-1?e-1:void 0),d=[c],a=Math.max(a,o+1)}),i.push(...d)}),c=i,l+=Math.max(a,1);continue}let n=f(t,String(e+1),0,l*OU,void 0,void 0,[ ` steps ` ,e]);p(c,n,e-1),c=[n],l++}r.push({id: ` add - end ` ,type: ` add ` ,position:{x:104,y:l*OU-24},data:{kind: ` step ` ,key: ` add ` ,title: ` ` ,type: ` ` ,detail: ` ` }}),p(c, ` add - end ` );for(let{from:e,to:t}of o){let n=a.get(e);n&&(i.some(e=>e.kind=== ` flow ` &&e.source===n&&e.target===t)||i.push({id: ` data - $ { n } - $ { t } ` ,source:n,target:t,kind: ` data ` ,label:e,offset:24+14*i.filter(e=>e.kind=== ` data ` ).length,sourceHandle: ` data - out ` ,targetHandle: ` data - in ` }))}return{nodes:r,edges:i}}var RU={agent:sr,command:Jr,repo:Cr,gate:Gr,forge:jr,human:ti,review:xr,workflow:ii},zU={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function BU(e){return RU[e.split( ` . ` )[0]]??ii}function VU(e){return Object.keys(zU).map(t=>({title:zU[t],icon:RU[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function HU(e,t){let n=CU(e).getIn(t,!0);if(Uz(n))return n.toJSON()}function UU(e,t,n){let r=CU(e);return r.setIn(t,r.createNode(YU(n))),r.toString()}function WU(e,t,n){let r=CU(e),i=r.get( ` steps ` ,!0);if(Kz(i)||(r.set( ` steps ` ,r.createNode([])),i=r.get( ` steps ` ,!0)),!Kz(i))return{source:e,path:[]};let a=Math.min(Math.max(t+1,0),i.items.length);return i.items.splice(a,0,r.createNode({type:n})),{source:r.toString(),path:[ ` steps ` ,a]}}function GU(e,t){let n=CU(e),r=n.getIn(t.slice(0,-1),!0),i=t.at(-1);if(!Kz(r)||typeof i!= ` number ` )return{source:e,path:t};let a=n.createNode(n.getIn(t));return Uz(a)&&a.delete( ` id ` ),r.items.splice(i+1,0,a),{source:n.toString(),path:[...t.slice(0,-1),i+1]}}function KU(e,t){let n=CU(e);n.deleteIn(t);let r=t.slice(0,-1);if(r.length>2){let e=n.getIn(r,!0);Kz(e)&&e.items.length===0&&n.deleteIn(r)}return n.toString()}function qU(e,t,n){let r=CU(e),i=r.getIn(t.slice(0,-1),!0),a=t.at(-1);if(!Kz(i)||typeof a!= ` number ` )return{source:e,path:t};let o=a+n;if(o<0||o>=i.items.length)return{source:e,path:t};let[s]=i.items.splice(a,1);return i.items.splice(o,0,s),{source:r.toString(),path:[...t.slice(0,-1),o]}}function JU(e,t){let n=CU(e).toJS(),r=Array.isArray(n?.steps)?n.steps:[],i=typeof t[1]== ` number ` ?t[1]:r.length,a=[],o=e=>{if(typeof e!= ` object ` ||!e)return;let t=e;if(typeof t.id== ` string ` &&a.push(t.id),typeof t.parallel== ` object ` &&t.parallel!==null)for(let e of Object.values(t.parallel))Array.isArray(e)&&e.forEach(o)};if(r.slice(0,i).forEach(o),t.length===5){let e=r[i]?.parallel?.[t[3]];Array.isArray(e)&&e.slice(0,t[4]).forEach(o)}return a}function YU(e){if(Array.isArray(e))return e.map(YU);if(typeof e!= ` object ` ||!e)return e;let t={};for(let[n,r]of Object.entries(e)){if(r===void 0||r=== ` ` ||r===null)continue;let e=YU(r);(typeof e!= ` object ` ||!e||Array.isArray(e)||Object.keys(e).length!==0)&&(t[n]=e)}return t}function XU(e,t){let n=CU(e).get(t,!0);return n&&typeof n== ` object ` && ` toJSON ` in n?n.toJSON():CU(e).get(t)}function ZU(e,t,n){let r=CU(e),i=YU({[t]:n})[t];return i===void 0?r.delete(t):r.set(t,r.createNode(i)),r.toString()}function QU(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function $ U(e,t=[]){let n=CU(e),r=n.errors[0];if(r)return{ok:!1,message:pW(r.message),line:r.linePos?.[0]?.line};let i=n.toJS();if(!mW(i))return{ok:!1,message: ` A workflow is a mapping with an id and steps . ` };let a=typeof i.id== ` string ` ?i.id.trim(): ` ` ;if(!a)return{ok:!1,message: ` workflow id is required ` };le
Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:l W(e)}))}var s W=/^( \s *)(- \s +)?/,c W=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function l W(e){let{code:t,comment:n}=u W(e),r=d W(t);return n&&r.push({text:n,kind: ` comment ` }),r}function u W(e){let t= ` ` ;for(let n=0;n<e.length;n++){let r=e[n];if(t){r===t&&(t= ` ` );continue}if(r=== ` "`||r===`'`){t=r;continue}if(r===`#`&&(n===0||/\s/.test(e[n-1]??``)))return{code:e.slice(0,n),comment:e.slice(n)}}return{code:e,comment:``}}function d W(e){if(!e)return[];let t=[],n=s W.exec(e);n?.[1]&&t.push({text:n[1],kind:`plain`}),n?.[2]&&t.push({text:n[2],kind:`punct`});let r=e.slice(n?.[0].length??0);if(!r)return t;let i=c W.exec(r);return i?(t.push({text:i[1]??``,kind:`key`}),t.push({text:i[2]??`:`,kind:`punct`}),i[3]&&t.push({text:i[3],kind:`plain`}),[...t,...f W(i[4]??``)]):[...t,...f W(r)]}function f W(e){if(!e)return[];let t=/^(" [ ^ "]*" ? | '[^' ] * ' ? ) ( [ \ s \ S ] * ) $ / . exec ( e ) ; if ( ! t ) return [ { text : e , kind : ` plain ` } ] ; let n = [ { text : t [ 1 ] ? ? ` ` , kind : ` string ` } ] ; return t [ 2 ] && n . push ( { text : t [ 2 ] , kind : ` plain ` } ) , n } function pW ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function m W(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function h W(e){return typeof e== ` string ` &&e.trim()!== ` ` }var g W={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },_ W={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },v W={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },y W={class: ` min - w - 0 flex - 1 ` },b W=[ ` value ` , ` placeholder ` ],x W={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },S W={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },C W={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },w W={key:1,class: ` space - y - 1.5 ` },T W=[ ` title ` ],E W=[ ` value ` ],D W=[ ` value ` ],O W={key:3,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },k W=[ ` onClick ` ],A W=[ ` onClick ` ],j W={key:2,class: ` divide - y divide - border rounded - md border border - border ` },M W=[ ` title ` ],N W=[ ` value ` , ` onChange ` ],P W=[ ` value ` ],F W=[ ` value ` , ` onInput ` ],I W=[ ` value ` , ` onFocus ` , ` onInput ` ],L W=[ ` title ` ],R W={key:0,class: ` text - xs text - danger ` },z W={class: ` space - y - 2 ` },B W={class: ` divide - y divide - border rounded - md border border - border ` },V W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },H W=[ ` value ` ],U W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },W W=[ ` value ` ],G W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },K W=[ ` value ` ],q W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },J W={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },Y W=n({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=M(()=>H U(n.yaml,n.path)??{}),a=M(()=>typeof i.value.type== ` string ` ?i.value.type: ` ` ),o=M(()=>n.vocabulary.find(e=>e.name===a.value)),s=M(()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),c=M(()=>J U(n.yaml,n.path)),u=M(()=>o.value?.settings&&i.value.settings?i W(i.value.settings,o.value.settings, ` settings ` ): ` ` ),d=[ ` mission ` , ` workflow ` , ` message ` , ` body ` , ` plan ` , ` then ` , ` status ` , ` detail ` , ` run ` , ` rules ` ],f=/mission|body|detail|plan|rules/;function p(e,t){return t.type=== ` string ` ?t.enum? ` select ` :f.test(e)? ` text ` : ` line ` :t.type=== ` boolean ` ? ` boolean ` :t.type=== ` integer ` ||t.type=== ` number ` ? ` number ` :t.type=== ` array ` &&t.items?.type=== ` string ` ? ` lines ` : ` yaml ` }let m=M(()=>{let e=Object.entries(o.value?.settings?.properties??{}).map(([e,t])=>({key:e,schema:t,kind:p(e,t)})),t=e.filter(e=>d.includes(e.key)&&e.kind!== ` boolean ` ).sort((e,t)=>d.indexOf(e.key)-d.indexOf(t.key))[0],n=e.filter(e=>e!==t);return{lead:t,compact:n.filter(e=>[ ` select ` , ` line ` , ` number ` , ` boolean ` ].includes(e.kind)),long:n.filter(e=>[ ` text ` , ` lines ` , ` yaml ` ].includes(e.kind))}});function h(e){let{id:t,type:i,...a}=e;r( ` update : yaml ` ,U U(n.yaml,n.path,{id:t,type:i,...a}))}function g(e,t){h({...i.value,[e]:t})}function _(e){g( ` retry ` ,{...i.value.retry,...e})}function v(e,t){h({...i.value,settings:{...s.value,[e]:t}})}let y=W(null);function b(e,t){let n=y.value??m.value.lead?.key;if(!n)return;let r=typeof s.value[n]== ` string ` ?s.value[n]: ` ` ,i= ` { { steps . $ { e } . $ { t } } } ` ;v(n,r? ` $ { r . trimEnd ( ) } $ { i } ` :i)}let x=W({});function S(e,t){try{v(e,t.trim()?w U(t):void 0),x.value={...x.value,[e]: ` ` }}catch(t){x.value={...x.value,[e]:String(t.message).split( `
` )[0]}}}let ee=e=>e===void 0? ` ` :T U(e).trimEnd(),w=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),T=e=>typeof s.value[e]== ` string ` ?s.value[e]: ` ` ;return(e,t)=>(P(),V( ` aside ` ,g W,[B( ` header ` ,_ W,[B( ` span ` ,v W,[(P(),U(ye(F(B U)(a.value)),{class: ` size - 4 ` }))]),B( ` div ` ,y W,[B( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:F(j U)(a.value),"aria-label": ` Step id ` ,onInput:t[0]||=e=>g( ` id ` ,e.target.value)},null,40,b W),B( ` div ` ,x W,L(a.value),1)]),O(F(q),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:t[1]||=e=>r( ` close ` )},{default:C(()=>[O(F(oi))]),_:1})]),B( ` div ` ,S W,[u.value?(P(),V( ` p ` ,C W,L(u.value),1)):N( ` ` ,!0),m.value.lead?(P(),V( ` section ` ,w W,[B( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:m.value.lead.schema.description},[l(L(w(m.value.lead.key,m.value.lead.schema))+ ` ` ,1),m.value.lead.schema.description?(P(),U(F(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):N( ` ` ,!0)],8,T W),m.value.lead.kind=== ` select ` ?(P(),V( ` select ` ,{key:0,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:T(m.value.lead.key),onChange:t[2]||=e=>v(m.value.lead.key,e.target.value||void 0)},[t[13]||=B( ` option ` ,{value: ` ` }, ` Default ` ,-1),(P(!0),V(R,null,H(m.value.lead.schema.enum,e=>(P(),V( ` option ` ,{key:e,value:e},L(e),9,D W))),128))],40,E W)):m.value.lead.kind=== ` text ` ?(P(),U(F(mh),{key:1,"model-value":T(m.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:t[3]||=e=>y.value=m.value.lead.key,"onUpdate:modelValue":t[4]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(P(),U(F(J),{key:2,"model-value":T(m.value.lead.key),onFocus:t[5]||=e=>y.value=m.value.lead.key,"onUpdate:modelValue":t[6]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])),c.value.length&&m.value.lead.kind!== ` select ` ?(P(),V( ` div ` ,O W,[t[14]||=B( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(P(!0),V(R,null,H(c.value,e=>(P(),V(R,{key:e},[B( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>b(e, ` summary ` )},L(e),9,k W),B( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>b(e, ` result ` )},L(e)+ ` . result ` ,9,A W)],64))),128))])):N( ` ` ,!0)])):N( ` ` ,!0),m.value.compact.length?(P(),V( ` section ` ,j W,[(P(!0),V(R,null,H(m.value.compact,e=>(P(),V( ` div ` ,{key:e.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[B( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:e.schema.description},[l(L(w(e.key,e.schema))+ ` ` ,1),e.schema.description?(P(),U(F(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):N( ` ` ,!0)],8,M W),e.kind=== ` boolean ` ?(P(),U(F(sb),{key:0,"model-value":s.value[e.key]===!0,"onUpdate:modelValue":t=>v(e.key,t||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):e.kind=== ` select ` ?(P(),V( ` select ` ,{key:1,class: ` h - 7 max - w - 40 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:T(e.key),onChange:t=>v(e.key,t.target.value||void 0)},[t[15]||=B( ` option ` ,{value: ` ` }, ` Default ` ,-1),(P(!0),V(R,null,H(e.schema.enum,e=>(P(),V( ` option ` ,{key:e,value:e},L(e),9,P W))),128))],40,N W)):e.kind=== ` number ` ?(P(),V( ` input ` ,{key:2,type: ` number ` ,class: ` h - 7 w - 24 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:s.value[e.key]?? ` ` ,onInput:t=>v(e.key,t.target.value=== ` ` ?void 0:Number(t.target.value))},null,40,F W)):(P(),V( ` input ` ,{key:3,class: ` h - 7 w - 40 rounded - md border border - input bg - background px - 2 text - [ 13 px ] ` ,value:T(e.key),onFocus:t=>y.value=e.key,onInput:t=>v(e.key,t.target.value)},null,40,I W))]))),128))])):N( ` ` ,!0),(P(!0),V(R,null,H(m.value.long,e=>(P(),V( ` section ` ,{key:e.key,class: ` space - y - 1.5 ` },[B( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:e.schema.description},[l(L(w(e.key,e.schema))+ ` ` ,1),e.schema.description?(P(),U(F(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):N( ` ` ,!0)],8,L W),e.kind=== ` text ` ?(P(),U(F(mh),{key:0,"model-value":T(e.key),class: ` min - h - 20 text - [ 13 px ] ` ,onFocus:t=>y.value=e.key,"onUpdate:modelValue":t=>v(e.key,String(t))},null,8,[ ` model - value ` , ` onFocus ` , ` onUpdate : modelValue ` ])):e.kind=== ` lines ` ?(P(),U(F(mh),{key:1,"model-value":Array.isArray(s.value[e.key])?s.value[e.key].join( `
` ,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return this.flowScalar(this.type);case ` block - scalar - header ` :return{type: ` block - scalar ` ,offset:this.offset,indent:this.indent,props:[this.sourceToken],source: ` ` };case ` flow - map - start ` :case ` flow - seq - start ` :return{type: ` flow - collection ` ,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case ` seq - item - ind ` :return{type: ` block - seq ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case ` explicit - key - ind ` :{this.onKeyLine=!0;let t=S U(x U(e));return t.push(this.sourceToken),{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case ` map - value - ind ` :{this.onKeyLine=!0;let t=S U(x U(e));return{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!== ` comment ` ||this.indent<=t?!1:e.every(e=>e.type=== ` newline ` ||e.type=== ` space ` )}*documentEnd(e){this.type!== ` doc - mode ` &&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop()))}*lineEnd(e){switch(this.type){case ` comma ` :case ` doc - start ` :case ` doc - end ` :case ` flow - seq - end ` :case ` flow - map - end ` :case ` map - value - ind ` :yield*this.pop(),yield*this.step();break;case ` newline ` :this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop())}}};function E U(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new _ U||null,prettyErrors:t}}function D U(e,t={}){let{lineCounter:n,prettyErrors:r}=E U(t),i=new T U(n?.addNewLine),a=new rU (t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!== ` silent ` ){o.errors.push(new y H(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(x H(e,n)),o.warnings.forEach(x H(e,n))),o}function O U(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=D U(e,n);if(!i)return null;if(i.warnings.forEach(e=>Z B(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!== ` silent ` )throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function k U(e,t,n){let r=null;if(typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n== ` string ` &&(n=n.length),typeof n== ` number ` ){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return K z(e)&&!r?e.toString(n):new g H(e,r,n).toString(n)}function A U(e,t){let n=new Map;for(let e of t)n.set(e.name,[...n.get(e.name)??[],e]);return{edges:e.edges,nodes:e.nodes.map(e=>{let{stage:t,occurrence:r}=e.data,i=t===void 0?void 0:n.get(t)?.[r??0];return i?{...e,data:{...e.data,run:i}}:e})}}function j U(e,t){let n=e=>e.path&&e.path.length>=2?Number(e.path[1]):-1,r=e.nodes.find(e=>JSON.stringify(e.data.path)===JSON.stringify(t))?.data,i=r?.resume??r?.stage;if(!r||!i)return null;let a=Math.max(-1,...e.nodes.filter(e=>e.data.run).map(e=>n(e.data))),o=n(r);if(o<0||o>a)return null;let s=e.nodes.filter(e=>e.data.path?.length===2).sort((e,t)=>n(e.data)-n(t.data)).map(e=>e.data.resume??e.data.stage?? ` ` ),c=e=>!!e&&s.filter(t=>t===e).length>1;return c(i)||o>0&&c(s[o-1])?{label: ` Add an id to resume here ` ,from:i,blocked:!0}:{label:o===a? ` Resume from here ` : ` Re - run from here ` ,from:i}}var M U=140,N U=280,P U={"agent.run": ` Agent ` ,"command.run": ` Run commands ` ,"repo.prepare": ` Prepare worktree ` ,"repo.commit": ` Commit ` ,"repo.open-pr": ` Open pull request ` ,"gate.repository": ` Repository gate ` ,"gate.diff-size": ` Diff size gate ` ,"gate.diff-rules": ` Diff rules gate ` ,"forge.comment": ` Comment ` ,"forge.close-issue": ` Close issue ` ,"human.approve": ` Human approval ` ,"workflow.call": ` Call workflow ` ,"workflow.handoff": ` Hand off ` ,"workflow.finish": ` Finish ` ,"review.pr": ` Review pull request ` ,"review.start-round": ` Start review round ` ,"review.reply": ` Reply to review ` };function F U(e){return P U[e]??e}var I U=/ \{ \{ \s *steps \. ([A-Za-z0-9_-]+) \. [^}]* \} \} /g;function L U(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function R U(e,t){let n=e=>typeof t[e]== ` string ` ?t[e]: ` ` ;switch(e){case ` agent . run ` :return[n( ` role ` )|| ` builder ` ,t.read_only? ` read - only ` :n( ` gate ` )? ` gated : $ { n ( ` gate ` ) } ` : ` ` ].filter(Boolean).join( ` · ` );case ` repo . commit ` :return[n( ` message ` ),t.push? ` push ` : ` ` ].filter(Boolean).join( ` · ` );case ` workflow . call ` :case ` workflow . handoff ` :return n( ` workflow ` );case ` workflow . finish ` :return n( ` status ` )|| ` completed ` ;case ` human . approve ` :return n( ` then ` )? ` then $ { n ( ` then ` ) } ` : ` ` ;case ` gate . repository ` :return n( ` expect ` )=== ` test - failure ` ? ` tests must fail ` :t.repair? ` repair if red ` : ` ` }return ` ` }function z U(e){for(let t of[ ` mission ` , ` message ` , ` body ` , ` plan ` , ` detail ` ]){let n=e[t];if(typeof n== ` string ` &&n.trim())return n.replace(/ \{ \{ \s *([^}]+?) \s * \} \} /g, ` ‹ $1 › ` ).split( `
` ).find(e=>e.trim())?.trim()}}function BU(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(IU)].map(e=>e[1]))]}function VU(e){let t=DU(e).toJS(),n=LU(t)&&Array.isArray(t.steps)?t.steps:[],r=[],i=[],a=new Map,o=[],s= ` start ` ;r.push({id:s,type: ` step ` ,position:{x:0,y:0},data:{kind: ` start ` ,key: ` start ` ,title: ` Starts when ` ,type: ` ` ,detail: ` ` }});let c=[s],l=1,u=new Map,d=e=>{let t=u.get(e)??0;return u.set(e,t+1),t},f=(e,t,n,i,s,c,l)=>{let u=LU(e)?e:{},f=typeof u.type== ` string ` ?u.type: ` ` ,p=LU(u.settings)?u.settings:{},m=typeof u.id== ` string ` ?u.id: ` ` ,h= ` step - $ { t } ` ,g=s? ` $ { s } / $ { m || f } ` :m||f;r.push({id:h,type: ` step ` ,position:{x:n,y:i},data:{kind: ` step ` ,key:m||t,title:m||FU(f),type:f,detail:RU(f,p),summary:zU(p),when:typeof u.when== ` string ` ?u.when:void 0,retry:LU(u.retry)&&typeof u.retry.attempts== ` number ` ?u.retry.attempts:void 0,continues:u.on_failure=== ` continue ` ,branch:s,path:l,stage:g,occurrence:d(g),...c?{resume:c}:{}}}),m&&a.set(m,h);for(let e of BU(u.settings,u.when))o.push({from:e,to:h});return h},p=(e,t,n)=>{e.forEach((r,a)=>i.push({id: ` flow - $ { r } - $ { t } ` ,source:r,target:t,kind: ` flow ` ,insertAfter:a===e.length-1?n:void 0}))};for(let[e,t]of n.entries()){if(LU(t)&&LU(t.parallel)){let n=Object.entries(t.parallel),r=typeof t.id== ` string ` ?t.id: ` parallel ` ,i=[],a=0;n.forEach(([t,o],s)=>{let u=(s-(n.length-1)/2)*NU,d=c,m=c;(Array.isArray(o)?o:[]).forEach((i,o)=>{let c=f(i, ` $ { e + 1 } - $ { t } - $ { o + 1 } ` ,u,(l+o)*MU,t,r,[ ` steps ` ,e, ` parallel ` ,t,o]);p(d,c,d===m&&s===n.length-1?e-1:void 0),d=[c],a=Math.max(a,o+1)}),i.push(...d)}),c=i,l+=Math.max(a,1);continue}let n=f(t,String(e+1),0,l*MU,void 0,void 0,[ ` steps ` ,e]);p(c,n,e-1),c=[n],l++}r.push({id: ` add - end ` ,type: ` add ` ,position:{x:104,y:l*MU-24},data:{kind: ` step ` ,key: ` add ` ,title: ` ` ,type: ` ` ,detail: ` ` }}),p(c, ` add - end ` );for(let{from:e,to:t}of o){let n=a.get(e);n&&(i.some(e=>e.kind=== ` flow ` &&e.source===n&&e.target===t)||i.push({id: ` data - $ { n } - $ { t } ` ,source:n,target:t,kind: ` data ` ,label:e,offset:24+14*i.filter(e=>e.kind=== ` data ` ).length,sourceHandle: ` data - out ` ,targetHandle: ` data - in ` }))}return{nodes:r,edges:i}}var HU={agent:sr,command:Jr,repo:Cr,gate:Gr,forge:jr,human:ti,review:xr,workflow:ii},UU={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function WU(e){return HU[e.split( ` . ` )[0]]??ii}function GU(e){return Object.keys(UU).map(t=>({title:UU[t],icon:HU[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function KU(e,t){let n=DU(e).getIn(t,!0);if(qz(n))return n.toJSON()}function qU(e,t,n){let r=DU(e);return r.setIn(t,r.createNode( $ U(n))),r.toString()}function JU(e,t,n){let r=DU(e),i=r.get( ` steps ` ,!0);if(Xz(i)||(r.set( ` steps ` ,r.createNode([])),i=r.get( ` steps ` ,!0)),!Xz(i))return{source:e,path:[]};let a=Math.min(Math.max(t+1,0),i.items.length);return i.items.splice(a,0,r.createNode({type:n})),{source:r.toString(),path:[ ` steps ` ,a]}}function YU(e,t){let n=DU(e),r=n.getIn(t.slice(0,-1),!0),i=t.at(-1);if(!Xz(r)||typeof i!= ` number ` )return{source:e,path:t};let a=n.createNode(n.getIn(t));return qz(a)&&a.delete( ` id ` ),r.items.splice(i+1,0,a),{source:n.toString(),path:[...t.slice(0,-1),i+1]}}function XU(e,t){let n=DU(e);n.deleteIn(t);let r=t.slice(0,-1);if(r.length>2){let e=n.getIn(r,!0);Xz(e)&&e.items.length===0&&n.deleteIn(r)}return n.toString()}function ZU(e,t,n){let r=DU(e),i=r.getIn(t.slice(0,-1),!0),a=t.at(-1);if(!Xz(i)||typeof a!= ` number ` )return{source:e,path:t};let o=a+n;if(o<0||o>=i.items.length)return{source:e,path:t};let[s]=i.items.splice(a,1);return i.items.splice(o,0,s),{source:r.toString(),path:[...t.slice(0,-1),o]}}function QU(e,t){let n=DU(e).toJS(),r=Array.isArray(n?.steps)?n.steps:[],i=typeof t[1]== ` number ` ?t[1]:r.length,a=[],o=e=>{if(typeof e!= ` object ` ||!e)return;let t=e;if(typeof t.id== ` string ` &&a.push(t.id),typeof t.parallel== ` object ` &&t.parallel!==null)for(let e of Object.values(t.parallel))Array.isArray(e)&&e.forEach(o)};if(r.slice(0,i).forEach(o),t.length===5){let e=r[i]?.parallel?.[t[3]];Array.isArray(e)&&e.slice(0,t[4]).forEach(o)}return a}function $ U(e){if(Array.isArray(e))return e.map( $ U);if(typeof e!= ` object ` ||!e)return e;let t={};for(let[n,r]of Object.entries(e)){if(r===void 0||r=== ` ` ||r===null)continue;let e= $ U(r);(typeof e!= ` object ` ||!e||Array.isArray(e)||Object.keys(e).length!==0)&&(t[n]=e)}return t}function eW(e,t){let n=DU(e).get(t,!0);return n&&typeof n== ` object ` && ` toJSON ` in n?n.toJSON():DU(e).get(t)}function tW(e,t,n){let r=DU(e),i= $ U({[t]:n})[t];return i===void 0?r.delete(t):r.set(t,r.createNode(i)),r.toString()}function nW(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function rW(e,t=[]){let n=DU(e),r=n.errors[0];if(r)return{ok:!1,message:_W(r.message),line:r.linePos?.[0]?.line};let i=n.toJS();if(!vW(i))return{ok:!1,message: ` A workflow is a mapping with an id and steps . ` };let a=typeof i.id== ` string ` ?i.id.trim(): ` ` ;if(!a)return{ok:!1,message: ` workflow id is required ` };le
Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:p W(e)}))}var d W=/^( \s *)(- \s +)?/,f W=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function p W(e){let{code:t,comment:n}=m W(e),r=h W(t);return n&&r.push({text:n,kind: ` comment ` }),r}function m W(e){let t= ` ` ;for(let n=0;n<e.length;n++){let r=e[n];if(t){r===t&&(t= ` ` );continue}if(r=== ` "`||r===`'`){t=r;continue}if(r===`#`&&(n===0||/\s/.test(e[n-1]??``)))return{code:e.slice(0,n),comment:e.slice(n)}}return{code:e,comment:``}}function h W(e){if(!e)return[];let t=[],n=d W.exec(e);n?.[1]&&t.push({text:n[1],kind:`plain`}),n?.[2]&&t.push({text:n[2],kind:`punct`});let r=e.slice(n?.[0].length??0);if(!r)return t;let i=f W.exec(r);return i?(t.push({text:i[1]??``,kind:`key`}),t.push({text:i[2]??`:`,kind:`punct`}),i[3]&&t.push({text:i[3],kind:`plain`}),[...t,...g W(i[4]??``)]):[...t,...g W(r)]}function g W(e){if(!e)return[];let t=/^(" [ ^ "]*" ? | '[^' ] * ' ? ) ( [ \ s \ S ] * ) $ / . exec ( e ) ; if ( ! t ) return [ { text : e , kind : ` plain ` } ] ; let n = [ { text : t [ 1 ] ? ? ` ` , kind : ` string ` } ] ; return t [ 2 ] && n . push ( { text : t [ 2 ] , kind : ` plain ` } ) , n } function _W ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function v W(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function y W(e){return typeof e== ` string ` &&e.trim()!== ` ` }var b W={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },x W={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },S W={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },C W={class: ` min - w - 0 flex - 1 ` },w W=[ ` value ` , ` placeholder ` ],T W={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },E W={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },D W={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },O W={key:1,class: ` space - y - 1.5 ` },k W=[ ` title ` ],A W=[ ` value ` ],j W=[ ` value ` ],M W={key:3,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },N W=[ ` onClick ` ],P W=[ ` onClick ` ],F W={key:2,class: ` divide - y divide - border rounded - md border border - border ` },I W=[ ` title ` ],L W=[ ` value ` , ` onChange ` ],R W=[ ` value ` ],z W=[ ` value ` , ` onInput ` ],B W=[ ` value ` , ` onFocus ` , ` onInput ` ],V W=[ ` title ` ],H W={key:0,class: ` text - xs text - danger ` },U W={class: ` space - y - 2 ` },W W={class: ` divide - y divide - border rounded - md border border - border ` },G W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },K W=[ ` value ` ],q W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },J W=[ ` value ` ],Y W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },X W=[ ` value ` ],Z W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },Q W={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` }, $ W=n({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=M(()=>K U(n.yaml,n.path)??{}),a=M(()=>typeof i.value.type== ` string ` ?i.value.type: ` ` ),o=M(()=>n.vocabulary.find(e=>e.name===a.value)),s=M(()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),c=M(()=>Q U(n.yaml,n.path)),u=M(()=>o.value?.settings&&i.value.settings?c W(i.value.settings,o.value.settings, ` settings ` ): ` ` ),d=[ ` mission ` , ` workflow ` , ` message ` , ` body ` , ` plan ` , ` then ` , ` status ` , ` detail ` , ` run ` , ` rules ` ],f=/mission|body|detail|plan|rules/;function p(e,t){return t.type=== ` string ` ?t.enum? ` select ` :f.test(e)? ` text ` : ` line ` :t.type=== ` boolean ` ? ` boolean ` :t.type=== ` integer ` ||t.type=== ` number ` ? ` number ` :t.type=== ` array ` &&t.items?.type=== ` string ` ? ` lines ` : ` yaml ` }let m=M(()=>{let e=Object.entries(o.value?.settings?.properties??{}).map(([e,t])=>({key:e,schema:t,kind:p(e,t)})),t=e.filter(e=>d.includes(e.key)&&e.kind!== ` boolean ` ).sort((e,t)=>d.indexOf(e.key)-d.indexOf(t.key))[0],n=e.filter(e=>e!==t);return{lead:t,compact:n.filter(e=>[ ` select ` , ` line ` , ` number ` , ` boolean ` ].includes(e.kind)),long:n.filter(e=>[ ` text ` , ` lines ` , ` yaml ` ].includes(e.kind))}});function h(e){let{id:t,type:i,...a}=e;r( ` update : yaml ` ,q U(n.yaml,n.path,{id:t,type:i,...a}))}function g(e,t){h({...i.value,[e]:t})}function _(e){g( ` retry ` ,{...i.value.retry,...e})}function v(e,t){h({...i.value,settings:{...s.value,[e]:t}})}let y=W(null);function b(e,t){let n=y.value??m.value.lead?.key;if(!n)return;let r=typeof s.value[n]== ` string ` ?s.value[n]: ` ` ,i= ` { { steps . $ { e } . $ { t } } } ` ;v(n,r? ` $ { r . trimEnd ( ) } $ { i } ` :i)}let x=W({});function S(e,t){try{v(e,t.trim()?O U(t):void 0),x.value={...x.value,[e]: ` ` }}catch(t){x.value={...x.value,[e]:String(t.message).split( `
` )[0]}}}let ee=e=>e===void 0? ` ` :k U(e).trimEnd(),w=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),T=e=>typeof s.value[e]== ` string ` ?s.value[e]: ` ` ;return(e,t)=>(P(),V( ` aside ` ,b W,[B( ` header ` ,x W,[B( ` span ` ,S W,[(P(),U(ye(F(W U)(a.value)),{class: ` size - 4 ` }))]),B( ` div ` ,C W,[B( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:F(F U)(a.value),"aria-label": ` Step id ` ,onInput:t[0]||=e=>g( ` id ` ,e.target.value)},null,40,w W),B( ` div ` ,T W,L(a.value),1)]),O(F(q),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:t[1]||=e=>r( ` close ` )},{default:C(()=>[O(F(oi))]),_:1})]),B( ` div ` ,E W,[u.value?(P(),V( ` p ` ,D W,L(u.value),1)):N( ` ` ,!0),m.value.lead?(P(),V( ` section ` ,O W,[B( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:m.value.lead.schema.description},[l(L(w(m.value.lead.key,m.value.lead.schema))+ ` ` ,1),m.value.lead.schema.description?(P(),U(F(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):N( ` ` ,!0)],8,k W),m.value.lead.kind=== ` select ` ?(P(),V( ` select ` ,{key:0,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:T(m.value.lead.key),onChange:t[2]||=e=>v(m.value.lead.key,e.target.value||void 0)},[t[13]||=B( ` option ` ,{value: ` ` }, ` Default ` ,-1),(P(!0),V(R,null,H(m.value.lead.schema.enum,e=>(P(),V( ` option ` ,{key:e,value:e},L(e),9,j W))),128))],40,A W)):m.value.lead.kind=== ` text ` ?(P(),U(F(mh),{key:1,"model-value":T(m.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:t[3]||=e=>y.value=m.value.lead.key,"onUpdate:modelValue":t[4]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(P(),U(F(J),{key:2,"model-value":T(m.value.lead.key),onFocus:t[5]||=e=>y.value=m.value.lead.key,"onUpdate:modelValue":t[6]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])),c.value.length&&m.value.lead.kind!== ` select ` ?(P(),V( ` div ` ,M W,[t[14]||=B( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(P(!0),V(R,null,H(c.value,e=>(P(),V(R,{key:e},[B( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>b(e, ` summary ` )},L(e),9,N W),B( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>b(e, ` result ` )},L(e)+ ` . result ` ,9,P W)],64))),128))])):N( ` ` ,!0)])):N( ` ` ,!0),m.value.compact.length?(P(),V( ` section ` ,F W,[(P(!0),V(R,null,H(m.value.compact,e=>(P(),V( ` div ` ,{key:e.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[B( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:e.schema.description},[l(L(w(e.key,e.schema))+ ` ` ,1),e.schema.description?(P(),U(F(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):N( ` ` ,!0)],8,I W),e.kind=== ` boolean ` ?(P(),U(F(sb),{key:0,"model-value":s.value[e.key]===!0,"onUpdate:modelValue":t=>v(e.key,t||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):e.kind=== ` select ` ?(P(),V( ` select ` ,{key:1,class: ` h - 7 max - w - 40 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:T(e.key),onChange:t=>v(e.key,t.target.value||void 0)},[t[15]||=B( ` option ` ,{value: ` ` }, ` Default ` ,-1),(P(!0),V(R,null,H(e.schema.enum,e=>(P(),V( ` option ` ,{key:e,value:e},L(e),9,R W))),128))],40,L W)):e.kind=== ` number ` ?(P(),V( ` input ` ,{key:2,type: ` number ` ,class: ` h - 7 w - 24 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:s.value[e.key]?? ` ` ,onInput:t=>v(e.key,t.target.value=== ` ` ?void 0:Number(t.target.value))},null,40,z W)):(P(),V( ` input ` ,{key:3,class: ` h - 7 w - 40 rounded - md border border - input bg - background px - 2 text - [ 13 px ] ` ,value:T(e.key),onFocus:t=>y.value=e.key,onInput:t=>v(e.key,t.target.value)},null,40,B W))]))),128))])):N( ` ` ,!0),(P(!0),V(R,null,H(m.value.long,e=>(P(),V( ` section ` ,{key:e.key,class: ` space - y - 1.5 ` },[B( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:e.schema.description},[l(L(w(e.key,e.schema))+ ` ` ,1),e.schema.description?(P(),U(F(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):N( ` ` ,!0)],8,V W),e.kind=== ` text ` ?(P(),U(F(mh),{key:0,"model-value":T(e.key),class: ` min - h - 20 text - [ 13 px ] ` ,onFocus:t=>y.value=e.key,"onUpdate:modelValue":t=>v(e.key,String(t))},null,8,[ ` model - value ` , ` onFocus ` , ` onUpdate : modelValue ` ])):e.kind=== ` lines ` ?(P(),U(F(mh),{key:1,"model-value":Array.isArray(s.value[e.key])?s.value[e.key].join( `
` ): ` ` ,class: ` min - h - 16 font - mono text - xs ` ,placeholder: ` One per line ` ,"onUpdate:modelValue":t=>v(e.key,String(t).split( `
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(P(),V(R,{key:2},[O(F(mh),{"model-value":ee(s.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>S(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),x.value[e.key]?(P(),V( ` span ` ,RW,L(x.value[e.key]),1)):N( ` ` ,!0)],64))]))),128)),B( ` section ` ,zW,[t[21]||=B( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),B( ` div ` ,BW,[B( ` label ` ,VW,[t[16]||=B( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),B( ` input ` ,{class: ` h - 7 w - 48 rounded - md border border - input bg - background px - 2 font - mono text - xs ` ,placeholder: ` always ` ,value:i.value.when?? ` ` ,onInput:t[7]||=e=>g( ` when ` ,e.target.value)},null,40,HW)]),B( ` label ` ,UW,[t[18]||=B( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),B( ` select ` ,{class: ` h - 7 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:i.value.on_failure?? ` ` ,onChange:t[8]||=e=>g( ` on _failure ` ,e.target.value||void 0)},[...t[17]||=[B( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),B( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,WW)]),B( ` label ` ,GW,[t[19]||=B( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),B( ` input ` ,{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 7 w - 20 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:i.value.retry?.attempts?? ` ` ,onInput:t[9]||=e=>_({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,KW)]),B( ` label ` ,qW,[t[20]||=B( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),O(F(Xy),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":t[10]||=e=>_({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),B( ` footer ` ,JW,[O(F(q),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:t[11]||=e=>r( ` remove ` )},{default:C(()=>[O(F(Xr)),t[22]||=l( ` Delete step ` ,-1)]),_:1}),O(F(q),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:t[12]||=e=>r( ` close ` )},{default:C(()=>[...t[23]||=[l( ` Done ` ,-1)]]),_:1})])]))}}),XW= ` repository _path ` ;function ZW(e,t,n){let r=[];for(let[n,i]of e){let e=t[n];e?.from=== ` path ` &&e.path.trim()&&r.push({name:n,path:e.path.trim(),type:i.type?? ` string ` ,required:i.required===!0})}return n.trim()&&r.push({name:XW,path:n.trim(),type: ` string ` ,required:!0}),r}function QW(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function $ W(e,t,n){let r=[];for(let[i,a]of e){let e=t[i],o=a.type?? ` string ` ;if(!(e&&(e.from=== ` path ` ?e.path.trim():e.value!== ` ` ))){a.required&&r.push( ` $ { i } is required ` );continue}if(e.from=== ` path ` ){let e=n?.failures?.find(e=>e.field_name===i);e&&r.push( ` $ { i } : $ { e . reason } ` );continue}let s=QW(Ww(e.value,o));o!== ` any ` &&s!==o&&r.push( ` $ { i } is $ { o } , but $ { JSON . stringify ( e . value ) } is not ` )}return n?.failures?.some(e=>e.field_name=== ` repository _path ` )&&r.push( ` the repository path does not resolve ` ),r}function eG(e,t){let n={};for(let[r,i]of e){let e=t[r];e?.from=== ` path ` &&e.path.trim()?n[r]={param:r}:e?.from=== ` value ` &&e.value!== ` ` &&(n[r]={value:Ww(e.value,i.type?? ` string ` )})}return n}function tG(e,t){let n=e=>t.find(t=>t.name===e)?.path?? ` ` ,r={};for(let[t,i]of Object.entries(e.inputs??{}))r[t]=i.param?{from: ` path ` ,path:n(i.param),value: ` ` }:{from: ` value ` ,path: ` ` ,value:typeof i.value== ` string ` ?i.value:JSON.stringify(i.value)};return{rows:r,repositoryPath:n(e.repo_param)}}function nG(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...nG(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...nG(n,r)]}):[]}function rG(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function iG(e){try{let t=JSON.parse(e.headers?? ` { } ` );return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.join( ` , ` ):String(t)]))}catch{return{}}}function aG(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var oG={class: ` flex h - full flex - col ` },sG={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },cG={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },lG={key:0,class: ` flex flex - 1 items - center justify - center ` },uG={class: ` space - y - 1.5 ` },dG=[ ` disabled ` ],fG=[ ` value ` ],pG={key:1,class: ` space - y - 1.5 ` },mG=[ ` value ` ],hG=[ ` title ` ],gG={class: ` space - y - 1.5 ` },_G={id: ` bind - paths ` },vG=[ ` value ` ],yG={class: ` divide - y divide - border rounded - md border border - border ` },bG={class: ` flex items - center gap - 1.5 text - xs ` },xG={class: ` font - mono ` },SG={class: ` text - fg - subtle ` },CG={key:0,class: ` text - danger ` ,title: ` Required ` },wG=[ ` title ` , ` aria - label ` , ` onClick ` ],TG=[ ` onUpdate : modelValue ` , ` aria - label ` ],EG=[ ` onUpdate : modelValue ` , ` aria - label ` ],DG={key:2,class: ` text - xs text - danger ` },OG=[ ` title ` ],kG={key:0,class: ` space - y - 1 px - 3 py - 2 ` },AG={key:0,class: ` text - xs text - danger ` },jG={key:1,class: ` truncate font - mono text - xs text - success ` },MG={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },NG={class: ` space - y - 2 ` },PG={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },FG={key:1,class: ` te Line truncated
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(P(),V(R,{key:2},[O(F(mh),{"model-value":ee(s.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>S(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),x.value[e.key]?(P(),V( ` span ` ,HW,L(x.value[e.key]),1)):N( ` ` ,!0)],64))]))),128)),B( ` section ` ,UW,[t[21]||=B( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),B( ` div ` ,WW,[B( ` label ` ,GW,[t[16]||=B( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),B( ` input ` ,{class: ` h - 7 w - 48 rounded - md border border - input bg - background px - 2 font - mono text - xs ` ,placeholder: ` always ` ,value:i.value.when?? ` ` ,onInput:t[7]||=e=>g( ` when ` ,e.target.value)},null,40,KW)]),B( ` label ` ,qW,[t[18]||=B( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),B( ` select ` ,{class: ` h - 7 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:i.value.on_failure?? ` ` ,onChange:t[8]||=e=>g( ` on _failure ` ,e.target.value||void 0)},[...t[17]||=[B( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),B( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,JW)]),B( ` label ` ,YW,[t[19]||=B( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),B( ` input ` ,{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 7 w - 20 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:i.value.retry?.attempts?? ` ` ,onInput:t[9]||=e=>_({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,XW)]),B( ` label ` ,ZW,[t[20]||=B( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),O(F(Xy),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":t[10]||=e=>_({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),B( ` footer ` ,QW,[O(F(q),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:t[11]||=e=>r( ` remove ` )},{default:C(()=>[O(F(Xr)),t[22]||=l( ` Delete step ` ,-1)]),_:1}),O(F(q),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:t[12]||=e=>r( ` close ` )},{default:C(()=>[...t[23]||=[l( ` Done ` ,-1)]]),_:1})])]))}}),eG= ` repository _path ` ;function tG(e,t,n){let r=[];for(let[n,i]of e){let e=t[n];e?.from=== ` path ` &&e.path.trim()&&r.push({name:n,path:e.path.trim(),type:i.type?? ` string ` ,required:i.required===!0})}return n.trim()&&r.push({name:eG,path:n.trim(),type: ` string ` ,required:!0}),r}function nG(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function rG(e,t,n){let r=[];for(let[i,a]of e){let e=t[i],o=a.type?? ` string ` ;if(!(e&&(e.from=== ` path ` ?e.path.trim():e.value!== ` ` ))){a.required&&r.push( ` $ { i } is required ` );continue}if(e.from=== ` path ` ){let e=n?.failures?.find(e=>e.field_name===i);e&&r.push( ` $ { i } : $ { e . reason } ` );continue}let s=nG(Ww(e.value,o));o!== ` any ` &&s!==o&&r.push( ` $ { i } is $ { o } , but $ { JSON . stringify ( e . value ) } is not ` )}return n?.failures?.some(e=>e.field_name=== ` repository _path ` )&&r.push( ` the repository path does not resolve ` ),r}function iG(e,t){let n={};for(let[r,i]of e){let e=t[r];e?.from=== ` path ` &&e.path.trim()?n[r]={param:r}:e?.from=== ` value ` &&e.value!== ` ` &&(n[r]={value:Ww(e.value,i.type?? ` string ` )})}return n}function aG(e,t){let n=e=>t.find(t=>t.name===e)?.path?? ` ` ,r={};for(let[t,i]of Object.entries(e.inputs??{}))r[t]=i.param?{from: ` path ` ,path:n(i.param),value: ` ` }:{from: ` value ` ,path: ` ` ,value:typeof i.value== ` string ` ?i.value:JSON.stringify(i.value)};return{rows:r,repositoryPath:n(e.repo_param)}}function oG(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...oG(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...oG(n,r)]}):[]}function sG(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function cG(e){try{let t=JSON.parse(e.headers?? ` { } ` );return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.join( ` , ` ):String(t)]))}catch{return{}}}function lG(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var uG={class: ` flex h - full flex - col ` },dG={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },fG={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },pG={key:0,class: ` flex flex - 1 items - center justify - center ` },mG={class: ` space - y - 1.5 ` },hG=[ ` disabled ` ],gG=[ ` value ` ],_G={key:1,class: ` space - y - 1.5 ` },vG=[ ` value ` ],yG=[ ` title ` ],bG={class: ` space - y - 1.5 ` },xG={id: ` bind - paths ` },SG=[ ` value ` ],CG={class: ` divide - y divide - border rounded - md border border - border ` },wG={class: ` flex items - center gap - 1.5 text - xs ` },TG={class: ` font - mono ` },EG={class: ` text - fg - subtle ` },DG={key:0,class: ` text - danger ` ,title: ` Required ` },OG=[ ` title ` , ` aria - label ` , ` onClick ` ],kG=[ ` onUpdate : modelValue ` , ` aria - label ` ],AG=[ ` onUpdate : modelValue ` , ` aria - label ` ],jG={key:2,class: ` text - xs text - danger ` },MG=[ ` title ` ],NG={key:0,class: ` space - y - 1 px - 3 py - 2 ` },PG={key:0,class: ` text - xs text - danger ` },FG={key:1,class: ` truncate font - mono text - xs text - success ` },IG={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },LG={class: ` space - y - 2 ` },RG={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },zG={key:1,class: ` te Line truncated
` ).replace( `
` , `
+ ` ).split( `
` ).map(e=>e.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();r||n.add(e.toLowerCase());let a=i.every((e,t)=>n.has(e)&&Array.from(n.values())[t]===i[t]);return r&&n.delete(e.toLowerCase()),a}function O $ (e,t){return n=>{if(!n.code&&!n.key)return!1;let r=k $ (n.code,e);return Array.isArray(e)?e.some(e=>D $ (n[r],e,t,n.type=== ` keyup ` )):D $ (n[r],e,t,n.type=== ` keyup ` )}}function k $ (e,t){return t.includes(e)? ` code ` : ` key ` }function A $ (e,t){let n=M(()=>u(t?.target)??w $ ),r=ge(u(e)===!0),i=!1,a=new Set,o=c(u(e));j(()=>u(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),Sq([ ` blur ` , ` contextmenu ` ],s),wq((...e)=>o(...e),e=>{let n=u(t?.actInsideInputWithModifier)??!0,a=u(t?.preventDefault)??!1;if(i=E $ (e),(!i||i&&!n)&&T $ (e))return;let o=e.composedPath?.call(e)?.[0]||e.target,s=o?.nodeName=== ` BUTTON ` ||o?.nodeName=== ` A ` ;!a&&(i||!s)&&e.preventDefault(),r.value=!0},{eventName: ` keydown ` ,target:n}),wq((...e)=>o(...e),e=>{let n=u(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&T $ (e))return;i=!1,r.value=!1}},{eventName: ` keyup ` ,target:n});function s(){i=!1,a.clear(),r.value=u(e)===!0}function c(e){return e===null?(s(),()=>!1):typeof e== ` boolean ` ?(s(),r.value=e,()=>!1):Array.isArray(e)||typeof e== ` string ` ?O $ (e,a):e}return r}var j $ = ` vue - flow _ _node - desc ` ,M $ = ` vue - flow _ _edge - desc ` ,N $ = ` vue - flow _ _aria - live ` ,P $ =[ ` Enter ` , ` ` , ` Escape ` ],F $ ={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function I $ (e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function L $ (e,t){let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)}function R $ (e){return{width:e.offsetWidth,height:e.offsetHeight}}function z $ (e,t=0,n=1){return Math.min(Math.max(e,t),n)}function B $ (e,t){return{x:z $ (e.x,t[0][0],t[1][0]),y:z $ (e.y,t[0][1],t[1][1])}}function V $ (e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function H $ (e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function U $ (e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!H $ (e)}function W $ (e){return U $ (e)&& ` computedPosition ` in e}function G $ (e){return!Number.isNaN(e)&&Number.isFinite(e)}function K $ (e){return G $ (e.width)&&G $ (e.height)&&G $ (e.x)&&G $ (e.y)}function q $ (e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:bt({width:0,height:0}),computedPosition:bt({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:l0(e.data)?e.data:{},events:bt(l0(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function J $ (e,t,n){let r={id:e.id.toString(),type:e.type??t?.type?? ` default ` ,source:e.source.toString(),target:e.target.toString(),sourceHandle:e.sourceHandle?.toString(),targetHandle:e.targetHandle?.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:l0(e.data)?e.data:{},events:bt(l0(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function Y $ (e,t,n,r){let i=typeof e== ` string ` ?e:e.id,a=new Set,o=r=== ` source ` ? ` target ` : ` source ` ;for(let e of n)e[o]===i&&a.add(e[r]);return t.filter(e=>a.has(e.id))}function X $ (...e){if(e.length===3){let[t,n,r]=e;return Y $ (t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>H $ (e)&&e.source===r).map(e=>n.find(t=>U $ (t)&&t.id===e.target))}function Z $ (...e){if(e.length===3){let[t,n,r]=e;return Y $ (t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>H $ (e)&&e.target===r).map(e=>n.find(t=>U $ (t)&&t.id===e.source))}function Q $ ({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function $ $ (e,t){return t.some(t=>H $ (t)&&t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))}function e1({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function t1({x:e,y:t},{x:n,y:r,zoom:i},a=!1,o=[1,1]){let s={x:(e-n)/i,y:(t-r)/i};return a?K1(s,o):s}function n1(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function r1({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function i1({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function a1(e){let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0};for(let n=0;n<e.length;n++){let r=e[n];t=n1(t,r1({...r.computedPosition,...r.dimensions}))}return i1(t)}function o1(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...t1(t,n),width:t.width/n.zoom,height:t.height/n.zoom},o=[];for(let t of e){let{dimensions:e,selectable:n=!0,hidden:s=!1}=t,c=
Line truncated
` ).map(e=>e.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();r||n.add(e.toLowerCase());let a=i.every((e,t)=>n.has(e)&&Array.from(n.values())[t]===i[t]);return r&&n.delete(e.toLowerCase()),a}function M $ (e,t){return n=>{if(!n.code&&!n.key)return!1;let r=N $ (n.code,e);return Array.isArray(e)?e.some(e=>j $ (n[r],e,t,n.type=== ` keyup ` )):j $ (n[r],e,t,n.type=== ` keyup ` )}}function N $ (e,t){return t.includes(e)? ` code ` : ` key ` }function P $ (e,t){let n=M(()=>u(t?.target)??O $ ),r=ge(u(e)===!0),i=!1,a=new Set,o=c(u(e));j(()=>u(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),Eq([ ` blur ` , ` contextmenu ` ],s),Oq((...e)=>o(...e),e=>{let n=u(t?.actInsideInputWithModifier)??!0,a=u(t?.preventDefault)??!1;if(i=A $ (e),(!i||i&&!n)&&k $ (e))return;let o=e.composedPath?.call(e)?.[0]||e.target,s=o?.nodeName=== ` BUTTON ` ||o?.nodeName=== ` A ` ;!a&&(i||!s)&&e.preventDefault(),r.value=!0},{eventName: ` keydown ` ,target:n}),Oq((...e)=>o(...e),e=>{let n=u(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&k $ (e))return;i=!1,r.value=!1}},{eventName: ` keyup ` ,target:n});function s(){i=!1,a.clear(),r.value=u(e)===!0}function c(e){return e===null?(s(),()=>!1):typeof e== ` boolean ` ?(s(),r.value=e,()=>!1):Array.isArray(e)||typeof e== ` string ` ?M $ (e,a):e}return r}var F $ = ` vue - flow _ _node - desc ` ,I $ = ` vue - flow _ _edge - desc ` ,L $ = ` vue - flow _ _aria - live ` ,R $ =[ ` Enter ` , ` ` , ` Escape ` ],z $ ={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function B $ (e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function V $ (e,t){let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)}function H $ (e){return{width:e.offsetWidth,height:e.offsetHeight}}function U $ (e,t=0,n=1){return Math.min(Math.max(e,t),n)}function W $ (e,t){return{x:U $ (e.x,t[0][0],t[1][0]),y:U $ (e.y,t[0][1],t[1][1])}}function G $ (e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function K $ (e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function q $ (e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!K $ (e)}function J $ (e){return q $ (e)&& ` computedPosition ` in e}function Y $ (e){return!Number.isNaN(e)&&Number.isFinite(e)}function X $ (e){return Y $ (e.width)&&Y $ (e.height)&&Y $ (e.x)&&Y $ (e.y)}function Z $ (e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:bt({width:0,height:0}),computedPosition:bt({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:p0(e.data)?e.data:{},events:bt(p0(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function Q $ (e,t,n){let r={id:e.id.toString(),type:e.type??t?.type?? ` default ` ,source:e.source.toString(),target:e.target.toString(),sourceHandle:e.sourceHandle?.toString(),targetHandle:e.targetHandle?.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:p0(e.data)?e.data:{},events:bt(p0(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function $ $ (e,t,n,r){let i=typeof e== ` string ` ?e:e.id,a=new Set,o=r=== ` source ` ? ` target ` : ` source ` ;for(let e of n)e[o]===i&&a.add(e[r]);return t.filter(e=>a.has(e.id))}function e1(...e){if(e.length===3){let[t,n,r]=e;return $ $ (t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>K $ (e)&&e.source===r).map(e=>n.find(t=>q $ (t)&&t.id===e.target))}function t1(...e){if(e.length===3){let[t,n,r]=e;return $ $ (t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>K $ (e)&&e.target===r).map(e=>n.find(t=>q $ (t)&&t.id===e.source))}function n1({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function r1(e,t){return t.some(t=>K $ (t)&&t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))}function i1({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function a1({x:e,y:t},{x:n,y:r,zoom:i},a=!1,o=[1,1]){let s={x:(e-n)/i,y:(t-r)/i};return a?X1(s,o):s}function o1(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function s1({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function c1({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function l1(e){let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0};for(let n=0;n<e.length;n++){let r=e[n];t=o1(t,s1({...r.computedPosition,...r.dimensions}))}return c1(t)}function u1(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...a1(t,n),width:t.width/n.zoom,height:t.height/n.zoom},o=[];for(let t of e){let{dimensions:e,selectable:n=!0,hidden:s=!1}=t,c=
Line truncated
Node : $ { e } ` ,NODE_NOT_FOUND:e=> ` Node not found
Node : $ { e } ` ,NODE_MISSING_PARENT:(e,t)=> ` Node is missing a parent
Node : $ { e }
@@ -149,4 +149,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 ` },B1=class extends Error{constructor(e,...t){super(z1[e]?.call(z1,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function V1(e){return ` clientX ` in e}function H1(e){return ` sourceEvent ` in e}function U1(e,t){let n=V1(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 W1=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function G1(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function K1(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var q1=()=>!0;function J1(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function Y1(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())L $ (i,I $ (e))>0&&r.push(e);return r}var X1=250;function Z1(e,t,n,r){let i=[],a=1/0,o=Y1(e,n,t+X1);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}=P1(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 Q1(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=q1},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:_}=U1(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= $ 1(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===y $ .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=n0(t,e,a,p,n,!0)}return b}function $ 1(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function e0(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function t0(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function n0(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===y $ .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,...P1(o,c,c.position,!0)}:c}var r0={[g $ .Left]:g $ .Right,[g $ .Right]:g $ .Left,[g $ .Top]:g $ .Bottom,[g $ .Bottom]:g $ .Top},i0=[ ` production ` , ` prod ` ];function a0(e,...t){o0()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function o0(){return!i0.includes( ` production ` )}function s0(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,...R $ (t)}}):null}function c0(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),ht(()=>{o.blur()})):n([e])}function l0(e){return F(e)!==void 0}function u0(e,t,n,r){if(!e||!e.source||!e.target)return n(new B1(R1.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=H $ (e)?e:{...e,id:Q $ (e)},i=J $ (i,void 0,r),! $ $ (i,t)&&i}function d0(e,t,n,r,i){if(!t.source||!t.target)return i(new B1(R1.EDGE_INVALID,e.id)),!1;if(!n)return i(new B1(R1.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?Q $ (t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function f0(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!U $ (o)){n(new B1(R1.NODE_INVALID,o?.id));continue}let s=q $ (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 B1(R1.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 p0(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 m0(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 } ` ;p0( ` source ` ,o, ` $ { r } - $ { a } -- 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 ` },W1=class extends Error{constructor(e,...t){super(U1[e]?.call(U1,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function G1(e){return ` clientX ` in e}function K1(e){return ` sourceEvent ` in e}function q1(e,t){let n=G1(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 J1=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function Y1(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function X1(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var Z1=()=>!0;function Q1(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function $ 1(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())V $ (i,B $ (e))>0&&r.push(e);return r}var e0=250;function t0(e,t,n,r){let i=[],a=1/0,o= $ 1(e,n,t+e0);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}=R1(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 n0(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=Z1},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:_}=q1(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=r0(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===C $ .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=o0(t,e,a,p,n,!0)}return b}function r0(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function i0(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function a0(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function o0(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===C $ .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,...R1(o,c,c.position,!0)}:c}var s0={[b $ .Left]:b $ .Right,[b $ .Right]:b $ .Left,[b $ .Top]:b $ .Bottom,[b $ .Bottom]:b $ .Top},c0=[ ` production ` , ` prod ` ];function l0(e,...t){u0()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function u0(){return!c0.includes( ` production ` )}function d0(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,...H $ (t)}}):null}function f0(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),ht(()=>{o.blur()})):n([e])}function p0(e){return F(e)!==void 0}function m0(e,t,n,r){if(!e||!e.source||!e.target)return n(new W1(H1.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=K $ (e)?e:{...e,id:n1(e)},i=Q $ (i,void 0,r),!r1(i,t)&&i}function h0(e,t,n,r,i){if(!t.source||!t.target)return i(new W1(H1.EDGE_INVALID,e.id)),!1;if(!n)return i(new W1(H1.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?n1(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function g0(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!q $ (o)){n(new W1(H1.NODE_INVALID,o?.id));continue}let s=Z $ (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 W1(H1.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 _0(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 v0(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 } ` ;_0( ` source ` ,o, ` $ { r } - $ { a } -- Line truncated