@@ -4,67 +4,67 @@ import{$ as e,$t as t,A as n,At as r,B as i,Bt as a,C as o,Cn as s,Ct as c,D as
` );d=n.pop()|| ` ` ;for(let e of n){let t=e.split( `
` ).find(e=>e.startsWith( ` data : ` ));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.session_id&&(Ci.value=n.session_id),n.type=== ` delta ` &&(o+=n.text,Oi.value=Oi.value?{...Oi.value,text:o}:null),(n.type=== ` tool ` ||n.type=== ` navigate ` )&&(a=[...a,n],Oi.value=Oi.value?{...Oi.value,tools:a}:null),n.type=== ` ask ` &&n.ask&&(clearTimeout(l),Oi.value=Oi.value?{...Oi.value,ask:n.ask}:null),n.type=== ` done ` &&(s=!0,o||=n.text|| ` ` ),n.type=== ` error ` )throw Error(n.text)}if(t)break}if(!s)throw Error( ` chat stream ended before completion ` );wi.value=[...wi.value,{from: ` assistant ` ,text:o,tool_calls:a}],Oi.value=null,Ei.value= ` Ready ` ,await Ui()}catch(e){let t=e;t.name=== ` AbortError ` &&!c?(Oi.value={text: ` Turn stopped . ` ,tools:a,isError:!1,turn:r,isRetry:i},Ei.value= ` Stopped ` ):(Oi.value={text: ` Unable to complete that turn : $ { t . message || t } ` ,tools:a,isError:!0,turn:r?gi(r):void 0,isRetry:i},Ei.value= ` Error — retry available ` )}finally{clearTimeout(l),bi=null,Vi=null,Di.value=!1}}function na(){Ei.value= ` Stopping … ` ,Ci.value&&q.chatCancel(Ci.value).catch(()=>{}),Hi()}function ra(){L(()=>{Ui().catch(e=>{Ei.value=e.message|| ` Chat unavailable ` })}),bt(()=>{Hi()})}async function ia(e){let t=new Uint8Array(await e.arrayBuffer()),n= ` ` ;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));await ta({textOverride: ` 🎤 Voice message ` ,voice:{data:btoa(n),mime_type:e.type|| ` audio / webm ` }})}var aa=[ ` aria - label ` , ` title ` , ` aria - expanded ` , ` aria - controls ` ],oa=n({__name: ` ChatFab ` ,props:{open:{type:Boolean}},emits:[ ` toggle ` ],setup(e,{emit:t}){let n=t;function r(e){return K( ` col - start - 1 row - start - 1 grid place - items - center transition - [ opacity , transform ] duration - [ 140 ms ] ` ,e? ` opacity - 100 ` : ` - rotate - 45 scale - [ 0.7 ] opacity - 0 ` )}return(t,i)=>(F(),H( ` button ` ,{type: ` button ` ,class: ` relative z - 10 grid size - 14 cursor - pointer place - items - center rounded - full border border - border - strong bg - secondary text - primary shadow - [ var ( -- shadow - md ) ] transition - transform duration - [ 140 ms ] hover : - translate - y - px focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary active : translate - y - 0 ` ,"aria-label":e.open? ` Close chat ` : ` Chat with Archie ` ,title:e.open? ` Close chat ` : ` Chat with Archie ` ,"aria-expanded":e.open,"aria-controls":I(vi),onClick:i[0]||=e=>n( ` toggle ` )},[V( ` span ` ,{"aria-hidden": ` true ` ,class:A(r(!e.open))},[k(I(Ar),{size:22})],2),V( ` span ` ,{"aria-hidden": ` true ` ,class:A(r(e.open))},[k(I(oi),{size:22})],2)],8,aa))}});function sa(e){return typeof e== ` string ` ? ` '${e}' ` :new da().serialize(e)}var ca= ` _ - , ; : ! ? . '"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,la=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[ca.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function ua(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&la[n]?la[n]:n+128,s=a<128&&la[a]?la[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var da=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?ua(e,t):n===`number`&&r===`number`?e-t:ua(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`' $ { e } ' ` ;case ` bigint ` :return ` $ { e } n ` ;case ` object ` :return this. $ object(e);case ` function ` :return this. $ function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!== ` [ object Object ] ` )return this.serializeBuiltInType(t.length<10? ` unknown : $ { t } ` :t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0? ` ` :n.name;if(r!== ` ` &&globalThis[r]===n)return this.serializeBuiltInType(r,e);if( ` toJSON ` in e&&typeof e.toJSON== ` function ` ){let t=e.toJSON();return r+(typeof t== ` object ` &&t?this. $ object(t): ` ( $ { this . serialize ( t ) } ) ` )}let i=Object.keys(e).sort(ua),a= ` $ { r } { ` ;for(let t=0;t<i.length;t++){let n=i[t];a+= ` $ { n } : $ { this . serialize ( e [ n ] ) } ` ,t<i.length-1&&(a+= ` , ` )}return a+ ` } ` }serializeBuiltInType(e,t){let n=this[ ` $ ` +e];if(n)return n.call(this,t);if(typeof t.entries== ` function ` )return this.serializeObjectEntries(e,t.entries());throw Error( ` Cannot serialize $ { e } ` )}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r= ` $ { e } { ` ;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+= ` $ { this . serialize ( t , ! 0 ) } : $ { this . serialize ( i ) } ` ,e<n.length-1&&(r+= ` , ` )}return r+ ` } ` } $ object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e, ` # $ { this . # e . size } ` ),t=this.serializeObject(e),this.#e.set(e,t)),t} $ function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)=== ` [ native code ] } ` ? ` $ { e . name || ` ` } ( ) [ native ] ` : ` $ { e . name } ( $ { e . length } ) $ { t . replace ( /\s*\n\s*/g , ` ` ) } ` } $ Array(e){let t= ` [ ` ;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+= ` , ` );return t+ ` ] ` } $ Date(e){try{return ` Date ( $ { e . toISOString ( ) } ) ` }catch{return ` Date ( null ) ` }} $ ArrayBuffer(e){return ` ArrayBuffer [ $ { new Uint8Array ( e ) . join ( ` , ` ) } ] ` } $ Set(e){return ` Set$ { this . $Arr Line truncated
` )].join( `
` ))}return()=>i.value||r.value||o.value?be(t.default({present:o.value})[0],{ref:e=>{let t=Ua(e);return t?.hasAttribute===void 0||(t?.hasAttribute( ` data - reka - popper - content - wrapper ` )?a.value=t.firstElementChild:a.value=t),t}}):null}});function us(){let e=G();return{primitiveElement:e,currentElement:N(()=>[ ` # text ` , ` # comment ` ].includes(e.value?. $ el.nodeName)?e.value?. $ el.nextElementSibling:Ua(e))}}var[ds,fs]=ga( ` CollapsibleRoot ` ),ps=n({__name: ` CollapsibleRoot ` ,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[ ` update : open ` ],setup(e,{expose:t,emit:n}){let r=e,i=io(r, ` open ` ,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),{disabled:a,unmountOnHide:o}=p(r);return fs({contentId: ` ` ,disabled:a,open:i,unmountOnHide:o,onOpenToggle:()=>{a.value||(i.value=!i.value)}}),t({open:i}),X(),(t,n)=>(F(),W(I(pn),{as:e.as,"as-child":r.asChild,"data-state":I(i)? ` open ` : ` closed ` ,"data-disabled":I(a)? ` ` :void 0},{default:w(()=>[j(t. $ slots, ` default ` ,{open:I(i)})]),_:3},8,[ ` as ` , ` as - child ` , ` data - state ` , ` data - disabled ` ]))}}),ms=n({inheritAttrs:!1,__name: ` CollapsibleContent ` ,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[ ` contentFound ` ],setup(e,{emit:t}){let n=e,r=t,i=ds();i.contentId||= $ o(void 0, ` reka - collapsible - content ` );let a=G(),{forwardRef:o,currentElement:s}=X(),c=G(0),l=G(0),u=N(()=>i.open.value),d=G(u.value),f=G();M(()=>[u.value,a.value?.present],async()=>{await mt();let e=s.value;if(!e)return;f.value=f.value||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration= ` 0 s ` ,e.style.animationName= ` none ` ;let t=e.getBoundingClientRect();l.value=t.height,c.value=t.width,d.value||(e.style.transitionDuration=f.value.transitionDuration,e.style.animationName=f.value.animationName)},{immediate:!0});let p=N(()=>d.value&&i.open.value);return L(()=>{requestAnimationFrame(()=>{d.value=!1})}),Wa(s, ` beforematch ` ,e=>{requestAnimationFrame(()=>{i.onOpenToggle(),r( ` contentFound ` )})}),(t,r)=>(F(),W(I(ls),{ref_key: ` presentRef ` ,ref:a,present:e.forceMount||I(i).open.value,"force-mount":!0},{default:w(({present:r})=>[k(I(pn),B(t. $ attrs,{id:I(i).contentId,ref:I(o),"as-child":n.asChild,as:e.as,hidden:r?void 0:I(i).unmountOnHide.value? ` ` : ` until - found ` ,"data-state":p.value?void 0:I(i).open.value? ` open ` : ` closed ` ,"data-disabled":I(i).disabled?.value? ` ` :void 0,style:{"--reka-collapsible-content-height": ` $ { l . value } px ` ,"--reka-collapsible-content-width": ` $ { c . value } px ` }}),{default:w(()=>[!I(i).unmountOnHide.value||r?j(t. $ slots, ` default ` ,{},void 0,void 0,0):P( ` v - if ` ,!0)]),_:2},1040,[ ` id ` , ` as - child ` , ` as ` , ` hidden ` , ` data - state ` , ` data - disabled ` , ` style ` ])]),_:3},8,[ ` present ` ]))}}),hs=n({__name: ` CollapsibleTrigger ` ,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default: ` button ` }},setup(e){let t=e;X();let n=ds();return(r,i)=>(F(),W(I(pn),{type:e.as=== ` button ` ? ` button ` :void 0,as:e.as,"as-child":t.asChild,"aria-controls":I(n).contentId,"aria-expanded":I(n).open.value,"data-state":I(n).open.value? ` open ` : ` closed ` ,"data-disabled":I(n).disabled?.value? ` ` :void 0,disabled:I(n).disabled?.value,onClick:I(n).onOpenToggle},{default:w(()=>[j(r. $ slots, ` default ` )]),_:3},8,[ ` type ` , ` as ` , ` as - child ` , ` aria - controls ` , ` aria - expanded ` , ` data - state ` , ` data - disabled ` , ` disabled ` , ` onClick ` ]))}});function gs({type:e,defaultValue:t,modelValue:n}){let r=n||t;return n!==void 0||t!==void 0?Array.isArray(r)? ` multiple ` : ` single ` :e?? ` single ` }function _s({type:e,defaultValue:t,modelValue:n}){return e||gs({type:e,defaultValue:t,modelValue:n})}function vs({type:e,defaultValue:t}){return t===void 0?e=== ` single ` ?void 0:[]:t}function ys(e,t){let n=N(()=>_s(e)),r=io(e, ` modelValue ` ,t,{defaultValue:vs(e),passive:e.modelValue===void 0,deep:!0});function i(e){if(n.value=== ` single ` )r.value=fa(e,r.value)?void 0:e;else{let t=Array.isArray(r.value)?[...r.value||[]]:[r.value].filter(Boolean);if(ba(t,e)){let n=t.findIndex(t=>fa(t,e));t.splice(n,1)}else t.push(e);r.value=t}}return{modelValue:r,changeModelValue:i,isSingle:N(()=>n.value=== ` single ` )}}var[bs,xs]=ga( ` AccordionRoot ` ),Ss=n({__name: ` AccordionRoot ` ,props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default: ` vertical ` },unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:[ ` update : modelValue ` ],setup(e,{emit:t}){let n=e,r=t,{dir:i,disabled:a,unmountOnHide:o}=p(n),s=Eo(i),{modelValue:c,changeModelValue:l,isSingle:u}=ys(n,r),{forwardRef:d,currentElement:f}=X();return xs({disabled:a,direction:s,orientation:n.orientation,parentElement:f
Line truncated
` ))}return()=>i.value||r.value||o.value?be(t.default({present:o.value})[0],{ref:e=>{let t=Ua(e);return t?.hasAttribute===void 0||(t?.hasAttribute( ` data - reka - popper - content - wrapper ` )?a.value=t.firstElementChild:a.value=t),t}}):null}});function us(){let e=G();return{primitiveElement:e,currentElement:N(()=>[ ` # text ` , ` # comment ` ].includes(e.value?. $ el.nodeName)?e.value?. $ el.nextElementSibling:Ua(e))}}var[ds,fs]=ga( ` CollapsibleRoot ` ),ps=n({__name: ` CollapsibleRoot ` ,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[ ` update : open ` ],setup(e,{expose:t,emit:n}){let r=e,i=io(r, ` open ` ,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),{disabled:a,unmountOnHide:o}=p(r);return fs({contentId: ` ` ,disabled:a,open:i,unmountOnHide:o,onOpenToggle:()=>{a.value||(i.value=!i.value)}}),t({open:i}),X(),(t,n)=>(F(),W(I(pn),{as:e.as,"as-child":r.asChild,"data-state":I(i)? ` open ` : ` closed ` ,"data-disabled":I(a)? ` ` :void 0},{default:w(()=>[j(t. $ slots, ` default ` ,{open:I(i)})]),_:3},8,[ ` as ` , ` as - child ` , ` data - state ` , ` data - disabled ` ]))}}),ms=n({inheritAttrs:!1,__name: ` CollapsibleContent ` ,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[ ` contentFound ` ],setup(e,{emit:t}){let n=e,r=t,i=ds();i.contentId||= $ o(void 0, ` reka - collapsible - content ` );let a=G(),{forwardRef:o,currentElement:s}=X(),c=G(0),l=G(0),u=N(()=>i.open.value),d=G(u.value),f=G();M(()=>[u.value,a.value?.present],async()=>{await mt();let e=s.value;if(!e)return;f.value=f.value||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration= ` 0 s ` ,e.style.animationName= ` none ` ;let t=e.getBoundingClientRect();l.value=t.height,c.value=t.width,d.value||(e.style.transitionDuration=f.value.transitionDuration,e.style.animationName=f.value.animationName)},{immediate:!0});let p=N(()=>d.value&&i.open.value);return L(()=>{requestAnimationFrame(()=>{d.value=!1})}),Wa(s, ` beforematch ` ,e=>{requestAnimationFrame(()=>{i.onOpenToggle(),r( ` contentFound ` )})}),(t,r)=>(F(),W(I(ls),{ref_key: ` presentRef ` ,ref:a,present:e.forceMount||I(i).open.value,"force-mount":!0},{default:w(({present:r})=>[k(I(pn),B(t. $ attrs,{id:I(i).contentId,ref:I(o),"as-child":n.asChild,as:e.as,hidden:r?void 0:I(i).unmountOnHide.value? ` ` : ` until - found ` ,"data-state":p.value?void 0:I(i).open.value? ` open ` : ` closed ` ,"data-disabled":I(i).disabled?.value? ` ` :void 0,style:{"--reka-collapsible-content-height": ` $ { l . value } px ` ,"--reka-collapsible-content-width": ` $ { c . value } px ` }}),{default:w(()=>[!I(i).unmountOnHide.value||r?j(t. $ slots, ` default ` ,{},void 0,void 0,0):P( ` v - if ` ,!0)]),_:2},1040,[ ` id ` , ` as - child ` , ` as ` , ` hidden ` , ` data - state ` , ` data - disabled ` , ` style ` ])]),_:3},8,[ ` present ` ]))}}),hs=n({__name: ` CollapsibleTrigger ` ,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default: ` button ` }},setup(e){let t=e;X();let n=ds();return(r,i)=>(F(),W(I(pn),{type:e.as=== ` button ` ? ` button ` :void 0,as:e.as,"as-child":t.asChild,"aria-controls":I(n).contentId,"aria-expanded":I(n).open.value,"data-state":I(n).open.value? ` open ` : ` closed ` ,"data-disabled":I(n).disabled?.value? ` ` :void 0,disabled:I(n).disabled?.value,onClick:I(n).onOpenToggle},{default:w(()=>[j(r. $ slots, ` default ` )]),_:3},8,[ ` type ` , ` as ` , ` as - child ` , ` aria - controls ` , ` aria - expanded ` , ` data - state ` , ` data - disabled ` , ` disabled ` , ` onClick ` ]))}});function gs({type:e,defaultValue:t,modelValue:n}){let r=n||t;return n!==void 0||t!==void 0?Array.isArray(r)? ` multiple ` : ` single ` :e?? ` single ` }function _s({type:e,defaultValue:t,modelValue:n}){return e||gs({type:e,defaultValue:t,modelValue:n})}function vs({type:e,defaultValue:t}){return t===void 0?e=== ` single ` ?void 0:[]:t}function ys(e,t){let n=N(()=>_s(e)),r=io(e, ` modelValue ` ,t,{defaultValue:vs(e),passive:e.modelValue===void 0,deep:!0});function i(e){if(n.value=== ` single ` )r.value=fa(e,r.value)?void 0:e;else{let t=Array.isArray(r.value)?[...r.value||[]]:[r.value].filter(Boolean);if(ba(t,e)){let n=t.findIndex(t=>fa(t,e));t.splice(n,1)}else t.push(e);r.value=t}}return{modelValue:r,changeModelValue:i,isSingle:N(()=>n.value=== ` single ` )}}var[bs,xs]=ga( ` AccordionRoot ` ),Ss=n({__name: ` AccordionRoot ` ,props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default: ` vertical ` },unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:[ ` update : modelValue ` ],setup(e,{emit:t}){let n=e,r=t,{dir:i,disabled:a,unmountOnHide:o}=p(n),s=Eo(i),{modelValue:c,changeModelValue:l,isSingle:u}=ys(n,r),{forwardRef:d,currentElement:f}=X();return xs({disabled:a,direction:s,orientation:n.orientation,parentElement:f
Line truncated
- a positive number
- less than the value passed to \ ` max \` (or ${ rp } if no \` max \` prop is set)
- less than the value passed to \ ` max \` (or ${ np } if no \` max \` prop is set)
- \ ` null \` or \` undefined \` if the progress is indeterminate.
Defaulting to \ ` null \` . ` ) , null ) } function cp ( e ) { return op ( e ) && ! Number . isNaN ( e ) && e > 0 ? e : ( console . error ( ` Invalid prop \` max \` of value \` ${ e } \` supplied to \` ProgressRoot \` . Only numbers greater than 0 are valid max values. Defaulting to \` ${ rp } \` . ` ) , rp ) } var lp = n ( { _ _name : ` ProgressRoot ` , props : { modelValue : { type : [ Number , null ] , required : ! 1 } , max : { type : Number , required : ! 1 , default : rp } , getValueLabel : { type : Function , required : ! 1 , default : ( e , t ) => op ( e ) ? ` ${ Math . round ( e / t * rp ) } % ` : void 0 } , getValueText : { type : Function , required : ! 1 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , emits : [ ` update:modelValue ` , ` update:max ` ] , setup ( e , { emit : t } ) { let n = e , r = t ; X ( ) ; let i = io ( n , ` modelValue ` , r , { passive : n . modelValue === void 0 } ) , a = io ( n , ` max ` , r , { passive : n . max === void 0 } ) ; M ( ( ) => i . value , async e => { let t = sp ( e , n . max ) ; t !== e && ( await mt ( ) , i . value = t ) } , { immediate : ! 0 } ) , M ( ( ) => n . max , e => { let t = cp ( n . max ) ; t !== e && ( a . value = t ) } , { immediate : ! 0 } ) ; let o = N ( ( ) => ya ( i . value ) ? ` indeterminate ` : i . value === a . value ? ` complete ` : ` loading ` ) ; return ap ( { modelValue : i , max : a , progressState : o } ) , ( t , n ) => ( F ( ) , W ( I ( pn ) , { "as-child" : e . asChild , as : e . as , "aria-valuemax" : I ( a ) , "aria-valuemin" : 0 , "aria-valuenow" : op ( I ( i ) ) ? I ( i ) : void 0 , "aria-valuetext" : e . getValueText ? . ( I ( i ) , I ( a ) ) , "aria-label" : e . getValueLabel ( I ( i ) , I ( a ) ) , role : ` progressbar ` , "data-state" : o . value , "data-value" : I ( i ) ? ? void 0 , "data-max" : I ( a ) } , { default : w ( ( ) => [ j ( t . $slots , ` default ` , { modelValue : I ( i ) } ) ] ) , _ : 3 } , 8 , [ ` as-child ` , ` as ` , ` aria-valuemax ` , ` aria-valuenow ` , ` aria-valuetext ` , ` aria-label ` , ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , up = n ( { _ _name : ` ProgressIndicator ` , props : { asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , setup ( e ) { let t = e , n = ip ( ) ; return X ( ) , ( e , r ) => ( F ( ) , W ( I ( pn ) , B ( t , { "data-state" : I ( n ) . progressState . value , "data-value" : I ( n ) . modelValue ? . value ? ? void 0 , "data-max" : I ( n ) . max . value } ) , { default : w ( ( ) => [ j ( e . $slots , ` default ` ) ] ) , _ : 3 } , 16 , [ ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , dp = ` radio.select ` ; function fp ( e , t , n ) { va ( dp , n , { originalEvent : e , value : t } ) } var pp = n ( { inheritAttrs : ! 1 , _ _name : ` Radio ` , props : { id : { type : String , required : ! 1 } , value : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , checked : { type : Boolean , required : ! 1 , default : void 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 , default : ` button ` } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 } } , emits : [ ` update:checked ` , ` select ` ] , setup ( e , { emit : t } ) { let n = e , r = t , i = io ( n , ` checked ` , r , { passive : n . checked === void 0 } ) , { value : a } = p ( n ) , { forwardRef : o , currentElement : s } = X ( ) , c = jo ( s ) , l = Po ( ) , u = N ( ( ) => n . id && s . value ? document . querySelector ( ` [for=" ${ n . id } "] ` ) ? . innerText : void 0 ) ; function d ( e ) { n . disabled || fp ( e , n . value , e => { r ( ` select ` , e ) , ! e ? . defaultPrevented && ( i . value = ! 0 , c . value && e . stopPropagation ( ) ) } ) } return ( t , n ) => ( F ( ) , H ( z , null , [ k ( I ( pn ) , B ( { id : e . id , ref : I ( o ) , role : ` radio ` , type : e . as === ` button ` ? ` button ` : void 0 , as : e . as , "aria-checked" : I ( i ) ? ? ! 1 , "aria-label" : u . value , "as-child" : e . asChild , disabled : e . disabled ? ` ` : void 0 , "data-state" : I ( i ) ? ` checked ` : ` unchecked ` , "data-disabled" : e . disabled ? ` ` : void 0 , value : I ( a ) , required : e . required , name : e . name } , { ... I ( l ) , ... t . $attrs } , { onClick : ln ( d , [ ` stop ` ] ) } ) , { default : w ( ( ) => [ j ( t . $slots , ` default ` , { checked : I ( i ) } ) ] ) , _ : 3 } , 16 , [ ` id ` , ` type ` , ` as ` , ` aria-checked ` , ` aria-label ` , ` as-child ` , ` disabled ` , ` data-state ` , ` data-disabled ` , ` value ` , ` required ` , ` name ` ] ) , I ( c ) && e . name ? ( F ( ) , W ( I ( Hc ) , B ( { key : 0 , type : ` radio ` , tabindex : ` -1 ` , value : I ( a ) , checked : ! ! I ( i ) , name : e . name , disabled : e . disabled , required : e . required } , I ( l ) ) , null , 16 , [ ` value ` , ` checked ` , ` name ` , ` disabled ` , ` required ` ] ) ) : P ( ` v-if ` , ! 0 ) ] , 64 ) ) } } ) , [ mp , hp ] = ga ( ` RadioGroupRoot ` ) , gp = n ( { _ _name : ` RadioGroupRoot ` , props : { modelValue : { type : null , required : ! 1 } , defaultValue : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , orientation : { type : String , required : ! 1 , default : void 0 } , dir : { type : String , required : ! 1 } , loop : { type : Boolean , required : ! 1 , default : ! 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 , default : ! 1 } } , emits : [ ` update:modelValue ` ] , setup ( e , { emit : t } ) { let n = e , r = t , { forwardRef : i , currentElement : a } = X ( ) , o = io ( n , ` modelValue ` , r , { defaultValue : n . defaultValue , passive : n . modelValue === void 0 } ) , { disabled : s , loop : c , orientation : l , name : u , required : d , dir : f } = p ( n ) , m = Eo ( f ) , h = jo ( a ) ; return hp ( { modelValue : o , changeModelValue : e => { o . value = e } , disabled : s , loop : c , orientation : l , name : u ? . value , required : d } ) , ( t , n ) => ( F ( ) , W ( I ( Cd ) , { "as-child" : ` ` , orientation : I ( l ) , dir : I ( m ) , loop : I ( c ) } , { default : w ( ( ) => [ k ( I ( pn ) , { ref : I ( i ) , role : ` radiogroup ` , "data-disabled" : I ( s ) ? ` ` : void 0 , "as-child" : e . asChild , as : e . as , "aria-orientation" : I ( l ) , "aria-required" : I ( d ) , dir : I ( m ) } , { default : w ( ( ) => [ j ( t . $slots , ` default ` , { modelValue : I ( o ) } ) , I ( h ) && I ( u ) ? ( F ( ) , W ( I ( Hc ) , { key : 0 , required : I ( d ) , disabled : I ( s ) , value : I ( o ) , name : I ( u ) } , null , 8 , [ ` required ` , ` disabled ` , ` value ` , ` name ` ] ) ) : P ( ` v-if ` , ! 0 ) ] ) , _ : 3 } , 8 , [ ` data-disabled ` , ` as-child ` , ` as ` , ` aria-orientation ` , ` aria-required ` , ` dir ` ] ) ] ) , _ : 3 } , 8 , [ ` orientation ` , ` dir ` , ` loop ` ] ) ) } } ) , [ iee , _p ] = ga ( ` RadioGroupItem ` ) , vp = n ( { inheritAttrs : ! 1 , _ _name : ` RadioGroupItem ` , props : { id : { type : String , required : ! 1 } , value : { type : null Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:H g(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>H g(e))}),null)};for(let e=0;e<n.length;e++){let c=n[e];if(c.startsWith(" ` ` ` " ) ) { o ( ) , s ( ) , a ? ( t . push ( { kind : ` pre ` , code : a . join ( `
` )}),a=null):a=[];continue}if(a){a.push(c);continue}let l=Ug(c),u=e+1<n.length?Ug(n[e+1]):null;if(l&&u&&Wg(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=Ug(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>H g(e)),rows:r.map(e=>e.map(e=>H g(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:H g(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])}else c.startsWith( ` > ` )?(o(),s(),t.push({kind: ` blockquote ` ,inline:H g(c.replace(/^> \s ?/, ` ` ))})):r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function Ug(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 Wg(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var Gg={class: ` [ overflow - wrap : anywhere ] ` },Kg={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },qg={class: ` font - mono text - [ 0.85 em ] ` },Jg={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Yg={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Xg={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Zg={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },Qg={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` }, $ g={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },e_={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },t_={key:8,class: ` mb - 2.5 last : mb - 0 ` },n_=n({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=N(()=>oee(t.text));return(e,t)=>(F(),H( ` div ` ,Gg,[(F(!0),H(z,null,U(n.value,(e,t)=>(F(),H(z,{key:t},[e.kind=== ` pre ` ?(F(),H( ` pre ` ,Kg,[V( ` code ` ,qg,R(e.code),1)])):e.kind=== ` table ` ?(F(),H( ` table ` ,Jg,[V( ` thead ` ,null,[V( ` tr ` ,null,[(F(!0),H(z,null,U(e.head,(e,t)=>(F(),H( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[k(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))])]),V( ` tbody ` ,null,[(F(!0),H(z,null,U(e.rows,(e,t)=>(F(),H( ` tr ` ,{key:t},[(F(!0),H(z,null,U(e,(e,t)=>(F(),H( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[k(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(F(),H( ` blockquote ` ,Yg,[k(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(F(),H( ` h1 ` ,Xg,[k(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(F(),H( ` h2 ` ,Zg,[k(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(F(),H( ` h3 ` ,Qg,[k(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(F(),H( ` ul ` , $ g,[(F(!0),H(z,null,U(e.items,(e,t)=>(F(),H( ` li ` ,{key:t},[k(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(F(),H( ` ol ` ,e_,[(F(!0),H(z,null,U(e.items,(e,t)=>(F(),H( ` li ` ,{key:t},[k(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(F(),H( ` p ` ,t_,[k(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):P( ` ` ,!0)],64))),128))]))}}),r_={class: ` truncate ` },i_=n({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=c( ` RouterLink ` );return F(),W(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:w(()=>[k(I(ir),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),V( ` span ` ,r_,R(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),a_={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },o_={class: ` font - semibold text - foreground ` },s_={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },c_=n({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=N(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=N(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=N(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=N(()=>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?(F(),W(i_,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(F(),H( ` div ` ,a_,[k(I(ai),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),V( ` span ` ,o_,R(n.value),1),r.value?(F(),H( ` code ` ,s_,R(r.value),1)):P( ` ` ,!0),V( ` span ` ,{class:A(I(K)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},R(a.value),3)]))}}),l_={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },u_={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },d_={key:3,class: ` whitespace - pre - wrap ` },f_=n({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(F(),H( ` div ` ,{class:A([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[V( ` div ` ,{class:A(I(K)( ` 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?(F(),H( ` div ` ,l_,[(F(!0),H(z,null,U(e.tools,(t,n)=>(F(),W(c_,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):P( ` ` ,!0),e.media.length?(F(),H( ` div ` ,u_,[(F(!0),H(z,null,U(e.media,(e,t)=>(F(),W(Ng,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):P( ` ` ,!0),e.assistant?(F(),W(n_,{key:2,text:e.text},null,8,[ ` text ` ])):(F(),H( ` div ` ,d_,R(e.text),1)),j(t. $ slots, ` default ` )],2)],2))}}),p_={class: ` text - sm ` },m_={class: ` font - medium ` },h_={key:0,class: ` mt - 1 text - fg - muted ` },g_={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },__=n({__name: ` ChatCh Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>bS? ` $ { n . slice ( 0 , bS ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var SS=[ ` title ` ],CS=n({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=N(()=>Qx(n.event)),a=N(()=>xS(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=N(()=>n.event.at?ex(n.event.at): ` — ` );return(e,t)=>(F(),W(I(vS),{class:A(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:[un(ln(o,[ ` prevent ` ]),[ ` enter ` ]),un(ln(o,[ ` prevent ` ]),[ ` space ` ])]},{default:w(()=>[k(I(Q),{class: ` font - medium ` },{default:w(()=>[l(R(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),k(I(Q),{class: ` font - mono ` },{default:w(()=>[l(R(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),k(I(Q),{class: ` w - [ 55 % ] max - w - 0 ` },{default:w(()=>[V( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},R(a.value.text),9,SS)]),_:1}),k(I(Q),null,{default:w(()=>[l(R(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),wS=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function TS(e){return(Number(e?.task_id)||0)>0}function ES(e,t){return t=== ` tasks ` ?TS(e):t!== ` system ` ||!TS(e)}function DS(e,t){return e.filter(e=>ES(e,t))}function OS(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function kS(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function AS(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=kS(xS(n).text,r),a=t[t.length-1];a&&a.key===i?(a.count+=1,a.events.push(n)):t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var jS={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },MS={class: ` max - h - [ 28 rem ] overflow - y - auto ` },NS=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],PS=[ ` title ` ],FS=n({__name: ` LiveActivityCard ` ,setup(e){let t=rv(),{activity:n,streamKind:r,streamState:i}=On(kn()),a=G( ` all ` ),o=N(()=>DS(n.value,a.value)),s=N(()=>OS(o.value.length,a.value)),c=Ae(new Set),u=N(()=>AS(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 xS(e.representative)}function m(e){return e.representative.at?ex(e.representative.at): ` — ` }function h(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(F(),W(I(qb),null,{default:w(()=>[k(I(Qb),null,{default:w(()=>[k(I( $ b),null,{default:w(()=>[...t[1]||=[l( ` Live activity ` ,-1)]]),_:1}),k(I(Jb),{class: ` flex items - center gap - 2 ` },{default:w(()=>[k(I(mS),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:I(wS)},null,8,[ ` modelValue ` , ` options ` ]),k(I(bn),{variant:I(r)},{default:w(()=>[l(R(I(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),k(I(Yb),null,{default:w(()=>[V( ` div ` ,jS,[V( ` div ` ,MS,[k(I(gS),null,{default:w(()=>[k(I(yS),{class: ` sticky top - 0 z - 10 bg - card ` },{default:w(()=>[k(I(vS),null,{default:w(()=>[k(I( $ ),null,{default:w(()=>[...t[2]||=[l( ` Event ` ,-1)]]),_:1}),k(I( $ ),null,{default:w(()=>[...t[3]||=[l( ` Task ` ,-1)]]),_:1}),k(I( $ ),null,{default:w(()=>[...t[4]||=[l( ` Detail ` ,-1)]]),_:1}),k(I( $ ),null,{default:w(()=>[...t[5]||=[l( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),k(I(_S),null,{default:w(()=>[o.value.length?P( ` ` ,!0):(F(),W(I(vS),{key:0},{default:w(()=>[k(I(Q),{colspan: ` 4 ` },{default:w(()=>[k(I(Rb),null,{default:w(()=>[k(I(Vb),null,{default:w(()=>[k(I(Wb),null,{default:w(()=>[l(R(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(F(!0),H(z,{key:1},U(u.value,e=>(F(),H(z,{key:e.key},[e.count===1?(F(),W(CS,{key:0,event:e.representative,onOpen:h},null,8,[ ` event ` ])):(F(),H(z,{key:1},[k(I(vS),{class:A(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:[un(ln(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),un(ln(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:w(()=>[k(I(Q),{class: ` font - medium ` },{default:w(()=>[V( ` 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:ln(t=>d(e.key),[ ` stop ` ])},[f(e)?(F(),W(I(dr),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(F(),W(I(fr),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),l( ` ` +R(e.label)+ ` ` ,1),k(I(bn),{variant: ` idle ` },{default:w(()=>[l( ` × ` +R(e.count),1)]),_:2},1024)],8,NS)]),_:2},1024),k(I(Q),{class: ` font - mono ` },{default:w(()=>[l(R(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),k(I(Q),{class: ` w - [ 55 % ] max - w - 0 ` },{default:w(()=>[V( ` span ` ,{class: ` block truncate ` ,title:p(e).truncated?p(e).full:void 0},R(p(e).text),9,PS)]),_:2},1024),k(I(Q),null,{default:w(()=>[l(R(m(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),f(e)?(F(!0),H(z,{key:0},U(e.events,(t,n)=>(F(),W(CS,{key: ` $ { e . key } : $ { n } ` ,event:t,onOpen:h},null,8,[
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 tw(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 nw(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 rw(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 iw(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 aw=G([]),ow=G([]),sw=G(!0),cw=G(null),lw=G(null),uw=G(!1),dw=G(null);async function fw(){try{let e=await q.eventTypes();sw.value=e.enabled!==!1,aw.value=e.event_types||[],ow.value=e.proposals||[],cw.value=null}catch(e){cw.value=e.message||String(e)}}function pw(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function mw(e){dw.value=null,lw.value=e}function hw(e){let t=Cw.value.find(t=>String(t.id)===e.sample_id);mw({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:pw(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function gw(e= ` ` ){mw({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function _w(e){mw({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:pw(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function vw(){lw.value=null}async function yw(){let e=lw.value;if(e){uw.value=!0;try{if(e.mode=== ` edit ` &&e.id)await q.eventTypeUpdate(e.id,{name:e.name,rule:iw(e.rule)});else{let t=e.mode=== ` paste ` ?ew(e.headersText):e.exampleHeaders;await q.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:iw(e.rule),example:{headers:t,body:e.body}})}lw.value=null,await fw()}catch(e){dw.value=e.message||String(e)}finally{uw.value=!1}}}var bw=G(null);async function xw(){let e=bw.value;if(bw.value=null,e)try{await q.eventTypeDelete(e.id),await fw()}catch(e){cw.value=e.message||String(e)}}var Sw=100,Cw=G([]),ww=G(!0),Tw=G(null),Ew=G(!0),Dw=G(null);async function Ow(){try{let e=await q.captures(Sw);ww.value=e.enabled!==!1,Cw.value=e.captures||[],Tw.value=null}catch(e){Tw.value=e.message||String(e)}finally{Ew.value=!1}}function kw(e){let t=Cw.value.find(t=>t.id===e);return t&&(Dw.value=t),!!t}function Aw(){Cw.value.length&&(Dw.value=Cw.value[0])}function jw(){Fn( ` captures ` ,()=>{Ow(),fw()})}var Mw={key:0,class: ` text - xs text - fg - muted ` },Nw={key:1,class: ` flex flex - col gap - 1 text - xs ` },Pw={key:1},Fw={key:2,class: ` text - xs text - fg - muted ` },Iw=n({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=G([]),r=G(!1);M(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await q.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?(F(),H( ` p ` ,Mw, ` Dispatches unavailable . ` )):n.value.length?(F(),H( ` ul ` ,Nw,[(F(!0),H(z,null,U(n.value,e=>(F(),H( ` 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 ` ?P( ` ` ,!0):(F(),W(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:w(()=>[l( ` binding ` +R(e.binding_id.slice(0,8))+ ` v ` +R(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?P( ` ` ,!0):(F(),W(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:w(()=>[l( ` capture ` +R(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?P( ` ` ,!0):(F(),H(z,{key:2},[e.task_id?(F(),W(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:w(()=>[l( ` task # ` +R(e.task_id),1)]),_:2},1032,[ ` to ` ])):(F(),H( ` span ` ,Pw,R(e.reason|| ` claimed , no task recorded ` ),1))],64)),V( ` span ` ,null,R(I(ex)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?P( ` ` ,!0):(F(),H( ` p ` ,Fw, ` No dispatches yet . ` ))}}}),Lw=n({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(F(),W(I(Er),{role: ` status ` ,"aria-label": ` Loading ` ,class:A(I(K)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function Rw(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function zw(e){return(e?.repository?? ` required ` )!== ` none ` }function Bw(e,t){return e.filter(e=>t=== ` any ` ||e.type=== ` any ` ||e.type===t)}function Vw(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 Hw={pending_approval: ` pending approval ` ,armed: ` armed ` ,paused: ` paused ` },Uw={pending_approval: ` warn ` ,armed: ` ok ` ,paused: ` idle ` };function Ww(e){
Line truncated
` )}};nU.defaultYaml={explicit:!1,version: ` 1.2 ` },nU.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function rU(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 iU(e){let t=new Set;return YH(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function aU(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function oU(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=iU(e);let a=aU(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(VH(t.node)||UH(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 sU(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=sU(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=sU(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=sU(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=sU(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function cU(e,t,n){if(Array.isArray(e))return e.map((e,t)=>cU(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!GH(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 lU=class{constructor(e){Object.defineProperty(this,IH,{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(!RH(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=cU(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?sU(i,{"":o}, ` ` ,o):o}},uU=class extends lU{constructor(e){super(AH),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=[],YH(e,{Node:(e,t)=>{(LH(t)||GH(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||=(cU(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=dU(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(rU(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 dU(e,t,n){if(LH(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(UH(t)){let r=0;for(let i of t.items){let t=dU(e,i,n);t>r&&(r=t)}return r}if(BH(t)){let r=dU(e,t.key,n),i=dU(e,t.value,n);return Math.max(r,i)}return 1}var fU=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,pU=class extends lU{constructor(e){super(PH),this.value=e}toJSON(e,t){return t?.keep?this.value:cU(this.value,e,t)}toString(){return String(this.value)}};pU.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,pU.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,pU.PLAIN= ` PLAIN ` ,pU.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,pU.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var mU= ` tag : yaml . org , 2002 : ` ;function hU(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 gU(e,t,n){if(RH(e)&&(e=e.contents),WH(e))return e;if(BH(e)){let t=n.schema[MH].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 uU(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=mU+t.slice(2));let l=hU(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new pU(e);return c&&(c.node=t),t
Line truncated
` )?x U(n,t):n.includes( `
Defaulting to \ ` null \` . ` ) , null ) } function sp ( e ) { return ap ( e ) && ! Number . isNaN ( e ) && e > 0 ? e : ( console . error ( ` Invalid prop \` max \` of value \` ${ e } \` supplied to \` ProgressRoot \` . Only numbers greater than 0 are valid max values. Defaulting to \` ${ np } \` . ` ) , np ) } var cp = n ( { _ _name : ` ProgressRoot ` , props : { modelValue : { type : [ Number , null ] , required : ! 1 } , max : { type : Number , required : ! 1 , default : np } , getValueLabel : { type : Function , required : ! 1 , default : ( e , t ) => ap ( e ) ? ` ${ Math . round ( e / t * np ) } % ` : void 0 } , getValueText : { type : Function , required : ! 1 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , emits : [ ` update:modelValue ` , ` update:max ` ] , setup ( e , { emit : t } ) { let n = e , r = t ; X ( ) ; let i = io ( n , ` modelValue ` , r , { passive : n . modelValue === void 0 } ) , a = io ( n , ` max ` , r , { passive : n . max === void 0 } ) ; M ( ( ) => i . value , async e => { let t = op ( e , n . max ) ; t !== e && ( await mt ( ) , i . value = t ) } , { immediate : ! 0 } ) , M ( ( ) => n . max , e => { let t = sp ( n . max ) ; t !== e && ( a . value = t ) } , { immediate : ! 0 } ) ; let o = N ( ( ) => ya ( i . value ) ? ` indeterminate ` : i . value === a . value ? ` complete ` : ` loading ` ) ; return ip ( { modelValue : i , max : a , progressState : o } ) , ( t , n ) => ( F ( ) , W ( I ( pn ) , { "as-child" : e . asChild , as : e . as , "aria-valuemax" : I ( a ) , "aria-valuemin" : 0 , "aria-valuenow" : ap ( I ( i ) ) ? I ( i ) : void 0 , "aria-valuetext" : e . getValueText ? . ( I ( i ) , I ( a ) ) , "aria-label" : e . getValueLabel ( I ( i ) , I ( a ) ) , role : ` progressbar ` , "data-state" : o . value , "data-value" : I ( i ) ? ? void 0 , "data-max" : I ( a ) } , { default : w ( ( ) => [ j ( t . $slots , ` default ` , { modelValue : I ( i ) } ) ] ) , _ : 3 } , 8 , [ ` as-child ` , ` as ` , ` aria-valuemax ` , ` aria-valuenow ` , ` aria-valuetext ` , ` aria-label ` , ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , lp = n ( { _ _name : ` ProgressIndicator ` , props : { asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , setup ( e ) { let t = e , n = rp ( ) ; return X ( ) , ( e , r ) => ( F ( ) , W ( I ( pn ) , B ( t , { "data-state" : I ( n ) . progressState . value , "data-value" : I ( n ) . modelValue ? . value ? ? void 0 , "data-max" : I ( n ) . max . value } ) , { default : w ( ( ) => [ j ( e . $slots , ` default ` ) ] ) , _ : 3 } , 16 , [ ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , up = ` radio.select ` ; function dp ( e , t , n ) { va ( up , n , { originalEvent : e , value : t } ) } var fp = n ( { inheritAttrs : ! 1 , _ _name : ` Radio ` , props : { id : { type : String , required : ! 1 } , value : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , checked : { type : Boolean , required : ! 1 , default : void 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 , default : ` button ` } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 } } , emits : [ ` update:checked ` , ` select ` ] , setup ( e , { emit : t } ) { let n = e , r = t , i = io ( n , ` checked ` , r , { passive : n . checked === void 0 } ) , { value : a } = p ( n ) , { forwardRef : o , currentElement : s } = X ( ) , c = jo ( s ) , l = Po ( ) , u = N ( ( ) => n . id && s . value ? document . querySelector ( ` [for=" ${ n . id } "] ` ) ? . innerText : void 0 ) ; function d ( e ) { n . disabled || dp ( e , n . value , e => { r ( ` select ` , e ) , ! e ? . defaultPrevented && ( i . value = ! 0 , c . value && e . stopPropagation ( ) ) } ) } return ( t , n ) => ( F ( ) , H ( z , null , [ k ( I ( pn ) , B ( { id : e . id , ref : I ( o ) , role : ` radio ` , type : e . as === ` button ` ? ` button ` : void 0 , as : e . as , "aria-checked" : I ( i ) ? ? ! 1 , "aria-label" : u . value , "as-child" : e . asChild , disabled : e . disabled ? ` ` : void 0 , "data-state" : I ( i ) ? ` checked ` : ` unchecked ` , "data-disabled" : e . disabled ? ` ` : void 0 , value : I ( a ) , required : e . required , name : e . name } , { ... I ( l ) , ... t . $attrs } , { onClick : ln ( d , [ ` stop ` ] ) } ) , { default : w ( ( ) => [ j ( t . $slots , ` default ` , { checked : I ( i ) } ) ] ) , _ : 3 } , 16 , [ ` id ` , ` type ` , ` as ` , ` aria-checked ` , ` aria-label ` , ` as-child ` , ` disabled ` , ` data-state ` , ` data-disabled ` , ` value ` , ` required ` , ` name ` ] ) , I ( c ) && e . name ? ( F ( ) , W ( I ( Hc ) , B ( { key : 0 , type : ` radio ` , tabindex : ` -1 ` , value : I ( a ) , checked : ! ! I ( i ) , name : e . name , disabled : e . disabled , required : e . required } , I ( l ) ) , null , 16 , [ ` value ` , ` checked ` , ` name ` , ` disabled ` , ` required ` ] ) ) : P ( ` v-if ` , ! 0 ) ] , 64 ) ) } } ) , [ pp , mp ] = ga ( ` RadioGroupRoot ` ) , hp = n ( { _ _name : ` RadioGroupRoot ` , props : { modelValue : { type : null , required : ! 1 } , defaultValue : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , orientation : { type : String , required : ! 1 , default : void 0 } , dir : { type : String , required : ! 1 } , loop : { type : Boolean , required : ! 1 , default : ! 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 , default : ! 1 } } , emits : [ ` update:modelValue ` ] , setup ( e , { emit : t } ) { let n = e , r = t , { forwardRef : i , currentElement : a } = X ( ) , o = io ( n , ` modelValue ` , r , { defaultValue : n . defaultValue , passive : n . modelValue === void 0 } ) , { disabled : s , loop : c , orientation : l , name : u , required : d , dir : f } = p ( n ) , m = Eo ( f ) , h = jo ( a ) ; return mp ( { modelValue : o , changeModelValue : e => { o . value = e } , disabled : s , loop : c , orientation : l , name : u ? . value , required : d } ) , ( t , n ) => ( F ( ) , W ( I ( Sd ) , { "as-child" : ` ` , orientation : I ( l ) , dir : I ( m ) , loop : I ( c ) } , { default : w ( ( ) => [ k ( I ( pn ) , { ref : I ( i ) , role : ` radiogroup ` , "data-disabled" : I ( s ) ? ` ` : void 0 , "as-child" : e . asChild , as : e . as , "aria-orientation" : I ( l ) , "aria-required" : I ( d ) , dir : I ( m ) } , { default : w ( ( ) => [ j ( t . $slots , ` default ` , { modelValue : I ( o ) } ) , I ( h ) && I ( u ) ? ( F ( ) , W ( I ( Hc ) , { key : 0 , required : I ( d ) , disabled : I ( s ) , value : I ( o ) , name : I ( u ) } , null , 8 , [ ` required ` , ` disabled ` , ` value ` , ` name ` ] ) ) : P ( ` v-if ` , ! 0 ) ] ) , _ : 3 } , 8 , [ ` data-disabled ` , ` as-child ` , ` as ` , ` aria-orientation ` , ` aria-required ` , ` dir ` ] ) ] ) , _ : 3 } , 8 , [ ` orientation ` , ` dir ` , ` loop ` ] ) ) } } ) , [ aee , gp ] = ga ( ` RadioGroupItem ` ) , _p = n ( { inheritAttrs : ! 1 , _ _name : ` RadioGroupItem ` , props : { id : { type : String , required : ! 1 } , value : { type : null Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:V g(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>V g(e))}),null)};for(let e=0;e<n.length;e++){let c=n[e];if(c.startsWith(" ` ` ` " ) ) { o ( ) , s ( ) , a ? ( t . push ( { kind : ` pre ` , code : a . join ( `
` )}),a=null):a=[];continue}if(a){a.push(c);continue}let l=Ug(c),u=e+1<n.length?Ug(n[e+1]):null;if(l&&u&&Wg(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=Ug(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>V g(e)),rows:r.map(e=>e.map(e=>V g(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:V g(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])}else c.startsWith( ` > ` )?(o(),s(),t.push({kind: ` blockquote ` ,inline:V g(c.replace(/^> \s ?/, ` ` ))})):r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function Ug(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 Wg(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var see={class: ` [ overflow - wrap : anywhere ] ` },Gg={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },Kg={class: ` font - mono text - [ 0.85 em ] ` },qg={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Jg={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Yg={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Xg={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },Zg={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },Qg={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` }, $ g={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },e_={key:8,class: ` mb - 2.5 last : mb - 0 ` },t_=n({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=N(()=>Hg(t.text));return(e,t)=>(F(),H( ` div ` ,see,[(F(!0),H(z,null,U(n.value,(e,t)=>(F(),H(z,{key:t},[e.kind=== ` pre ` ?(F(),H( ` pre ` ,Gg,[V( ` code ` ,Kg,R(e.code),1)])):e.kind=== ` table ` ?(F(),H( ` table ` ,qg,[V( ` thead ` ,null,[V( ` tr ` ,null,[(F(!0),H(z,null,U(e.head,(e,t)=>(F(),H( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[k(zg,{inline:e},null,8,[ ` inline ` ])]))),128))])]),V( ` tbody ` ,null,[(F(!0),H(z,null,U(e.rows,(e,t)=>(F(),H( ` tr ` ,{key:t},[(F(!0),H(z,null,U(e,(e,t)=>(F(),H( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[k(zg,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(F(),H( ` blockquote ` ,Jg,[k(zg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(F(),H( ` h1 ` ,Yg,[k(zg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(F(),H( ` h2 ` ,Xg,[k(zg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(F(),H( ` h3 ` ,Zg,[k(zg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(F(),H( ` ul ` ,Qg,[(F(!0),H(z,null,U(e.items,(e,t)=>(F(),H( ` li ` ,{key:t},[k(zg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(F(),H( ` ol ` , $ g,[(F(!0),H(z,null,U(e.items,(e,t)=>(F(),H( ` li ` ,{key:t},[k(zg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(F(),H( ` p ` ,e_,[k(zg,{inline:e.inline},null,8,[ ` inline ` ])])):P( ` ` ,!0)],64))),128))]))}}),n_={class: ` truncate ` },r_=n({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=c( ` RouterLink ` );return F(),W(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:w(()=>[k(I(ir),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),V( ` span ` ,n_,R(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),i_={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },a_={class: ` font - semibold text - foreground ` },o_={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },s_=n({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=N(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=N(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=N(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=N(()=>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?(F(),W(r_,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(F(),H( ` div ` ,i_,[k(I(ai),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),V( ` span ` ,a_,R(n.value),1),r.value?(F(),H( ` code ` ,o_,R(r.value),1)):P( ` ` ,!0),V( ` span ` ,{class:A(I(K)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},R(a.value),3)]))}}),c_={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },l_={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },u_={key:3,class: ` whitespace - pre - wrap ` },d_=n({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(F(),H( ` div ` ,{class:A([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[V( ` div ` ,{class:A(I(K)( ` 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?(F(),H( ` div ` ,c_,[(F(!0),H(z,null,U(e.tools,(t,n)=>(F(),W(s_,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):P( ` ` ,!0),e.media.length?(F(),H( ` div ` ,l_,[(F(!0),H(z,null,U(e.media,(e,t)=>(F(),W(Mg,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):P( ` ` ,!0),e.assistant?(F(),W(t_,{key:2,text:e.text},null,8,[ ` text ` ])):(F(),H( ` div ` ,u_,R(e.text),1)),j(t. $ slots, ` default ` )],2)],2))}}),f_={class: ` text - sm ` },p_={class: ` font - medium ` },m_={key:0,class: ` mt - 1 text - fg - muted ` },h_={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },g_=n({__name: ` ChatC Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>yS? ` $ { n . slice ( 0 , yS ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var xS=[ ` title ` ],SS=n({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=N(()=>Zx(n.event)),a=N(()=>bS(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=N(()=>n.event.at? $ b(n.event.at): ` — ` );return(e,t)=>(F(),W(I(_S),{class:A(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:[un(ln(o,[ ` prevent ` ]),[ ` enter ` ]),un(ln(o,[ ` prevent ` ]),[ ` space ` ])]},{default:w(()=>[k(I(Q),{class: ` font - medium ` },{default:w(()=>[l(R(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),k(I(Q),{class: ` font - mono ` },{default:w(()=>[l(R(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),k(I(Q),{class: ` w - [ 55 % ] max - w - 0 ` },{default:w(()=>[V( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},R(a.value.text),9,xS)]),_:1}),k(I(Q),null,{default:w(()=>[l(R(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),CS=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function wS(e){return(Number(e?.task_id)||0)>0}function TS(e,t){return t=== ` tasks ` ?wS(e):t!== ` system ` ||!wS(e)}function ES(e,t){return e.filter(e=>TS(e,t))}function DS(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function OS(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function kS(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=OS(bS(n).text,r),a=t[t.length-1];a&&a.key===i?(a.count+=1,a.events.push(n)):t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var AS={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },jS={class: ` max - h - [ 28 rem ] overflow - y - auto ` },MS=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],NS=[ ` title ` ],PS=n({__name: ` LiveActivityCard ` ,setup(e){let t=nv(),{activity:n,streamKind:r,streamState:i}=On(kn()),a=G( ` all ` ),o=N(()=>ES(n.value,a.value)),s=N(()=>DS(o.value.length,a.value)),c=Ae(new Set),u=N(()=>kS(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 bS(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)=>(F(),W(I(Kb),null,{default:w(()=>[k(I(Zb),null,{default:w(()=>[k(I(Qb),null,{default:w(()=>[...t[1]||=[l( ` Live activity ` ,-1)]]),_:1}),k(I(qb),{class: ` flex items - center gap - 2 ` },{default:w(()=>[k(I(pS),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:I(CS)},null,8,[ ` modelValue ` , ` options ` ]),k(I(bn),{variant:I(r)},{default:w(()=>[l(R(I(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),k(I(Jb),null,{default:w(()=>[V( ` div ` ,AS,[V( ` div ` ,jS,[k(I(hS),null,{default:w(()=>[k(I(vS),{class: ` sticky top - 0 z - 10 bg - card ` },{default:w(()=>[k(I(_S),null,{default:w(()=>[k(I( $ ),null,{default:w(()=>[...t[2]||=[l( ` Event ` ,-1)]]),_:1}),k(I( $ ),null,{default:w(()=>[...t[3]||=[l( ` Task ` ,-1)]]),_:1}),k(I( $ ),null,{default:w(()=>[...t[4]||=[l( ` Detail ` ,-1)]]),_:1}),k(I( $ ),null,{default:w(()=>[...t[5]||=[l( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),k(I(gS),null,{default:w(()=>[o.value.length?P( ` ` ,!0):(F(),W(I(_S),{key:0},{default:w(()=>[k(I(Q),{colspan: ` 4 ` },{default:w(()=>[k(I(Lb),null,{default:w(()=>[k(I(Bb),null,{default:w(()=>[k(I(Ub),null,{default:w(()=>[l(R(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(F(!0),H(z,{key:1},U(u.value,e=>(F(),H(z,{key:e.key},[e.count===1?(F(),W(SS,{key:0,event:e.representative,onOpen:h},null,8,[ ` event ` ])):(F(),H(z,{key:1},[k(I(_S),{class:A(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:[un(ln(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),un(ln(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:w(()=>[k(I(Q),{class: ` font - medium ` },{default:w(()=>[V( ` 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:ln(t=>d(e.key),[ ` stop ` ])},[f(e)?(F(),W(I(dr),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(F(),W(I(fr),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),l( ` ` +R(e.label)+ ` ` ,1),k(I(bn),{variant: ` idle ` },{default:w(()=>[l( ` × ` +R(e.count),1)]),_:2},1024)],8,MS)]),_:2},1024),k(I(Q),{class: ` font - mono ` },{default:w(()=>[l(R(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),k(I(Q),{class: ` w - [ 55 % ] max - w - 0 ` },{default:w(()=>[V( ` span ` ,{class: ` block truncate ` ,title:p(e).truncated?p(e).full:void 0},R(p(e).text),9,NS)]),_:2},1024),k(I(Q),null,{default:w(()=>[l(R(m(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),f(e)?(F(!0),H(z,{key:0},U(e.events,(t,n)=>(F(),W(SS,{key: ` $ { e . key } : $ { n } ` ,event:t,onOpen:h},null,8,[
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 ew(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 tw(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 nw(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 rw(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 iw=G([]),aw=G([]),ow=G(!0),sw=G(null),cw=G(null),lw=G(!1),uw=G(null);async function dw(){try{let e=await q.eventTypes();ow.value=e.enabled!==!1,iw.value=e.event_types||[],aw.value=e.proposals||[],sw.value=null}catch(e){sw.value=e.message||String(e)}}function fw(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function pw(e){uw.value=null,cw.value=e}function mw(e){let t=Sw.value.find(t=>String(t.id)===e.sample_id);pw({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:fw(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function hw(e= ` ` ){pw({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function gw(e){pw({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:fw(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function _w(){cw.value=null}async function vw(){let e=cw.value;if(e){lw.value=!0;try{if(e.mode=== ` edit ` &&e.id)await q.eventTypeUpdate(e.id,{name:e.name,rule:rw(e.rule)});else{let t=e.mode=== ` paste ` ? $ C(e.headersText):e.exampleHeaders;await q.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:rw(e.rule),example:{headers:t,body:e.body}})}cw.value=null,await dw()}catch(e){uw.value=e.message||String(e)}finally{lw.value=!1}}}var yw=G(null);async function bw(){let e=yw.value;if(yw.value=null,e)try{await q.eventTypeDelete(e.id),await dw()}catch(e){sw.value=e.message||String(e)}}var xw=100,Sw=G([]),Cw=G(!0),ww=G(null),Tw=G(!0),Ew=G(null);async function Dw(){try{let e=await q.captures(xw);Cw.value=e.enabled!==!1,Sw.value=e.captures||[],ww.value=null}catch(e){ww.value=e.message||String(e)}finally{Tw.value=!1}}function Ow(e){let t=Sw.value.find(t=>t.id===e);return t&&(Ew.value=t),!!t}function kw(){Sw.value.length&&(Ew.value=Sw.value[0])}function Aw(){Fn( ` captures ` ,()=>{Dw(),dw()})}var jw={key:0,class: ` text - xs text - fg - muted ` },Mw={key:1,class: ` flex flex - col gap - 1 text - xs ` },Nw={key:1},Pw={key:2,class: ` text - xs text - fg - muted ` },Fw=n({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=G([]),r=G(!1);M(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await q.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?(F(),H( ` p ` ,jw, ` Dispatches unavailable . ` )):n.value.length?(F(),H( ` ul ` ,Mw,[(F(!0),H(z,null,U(n.value,e=>(F(),H( ` 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 ` ?P( ` ` ,!0):(F(),W(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:w(()=>[l( ` binding ` +R(e.binding_id.slice(0,8))+ ` v ` +R(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?P( ` ` ,!0):(F(),W(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:w(()=>[l( ` capture ` +R(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?P( ` ` ,!0):(F(),H(z,{key:2},[e.task_id?(F(),W(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:w(()=>[l( ` task # ` +R(e.task_id),1)]),_:2},1032,[ ` to ` ])):(F(),H( ` span ` ,Nw,R(e.reason|| ` claimed , no task recorded ` ),1))],64)),V( ` span ` ,null,R(I( $ b)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?P( ` ` ,!0):(F(),H( ` p ` ,Pw, ` No dispatches yet . ` ))}}}),Iw=n({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(F(),W(I(Er),{role: ` status ` ,"aria-label": ` Loading ` ,class:A(I(K)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function Lw(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function Rw(e){return(e?.repository?? ` required ` )!== ` none ` }function zw(e,t){return e.filter(e=>t=== ` any ` ||e.type=== ` any ` ||e.type===t)}function Bw(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 Vw={pending_approval: ` pending approval ` ,armed: ` armed ` ,paused: ` paused ` },Hw={pending_approval: ` warn ` ,armed: ` ok ` ,paused: ` idle ` };function Uw(e){
Line truncated
` )}};tU.defaultYaml={explicit:!1,version: ` 1.2 ` },tU.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function nU(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 rU(e){let t=new Set;return JH(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function iU(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function aU(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=rU(e);let a=iU(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(BH(t.node)||HH(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 oU(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=oU(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=oU(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=oU(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=oU(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function sU(e,t,n){if(Array.isArray(e))return e.map((e,t)=>sU(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!WH(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 cU=class{constructor(e){Object.defineProperty(this,FH,{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(!LH(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=sU(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?oU(i,{"":o}, ` ` ,o):o}},lU=class extends cU{constructor(e){super(kH),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=[],JH(e,{Node:(e,t)=>{(IH(t)||WH(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||=(sU(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=uU(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(nU(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 uU(e,t,n){if(IH(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(HH(t)){let r=0;for(let i of t.items){let t=uU(e,i,n);t>r&&(r=t)}return r}if(zH(t)){let r=uU(e,t.key,n),i=uU(e,t.value,n);return Math.max(r,i)}return 1}var dU=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,fU=class extends cU{constructor(e){super(NH),this.value=e}toJSON(e,t){return t?.keep?this.value:sU(this.value,e,t)}toString(){return String(this.value)}};fU.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,fU.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,fU.PLAIN= ` PLAIN ` ,fU.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,fU.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var pU= ` tag : yaml . org , 2002 : ` ;function mU(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 hU(e,t,n){if(LH(e)&&(e=e.contents),UH(e))return e;if(zH(e)){let t=n.schema[jH].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 lU(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=pU+t.slice(2));let l=mU(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new fU(e);return c&&(c.node=t),t
Line truncated
` )?b U(n,t):n.includes( `
` )? `
` +x U(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,C U= ` flow ` ,w U= ` block ` ,T U= ` quoted ` ;function E U(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=D U(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=D U(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` +b U(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,S U= ` flow ` ,C U= ` block ` ,w U= ` quoted ` ;function T U(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=E U(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=E U(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 D U(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 O U=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),k U=e=>/^(%|---| \. \. \. )/m.test(e);function A U(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 j U(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(k U(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 E U(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 D U=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),O U=e=>/^(%|---| \. \. \. )/m.test(e);function k U(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 A U(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(O U(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:E U(o,a,T U,O U(t,!1))}function M U(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return j U(e,t);let n=t.indent||(k U(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : EU ( r , n , CU , OU ( t , ! 1 ) ) } function NU ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = jU ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? MU : i && ! t ? jU : n ? MU : jU } return r ( e , t ) } var PU ; try { PU = 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:T U(o,a,w U,D U(t,!1))}function j U(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return A U(e,t);let n=t.indent||(O U(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : TU ( r , n , SU , DU ( t , ! 1 ) ) } function MU ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = AU ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? jU : i && ! t ? AU : n ? jU : AU } return r ( e , t ) } var NU ; try { NU = RegExp ( ` (^|(?<!
) )
+ ( ? !
| $ ) ` , ` g ` )}catch{P U=/ \n +(?! \n | $ )/g}function F U({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 N U(n,r);let l=r.indent||(r.forceBlockIndent||k U(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===p U.BLOCK_FOLDED?!1:t===p U.BLOCK_LITERAL||!A U(n,c,l.length);if(!n)return u? ` |
| $ ) ` , ` g ` )}catch{N U=/ \n +(?! \n | $ )/g}function P U({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 M U(n,r);let l=r.indent||(r.forceBlockIndent||O U(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===f U.BLOCK_FOLDED?!1:t===f U.BLOCK_LITERAL||!k U(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(P U, ` $ & $ { 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(N U, ` $ & $ { 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=O U(r,!0);o!== ` folded ` &&t!==p U.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=E U( ` $ { v } $ { e } $ { p } ` ,l,w U,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function I U(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 N U(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?N U(a,t):F U(e,t,n,r);if(!s&&!u&&i!==p U.PLAIN&&a.includes( `
` ))return F U(e,t,n,r);if(k U(a)){if(c=== ` ` )return t.forceBlockIndent=!0,F U(e,t,n,r);if(s&&c===l)return N U(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 N U(a,t)}return s?d:E U(d,c,C U,O U(t,!1))}function L U(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!==p U.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=p U.QUOTE_DOUBLE);let c=e=>{switch(e){case p U.BLOCK_FOLDED:case p U.BLOCK_LITERAL:return i||a?N U(o.value,t):F U(o,t,n,r);case p U.QUOTE_DOUBLE:return j U(o.value,t);case p U.QUOTE_SINGLE:return M U(o.value,t);case p U.PLAIN:return I U(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 R U(e,t){let n=Object.assign({blockQuote:!0,commentString:b U,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 z U(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(V H(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 B U(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(V H(e)||U H(e))&&e.anchor;a&&r U(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 V U(e,t,n,r){if(B H(e))return e.toString(t,n,r);if(L H(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=W H(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=z U(t.doc.schema.tags,a);let o=B U(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):V H(a)?L U(a,t,n,r):a.toString(t,n,r);return o?V H(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function H U({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=W H(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(U H(e)||!W H(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||U H(e)||(V H(e)?e.type===p U.BLOCK_FOLDED||e.type===p U.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=V U(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+=S U(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=S U(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=S U(g,n.indent,l(f))));let _,v,y;W H(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&&V H(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&H H(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=V U(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { xU ( 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=D U(r,!0);o!== ` folded ` &&t!==f U.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=T U( ` $ { v } $ { e } $ { p } ` ,l,C U,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function F U(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 M U(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?M U(a,t):P U(e,t,n,r);if(!s&&!u&&i!==f U.PLAIN&&a.includes( `
` ))return P U(e,t,n,r);if(O U(a)){if(c=== ` ` )return t.forceBlockIndent=!0,P U(e,t,n,r);if(s&&c===l)return M U(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 M U(a,t)}return s?d:T U(d,c,S U,D U(t,!1))}function I U(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!==f U.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=f U.QUOTE_DOUBLE);let c=e=>{switch(e){case f U.BLOCK_FOLDED:case f U.BLOCK_LITERAL:return i||a?M U(o.value,t):P U(o,t,n,r);case f U.QUOTE_DOUBLE:return A U(o.value,t);case f U.QUOTE_SINGLE:return j U(o.value,t);case f U.PLAIN:return F U(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 L U(e,t){let n=Object.assign({blockQuote:!0,commentString:y U,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 R U(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(B H(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 z U(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(B H(e)||H H(e))&&e.anchor;a&&n U(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 B U(e,t,n,r){if(z H(e))return e.toString(t,n,r);if(I H(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=U H(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=R U(t.doc.schema.tags,a);let o=z U(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):B H(a)?I U(a,t,n,r):a.toString(t,n,r);return o?B H(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function V U({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=U H(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(H H(e)||!U H(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||H H(e)||(B H(e)?e.type===f U.BLOCK_FOLDED||e.type===f U.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=B U(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+=x U(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=x U(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=x U(g,n.indent,l(f))));let _,v,y;U H(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&&B H(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&V H(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=B U(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { bU ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
` &&y&&(S= `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&U H(t)){let e=x[0],r=x.indexOf( `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&H H(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+=S U(g,n.indent,l(y)):h&&i&&i(),g}function U U(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var W U= ` << ` ,G U={identify:e=>e===W U||typeof e== ` symbol ` &&e.description===W U,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new p U(Symbol(W U)),{addToJSMap:q U}),stringify:()=>W U},K U=(e,t)=>(G U.identify(t)||V H(t)&&(!t.type||t.type===p U.PLAIN)&&G U.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===G U.tag&&e.default);function q U(e,t,n){let r=Y U(e,n);if(H H(r))for(let n of r.items)J U(e,t,n);else if(Array.isArray(r))for(let n of r)J U(e,t,n);else J U(e,t,r)}function J U(e,t,n){let r=Y U(e,n);if(!z H(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 Y U(e,t){return e&&L H(t)?t.resolve(e.doc,e):t}function X U(e,t,{key:n,value:r}){if(W H(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(K U(e,n))q U(e,t,r);else{let i=c U(n, ` ` ,e);if(t instanceof Map)t.set(i,c U(r,i,e));else if(t instanceof Set)t.add(i);else{let a=Z U(n,i,e),o=c U(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function Z U(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(W H(e)&&n?.doc){let t=R U(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)+ ` ... " ` ),U U(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 Q U(e,t,n){return new $ U(g U(e,void 0,n),g U(t,void 0,n))}var $ U=class e{constructor(e,t=null){Object.defineProperty(this,I H,{value:N H}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return W H(n)&&(n=n.clone(t)),W H(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return X U(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?H U(this,e,t,n):JSON.stringify(this)}};function eW (e,t,n){return(t.inFlow??e.flow?n W:t W)(e,t,n)}function t W({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(W H(i))!d&&i.spaceBefore&&f.push( ` ` ),r W(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(B H(i)){let e=W H(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),r W(n,f,e.commentBefore,d))}d=!1;let s=V U(i,u,()=>o=null,()=>d=!0);o&&(s+=S U(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+=x U(g,n.indent,l(y)):h&&i&&i(),g}function H U(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var U U= ` << ` ,W U={identify:e=>e===U U||typeof e== ` symbol ` &&e.description===U U,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new f U(Symbol(U U)),{addToJSMap:K U}),stringify:()=>U U},G U=(e,t)=>(W U.identify(t)||B H(t)&&(!t.type||t.type===f U.PLAIN)&&W U.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===W U.tag&&e.default);function K U(e,t,n){let r=J U(e,n);if(V H(r))for(let n of r.items)q U(e,t,n);else if(Array.isArray(r))for(let n of r)q U(e,t,n);else q U(e,t,r)}function q U(e,t,n){let r=J U(e,n);if(!R H(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 J U(e,t){return e&&I H(t)?t.resolve(e.doc,e):t}function Y U(e,t,{key:n,value:r}){if(U H(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(G U(e,n))K U(e,t,r);else{let i=s U(n, ` ` ,e);if(t instanceof Map)t.set(i,s U(r,i,e));else if(t instanceof Set)t.add(i);else{let a=X U(n,i,e),o=s U(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function X U(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(U H(e)&&n?.doc){let t=L U(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)+ ` ... " ` ),H U(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 Z U(e,t,n){return new Q U(h U(e,void 0,n),h U(t,void 0,n))}var Q U=class e{constructor(e,t=null){Object.defineProperty(this,F H,{value:M H}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return U H(n)&&(n=n.clone(t)),U H(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return Y U(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?V U(this,e,t,n):JSON.stringify(this)}};function $ U (e,t,n){return(t.inFlow??e.flow?t W:e W)(e,t,n)}function e W({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(U H(i))!d&&i.spaceBefore&&f.push(` ` ),n W(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(z H(i)){let e=U H(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),n W(n,f,e.commentBefore,d))}d=!1;let s=B U(i,u,()=>o=null,()=>d=!0);o&&(s+=x U(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+= `
` +x U(l(e),c),s&&s()):d&&o&&o(),p}function n W({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(W H(i))i.spaceBefore&&d.push( ` ` ),r W(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(B H(i)){let e=W H(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),r W(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=W H(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=V U(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+=S U(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 rW({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=xU(t(r),e);n.push(i.trimStart())}}function iW(e,t){let n=VH(t)?t.value:t;for(let r of e)if(BH(r)&&(r.key===t||r.key===n||VH(r.key)&&r.key.value===n))return r}var aW=class extends yU{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(MH,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(QU(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=BH(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new $ U(e,e?.value):new $ U(e.key,e.value);let r=iW(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );VH(r.value)&&fU(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=iW(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=iW(this.items,e)?.value;return(!t&&VH(n)?n.value:n)??void 0}has(e){return!!iW(this.items,e)}set(e,t){this.add(new $ U(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)XU(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!BH(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})),eW(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},oW={collection: ` map ` ,default:!0,nodeClass:aW,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return zH(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>aW.from(e,t,n)},sW=class extends yU{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(FH,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=cW(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=cW(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&VH(r)?r.value:r}has(e){let t=cW(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=cW(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];VH(r)&&fU(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(cU(e,String(r++),t));return n}toString(e,t,n){return e?eW(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(gU(a,void 0,n))}}return i}};function cW(e){let t=VH(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var lW={collection: ` seq ` ,default:!0,nodeClass:sW,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return HH(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>sW.from(e,t,n)},uW={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),LU(e,t,n,r)}},dW={identify:e=>e==null,createNode:()=>new pU(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new pU(null),stringify:({source:e},t)=>typeof e== ` string ` &&dW.test.test(e)?e:t.options.nullStr},fW={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new pU(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&fW.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function pW({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 mW={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:pW},hW={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 LU({comment:e,type:t,value:s},r,i,a)}};function kW(e,t){if(HH(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!BH(r)){if(zH(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new $ U(new pU(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]=BH(r)?r:new $ U(r)}}else t( ` Expected a sequence for this tag ` );return e}function AW(e,t,n){let{replacer:r}=n,i=new sW(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(QU(o,s,n))}return i}var jW={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:kW,createNode:AW},MW=class e extends sW{constructor(){super(),this.add=aW.prototype.add.bind(this),this.delete=aW.prototype.delete.bind(this),this.get=aW.prototype.get.bind(this),this.has=aW.prototype.has.bind(this),this.set=aW.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(BH(e)?(r=cU(e.key, ` ` ,t),i=cU(e.value,r,t)):r=cU(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=AW(e,t,n),i=new this;return i.items=r.items,i}};MW.tag= ` tag : yaml . org , 2002 : omap ` ;var NW={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:MW,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=kW(e,t),r=[];for(let{key:e}of n.items)VH(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new MW,n)},createNode:(e,t,n)=>MW.from(e,t,n)};function PW({value:e,source:t},n){return t&&(e?FW:IW).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var FW={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 pU(!0),stringify:PW},IW={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 pU(!1),stringify:PW},LW={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:pW},RW={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():pW(e)}},zW={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 pU(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:pW},BW=e=>typeof e== ` bigint ` ||Number.isInteger(e);function VW(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 HW(e,t,n){let{value:r}=e;if(BW(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return pW(e)}var UW={identify:BW,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>VW(e,2,2,n),stringify:e=>HW(e,2, ` 0 b ` )},WW={identify:BW,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>VW(e,1,8,n),stringify:e=>HW(e,8, ` 0 ` )},GW={identify:BW,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>VW(e,0,10,n),stringify:pW},KW={identify:BW,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>VW(e,2,16,n),stringify:e=>HW(e,16, ` 0 x ` )},qW=class e extends aW{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=BH(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new $ U(e.key,null):new $ U(e,null),iW(this.items,t.key)||this.items.push(t)}get(e,t){let n=iW(this.items,e);return!t&&BH(n)?VH(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=iW(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new $ U(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(x U(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(x U(a(t), ` ` )))}return n.join( `
` +b U(l(e),c),s&&s()):d&&o&&o(),p}function t W({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(U H(i))i.spaceBefore&&d.push( ` ` ),n W(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(z H(i)){let e=U H(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),n W(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=U H(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=B U(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+=x U(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 nW({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=bU(t(r),e);n.push(i.trimStart())}}function rW(e,t){let n=BH(t)?t.value:t;for(let r of e)if(zH(r)&&(r.key===t||r.key===n||BH(r.key)&&r.key.value===n))return r}var iW=class extends vU{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(jH,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(ZU(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=zH(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new QU(e,e?.value):new QU(e.key,e.value);let r=rW(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );BH(r.value)&&dU(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=rW(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=rW(this.items,e)?.value;return(!t&&BH(n)?n.value:n)??void 0}has(e){return!!rW(this.items,e)}set(e,t){this.add(new QU(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)YU(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!zH(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})), $ U(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},aW={collection: ` map ` ,default:!0,nodeClass:iW,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return RH(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>iW.from(e,t,n)},oW=class extends vU{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(PH,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=sW(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=sW(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&BH(r)?r.value:r}has(e){let t=sW(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=sW(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];BH(r)&&dU(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(sU(e,String(r++),t));return n}toString(e,t,n){return e? $ U(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(hU(a,void 0,n))}}return i}};function sW(e){let t=BH(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var cW={collection: ` seq ` ,default:!0,nodeClass:oW,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return VH(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>oW.from(e,t,n)},lW={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),IU(e,t,n,r)}},uW={identify:e=>e==null,createNode:()=>new fU(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new fU(null),stringify:({source:e},t)=>typeof e== ` string ` &&uW.test.test(e)?e:t.options.nullStr},dW={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new fU(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&dW.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function fW({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 pW={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:fW},mW={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 IU({comment:e,type:t,value:s},r,i,a)}};function OW(e,t){if(VH(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!zH(r)){if(RH(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new QU(new fU(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]=zH(r)?r:new QU(r)}}else t( ` Expected a sequence for this tag ` );return e}function kW(e,t,n){let{replacer:r}=n,i=new oW(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(ZU(o,s,n))}return i}var AW={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:OW,createNode:kW},jW=class e extends oW{constructor(){super(),this.add=iW.prototype.add.bind(this),this.delete=iW.prototype.delete.bind(this),this.get=iW.prototype.get.bind(this),this.has=iW.prototype.has.bind(this),this.set=iW.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(zH(e)?(r=sU(e.key, ` ` ,t),i=sU(e.value,r,t)):r=sU(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=kW(e,t,n),i=new this;return i.items=r.items,i}};jW.tag= ` tag : yaml . org , 2002 : omap ` ;var MW={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:jW,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=OW(e,t),r=[];for(let{key:e}of n.items)BH(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new jW,n)},createNode:(e,t,n)=>jW.from(e,t,n)};function NW({value:e,source:t},n){return t&&(e?PW:FW).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var PW={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 fU(!0),stringify:NW},FW={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 fU(!1),stringify:NW},IW={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:fW},LW={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():fW(e)}},RW={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 fU(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:fW},zW=e=>typeof e== ` bigint ` ||Number.isInteger(e);function BW(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 VW(e,t,n){let{value:r}=e;if(zW(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return fW(e)}var HW={identify:zW,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>BW(e,2,2,n),stringify:e=>VW(e,2, ` 0 b ` )},UW={identify:zW,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>BW(e,1,8,n),stringify:e=>VW(e,8, ` 0 ` )},WW={identify:zW,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>BW(e,0,10,n),stringify:fW},GW={identify:zW,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>BW(e,2,16,n),stringify:e=>VW(e,16, ` 0 x ` )},KW=class e extends iW{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=zH(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new QU(e.key,null):new QU(e,null),rW(this.items,t.key)||this.items.push(t)}get(e,t){let n=rW(this.items,e);return!t&&zH(n)?BH(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=rW(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new QU(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(b U(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(b U(a(t), ` ` )))}return n.join( `
` )+ `
` }var c G=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,I H,{value:j H});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 n U({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[I H]:{value:j H}});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=W H(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){l G(this.contents)&&this.contents.add(e)}addIn(e,t){l G(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=i U(this);e.anchor=!t||n.has(t)?a U(t|| ` a ` ,n):t}return new u U(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}=o U(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=g U(e,l,p);return o&&U H(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new $ U(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return l G(this.contents)?this.contents.delete(e):!1}deleteIn(e){return v U(e)?this.contents!=null&&(this.contents=null,!0):l G(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return U H(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return v U(e)?!t&&V H(this.contents)?this.contents.value:this.contents:U H(this.contents)?this.contents.getIn(e,t):void 0}has(e){return U H(this.contents)?this.contents.has(e):!1}hasIn(e){return v U(e)?this.contents!==void 0:U H(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=_ U(this.schema,[e],t):l G(this.contents)&&this.contents.set(e,t)}setIn(e,t){v U(e)?this.contents=t:this.contents==null?this.contents=_ U(this.schema,Array.from(e),t):l G(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 n U({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 n U({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 o G(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=c U(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 ` ?s U(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 s G(this,e)}};function l G(e){if(U H(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var u G=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},d G=class extends u G{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},f G=class extends u G{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},p G=(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 m G(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],C=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:C,start:x??C}}function h G(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(h G(t.key)||h G(t.value))return!0}return!1;default:return!0}}function g G(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&h G(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function _ G(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||V H(e)&&V H(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var v G= ` All mapping items must start at the same column ` ;function y G({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??a W)(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=m G(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 ` ,v G)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||h G(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 ` ,v G);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&g G(r.indent,u,i),n.atKey=!1,_ G(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=m G(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&&g G(r.indent,f,i),s=c.range[2];let l=new $ U(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 $ U(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 b G({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??s W)(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=m G(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&&g G(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function x G(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 S G= ` Block collections are not allowed within flow collections ` ,C G=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function w G({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?a W:s W))(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=m G(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&&h G(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];B H(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],C G(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,S G)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);C G(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,S G),n.atKey=!1;let _=m G(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?C G(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,S G):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new $ U(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;_ G(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new a W(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=x G(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 T G(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?y G(e,t,n,r,a):n.type=== ` block - seq ` ?b G(e,t,n,r,a):w G(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function E G(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===a W.tagName&&s=== ` map ` ||o===s W.tagName&&s=== ` seq ` )return T G(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),T G(e,t,n,i,o)}let l=T G(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=W H(u)?u:new p U(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function D G(e,t,n){let r=t.offset,i=O G(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?p U.BLOCK_FOLDED:p U.BLOCK_LITERAL,o=t.source?k G(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 s G=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,F H,{value:A H});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 t U({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[F H]:{value:A H}});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=U H(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){c G(this.contents)&&this.contents.add(e)}addIn(e,t){c G(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=r U(this);e.anchor=!t||n.has(t)?i U(t|| ` a ` ,n):t}return new l U(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}=a U(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=h U(e,l,p);return o&&H H(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new Q U(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return c G(this.contents)?this.contents.delete(e):!1}deleteIn(e){return _ U(e)?this.contents!=null&&(this.contents=null,!0):c G(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return H H(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return _ U(e)?!t&&B H(this.contents)?this.contents.value:this.contents:H H(this.contents)?this.contents.getIn(e,t):void 0}has(e){return H H(this.contents)?this.contents.has(e):!1}hasIn(e){return _ U(e)?this.contents!==void 0:H H(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=g U(this.schema,[e],t):c G(this.contents)&&this.contents.set(e,t)}setIn(e,t){_ U(e)?this.contents=t:this.contents==null?this.contents=g U(this.schema,Array.from(e),t):c G(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 t U({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 t U({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 a G(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=s U(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 ` ?o U(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 o G(this,e)}};function c G(e){if(H H(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var l G=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},u G=class extends l G{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},d G=class extends l G{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},f G=(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 p G(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],C=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:C,start:x??C}}function m G(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(m G(t.key)||m G(t.value))return!0}return!1;default:return!0}}function h G(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&m G(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function g G(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||B H(e)&&B H(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var _ G= ` All mapping items must start at the same column ` ;function v G({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??i W)(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=p G(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 ` ,_ G)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||m G(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 ` ,_ G);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&h G(r.indent,u,i),n.atKey=!1,g G(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=p G(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&&h G(r.indent,f,i),s=c.range[2];let l=new Q U(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 Q U(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 y G({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??o W)(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=p G(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&&h G(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function b G(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 x G= ` Block collections are not allowed within flow collections ` ,S G=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function C G({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?i W:o W))(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=p G(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&&m G(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];z H(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],S G(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,x G)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);S G(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,x G),n.atKey=!1;let _=p G(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?S G(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,x G):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new Q U(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;g G(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new i W(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=b G(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 w G(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?v G(e,t,n,r,a):n.type=== ` block - seq ` ?y G(e,t,n,r,a):C G(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function T G(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===i W.tagName&&s=== ` map ` ||o===o W.tagName&&s=== ` seq ` )return w G(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),w G(e,t,n,i,o)}let l=w G(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=U H(u)?u:new f U(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function E G(e,t,n){let r=t.offset,i=D G(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?f U.BLOCK_FOLDED:f U.BLOCK_LITERAL,o=t.source?O G(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===p U.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===f U.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 O G({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 k G(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 A G(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=p U.PLAIN,c=j G(a,l);break;case ` single - quoted - scalar ` :s=p U.QUOTE_SINGLE,c=M G(a,l);break;case ` double - quoted - scalar ` :s=p U.QUOTE_DOUBLE,c=P G(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=x G(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function j G(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 } ` ) , NG ( e ) } function MG ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , NG ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function NG ( 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 D G({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 O G(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 k G(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=f U.PLAIN,c=A G(a,l);break;case ` single - quoted - scalar ` :s=f U.QUOTE_SINGLE,c=j G(a,l);break;case ` double - quoted - scalar ` :s=f U.QUOTE_DOUBLE,c=N G(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=b G(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function A G(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 } ` ) , MG ( e ) } function jG ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , MG ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function MG ( 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 P G(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 N G(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}=F G(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=I G[i];if(a)n+=a;else if(i=== `
` ){let{fold:t,offset:i}=P G(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=F G[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+=L G(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+=I G(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 F G(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 P G(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 I G={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function LG ( 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 RG ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? DG ( e , t , r ) : AG ( 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 [ PH ] : c ? zG ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? BG ( e , i , t , r ) : e . schema [ PH ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = VH ( a ) ? a : new pU ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new pU ( 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 zG ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ PH ] ; 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 [ PH ] ) } function BG ( { 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 [ PH ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ PH ] ; 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 VG ( 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 HG = { composeNode : UG , composeEmptyNode : WG } ; function UG ( 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 = GG ( 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 = RG ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = EG ( HG , 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 ? ? = WG ( 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 && ( ! VH ( 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 WG ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = RG ( e , { type : ` scalar ` , offset : VG ( 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 GG ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new uU ( 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 = xG ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function KG ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new cG ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = mG ( 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 ? UG ( c , i , l , o ) : WG ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = xG ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function qG ( 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 JG ( 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 F G={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function IG ( 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 LG ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? EG ( e , t , r ) : kG ( 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 [ NH ] : c ? RG ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? zG ( e , i , t , r ) : e . schema [ NH ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = BH ( a ) ? a : new fU ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new fU ( 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 RG ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ NH ] ; 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 [ NH ] ) } function zG ( { 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 [ NH ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ NH ] ; 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 BG ( 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 VG = { composeNode : HG , composeEmptyNode : UG } ; function HG ( 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 = WG ( 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 = LG ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = TG ( VG , 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 ? ? = UG ( 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 && ( ! BH ( 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 UG ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = LG ( e , { type : ` scalar ` , offset : BG ( 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 WG ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new lU ( 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 = bG ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function GG ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new sG ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = pG ( 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 ? HG ( c , i , l , o ) : UG ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = bG ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function KG ( 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 qG ( 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 Y G=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=q G(e);r?this.warnings.push(new f G(i,t,n)):this.errors.push(new d G(i,t,n))},this.directives=new n U({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=J G(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(U H(i)&&!i.flow&&i.items.length>0){let e=i.items[0];B H(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:J G(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=q G(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=K G(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 d G(q G(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 d G(q G(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=x G(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 d G(q G(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 c G(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}}},X G=Symbol( ` break visit ` ),Z G=Symbol( ` skip children ` ),Q G=Symbol( ` remove item ` );function $ G(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),eK (Object.freeze([]),e,t)} $ G.BREAK=X G, $ G.SKIP=Z G, $ G.REMOVE=Q G, $ G.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}, $ G.parentCollection=(e,t)=>{let n= $ G.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 eK (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=eK (Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===X G)return X G;else r===Q G&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function t K(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 J G=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=K G(e);r?this.warnings.push(new d G(i,t,n)):this.errors.push(new u G(i,t,n))},this.directives=new t U({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=q G(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(H H(i)&&!i.flow&&i.items.length>0){let e=i.items[0];z H(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:q G(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=K G(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=G G(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 u G(K G(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 u G(K G(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=b G(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 u G(K G(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 s G(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}}},Y G=Symbol( ` break visit ` ),X G=Symbol( ` skip children ` ),Z G=Symbol( ` remove item ` );function Q G(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}), $ G (Object.freeze([]),e,t)}Q G.BREAK=Y G,Q G.SKIP=X G,Q G.REMOVE=Z G,Q G.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},Q G.parentCollection=(e,t)=>{let n=Q G.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 $ G (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= $ G (Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==` number ` )t=r-1;else if(r===Y G)return Y G;else r===Z G&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function e K(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 n K(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var r K=new Set( ` 0123456789 ABCDEFabcdef ` ),i K=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , a K = n e w S e t ( ` , [ ] { } ` ) , o K = n e w S e t ( ` , [ ] { }
\ r ` ),s K=e=>!e||o K.has(e),c K=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 t K(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var n K=new Set( ` 0123456789 ABCDEFabcdef ` ),r K=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , i K = n e w S e t ( ` , [ ] { } ` ) , a K = n e w S e t ( ` , [ ] { }
\ r ` ),o K=e=>!e||a K.has(e),s K=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=== ` ... ` )&&n K(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=== ` ... ` )&&n K(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&&!n K(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=== ` : ` )&&n K(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(s K), ` 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(`...`))&&n K(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(s K),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||n K(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=== ` ... ` )&&t K(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=== ` ... ` )&&t K(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&&!t K(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=== ` : ` )&&t K(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(o K), ` 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(`...`))&&t K(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(o K),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||t K(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=>n K(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=>t K(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(n K(r)||e&&a K.has(r))break;t=n}else if(n K(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(t K(r)||e&&i K.has(r))break;t=n}else if(t K(r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` ?(n+=1,r= `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&a K.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&a K.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(s K),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(n K(n)||t&&a K.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(;!n K(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(i K.has(t))t=this.buffer[++e];else if(t=== ` % ` &&r K.has(this.buffer[e+1])&&r K.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&&i K.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&i K.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(o K),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(t K(n)||t&&i K.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(;!t K(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(r K.has(t))t=this.buffer[++e];else if(t=== ` % ` &&n K.has(this.buffer[e+1])&&n K.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)}},lK=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 uK(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function dK(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 fK(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 pK(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 mK(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 hK(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 gK(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!uK(t.start, ` explicit - key - ind ` )&&!uK(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,fK(t.value)?t.value.end?hK(t.value.end,t.sep):t.value.end=t.sep:hK(t.start,t.sep),delete t.sep)}var _K=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 cK,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=tK(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})}else{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 ` &&gK(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&&dK(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.in
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)}},cK=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 lK(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function uK(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 dK(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 fK(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 pK(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 mK(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 hK(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!lK(t.start, ` explicit - key - ind ` )&&!lK(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,dK(t.value)?t.value.end?mK(t.value.end,t.sep):t.value.end=t.sep:mK(t.start,t.sep),delete t.sep)}var gK=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 sK,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=eK(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})}else{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 ` &&hK(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&&uK(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.in
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)){hK(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(uK(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=mK(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(uK(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(fK(t.key)&&!uK(t.sep, ` newline ` )){let e=mK(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]}):uK(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&&!uK(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)){hK(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||uK(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)){mK(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(lK(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=pK(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(lK(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(dK(t.key)&&!lK(t.sep, ` newline ` )){let e=pK(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]}):lK(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&&!lK(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)){mK(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||lK(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=mK(pK(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=mK(pK(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 vK(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new lK||null,prettyErrors:t}}function yK(e,t={}){let{lineCounter:n,prettyErrors:r}=vK(t),i=new _K(n?.addNewLine),a=new YG(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 dG(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(pG(e,n)),o.warnings.forEach(pG(e,n))),o}function bK(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=yK(e,n);if(!i)return null;if(i.warnings.forEach(e=>UU(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 xK(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 RH(e)&&!r?e.toString(n):new cG(e,r,n).toString(n)}function SK(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 CK(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 wK=140,TK=280,EK={"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 DK(e){return EK[e]??e}var OK=/ \{ \{ \s *steps \. ([A-Za-z0-9_-]+) \. [^}]* \} \} /g;function kK(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function AK(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 jK(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 MK(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(OK)].map(e=>e[1]))]}function NK(e){let t=yK(e).toJS(),n=kK(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=kK(e)?e:{},f=typeof u.type== ` string ` ?u.type: ` ` ,p=kK(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||DK(f),type:f,detail:AK(f,p),summary:jK(p),when:typeof u.when== ` string ` ?u.when:void 0,retry:kK(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 MK(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(kK(t)&&kK(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)*TK,d=c,m=c;(Array.isArray(o)?o:[]).forEach((i,o)=>{let c=f(i, ` $ { e + 1 } - $ { t } - $ { o + 1 } ` ,u,(l+o)*wK,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*wK,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*wK-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 PK={agent:sr,command:Jr,repo:Cr,gate:Gr,forge:jr,human:ti,review:xr,workflow:ii},FK={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function IK(e){return PK[e.split( ` . ` )[0]]??ii}function LK(e){return Object.keys(FK).map(t=>({title:FK[t],icon:PK[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function RK(e,t){let n=yK(e).getIn(t,!0);if(zH(n))return n.toJSON()}function zK(e,t,n){let r=yK(e);return r.setIn(t,r.createNode(GK(n))),r.toString()}function BK(e,t,n){let r=yK(e),i=r.get( ` steps ` ,!0);if(HH(i)||(r.set( ` steps ` ,r.createNode([])),i=r.get( ` steps ` ,!0)),!HH(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 VK(e,t){let n=yK(e),r=n.getIn(t.slice(0,-1),!0),i=t.at(-1);if(!HH(r)||typeof i!= ` number ` )return{source:e,path:t};let a=n.createNode(n.getIn(t));return zH(a)&&a.delete( ` id ` ),r.items.splice(i+1,0,a),{source:n.toString(),path:[...t.slice(0,-1),i+1]}}function HK(e,t){let n=yK(e);n.deleteIn(t);let r=t.slice(0,-1);if(r.length>2){let e=n.getIn(r,!0);HH(e)&&e.items.length===0&&n.deleteIn(r)}return n.toString()}function UK(e,t,n){let r=yK(e),i=r.getIn(t.slice(0,-1),!0),a=t.at(-1);if(!HH(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 WK(e,t){let n=yK(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 GK(e){if(Array.isArray(e))return e.map(GK);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=GK(r);(typeof e!= ` object ` ||!e||Array.isArray(e)||Object.keys(e).length!==0)&&(t[n]=e)}return t}function KK(e,t){let n=yK(e).get(t,!0);return n&&typeof n== ` object ` && ` toJSON ` in n?n.toJSON():yK(e).get(t)}function qK(e,t,n){let r=yK(e),i=GK({[t]:n})[t];return i===void 0?r.delete(t):r.set(t,r.createNode(i)),r.toString()}function JK(e){return Object.entries(e?.inputs??{}).map(([e,t])=>({name:e,type:t.type,required:t.required===!0})).sort((e,t)=>e.name.localeCompare(t.name))}function YK(e,t){return e.filter(e=>e.required&&!(t[e.name]?? ` ` ).trim()).map(e=>e.name)}function XK(e,t){switch(t){case ` number ` :{let t=e.trim();return t!== ` ` &&!Number.isNaN(Number(t))?Number(t):e}case ` bool ` :return e=== ` true ` ||e!== ` fal Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:u q(e)}))}var c q=/^( \s *)(- \s +)?/,l q=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function u q(e){let{code:t,comment:n}=d q(e),r=f q(t);return n&&r.push({text:n,kind: ` comment ` }),r}function d q(e){let t= ` ` ;for(let n=0;n<e.length;n++){let r=e[n];if(t)r===t&&(t= ` ` );else if(r=== ` "`||r===`'`)t=r;else if(r===`#`&&(n===0||/\s/.test(e[n-1]??``)))return{code:e.slice(0,n),comment:e.slice(n)}}return{code:e,comment:``}}function f q(e){if(!e)return[];let t=[],n=c q.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=l q.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,...p q(i[4]??``)]):[...t,...p q(r)]}function p q(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 mq ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function hq(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function gq(e){return typeof e== ` string ` &&e.trim()!== ` ` }var _q={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },vq={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },yq={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },bq={class: ` min - w - 0 flex - 1 ` },xq=[ ` value ` , ` placeholder ` ],Sq={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },Cq={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },wq={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },Tq={key:1,class: ` space - y - 1.5 ` },Eq=[ ` title ` ],Dq=[ ` value ` ],Oq=[ ` value ` ],kq={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },Aq=[ ` onClick ` ],jq=[ ` onClick ` ],Mq={key:2,class: ` divide - y divide - border rounded - md border border - border ` },Nq=[ ` title ` ],Pq=[ ` value ` , ` onChange ` ],Fq=[ ` value ` ],Iq=[ ` value ` , ` onInput ` ],Lq=[ ` value ` , ` onFocus ` , ` onInput ` ],Rq={key:0,class: ` space - y - 3 ` },zq={class: ` text - [ 13 px ] ` },Bq={key:0,class: ` text - danger ` },Vq={class: ` ml - 2 text - xs text - fg - subtle ` },Hq=[ ` aria - label ` , ` value ` , ` onChange ` ],Uq={key:0,value: ` value ` },Wq=[ ` aria - label ` , ` value ` , ` onChange ` ],Gq=[ ` value ` ],Kq=[ ` aria - label ` , ` value ` , ` onChange ` ],qq={key:1,class: ` space - y - 3 ` },Jq={class: ` text - [ 13 px ] ` },Yq={class: ` ml - 2 text - xs text - fg - subtle ` },Xq=[ ` aria - label ` , ` disabled ` , ` value ` , ` onChange ` ],Zq=[ ` value ` ],Qq=[ ` title ` ], $ q={key:0,class: ` text - xs text - danger ` },eJ={class: ` space - y - 2 ` },tJ={class: ` divide - y divide - border rounded - md border border - border ` },nJ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },rJ=[ ` value ` ],iJ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },aJ=[ ` value ` ],oJ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },sJ=[ ` value ` ],cJ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },lJ={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },uJ=n({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=N(()=>RK(n.yaml,n.path)??{}),a=N(()=>typeof i.value.type== ` string ` ?i.value.type: ` ` ),o=N(()=>n.vocabulary.find(e=>e.name===a.value)),s=N(()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),c=N(()=>WK(n.yaml,n.path)),u=N(()=>o.value?.settings&&i.value.settings?aq(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[ ` workflow . call ` , ` workflow . handoff ` ].includes(a.value)&&e=== ` workflow ` ||a.value=== ` human . approve ` &&e=== ` then ` ? ` workflow ` :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=N(()=>{let e=Object.entries(o.value?.settings?.properties??{}).filter(([e])=>a.value!== ` workflow . call ` ||![ ` inputs ` , ` outputs ` ].includes(e)).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=>[ ` workflow ` , ` 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 ` ,zK(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){let n={...s.value,[e]:t};a.value=== ` workflow . call ` &&e=== ` wait ` &&t!==!0&&delete n.outputs,h({...i.value,settings:n})}function y(e,t){let n={...s.value,[e]:t};a.value=== ` workflow . call ` &&t!==s.value[e]&&(delete n.inputs,delete n.outputs),h({...i.value,settings:n})}let b=N(()=>n.workflows.find(e=>e.id===s.value.workflow)),x=N(()=>Object.entries(KK(b.value?.yaml?? ` ` , ` inputs ` )??{})),S=N(()=>Object.entries(KK(b.value?.yaml?? ` ` , ` outputs ` )??{})),C=N(()=>Object.entries(KK(n.yaml, ` inputs ` )??{})),T=N(()=>Object.entries(KK(n.yaml, ` outputs ` )??{})),E=N(()=>s.value.inputs??{}),ee=N(()=>s.value.outputs??{}),D=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),O=e=>E.value[e]===void 0? ` ` :String(E.value[e]);function te(e,t,n){v( ` inputs ` ,{...E.value,[e]:t=== ` ` ?void 0:D(t)?t:XK(t,n?? ` string ` )})}let ne=G(null);function re(e,t){let n=ne.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 ie=G({});function ae(e,t){try{v(e,t.trim()?bK(t):void 0),ie.value={...ie.value,[e]: ` ` }}catch(t){ie.value={...ie.value,[e]:String(t.message).split( `
` )[0]}}}let oe=e=>e===void 0? ` ` :xK(e).trimEnd(),se=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),ce=e=>typeof s.value[e]== ` string ` ?s.value[e]: ` ` ;return(t,n)=>(F(),H( ` aside ` ,_q,[V( ` header ` ,vq,[V( ` span ` ,yq,[(F(),W(ve(I(IK)(a.value)),{class: ` size - 4 ` }))]),V( ` div ` ,bq,[V( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:I(DK)(a.value),"aria-label": ` Step id ` ,onInput:n[0]||=e=>g( ` id ` ,e.target.value)},null,40,xq),V( ` div ` ,Sq,R(a.value),1)]),k(I(J),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:n[1]||=e=>r( ` close ` )},{default:w(()=>[k(I(oi))]),_:1})]),V( ` div ` ,Cq,[u.value?(F(),H( ` p ` ,wq,R(u.value),1)):P( ` ` ,!0),m.value.lead?(F(),H( ` section ` ,Tq,[V( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:m.value.lead.schema.description},[l(R(se(m.value.lead.key,m.value.lead.schema))+ ` ` ,1),m.value.lead.schema.description?(F(),W(I(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):P( ` ` ,!0)],8,Eq),m.value.lead.kind=== ` workflow ` ?(F(),W(QK,{key:0,value:ce(m.value.lead.key),workflows:e.workflows,label:se(m.value.lead.key,m.value.lead.schema),onPick:n[2]||=e=>y(m.value.lead.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` ])):m.value.lead.kind=== ` select ` ?(F(),H( ` select ` ,{key:1,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:ce(m.value.lead.key),onChange:n[3]||=e=>v(m.value.lead.key,e.target.value||void 0)},[n[14]||=V( ` option ` ,{value: ` ` }, ` Default ` ,-1),(F(!0),H(z,null,U(m.value.lead.schema.enum,e=>(F(),H( ` option ` ,{key:e,value:e},R(e),9,Oq))),128))],40,Dq)):m.value.lead.kind=== ` text ` ?(F(),W(I(mh),{key:2,"model-value":ce(m.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:n[4]||=e=>ne.value=m.value.lead.key,"onUpdate:modelValue":n[5]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(F(),W(I(Y),{key:3,"model-value":ce(m.value.lead.key),onFocus:n[6]||=e=>ne.value=m.value.lead.key,"onUpdate:modelValue":n[7]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])),c.value.length&&m.value.lead.kind!== ` select ` ?(F(),H( ` div ` ,kq,[n[15]||=V( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(F(!0),H(z,null,U(c.value,e=>(F(),H(z,{key:e},[V( ` 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=>re(e, ` summary ` )},R(e),9,Aq),V( ` 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=>re(e, ` result ` )},R(e)+ ` . result ` ,9,jq)],64))),128))])):P( ` ` ,!0)])):P( ` ` ,!0),m.value.compact.length?(F(),H( ` section ` ,Mq,[(F(!0),H(z,null,U(m.value.compact,t=>(F(),H( ` div ` ,{key:t.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[V( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:t.schema.description},[l(R(se(t.key,t.schema))+ ` ` ,1),t.schema.description?(F(),W(I(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):P( ` ` ,!0)],8,Nq),t.kind=== ` workflow ` ?(F(),W(QK,{key:0,class: ` max - w - 48 ` ,value:ce(t.key),workflows:e.workflows,label:se(t.key,t.schema),onPick:e=>y(t.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` , ` onPick ` ])):t.kind=== ` boolean ` ?(F(),W(I(cb),{key:1,"model-value":s.value[t.key]===!0,"onUpdate:modelValue":e=>v(t.key,e||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):t.kind=== ` select ` ?(F(),H( ` select ` ,{key:2,class: ` h - 7 max - w - 40 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:ce(t.key),onChange:e=>v(t.key,e.target.value||void 0)},[n[16]||=V( ` option ` ,{value: ` ` }, ` Default ` ,-1),(F(!0),H(z,null,U(t.schema.enum,e=>(F(),H( ` option ` ,{key:e,value:e},R(e),9,Fq))),128))],40,Pq)):t.kind=== ` number ` ?(F(),H( ` input ` ,{key:3,type: ` number ` ,class: ` h - 7 w - 24 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:s.value[t.key]?? ` ` ,onInput:e=>v(t.key,e.target.value=== ` ` ?void 0:Number(e.target.value))},null,40,Iq)):(F(),H( ` input ` ,{key:4,class: ` h - 7 w - 40 rounded - md border border - input bg - background px - 2 text - [ 13 px ] ` ,value:ce(t.key),onFocus:e=>ne.value=t.key,onInput:e=>v(t.key,e.target.value)},null,40,Lq))]))),128))])):P( ` ` ,!0),a.value=== ` workflow . call ` &&b.value?(F(),H(z,{key:3},[x.value.length?(F(),H( ` section ` ,Rq,[n[20]||=V( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Inputs ` ,-1),(F(!0),H(z,null,U(x.value,([e,t])=>(F(),H( ` div ` ,{key:e,class: ` space - y - 1.5 ` },[V( ` div ` ,zq,[l(R(e),1),t.required?(F(),H( ` span ` ,Bq, ` * ` )):P( ` ` ,!0),V( ` span ` ,Vq,R(t.type),1)]),V( ` select ` ,{"aria-label": ` $ { e } source ` ,class: ` h - 8 w - full rounded - md border border - input bg - background px - 2 text - [ 13 px ] ` ,value:D(E.value[e])||[ ` object ` , ` array ` ].includes(t.type?? ` ` )? ` input ` : ` value ` ,onChange:t=>te(e,t.target.value=== ` input ` ? ` inputs . ` : ` ` )},[[ ` object ` , ` array ` ].includes(t.type?? ` ` )?P( ` ` ,!0):(F(),H( ` option ` ,Uq, ` Value ` )),n[17]||=V( ` option ` ,{value: ` input ` }, ` Caller input ` ,-1)],40,Hq),D(E.value[e])||[ ` object ` , ` array ` ].includes(t.type?? ` ` )?(F(
Line truncated
` ): ` ` ,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 ` ])):(F(),H(z,{key:2},[k(I(mh),{"model-value":oe(s.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>ae(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),ie.value[e.key]?(F(),H( ` span ` , $ q,R(ie.value[e.key]),1)):P( ` ` ,!0)],64))]))),128)),V( ` section ` ,eJ,[n[28]||=V( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),V( ` div ` ,tJ,[V( ` label ` ,nJ,[n[23]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),V( ` 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:n[8]||=e=>g( ` when ` ,e.target.value)},null,40,rJ)]),V( ` label ` ,iJ,[n[25]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),V( ` select ` ,{class: ` h - 7 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:i.value.on_failure?? ` ` ,onChange:n[9]||=e=>g( ` on _failure ` ,e.target.value||void 0)},[...n[24]||=[V( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),V( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,aJ)]),V( ` label ` ,oJ,[n[26]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),V( ` 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:n[10]||=e=>_({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,sJ)]),V( ` label ` ,cJ,[n[27]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),k(I(Zy),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":n[11]||=e=>_({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),V( ` footer ` ,lJ,[k(I(J),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:n[12]||=e=>r( ` remove ` )},{default:w(()=>[k(I(Xr)),n[29]||=l( ` Delete step ` ,-1)]),_:1}),k(I(J),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:n[13]||=e=>r( ` close ` )},{default:w(()=>[...n[30]||=[l( ` Done ` ,-1)]]),_:1})])]))}}),dJ= ` repository _path ` ;function fJ(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:dJ,path:n.trim(),type: ` string ` ,required:!0}),r}function pJ(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function mJ(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=pJ(Vw(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 hJ(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:Vw(e.value,i.type?? ` string ` )})}return n}function gJ(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 _J(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,..._J(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,..._J(n,r)]}):[]}function vJ(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function yJ(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 bJ(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var xJ={class: ` flex h - full flex - col ` },SJ={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },CJ={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },wJ={key:0,class: ` flex flex - 1 items - center justify - center ` },TJ={class: ` space - y - 1.5 ` },EJ=[ ` disabled ` ],DJ=[ ` value ` ],OJ={key:1,class: ` space - y - 1.5 ` },kJ=[ ` value ` ],AJ=[ ` title ` ],jJ={class: ` space - y - 1.5 ` },MJ={id: ` bind - paths ` },NJ=[ ` value ` ],PJ={class: ` divide - y divide - border rounded - md border border - border ` },FJ={class: ` flex items - center gap - 1.5 text - xs ` },IJ={class: ` font - mono ` },LJ={class: ` text - fg - subtle ` },RJ={key:0,class: ` text - danger ` ,title: ` Required ` },zJ=[ ` title ` , ` aria - label ` , ` onClick ` ],BJ=[ ` onUpdate : modelValue ` , ` aria - label ` ],VJ=[ ` onUpdate : modelValue ` , ` aria - label ` ],HJ={key:2,class: ` text - xs text - danger ` },UJ=[ ` title ` ],WJ={key:0,class: ` space - y - 1 px - 3 py - 2 ` },GJ={key:0,class: ` text - xs text - danger ` },KJ={key:1,class: ` truncate font - mono text - xs text - success ` },qJ={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },JJ={class: ` space - y - 2 ` },YJ={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },XJ={key:1,class
Line truncated
` ,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=pK(fK(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=pK(fK(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 _K(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new cK||null,prettyErrors:t}}function vK(e,t={}){let{lineCounter:n,prettyErrors:r}=_K(t),i=new gK(n?.addNewLine),a=new JG(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 uG(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(fG(e,n)),o.warnings.forEach(fG(e,n))),o}function yK(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=vK(e,n);if(!i)return null;if(i.warnings.forEach(e=>HU(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 bK(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 LH(e)&&!r?e.toString(n):new sG(e,r,n).toString(n)}function xK(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 SK(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 CK=140,wK=280,TK={parallel: ` Parallel ` ,"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 EK(e){return TK[e]??e}var DK=/ \{ \{ \s *steps \. ([A-Za-z0-9_-]+) \. [^}]* \} \} /g;function OK(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function kK(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 AK(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, ` Line truncated
` ).find(e=>e.trim())?.trim()}}function jK(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(DK)].map(e=>e[1]))]}function MK(e){let t=vK(e).toJS(),n=OK(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=OK(e)?e:{},f=OK(u.parallel)? ` parallel ` :typeof u.type== ` string ` ?u.type: ` ` ,p=OK(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||EK(f),type:f,detail:kK(f,p),summary:AK(p),when:typeof u.when== ` string ` ?u.when:void 0,retry:OK(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 jK(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(OK(t)&&OK(t.parallel)){let n=Object.entries(t.parallel),i=f(t,String(e+1),0,l*CK,void 0,void 0,[ ` steps ` ,e]);p(c,i,[ ` steps ` ,e-1]),l++;let a=typeof t.id== ` string ` ?t.id: ` parallel ` ,o=[],s=0;n.forEach(([t,c],u)=>{let d=(u-(n.length-1)/2)*wK,m=[i],h=[ ` steps ` ,e, ` parallel ` ,t];(Array.isArray(c)?c:[]).forEach((n,r)=>{let i=f(n, ` $ { e + 1 } - $ { t } - $ { r + 1 } ` ,d,(l+r)*CK,t,a,[ ` steps ` ,e, ` parallel ` ,t,r]);p(m,i,[...h,r-1]),m=[i],s=Math.max(s,r+1)});let g=Array.isArray(c)?c.length:0,_= ` add - $ { e } - $ { t } ` ;r.push({id:_,type: ` add ` ,position:{x:d+104,y:(l+g)*CK},data:{kind: ` step ` ,key:_,title: ` ` ,type: ` ` ,detail: ` ` ,branch:t,insertAfter:[...h,g-1]}}),p(m,_),o.push(_)}),c=o,l+=Math.max(s,1)+1;continue}let n=f(t,String(e+1),0,l*CK,void 0,void 0,[ ` steps ` ,e]);p(c,n,[ ` steps ` ,e-1]),c=[n],l++}r.push({id: ` add - end ` ,type: ` add ` ,position:{x:104,y:l*CK-24},data:{kind: ` step ` ,key: ` add ` ,title: ` ` ,type: ` ` ,detail: ` ` ,insertAfter:[ ` steps ` ,n.length-1]}}),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 NK={agent:sr,command:Jr,repo:Cr,gate:Gr,forge:jr,human:ti,review:xr,workflow:ii},PK={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function FK(e){return NK[e.split( ` . ` )[0]]??ii}function IK(e){return Object.keys(PK).map(t=>({title:PK[t],icon:NK[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function LK(e,t){let n=vK(e).getIn(t,!0);if(RH(n))return n.toJSON()}function RK(e,t,n){let r=vK(e);return r.setIn(t,r.createNode(JK(n))),r.toString()}function zK(e,t,n){let r=vK(e),i=t.slice(0,-1),a=i.length>1;if(a&&![ ` agent . run ` , ` workflow . call ` ].includes(n))throw Error( ` Branches allow only read - only agents and workflow calls . ` );let o=r.getIn(i,!0);if(VH(o)||(r.setIn(i,r.createNode([])),o=r.getIn(i,!0)),!VH(o))return{source:e,path:[]};let s=Math.min(Math.max(Number(t.at(-1))+1,0),o.items.length),c=n=== ` parallel ` ?{parallel:{"branch-1":[],"branch-2":[]}}:{type:n,...a&&n=== ` agent . run ` ?{settings:{read_only:!0}}:{}};return o.items.splice(s,0,r.createNode(c)),{source:r.toString(),path:[...i,s]}}function BK(e){if(!/^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)* $ /.test(e))throw Error( ` Use a lowercase branch name with letters , digits , dots or dashes . ` )}function VK(e,t,n){BK(n);let r=vK(e),i=r.getIn([...t, ` parallel ` ],!0);if(!RH(i))throw Error( ` This step has no branches . ` );if(i.has(n))throw Error( ` Branch $ { n } already exists . ` );return i.set(n,r.createNode([])),r.toString()}function HK(e,t,n,r){BK(r);let i=vK(e),a=i.getIn([...t, ` parallel ` ],!0);if(!RH(a))throw Error( ` This step has no branches . ` );if(n!==r&&a.has(r))throw Error( ` Branch $ { r } already exists . ` );let o=a.items.find(e=>BH(e.key)&&e.key.value===n);if(!o||!BH(o.key))throw Error( ` Branch $ { n } does not exist . ` );return o.key.value=r,i.toString()}function UK(e,t,n){let r=vK(e),i=r.getIn([...t, ` parallel ` ],!0);if(!RH(i)||i.items.length<=2)throw Error( ` Parallel needs at least two branches . ` );return i.delete(n),r.toString()}function WK(e,t){let n=vK(e),r=n.getIn(t.slice(0,-1),!0),i=t.at(-1);if(!VH(r)||typeof i!= ` number ` )return{source:e,path:t};let a=n.createNode(n.getIn(t));return RH(a)&&a.delete( ` id ` ),r.items.splice(i+1,0,a),{source:n.toString(),path:[...t.slice(0,-1),i+1]}}function GK(e,t){let n=vK(e);return n.deleteIn(t),n.toString()}function KK(e,t,n){let r=vK(e),i=r.getIn(t.slice(0,-1),!0),a=t.at(-1);if(!VH(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.it
Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:p q(e)}))}var d q=/^( \s *)(- \s +)?/,f q=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function p q(e){let{code:t,comment:n}=m q(e),r=h q(t);return n&&r.push({text:n,kind: ` comment ` }),r}function m q(e){let t= ` ` ;for(let n=0;n<e.length;n++){let r=e[n];if(t)r===t&&(t= ` ` );else if(r=== ` "`||r===`'`)t=r;else 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 q(e){if(!e)return[];let t=[],n=d q.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 q.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 q(i[4]??``)]):[...t,...g q(r)]}function g q(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 _q ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function vq(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function yq(e){return typeof e== ` string ` &&e.trim()!== ` ` }var bq={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },xq={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },Sq={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },Cq={class: ` min - w - 0 flex - 1 ` },wq=[ ` value ` , ` placeholder ` ],Tq={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },Eq={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },Dq={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },Oq={key:1,class: ` space - y - 3 ` },kq={class: ` flex items - center gap - 2 ` },Aq={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },jq={key:2,class: ` space - y - 1.5 ` },Mq=[ ` title ` ],Nq=[ ` value ` ],Pq=[ ` value ` ],Fq={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },Iq=[ ` onClick ` ],Lq=[ ` onClick ` ],Rq={key:3,class: ` divide - y divide - border rounded - md border border - border ` },zq=[ ` title ` ],Bq=[ ` value ` , ` onChange ` ],Vq=[ ` value ` ],Hq=[ ` value ` , ` onInput ` ],Uq=[ ` value ` , ` onFocus ` , ` onInput ` ],Wq={key:0,class: ` space - y - 3 ` },Gq={class: ` text - [ 13 px ] ` },Kq={key:0,class: ` text - danger ` },qq={class: ` ml - 2 text - xs text - fg - subtle ` },Jq=[ ` aria - label ` , ` value ` , ` onChange ` ],Yq={key:0,value: ` value ` },Xq=[ ` aria - label ` , ` value ` , ` onChange ` ],Zq=[ ` value ` ],Qq=[ ` aria - label ` , ` value ` , ` onChange ` ], $ q={key:1,class: ` space - y - 3 ` },eJ={class: ` text - [ 13 px ] ` },tJ={class: ` ml - 2 text - xs text - fg - subtle ` },nJ=[ ` aria - label ` , ` disabled ` , ` value ` , ` onChange ` ],rJ=[ ` value ` ],iJ=[ ` title ` ],aJ={key:0,class: ` text - xs text - danger ` },oJ={class: ` space - y - 2 ` },sJ={class: ` divide - y divide - border rounded - md border border - border ` },cJ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },lJ=[ ` value ` ],uJ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },dJ=[ ` value ` ],fJ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },pJ=[ ` value ` ],mJ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },hJ={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },gJ=n({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=N(()=>LK(n.yaml,n.path)??{}),a=N(()=>i.value.parallel? ` parallel ` :typeof i.value.type== ` string ` ?i.value.type: ` ` ),o=N(()=>Object.keys(i.value.parallel??{})),s=G( ` ` ),c=G( ` ` );function u(e,t,i= ` ` ){try{let a=e=== ` add ` ?VK(n.yaml,n.path,t):e=== ` rename ` ?HK(n.yaml,n.path,t,i):UK(n.yaml,n.path,t);r( ` update : yaml ` ,a),s.value= ` ` ,c.value= ` ` }catch(e){c.value=String(e.message)}}let d=N(()=>n.vocabulary.find(e=>e.name===a.value)),f=N(()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),p=N(()=>qK(n.yaml,n.path)),m=N(()=>d.value?.settings&&i.value.settings?cq(i.value.settings,d.value.settings, ` settings ` ): ` ` ),h=[ ` mission ` , ` workflow ` , ` message ` , ` body ` , ` plan ` , ` then ` , ` status ` , ` detail ` , ` run ` , ` rules ` ],g=/mission|body|detail|plan|rules/;function _(e,t){return[ ` workflow . call ` , ` workflow . handoff ` ].includes(a.value)&&e=== ` workflow ` ||a.value=== ` human . approve ` &&e=== ` then ` ? ` workflow ` :t.type=== ` string ` ?t.enum? ` select ` :g.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 v=N(()=>{let e=Object.entries(d.value?.settings?.properties??{}).filter(([e])=>a.value!== ` workflow . call ` ||![ ` inputs ` , ` outputs ` ].includes(e)).map(([e,t])=>({key:e,schema:t,kind:_(e,t)})),t=e.filter(e=>h.includes(e.key)&&e.kind!== ` boolean ` ).sort((e,t)=>h.indexOf(e.key)-h.indexOf(t.key))[0],n=e.filter(e=>e!==t);return{lead:t,compact:n.filter(e=>[ ` workflow ` , ` select ` , ` line ` , ` number ` , ` boolean ` ].includes(e.kind)),long:n.filter(e=>[ ` text ` , ` lines ` , ` yaml ` ].includes(e.kind))}});function y(e){let{id:t,type:i,...a}=e;r( ` update : yaml ` ,RK(n.yaml,n.path,{id:t,type:i,...a}))}function b(e,t){y({...i.value,[e]:t})}function x(e){b( ` retry ` ,{...i.value.retry,...e})}function S(e,t){let n={...f.value,[e]:t};a.value=== ` workflow . call ` &&e=== ` wait ` &&t!==!0&&delete n.outputs,y({...i.value,settings:n})}function C(e,t){let n={...f.value,[e]:t};a.value=== ` workflow . call ` &&t!==f.value[e]&&(delete n.inputs,delete n.outputs),y({...i.value,settings:n})}let T=N(()=>n.workflows.find(e=>e.id===f.value.workflow)),E=N(()=>Object.entries(YK(T.value?.yaml?? ` ` , ` inputs ` )??{})),ee=N(()=>Object.entries(YK(T.value?.yaml?? ` ` , ` outputs ` )??{})),D=N(()=>Object.entries(YK(n.yaml, ` inputs ` )??{})),O=N(()=>Object.entries(YK(n.yaml, ` outputs ` )??{})),te=N(()=>f.value.inputs??{}),ne=N(()=>f.value.outputs??{}),re=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),ie=e=>te.value[e]===void 0? ` ` :String(te.value[e]);function ae(e,t,n){S( ` inputs ` ,{...te.value,[e]:t=== ` ` ?void 0:re(t)?t: $ K(t,n?? ` string ` )})}let oe=G(null);function se(e,t){let n=oe.value??v.value.lead?.key;if(!n)return;let r=typeof f.value[n]== ` string ` ?f.value[n]: ` ` ,i= ` { { steps . $ { e } . $ { t } } } ` ;S(n,r? ` $ { r . trimEnd ( ) } $ { i } ` :i)}let ce=G({});function le(e,t){try{S(e,t.trim()?yK(t):void 0),ce.value={...ce.valu
Line truncated
` )[0]}}}let ue=e=>e===void 0? ` ` :bK(e).trimEnd(),A=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),de=e=>typeof f.value[e]== ` string ` ?f.value[e]: ` ` ;return(t,n)=>(F(),H( ` aside ` ,bq,[V( ` header ` ,xq,[V( ` span ` ,Sq,[(F(),W(ve(I(FK)(a.value)),{class: ` size - 4 ` }))]),V( ` div ` ,Cq,[V( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:I(EK)(a.value),"aria-label": ` Step id ` ,onInput:n[0]||=e=>b( ` id ` ,e.target.value)},null,40,wq),V( ` div ` ,Tq,R(a.value),1)]),k(I(J),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:n[1]||=e=>r( ` close ` )},{default:w(()=>[k(I(oi))]),_:1})]),V( ` div ` ,Eq,[m.value?(F(),H( ` p ` ,Dq,R(m.value),1)):P( ` ` ,!0),a.value=== ` parallel ` ?(F(),H( ` section ` ,Oq,[n[17]||=V( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Branches ` ,-1),(F(!0),H(z,null,U(o.value,e=>(F(),H( ` div ` ,{key:e,class: ` flex items - center gap - 2 ` },[k(I(Y),{"model-value":e,"aria-label": ` Branch $ { e } ` ,onChange:t=>u( ` rename ` ,e,t.target.value.trim())},null,8,[ ` model - value ` , ` aria - label ` , ` onChange ` ]),k(I(J),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Remove branch $ { e } ` ,disabled:o.value.length<=2,title: ` Parallel needs at least two branches ` ,onClick:t=>u( ` delete ` ,e)},{default:w(()=>[k(I(Xr))]),_:1},8,[ ` aria - label ` , ` disabled ` , ` onClick ` ])]))),128)),V( ` div ` ,kq,[k(I(Y),{modelValue:s.value,"onUpdate:modelValue":n[2]||=e=>s.value=e,"aria-label": ` New branch name ` ,placeholder: ` Branch name ` ,onKeydown:n[3]||=un(ln(e=>u( ` add ` ,s.value.trim()),[ ` prevent ` ]),[ ` enter ` ])},null,8,[ ` modelValue ` ]),k(I(J),{type: ` button ` ,size: ` icon - sm ` ,variant: ` outline ` ,"aria-label": ` Add branch ` ,disabled:!s.value.trim(),onClick:n[4]||=e=>u( ` add ` ,s.value.trim())},{default:w(()=>[k(I(Rr))]),_:1},8,[ ` disabled ` ])]),c.value?(F(),H( ` p ` ,Aq,R(c.value),1)):P( ` ` ,!0)])):P( ` ` ,!0),v.value.lead?(F(),H( ` section ` ,jq,[V( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:v.value.lead.schema.description},[l(R(A(v.value.lead.key,v.value.lead.schema))+ ` ` ,1),v.value.lead.schema.description?(F(),W(I(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):P( ` ` ,!0)],8,Mq),v.value.lead.kind=== ` workflow ` ?(F(),W(tq,{key:0,value:de(v.value.lead.key),workflows:e.workflows,label:A(v.value.lead.key,v.value.lead.schema),onPick:n[5]||=e=>C(v.value.lead.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` ])):v.value.lead.kind=== ` select ` ?(F(),H( ` select ` ,{key:1,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:de(v.value.lead.key),onChange:n[6]||=e=>S(v.value.lead.key,e.target.value||void 0)},[n[18]||=V( ` option ` ,{value: ` ` }, ` Default ` ,-1),(F(!0),H(z,null,U(v.value.lead.schema.enum,e=>(F(),H( ` option ` ,{key:e,value:e},R(e),9,Pq))),128))],40,Nq)):v.value.lead.kind=== ` text ` ?(F(),W(I(ph),{key:2,"model-value":de(v.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:n[7]||=e=>oe.value=v.value.lead.key,"onUpdate:modelValue":n[8]||=e=>S(v.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(F(),W(I(Y),{key:3,"model-value":de(v.value.lead.key),onFocus:n[9]||=e=>oe.value=v.value.lead.key,"onUpdate:modelValue":n[10]||=e=>S(v.value.lead.key,String(e))},null,8,[ ` model - value ` ])),p.value.length&&v.value.lead.kind!== ` select ` ?(F(),H( ` div ` ,Fq,[n[19]||=V( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(F(!0),H(z,null,U(p.value,e=>(F(),H(z,{key:e},[V( ` 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=>se(e, ` summary ` )},R(e),9,Iq),V( ` 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=>se(e, ` result ` )},R(e)+ ` . result ` ,9,Lq)],64))),128))])):P( ` ` ,!0)])):P( ` ` ,!0),v.value.compact.length?(F(),H( ` section ` ,Rq,[(F(!0),H(z,null,U(v.value.compact,t=>(F(),H( ` div ` ,{key:t.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[V( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:t.schema.description},[l(R(A(t.key,t.schema))+ ` ` ,1),t.schema.description?(F(),W(I(_r),{key:0,class: ` size - 3 text - fg - subtle ` })):P( ` ` ,!0)],8,zq),t.kind=== ` workflow ` ?(F(),W(tq,{key:0,class: ` max - w - 48 ` ,value:de(t.key),workflows:e.workflows,label:A(t.key,t.schema),onPick:e=>C(t.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` , ` onPick ` ])):t.kind=== ` boolean ` ?(F(),W(I(sb),{key:1,"model-value":f.value[t.key]===!0,"onUpdate:modelValue":e=>S(t.key,e||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):t.kind=== ` select ` ?(F(),H( ` select ` ,{key:2,class: ` h - 7 max - w - 40 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:de(t.key),onChange:e=>S(t.key,e.target.value||void 0)},[n[20]||=V( ` option ` ,{value: ` ` }, ` Default ` ,-1),(F(!0),H(z,null,U(t.schema.enum,e=>(F(),H( ` option ` ,{key:e,value:e},R(e),9,Vq))),128))],40,Bq)):t.kind=== ` number ` ?(F(),H( ` input ` ,{key:3,type: ` number ` ,class: ` h - 7 w - 24 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value
Line truncated
` ): ` ` ,class: ` min - h - 16 font - mono text - xs ` ,placeholder: ` One per line ` ,"onUpdate:modelValue":t=>S (e.key,String(t).split( `
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(F(),H(z,{key:2},[k(I(ph),{"model-value":ue(f.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>le(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),ce.value[e.key]?(F(),H( ` span ` ,aJ,R(ce.value[e.key]),1)):P( ` ` ,!0)],64))]))),128)),V( ` section ` ,oJ,[n[32]||=V( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),V( ` div ` ,sJ,[V( ` label ` ,cJ,[n[27]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),V( ` 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:n[11]||=e=>b( ` when ` ,e.target.value)},null,40,lJ)]),V( ` label ` ,uJ,[n[29]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),V( ` select ` ,{class: ` h - 7 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:i.value.on_failure?? ` ` ,onChange:n[12]||=e=>b( ` on _failure ` ,e.target.value||void 0)},[...n[28]||=[V( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),V( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,dJ)]),V( ` label ` ,fJ,[n[30]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),V( ` 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:n[13]||=e=>x({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,pJ)]),V( ` label ` ,mJ,[n[31]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),k(I(Xy),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":n[14]||=e=>x({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),V( ` footer ` ,hJ,[k(I(J),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:n[15]||=e=>r( ` remove ` )},{default:w(()=>[k(I(Xr)),n[33]||=l( ` Delete step ` ,-1)]),_:1}),k(I(J),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:n[16]||=e=>r( ` close ` )},{default:w(()=>[...n[34]||=[l( ` Done ` ,-1)]]),_:1})])]))}}),_J= ` repository _path ` ;function vJ(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:_J,path:n.trim(),type: ` string ` ,required:!0}),r}function yJ(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function bJ(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=yJ(Bw(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 xJ(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:Bw(e.value,i.type?? ` string ` )})}return n}function SJ(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 CJ(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...CJ(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...CJ(n,r)]}):[]}function wJ(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function TJ(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 EJ(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var DJ={class: ` flex h - full flex - col ` },OJ={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },kJ={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },AJ={key:0,class: ` flex flex - 1 items - center justify - center ` },jJ={class: ` space - y - 1.5 ` },MJ=[ ` disabled ` ],NJ=[ ` value ` ],PJ={key:1,class: ` space - y - 1.5 ` },FJ=[ ` value ` ],IJ=[ ` title ` ],LJ={class: ` space - y - 1.5 ` },RJ={id: ` bind - paths ` },zJ=[ ` value ` ],BJ={class: ` divide - y divide - border rounded - md border border - border ` },VJ={class: ` flex items - center gap - 1.5 text - xs ` },HJ={class: ` font - mono ` },UJ={class: ` text - fg - subtle ` },WJ={key:0,class: ` text - danger ` ,title: ` Required ` },GJ=[ ` title ` , ` aria - label ` , ` onClick ` ],KJ=[ ` onUpdate : modelValue ` , ` aria - label ` ],qJ=[ ` onUpdate : modelValue ` , ` aria - label ` ],JJ={key:2,class: ` text - xs text - danger ` },YJ=[ ` title ` ],XJ={key:0,class: ` space - y - 1 px - 3 py - 2 ` },ZJ={key:0,class: ` text - xs text - danger ` },QJ={key:1,class: ` truncate font - mono text - xs text - success ` }, $ J={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },eY={class: ` space - y - 2 ` },tY={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },nY={key:1,cla
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 z2(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=B2(n.code,e);return Array.isArray(e)?e.some(e=>R2(n[r],e,t,n.type=== ` keyup ` )):R2(n[r],e,t,n.type=== ` keyup ` )}}function B2(e,t){return t.includes(e)? ` code ` : ` key ` }function V2(e,t){let n=N(()=>u(t?.target)??F2),r=he(u(e)===!0),i=!1,a=new Set,o=c(u(e));M(()=>u(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),NX([ ` blur ` , ` contextmenu ` ],s),FX((...e)=>o(...e),e=>{let n=u(t?.actInsideInputWithModifier)??!0,a=u(t?.preventDefault)??!1;if(i=L2(e),(!i||i&&!n)&&I2(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}),FX((...e)=>o(...e),e=>{let n=u(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&I2(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 ` ?z2(e,a):e}return r}var H2= ` vue - flow _ _node - desc ` ,U2= ` vue - flow _ _edge - desc ` ,W2= ` vue - flow _ _aria - live ` ,G2=[ ` Enter ` , ` ` , ` Escape ` ],K2={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function q2(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function J2(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 Y2(e){return{width:e.offsetWidth,height:e.offsetHeight}}function X2(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Z2(e,t){return{x:X2(e.x,t[0][0],t[1][0]),y:X2(e.y,t[0][1],t[1][1])}}function Q2(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function $ 2(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function e4(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&! $ 2(e)}function t4(e){return e4(e)&& ` computedPosition ` in e}function n4(e){return!Number.isNaN(e)&&Number.isFinite(e)}function r4(e){return n4(e.width)&&n4(e.height)&&n4(e.x)&&n4(e.y)}function i4(e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:yt({width:0,height:0}),computedPosition:yt({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:x3(e.data)?e.data:{},events:yt(x3(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function a4(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:x3(e.data)?e.data:{},events:yt(x3(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function o4(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 s4(...e){if(e.length===3){let[t,n,r]=e;return o4(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=> $ 2(e)&&e.source===r).map(e=>n.find(t=>e4(t)&&t.id===e.target))}function c4(...e){if(e.length===3){let[t,n,r]=e;return o4(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=> $ 2(e)&&e.target===r).map(e=>n.find(t=>e4(t)&&t.id===e.source))}function l4({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function u4(e,t){return t.some(t=> $ 2(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 d4({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function f4({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?i3(s,o):s}function p4(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 m4({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function h4({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function g4(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=p4(t,m4({...r.computedPosition,...r.dimensions}))}return h4(t)}function _4(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...f4(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 G2(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=K2(n.code,e);return Array.isArray(e)?e.some(e=>W2(n[r],e,t,n.type=== ` keyup ` )):W2(n[r],e,t,n.type=== ` keyup ` )}}function K2(e,t){return t.includes(e)? ` code ` : ` key ` }function q2(e,t){let n=N(()=>u(t?.target)??V2),r=he(u(e)===!0),i=!1,a=new Set,o=c(u(e));M(()=>u(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),zX([ ` blur ` , ` contextmenu ` ],s),VX((...e)=>o(...e),e=>{let n=u(t?.actInsideInputWithModifier)??!0,a=u(t?.preventDefault)??!1;if(i=U2(e),(!i||i&&!n)&&H2(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}),VX((...e)=>o(...e),e=>{let n=u(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&H2(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 ` ?G2(e,a):e}return r}var J2= ` vue - flow _ _node - desc ` ,Y2= ` vue - flow _ _edge - desc ` ,X2= ` vue - flow _ _aria - live ` ,Z2=[ ` Enter ` , ` ` , ` Escape ` ],Q2={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function $ 2(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function e4(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 t4(e){return{width:e.offsetWidth,height:e.offsetHeight}}function n4(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function r4(e,t){return{x:n4(e.x,t[0][0],t[1][0]),y:n4(e.y,t[0][1],t[1][1])}}function i4(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function a4(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function o4(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!a4(e)}function s4(e){return o4(e)&& ` computedPosition ` in e}function c4(e){return!Number.isNaN(e)&&Number.isFinite(e)}function l4(e){return c4(e.width)&&c4(e.height)&&c4(e.x)&&c4(e.y)}function u4(e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:yt({width:0,height:0}),computedPosition:yt({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:D3(e.data)?e.data:{},events:yt(D3(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function d4(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:D3(e.data)?e.data:{},events:yt(D3(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function f4(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 p4(...e){if(e.length===3){let[t,n,r]=e;return f4(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>a4(e)&&e.source===r).map(e=>n.find(t=>o4(t)&&t.id===e.target))}function m4(...e){if(e.length===3){let[t,n,r]=e;return f4(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>a4(e)&&e.target===r).map(e=>n.find(t=>o4(t)&&t.id===e.source))}function h4({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function g4(e,t){return t.some(t=>a4(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 _4({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function v4({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?u3(s,o):s}function y4(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 b4({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function x4({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function S4(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=y4(t,b4({...r.computedPosition,...r.dimensions}))}return x4(t)}function C4(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...v4(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 ` },Q4=class extends Error{constructor(e,...t){super(Z4[e]?.call(Z4,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function $ 4(e){return ` clientX ` in e}function e3(e){return ` sourceEvent ` in e}function t3(e,t){let n= $ 4(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 n3=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function r3(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function i3(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var a3=()=>!0;function o3(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function s3(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())J2(i,q2(e))>0&&r.push(e);return r}var c3=250;function l3(e,t,n,r){let i=[],a=1/0,o=s3(e,n,t+c3);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}=K4(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 u3(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=a3},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:_}=t3(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=d3(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===A2.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=m3(t,e,a,p,n,!0)}return b}function d3(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function f3(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function p3(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function m3(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===A2.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,...K4(o,c,c.position,!0)}:c}var h3={[D2.Left]:D2.Right,[D2.Right]:D2.Left,[D2.Top]:D2.Bottom,[D2.Bottom]:D2.Top},g3=[ ` production ` , ` prod ` ];function _3(e,...t){v3()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function v3(){return!g3.includes( ` production ` )}function y3(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,...Y2(t)}}):null}function b3(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),mt(()=>{o.blur()})):n([e])}function x3(e){return I(e)!==void 0}function S3(e,t,n,r){if(!e||!e.source||!e.target)return n(new Q4(X4.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i= $ 2(e)?e:{...e,id:l4(e)},i=a4(i,void 0,r),!u4(i,t)&&i}function C3(e,t,n,r,i){if(!t.source||!t.target)return i(new Q4(X4.EDGE_INVALID,e.id)),!1;if(!n)return i(new Q4(X4.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?l4(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function w3(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!e4(o)){n(new Q4(X4.NODE_INVALID,o?.id));continue}let s=i4(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 Q4(X4.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 T3(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 E3(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 } ` ;T3( ` 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 ` },i3=class extends Error{constructor(e,...t){super(r3[e]?.call(r3,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function a3(e){return ` clientX ` in e}function o3(e){return ` sourceEvent ` in e}function s3(e,t){let n=a3(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 c3=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function l3(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function u3(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var d3=()=>!0;function f3(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function p3(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())e4(i, $ 2(e))>0&&r.push(e);return r}var m3=250;function h3(e,t,n,r){let i=[],a=1/0,o=p3(e,n,t+m3);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}=Q4(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 g3(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=d3},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:_}=s3(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=_3(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===I2.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=b3(t,e,a,p,n,!0)}return b}function _3(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function v3(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function y3(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function b3(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===I2.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,...Q4(o,c,c.position,!0)}:c}var x3={[N2.Left]:N2.Right,[N2.Right]:N2.Left,[N2.Top]:N2.Bottom,[N2.Bottom]:N2.Top},S3=[ ` production ` , ` prod ` ];function C3(e,...t){w3()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function w3(){return!S3.includes( ` production ` )}function T3(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,...t4(t)}}):null}function E3(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),mt(()=>{o.blur()})):n([e])}function D3(e){return I(e)!==void 0}function O3(e,t,n,r){if(!e||!e.source||!e.target)return n(new i3(n3.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=a4(e)?e:{...e,id:h4(e)},i=d4(i,void 0,r),!g4(i,t)&&i}function k3(e,t,n,r,i){if(!t.source||!t.target)return i(new i3(n3.EDGE_INVALID,e.id)),!1;if(!n)return i(new i3(n3.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?h4(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function A3(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!o4(o)){n(new i3(n3.NODE_INVALID,o?.id));continue}let s=u4(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 i3(n3.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 j3(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 M3(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 } ` ;j3( ` source ` ,o, ` $ { r } - $ { a } -- Line truncated