const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/codeMirrorModule-DVQi6prl.js","assets/codeMirrorModule-C3UTv-Ge.css"])))=>i.map(i=>d[i]); (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function r(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=r(o);fetch(o.href,u)}})();function Xm(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var xa={exports:{}},xs={},Ta={exports:{}},ae={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ld;function Zm(){if(ld)return ae;ld=1;var i=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),S=Symbol.iterator;function T(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,v={};function w(_,D,oe){this.props=_,this.context=D,this.refs=v,this.updater=oe||E}w.prototype.isReactComponent={},w.prototype.setState=function(_,D){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,D,"setState")},w.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function $(){}$.prototype=w.prototype;function A(_,D,oe){this.props=_,this.context=D,this.refs=v,this.updater=oe||E}var B=A.prototype=new $;B.constructor=A,O(B,w.prototype),B.isPureReactComponent=!0;var V=Array.isArray,W=Object.prototype.hasOwnProperty,j={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function z(_,D,oe){var ce,de={},he=null,we=null;if(D!=null)for(ce in D.ref!==void 0&&(we=D.ref),D.key!==void 0&&(he=""+D.key),D)W.call(D,ce)&&!Y.hasOwnProperty(ce)&&(de[ce]=D[ce]);var me=arguments.length-2;if(me===1)de.children=oe;else if(1{const l=i.current;if(!l)return;const o=l.getBoundingClientRect();r(new DOMRect(0,0,o.width,o.height));const u=new ResizeObserver(f=>{const h=f[f.length-1];h&&h.contentRect&&r(h.contentRect)});return u.observe(l),()=>u.disconnect()},[i]),[n,i]}function ng(i){if(i<0||!isFinite(i))return"-";if(i===0)return"0";if(i<1e3)return i.toFixed(0)+"ms";const n=i/1e3;if(n<60)return n.toFixed(1)+"s";const r=n/60;if(r<60)return r.toFixed(1)+"m";const l=r/60;return l<24?l.toFixed(1)+"h":(l/24).toFixed(1)+"d"}function cd(i){const n=document.createElement("textarea");n.style.position="absolute",n.style.zIndex="-1000",n.value=i,document.body.appendChild(n),n.select(),document.execCommand("copy"),n.remove()}function Fa(i,n){i&&(n=bn.getObject(i,n));const[r,l]=_r.useState(n),o=_r.useCallback(u=>{i?bn.setObject(i,u):l(u)},[i,l]);return _r.useEffect(()=>{if(i){const u=()=>l(bn.getObject(i,n));return bn.onChangeEmitter.addEventListener(i,u),()=>bn.onChangeEmitter.removeEventListener(i,u)}},[n,i]),[r,o]}class rg{constructor(){this.onChangeEmitter=new EventTarget}getString(n,r){return localStorage[n]||r}setString(n,r){var l;localStorage[n]=r,this.onChangeEmitter.dispatchEvent(new Event(n)),(l=window.saveSettings)==null||l.call(window)}getObject(n,r){if(!localStorage[n])return r;try{return JSON.parse(localStorage[n])}catch{return r}}setObject(n,r){var l;localStorage[n]=JSON.stringify(r),this.onChangeEmitter.dispatchEvent(new Event(n)),(l=window.saveSettings)==null||l.call(window)}}const bn=new rg;function Vn(...i){return i.filter(Boolean).join(" ")}const fd="\\u0000-\\u0020\\u007f-\\u009f",sg=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+fd+'"]{2,}[^\\s'+fd+`"')}\\],:;.!?]`,"ug");function ig(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",r=>{r.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",r=>{document.body.classList.add("inactive")},!1);const i=bn.getString("theme","light-mode"),n=window.matchMedia("(prefers-color-scheme: dark)");(i==="dark-mode"||n.matches)&&document.body.classList.add("dark-mode")}const lg=new Set;function og(){const i=ag(),n=i==="dark-mode"?"light-mode":"dark-mode";i&&document.body.classList.remove(i),document.body.classList.add(n),bn.setString("theme",n);for(const r of lg)r(n)}function ag(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}var qi={},_a={exports:{}},ut={},Ca={exports:{}},La={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var dd;function ug(){return dd||(dd=1,function(i){function n(K,re){var J=K.length;K.push(re);e:for(;0>>1,D=K[_];if(0>>1;_o(de,J))heo(we,de)?(K[_]=we,K[he]=J,_=he):(K[_]=de,K[ce]=J,_=ce);else if(heo(we,J))K[_]=we,K[he]=J,_=he;else break e}}return re}function o(K,re){var J=K.sortIndex-re.sortIndex;return J!==0?J:K.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;i.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();i.unstable_now=function(){return f.now()-h}}var p=[],g=[],x=1,S=null,T=3,E=!1,O=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(K){for(var re=r(g);re!==null;){if(re.callback===null)l(g);else if(re.startTime<=K)l(g),re.sortIndex=re.expirationTime,n(p,re);else break;re=r(g)}}function V(K){if(v=!1,B(K),!O)if(r(p)!==null)O=!0,He(W);else{var re=r(g);re!==null&&xe(V,re.startTime-K)}}function W(K,re){O=!1,v&&(v=!1,$(z),z=-1),E=!0;var J=T;try{for(B(re),S=r(p);S!==null&&(!(S.expirationTime>re)||K&&!ue());){var _=S.callback;if(typeof _=="function"){S.callback=null,T=S.priorityLevel;var D=_(S.expirationTime<=re);re=i.unstable_now(),typeof D=="function"?S.callback=D:S===r(p)&&l(p),B(re)}else l(p);S=r(p)}if(S!==null)var oe=!0;else{var ce=r(g);ce!==null&&xe(V,ce.startTime-re),oe=!1}return oe}finally{S=null,T=J,E=!1}}var j=!1,Y=null,z=-1,P=5,le=-1;function ue(){return!(i.unstable_now()-leK||125_?(K.sortIndex=J,n(g,K),r(p)===null&&K===r(g)&&(v?($(z),z=-1):v=!0,xe(V,J-_))):(K.sortIndex=D,n(p,K),O||E||(O=!0,He(W))),K},i.unstable_shouldYield=ue,i.unstable_wrapCallback=function(K){var re=T;return function(){var J=T;T=re;try{return K.apply(this,arguments)}finally{T=J}}}}(La)),La}var hd;function cg(){return hd||(hd=1,Ca.exports=ug()),Ca.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var pd;function fg(){if(pd)return ut;pd=1;var i=Qa(),n=cg();function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,x={},S={};function T(e){return p.call(S,e)?!0:p.call(x,e)?!1:g.test(e)?S[e]=!0:(x[e]=!0,!1)}function E(e,t,s,a){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return a?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function O(e,t,s,a){if(t===null||typeof t>"u"||E(e,t,s,a))return!0;if(a)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,s,a,c,d,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=m}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){w[e]=new v(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];w[t]=new v(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){w[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){w[e]=new v(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){w[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){w[e]=new v(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){w[e]=new v(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){w[e]=new v(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){w[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var $=/[\-:]([a-z])/g;function A(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($,A);w[t]=new v(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($,A);w[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($,A);w[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){w[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),w.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){w[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function B(e,t,s,a){var c=w.hasOwnProperty(t)?w[t]:null;(c!==null?c.type!==0:a||!(2y||c[m]!==d[y]){var k=` `+c[m].replace(" at new "," at ");return e.displayName&&k.includes("")&&(k=k.replace("",e.displayName)),k}while(1<=m&&0<=y);break}}}finally{oe=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?D(e):""}function de(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=ce(e.type,!1),e;case 11:return e=ce(e.type.render,!1),e;case 1:return e=ce(e.type,!0),e;default:return""}}function he(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case j:return"Portal";case P:return"Profiler";case z:return"StrictMode";case ee:return"Suspense";case ke:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ue:return(e.displayName||"Context")+".Consumer";case le:return(e._context.displayName||"Context")+".Provider";case M:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case rt:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case He:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}function we(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(t);case 8:return t===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function me(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Te(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ht(e){var t=Te(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,d=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(m){a=""+m,d.call(this,m)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(m){a=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rs(e){e._valueTracker||(e._valueTracker=ht(e))}function fu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),a="";return e&&(a=Te(e)?e.checked?"true":"false":e.value),e=a,e!==s?(t.setValue(e),!0):!1}function Ds(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Il(e,t){var s=t.checked;return J({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function du(e,t){var s=t.defaultValue==null?"":t.defaultValue,a=t.checked!=null?t.checked:t.defaultChecked;s=me(t.value!=null?t.value:s),e._wrapperState={initialChecked:a,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function hu(e,t){t=t.checked,t!=null&&B(e,"checked",t,!1)}function $l(e,t){hu(e,t);var s=me(t.value),a=t.type;if(s!=null)a==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Al(e,t.type,s):t.hasOwnProperty("defaultValue")&&Al(e,t.type,me(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pu(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type;if(!(a!=="submit"&&a!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Al(e,t,s){(t!=="number"||Ds(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var Fr=Array.isArray;function Hn(e,t,s,a){if(e=e.options,t){t={};for(var c=0;c"+t.valueOf().toString()+"",t=bs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Br(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var zr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},np=["Webkit","ms","Moz","O"];Object.keys(zr).forEach(function(e){np.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zr[t]=zr[e]})});function Su(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||zr.hasOwnProperty(e)&&zr[e]?(""+t).trim():t+"px"}function ku(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var a=s.indexOf("--")===0,c=Su(s,t[s],a);s==="float"&&(s="cssFloat"),a?e.setProperty(s,c):e[s]=c}}var rp=J({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function jl(e,t){if(t){if(rp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!="object")throw Error(r(62))}}function Rl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dl=null;function bl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fl=null,Qn=null,Jn=null;function Eu(e){if(e=us(e)){if(typeof Fl!="function")throw Error(r(280));var t=e.stateNode;t&&(t=oi(t),Fl(e.stateNode,e.type,t))}}function Nu(e){Qn?Jn?Jn.push(e):Jn=[e]:Qn=e}function xu(){if(Qn){var e=Qn,t=Jn;if(Jn=Qn=null,Eu(e),t)for(e=0;e>>=0,e===0?32:31-(pp(e)/mp|0)|0}var Vs=64,Ks=4194304;function Wr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ws(e,t){var s=e.pendingLanes;if(s===0)return 0;var a=0,c=e.suspendedLanes,d=e.pingedLanes,m=s&268435455;if(m!==0){var y=m&~c;y!==0?a=Wr(y):(d&=m,d!==0&&(a=Wr(d)))}else m=s&~c,m!==0?a=Wr(m):d!==0&&(a=Wr(d));if(a===0)return 0;if(t!==0&&t!==a&&(t&c)===0&&(c=a&-a,d=t&-t,c>=d||c===16&&(d&4194240)!==0))return t;if((a&4)!==0&&(a|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=a;0s;s++)t.push(e);return t}function qr(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=s}function wp(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0=es),Xu=" ",Zu=!1;function ec(e,t){switch(e){case"keyup":return Hp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function Jp(e,t){switch(e){case"compositionend":return tc(t);case"keypress":return t.which!==32?null:(Zu=!0,Xu);case"textInput":return e=t.data,e===Xu&&Zu?null:e;default:return null}}function Yp(e,t){if(Xn)return e==="compositionend"||!ro&&ec(e,t)?(e=qu(),Ys=Gl=on=null,Xn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:s,offset:t-e};e=a}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ac(s)}}function cc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fc(){for(var e=window,t=Ds();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=Ds(e.document)}return t}function lo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function im(e){var t=fc(),s=e.focusedElem,a=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&cc(s.ownerDocument.documentElement,s)){if(a!==null&&lo(s)){if(t=a.start,e=a.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=s.textContent.length,d=Math.min(a.start,c);a=a.end===void 0?d:Math.min(a.end,c),!e.extend&&d>a&&(c=a,a=d,d=c),c=uc(s,d);var m=uc(s,a);c&&m&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),d>a?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s=document.documentMode,Zn=null,oo=null,ss=null,ao=!1;function dc(e,t,s){var a=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ao||Zn==null||Zn!==Ds(a)||(a=Zn,"selectionStart"in a&&lo(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ss&&rs(ss,a)||(ss=a,a=si(oo,"onSelect"),0sr||(e.current=ko[sr],ko[sr]=null,sr--)}function Se(e,t){sr++,ko[sr]=e.current,e.current=t}var fn={},Qe=cn(fn),st=cn(!1),Cn=fn;function ir(e,t){var s=e.type.contextTypes;if(!s)return fn;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var c={},d;for(d in s)c[d]=t[d];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function it(e){return e=e.childContextTypes,e!=null}function ai(){Ne(st),Ne(Qe)}function Cc(e,t,s){if(Qe.current!==fn)throw Error(r(168));Se(Qe,t),Se(st,s)}function Lc(e,t,s){var a=e.stateNode;if(t=t.childContextTypes,typeof a.getChildContext!="function")return s;a=a.getChildContext();for(var c in a)if(!(c in t))throw Error(r(108,we(e)||"Unknown",c));return J({},s,a)}function ui(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fn,Cn=Qe.current,Se(Qe,e),Se(st,st.current),!0}function Oc(e,t,s){var a=e.stateNode;if(!a)throw Error(r(169));s?(e=Lc(e,t,Cn),a.__reactInternalMemoizedMergedChildContext=e,Ne(st),Ne(Qe),Se(Qe,e)):Ne(st),Se(st,s)}var qt=null,ci=!1,Eo=!1;function Ic(e){qt===null?qt=[e]:qt.push(e)}function ym(e){ci=!0,Ic(e)}function dn(){if(!Eo&&qt!==null){Eo=!0;var e=0,t=ge;try{var s=qt;for(ge=1;e>=m,c-=m,Ht=1<<32-Ot(t)+c|s<se?(Ve=ne,ne=null):Ve=ne.sibling;var pe=R(C,ne,L[se],U);if(pe===null){ne===null&&(ne=Ve);break}e&&ne&&pe.alternate===null&&t(C,ne),N=d(pe,N,se),te===null?Z=pe:te.sibling=pe,te=pe,ne=Ve}if(se===L.length)return s(C,ne),_e&&On(C,se),Z;if(ne===null){for(;sese?(Ve=ne,ne=null):Ve=ne.sibling;var kn=R(C,ne,pe.value,U);if(kn===null){ne===null&&(ne=Ve);break}e&&ne&&kn.alternate===null&&t(C,ne),N=d(kn,N,se),te===null?Z=kn:te.sibling=kn,te=kn,ne=Ve}if(pe.done)return s(C,ne),_e&&On(C,se),Z;if(ne===null){for(;!pe.done;se++,pe=L.next())pe=F(C,pe.value,U),pe!==null&&(N=d(pe,N,se),te===null?Z=pe:te.sibling=pe,te=pe);return _e&&On(C,se),Z}for(ne=a(C,ne);!pe.done;se++,pe=L.next())pe=q(ne,C,se,pe.value,U),pe!==null&&(e&&pe.alternate!==null&&ne.delete(pe.key===null?se:pe.key),N=d(pe,N,se),te===null?Z=pe:te.sibling=pe,te=pe);return e&&ne.forEach(function(Gm){return t(C,Gm)}),_e&&On(C,se),Z}function Me(C,N,L,U){if(typeof L=="object"&&L!==null&&L.type===Y&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case W:e:{for(var Z=L.key,te=N;te!==null;){if(te.key===Z){if(Z=L.type,Z===Y){if(te.tag===7){s(C,te.sibling),N=c(te,L.props.children),N.return=C,C=N;break e}}else if(te.elementType===Z||typeof Z=="object"&&Z!==null&&Z.$$typeof===He&&Rc(Z)===te.type){s(C,te.sibling),N=c(te,L.props),N.ref=cs(C,te,L),N.return=C,C=N;break e}s(C,te);break}else t(C,te);te=te.sibling}L.type===Y?(N=Dn(L.props.children,C.mode,U,L.key),N.return=C,C=N):(U=bi(L.type,L.key,L.props,null,C.mode,U),U.ref=cs(C,N,L),U.return=C,C=U)}return m(C);case j:e:{for(te=L.key;N!==null;){if(N.key===te)if(N.tag===4&&N.stateNode.containerInfo===L.containerInfo&&N.stateNode.implementation===L.implementation){s(C,N.sibling),N=c(N,L.children||[]),N.return=C,C=N;break e}else{s(C,N);break}else t(C,N);N=N.sibling}N=wa(L,C.mode,U),N.return=C,C=N}return m(C);case He:return te=L._init,Me(C,N,te(L._payload),U)}if(Fr(L))return G(C,N,L,U);if(re(L))return X(C,N,L,U);pi(C,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,N!==null&&N.tag===6?(s(C,N.sibling),N=c(N,L),N.return=C,C=N):(s(C,N),N=va(L,C.mode,U),N.return=C,C=N),m(C)):s(C,N)}return Me}var ur=Dc(!0),bc=Dc(!1),mi=cn(null),gi=null,cr=null,Lo=null;function Oo(){Lo=cr=gi=null}function Io(e){var t=mi.current;Ne(mi),e._currentValue=t}function $o(e,t,s){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===s)break;e=e.return}}function fr(e,t){gi=e,Lo=cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(lt=!0),e.firstContext=null)}function Nt(e){var t=e._currentValue;if(Lo!==e)if(e={context:e,memoizedValue:t,next:null},cr===null){if(gi===null)throw Error(r(308));cr=e,gi.dependencies={lanes:0,firstContext:e}}else cr=cr.next=e;return t}var In=null;function Ao(e){In===null?In=[e]:In.push(e)}function Fc(e,t,s,a){var c=t.interleaved;return c===null?(s.next=s,Ao(t)):(s.next=c.next,c.next=s),t.interleaved=s,Jt(e,a)}function Jt(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var hn=!1;function Po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pn(e,t,s){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(fe&2)!==0){var c=a.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),a.pending=t,Jt(e,s)}return c=a.interleaved,c===null?(t.next=t,Ao(a)):(t.next=c.next,c.next=t),a.interleaved=t,Jt(e,s)}function yi(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var a=t.lanes;a&=e.pendingLanes,s|=a,t.lanes=s,ql(e,s)}}function zc(e,t){var s=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,s===a)){var c=null,d=null;if(s=s.firstBaseUpdate,s!==null){do{var m={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};d===null?c=d=m:d=d.next=m,s=s.next}while(s!==null);d===null?c=d=t:d=d.next=t}else c=d=t;s={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:a.shared,effects:a.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function vi(e,t,s,a){var c=e.updateQueue;hn=!1;var d=c.firstBaseUpdate,m=c.lastBaseUpdate,y=c.shared.pending;if(y!==null){c.shared.pending=null;var k=y,I=k.next;k.next=null,m===null?d=I:m.next=I,m=k;var b=e.alternate;b!==null&&(b=b.updateQueue,y=b.lastBaseUpdate,y!==m&&(y===null?b.firstBaseUpdate=I:y.next=I,b.lastBaseUpdate=k))}if(d!==null){var F=c.baseState;m=0,b=I=k=null,y=d;do{var R=y.lane,q=y.eventTime;if((a&R)===R){b!==null&&(b=b.next={eventTime:q,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var G=e,X=y;switch(R=t,q=s,X.tag){case 1:if(G=X.payload,typeof G=="function"){F=G.call(q,F,R);break e}F=G;break e;case 3:G.flags=G.flags&-65537|128;case 0:if(G=X.payload,R=typeof G=="function"?G.call(q,F,R):G,R==null)break e;F=J({},F,R);break e;case 2:hn=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,R=c.effects,R===null?c.effects=[y]:R.push(y))}else q={eventTime:q,lane:R,tag:y.tag,payload:y.payload,callback:y.callback,next:null},b===null?(I=b=q,k=F):b=b.next=q,m|=R;if(y=y.next,y===null){if(y=c.shared.pending,y===null)break;R=y,y=R.next,R.next=null,c.lastBaseUpdate=R,c.shared.pending=null}}while(!0);if(b===null&&(k=F),c.baseState=k,c.firstBaseUpdate=I,c.lastBaseUpdate=b,t=c.shared.interleaved,t!==null){c=t;do m|=c.lane,c=c.next;while(c!==t)}else d===null&&(c.shared.lanes=0);Pn|=m,e.lanes=m,e.memoizedState=F}}function Uc(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;ts?s:4,e(!0);var a=bo.transition;bo.transition={};try{e(!1),t()}finally{ge=s,bo.transition=a}}function af(){return xt().memoizedState}function km(e,t,s){var a=vn(e);if(s={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null},uf(e))cf(t,s);else if(s=Fc(e,t,s,a),s!==null){var c=tt();jt(s,e,a,c),ff(s,t,a)}}function Em(e,t,s){var a=vn(e),c={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null};if(uf(e))cf(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var m=t.lastRenderedState,y=d(m,s);if(c.hasEagerState=!0,c.eagerState=y,It(y,m)){var k=t.interleaved;k===null?(c.next=c,Ao(t)):(c.next=k.next,k.next=c),t.interleaved=c;return}}catch{}finally{}s=Fc(e,t,c,a),s!==null&&(c=tt(),jt(s,e,a,c),ff(s,t,a))}}function uf(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function cf(e,t){ps=ki=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function ff(e,t,s){if((s&4194240)!==0){var a=t.lanes;a&=e.pendingLanes,s|=a,t.lanes=s,ql(e,s)}}var xi={readContext:Nt,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useInsertionEffect:Je,useLayoutEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useMutableSource:Je,useSyncExternalStore:Je,useId:Je,unstable_isNewReconciler:!1},Nm={readContext:Nt,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:Zc,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,Ei(4194308,4,nf.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Ei(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ei(4,2,e,t)},useMemo:function(e,t){var s=zt();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var a=zt();return t=s!==void 0?s(t):t,a.memoizedState=a.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},a.queue=e,e=e.dispatch=km.bind(null,Oe,e),[a.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:Gc,useDebugValue:Wo,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=Gc(!1),t=e[0];return e=Sm.bind(null,e[1]),zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var a=Oe,c=zt();if(_e){if(s===void 0)throw Error(r(407));s=s()}else{if(s=t(),Ue===null)throw Error(r(349));(An&30)!==0||qc(a,t,s)}c.memoizedState=s;var d={value:s,getSnapshot:t};return c.queue=d,Zc(Qc.bind(null,a,d,e),[e]),a.flags|=2048,ys(9,Hc.bind(null,a,d,s,t),void 0,null),s},useId:function(){var e=zt(),t=Ue.identifierPrefix;if(_e){var s=Qt,a=Ht;s=(a&~(1<<32-Ot(a)-1)).toString(32)+s,t=":"+t+"R"+s,s=ms++,0<\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=m.createElement(s,{is:a.is}):(e=m.createElement(s),s==="select"&&(m=e,a.multiple?m.multiple=!0:a.size&&(m.size=a.size))):e=m.createElementNS(e,s),e[Ft]=t,e[as]=a,$f(e,t,!1,!1),t.stateNode=e;e:{switch(m=Rl(s,a),s){case"dialog":Ee("cancel",e),Ee("close",e),c=a;break;case"iframe":case"object":case"embed":Ee("load",e),c=a;break;case"video":case"audio":for(c=0;cgr&&(t.flags|=128,a=!0,vs(d,!1),t.lanes=4194304)}else{if(!a)if(e=wi(m),e!==null){if(t.flags|=128,a=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),vs(d,!0),d.tail===null&&d.tailMode==="hidden"&&!m.alternate&&!_e)return Ye(t),null}else 2*Pe()-d.renderingStartTime>gr&&s!==1073741824&&(t.flags|=128,a=!0,vs(d,!1),t.lanes=4194304);d.isBackwards?(m.sibling=t.child,t.child=m):(s=d.last,s!==null?s.sibling=m:t.child=m,d.last=m)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=Pe(),t.sibling=null,s=Le.current,Se(Le,a?s&1|2:s&1),t):(Ye(t),null);case 22:case 23:return ma(),a=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(t.flags|=8192),a&&(t.mode&1)!==0?(yt&1073741824)!==0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function $m(e,t){switch(xo(t),t.tag){case 1:return it(t.type)&&ai(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dr(),Ne(st),Ne(Qe),Do(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return jo(t),null;case 13:if(Ne(Le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ne(Le),null;case 4:return dr(),null;case 10:return Io(t.type._context),null;case 22:case 23:return ma(),null;case 24:return null;default:return null}}var Li=!1,Ge=!1,Am=typeof WeakSet=="function"?WeakSet:Set,Q=null;function pr(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(a){Ae(e,t,a)}else s.current=null}function ra(e,t,s){try{s()}catch(a){Ae(e,t,a)}}var Mf=!1;function Pm(e,t){if(mo=Qs,e=fc(),lo(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var a=s.getSelection&&s.getSelection();if(a&&a.rangeCount!==0){s=a.anchorNode;var c=a.anchorOffset,d=a.focusNode;a=a.focusOffset;try{s.nodeType,d.nodeType}catch{s=null;break e}var m=0,y=-1,k=-1,I=0,b=0,F=e,R=null;t:for(;;){for(var q;F!==s||c!==0&&F.nodeType!==3||(y=m+c),F!==d||a!==0&&F.nodeType!==3||(k=m+a),F.nodeType===3&&(m+=F.nodeValue.length),(q=F.firstChild)!==null;)R=F,F=q;for(;;){if(F===e)break t;if(R===s&&++I===c&&(y=m),R===d&&++b===a&&(k=m),(q=F.nextSibling)!==null)break;F=R,R=F.parentNode}F=q}s=y===-1||k===-1?null:{start:y,end:k}}else s=null}s=s||{start:0,end:0}}else s=null;for(go={focusedElem:e,selectionRange:s},Qs=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var G=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(G!==null){var X=G.memoizedProps,Me=G.memoizedState,C=t.stateNode,N=C.getSnapshotBeforeUpdate(t.elementType===t.type?X:At(t.type,X),Me);C.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(U){Ae(t,t.return,U)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return G=Mf,Mf=!1,G}function ws(e,t,s){var a=t.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var c=a=a.next;do{if((c.tag&e)===e){var d=c.destroy;c.destroy=void 0,d!==void 0&&ra(t,s,d)}c=c.next}while(c!==a)}}function Oi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var a=s.create;s.destroy=a()}s=s.next}while(s!==t)}}function sa(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function jf(e){var t=e.alternate;t!==null&&(e.alternate=null,jf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ft],delete t[as],delete t[So],delete t[mm],delete t[gm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rf(e){return e.tag===5||e.tag===3||e.tag===4}function Df(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ia(e,t,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=li));else if(a!==4&&(e=e.child,e!==null))for(ia(e,t,s),e=e.sibling;e!==null;)ia(e,t,s),e=e.sibling}function la(e,t,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(la(e,t,s),e=e.sibling;e!==null;)la(e,t,s),e=e.sibling}var Ke=null,Pt=!1;function mn(e,t,s){for(s=s.child;s!==null;)bf(e,t,s),s=s.sibling}function bf(e,t,s){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Us,s)}catch{}switch(s.tag){case 5:Ge||pr(s,t);case 6:var a=Ke,c=Pt;Ke=null,mn(e,t,s),Ke=a,Pt=c,Ke!==null&&(Pt?(e=Ke,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):Ke.removeChild(s.stateNode));break;case 18:Ke!==null&&(Pt?(e=Ke,s=s.stateNode,e.nodeType===8?wo(e.parentNode,s):e.nodeType===1&&wo(e,s),Gr(e)):wo(Ke,s.stateNode));break;case 4:a=Ke,c=Pt,Ke=s.stateNode.containerInfo,Pt=!0,mn(e,t,s),Ke=a,Pt=c;break;case 0:case 11:case 14:case 15:if(!Ge&&(a=s.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){c=a=a.next;do{var d=c,m=d.destroy;d=d.tag,m!==void 0&&((d&2)!==0||(d&4)!==0)&&ra(s,t,m),c=c.next}while(c!==a)}mn(e,t,s);break;case 1:if(!Ge&&(pr(s,t),a=s.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=s.memoizedProps,a.state=s.memoizedState,a.componentWillUnmount()}catch(y){Ae(s,t,y)}mn(e,t,s);break;case 21:mn(e,t,s);break;case 22:s.mode&1?(Ge=(a=Ge)||s.memoizedState!==null,mn(e,t,s),Ge=a):mn(e,t,s);break;default:mn(e,t,s)}}function Ff(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new Am),t.forEach(function(a){var c=Um.bind(null,e,a);s.has(a)||(s.add(a),a.then(c,c))})}}function Mt(e,t){var s=t.deletions;if(s!==null)for(var a=0;ac&&(c=m),a&=~d}if(a=c,a=Pe()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*jm(a/1960))-a,10e?16:e,yn===null)var a=!1;else{if(e=yn,yn=null,Mi=0,(fe&6)!==0)throw Error(r(331));var c=fe;for(fe|=4,Q=e.current;Q!==null;){var d=Q,m=d.child;if((Q.flags&16)!==0){var y=d.deletions;if(y!==null){for(var k=0;kPe()-ua?jn(e,0):aa|=s),at(e,t)}function Xf(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ks,Ks<<=1,(Ks&130023424)===0&&(Ks=4194304)));var s=tt();e=Jt(e,t),e!==null&&(qr(e,t,s),at(e,s))}function zm(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Xf(e,s)}function Um(e,t){var s=0;switch(e.tag){case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(r(314))}a!==null&&a.delete(t),Xf(e,s)}var Zf;Zf=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||st.current)lt=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return lt=!1,Om(e,t,s);lt=(e.flags&131072)!==0}else lt=!1,_e&&(t.flags&1048576)!==0&&$c(t,di,t.index);switch(t.lanes=0,t.tag){case 2:var a=t.type;Ci(e,t),e=t.pendingProps;var c=ir(t,Qe.current);fr(t,s),c=Bo(null,t,a,e,c,s);var d=zo();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,it(a)?(d=!0,ui(t)):d=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Po(t),c.updater=Ti,t.stateNode=c,c._reactInternals=t,Ho(t,a,e,s),t=Go(null,t,a,!0,d,s)):(t.tag=0,_e&&d&&No(t),et(null,t,c,s),t=t.child),t;case 16:a=t.elementType;e:{switch(Ci(e,t),e=t.pendingProps,c=a._init,a=c(a._payload),t.type=a,c=t.tag=Km(a),e=At(a,e),c){case 0:t=Yo(null,t,a,e,s);break e;case 1:t=Tf(null,t,a,e,s);break e;case 11:t=Sf(null,t,a,e,s);break e;case 14:t=kf(null,t,a,At(a.type,e),s);break e}throw Error(r(306,a,""))}return t;case 0:return a=t.type,c=t.pendingProps,c=t.elementType===a?c:At(a,c),Yo(e,t,a,c,s);case 1:return a=t.type,c=t.pendingProps,c=t.elementType===a?c:At(a,c),Tf(e,t,a,c,s);case 3:e:{if(_f(t),e===null)throw Error(r(387));a=t.pendingProps,d=t.memoizedState,c=d.element,Bc(e,t),vi(t,a,null,s);var m=t.memoizedState;if(a=m.element,d.isDehydrated)if(d={element:a,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){c=hr(Error(r(423)),t),t=Cf(e,t,a,s,c);break e}else if(a!==c){c=hr(Error(r(424)),t),t=Cf(e,t,a,s,c);break e}else for(gt=un(t.stateNode.containerInfo.firstChild),mt=t,_e=!0,$t=null,s=bc(t,null,a,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ar(),a===c){t=Gt(e,t,s);break e}et(e,t,a,s)}t=t.child}return t;case 5:return Vc(t),e===null&&_o(t),a=t.type,c=t.pendingProps,d=e!==null?e.memoizedProps:null,m=c.children,yo(a,c)?m=null:d!==null&&yo(a,d)&&(t.flags|=32),xf(e,t),et(e,t,m,s),t.child;case 6:return e===null&&_o(t),null;case 13:return Lf(e,t,s);case 4:return Mo(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ur(t,null,a,s):et(e,t,a,s),t.child;case 11:return a=t.type,c=t.pendingProps,c=t.elementType===a?c:At(a,c),Sf(e,t,a,c,s);case 7:return et(e,t,t.pendingProps,s),t.child;case 8:return et(e,t,t.pendingProps.children,s),t.child;case 12:return et(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(a=t.type._context,c=t.pendingProps,d=t.memoizedProps,m=c.value,Se(mi,a._currentValue),a._currentValue=m,d!==null)if(It(d.value,m)){if(d.children===c.children&&!st.current){t=Gt(e,t,s);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var y=d.dependencies;if(y!==null){m=d.child;for(var k=y.firstContext;k!==null;){if(k.context===a){if(d.tag===1){k=Yt(-1,s&-s),k.tag=2;var I=d.updateQueue;if(I!==null){I=I.shared;var b=I.pending;b===null?k.next=k:(k.next=b.next,b.next=k),I.pending=k}}d.lanes|=s,k=d.alternate,k!==null&&(k.lanes|=s),$o(d.return,s,t),y.lanes|=s;break}k=k.next}}else if(d.tag===10)m=d.type===t.type?null:d.child;else if(d.tag===18){if(m=d.return,m===null)throw Error(r(341));m.lanes|=s,y=m.alternate,y!==null&&(y.lanes|=s),$o(m,s,t),m=d.sibling}else m=d.child;if(m!==null)m.return=d;else for(m=d;m!==null;){if(m===t){m=null;break}if(d=m.sibling,d!==null){d.return=m.return,m=d;break}m=m.return}d=m}et(e,t,c.children,s),t=t.child}return t;case 9:return c=t.type,a=t.pendingProps.children,fr(t,s),c=Nt(c),a=a(c),t.flags|=1,et(e,t,a,s),t.child;case 14:return a=t.type,c=At(a,t.pendingProps),c=At(a.type,c),kf(e,t,a,c,s);case 15:return Ef(e,t,t.type,t.pendingProps,s);case 17:return a=t.type,c=t.pendingProps,c=t.elementType===a?c:At(a,c),Ci(e,t),t.tag=1,it(a)?(e=!0,ui(t)):e=!1,fr(t,s),hf(t,a,c),Ho(t,a,c,s),Go(null,t,a,!0,e,s);case 19:return If(e,t,s);case 22:return Nf(e,t,s)}throw Error(r(156,t.tag))};function ed(e,t){return Au(e,t)}function Vm(e,t,s,a){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _t(e,t,s,a){return new Vm(e,t,s,a)}function ya(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Km(e){if(typeof e=="function")return ya(e)?1:0;if(e!=null){if(e=e.$$typeof,e===M)return 11;if(e===rt)return 14}return 2}function Sn(e,t){var s=e.alternate;return s===null?(s=_t(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function bi(e,t,s,a,c,d){var m=2;if(a=e,typeof e=="function")ya(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case Y:return Dn(s.children,c,d,t);case z:m=8,c|=8;break;case P:return e=_t(12,s,t,c|2),e.elementType=P,e.lanes=d,e;case ee:return e=_t(13,s,t,c),e.elementType=ee,e.lanes=d,e;case ke:return e=_t(19,s,t,c),e.elementType=ke,e.lanes=d,e;case xe:return Fi(s,c,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:m=10;break e;case ue:m=9;break e;case M:m=11;break e;case rt:m=14;break e;case He:m=16,a=null;break e}throw Error(r(130,e==null?e:typeof e,""))}return t=_t(m,s,t,c),t.elementType=e,t.type=a,t.lanes=d,t}function Dn(e,t,s,a){return e=_t(7,e,a,t),e.lanes=s,e}function Fi(e,t,s,a){return e=_t(22,e,a,t),e.elementType=xe,e.lanes=s,e.stateNode={isHidden:!1},e}function va(e,t,s){return e=_t(6,e,null,t),e.lanes=s,e}function wa(e,t,s){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Wm(e,t,s,a,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wl(0),this.expirationTimes=Wl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wl(0),this.identifierPrefix=a,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Sa(e,t,s,a,c,d,m,y,k){return e=new Wm(e,t,s,y,k),t===1?(t=1,d===!0&&(t|=8)):t=0,d=_t(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:a,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Po(d),e}function qm(e,t,s){var a=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),_a.exports=fg(),_a.exports}var gd;function hg(){if(gd)return qi;gd=1;var i=dg();return qi.createRoot=i.createRoot,qi.hydrateRoot=i.hydrateRoot,qi}var pg=hg();const mg="modulepreload",gg=function(i){return"/"+i},yd={},yg=function(n,r,l){let o=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(r.map(p=>{if(p=gg(p),p in yd)return;yd[p]=!0;const g=p.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${x}`))return;const S=document.createElement("link");if(S.rel=g?"stylesheet":mg,g||(S.as="script"),S.crossOrigin="",S.href=p,h&&S.setAttribute("nonce",h),document.head.appendChild(S),g)return new Promise((T,E)=>{S.addEventListener("load",T),S.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${p}`)))})}))}function u(f){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=f,window.dispatchEvent(h),!h.defaultPrevented)throw f}return o.then(f=>{for(const h of f||[])h.status==="rejected"&&u(h.reason);return n().catch(u)})};function vg(i,n){const r=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,l=[];let o,u={},f=!1,h=n==null?void 0:n.fg,p=n==null?void 0:n.bg;for(;(o=r.exec(i))!==null;){const[,,g,,x]=o;if(g){const S=+g;switch(S){case 0:u={};break;case 1:u["font-weight"]="bold";break;case 2:u.opacity="0.8";break;case 3:u["font-style"]="italic";break;case 4:u["text-decoration"]="underline";break;case 7:f=!0;break;case 8:u.display="none";break;case 9:u["text-decoration"]="line-through";break;case 22:delete u["font-weight"],delete u["font-style"],delete u.opacity,delete u["text-decoration"];break;case 23:delete u["font-weight"],delete u["font-style"],delete u.opacity;break;case 24:delete u["text-decoration"];break;case 27:f=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:h=vd[S-30];break;case 39:h=n==null?void 0:n.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:p=vd[S-40];break;case 49:p=n==null?void 0:n.bg;break;case 53:u["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:h=wd[S-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:p=wd[S-100];break}}else if(x){const S={...u},T=f?p:h;T!==void 0&&(S.color=T);const E=f?h:p;E!==void 0&&(S["background-color"]=E),l.push(`${wg(x)}`)}}return l.join("")}const vd={0:"var(--vscode-terminal-ansiBlack)",1:"var(--vscode-terminal-ansiRed)",2:"var(--vscode-terminal-ansiGreen)",3:"var(--vscode-terminal-ansiYellow)",4:"var(--vscode-terminal-ansiBlue)",5:"var(--vscode-terminal-ansiMagenta)",6:"var(--vscode-terminal-ansiCyan)",7:"var(--vscode-terminal-ansiWhite)"},wd={0:"var(--vscode-terminal-ansiBrightBlack)",1:"var(--vscode-terminal-ansiBrightRed)",2:"var(--vscode-terminal-ansiBrightGreen)",3:"var(--vscode-terminal-ansiBrightYellow)",4:"var(--vscode-terminal-ansiBrightBlue)",5:"var(--vscode-terminal-ansiBrightMagenta)",6:"var(--vscode-terminal-ansiBrightCyan)",7:"var(--vscode-terminal-ansiBrightWhite)"};function wg(i){return i.replace(/[&"<>]/g,n=>({"&":"&",'"':""","<":"<",">":">"})[n])}function Sg(i){return Object.entries(i).map(([n,r])=>`${n}: ${r}`).join("; ")}const Oa=({text:i,language:n,mimeType:r,linkify:l,readOnly:o,highlight:u,revealLine:f,lineNumbers:h,isFocused:p,focusOnChange:g,wrapLines:x,onChange:S,dataTestId:T,placeholder:E})=>{const[O,v]=Dd(),[w]=ye.useState(yg(()=>import("./codeMirrorModule-DVQi6prl.js"),__vite__mapDeps([0,1])).then(V=>V.default)),$=ye.useRef(null),[A,B]=ye.useState();return ye.useEffect(()=>{(async()=>{var z,P;const V=await w;Eg(V);const W=v.current;if(!W)return;const j=xg(n)||Ng(r)||(l?"text/linkified":"");if($.current&&j===$.current.cm.getOption("mode")&&!!o===$.current.cm.getOption("readOnly")&&h===$.current.cm.getOption("lineNumbers")&&x===$.current.cm.getOption("lineWrapping")&&E===$.current.cm.getOption("placeholder"))return;(P=(z=$.current)==null?void 0:z.cm)==null||P.getWrapperElement().remove();const Y=V(W,{value:"",mode:j,readOnly:!!o,lineNumbers:h,lineWrapping:x,placeholder:E});return $.current={cm:Y},p&&Y.focus(),B(Y),Y})()},[w,A,v,n,r,l,h,x,o,p,E]),ye.useEffect(()=>{$.current&&$.current.cm.setSize(O.width,O.height)},[O]),ye.useLayoutEffect(()=>{var j;if(!A)return;let V=!1;if(A.getValue()!==i&&(A.setValue(i),V=!0,g&&(A.execCommand("selectAll"),A.focus())),V||JSON.stringify(u)!==JSON.stringify($.current.highlight)){for(const P of $.current.highlight||[])A.removeLineClass(P.line-1,"wrap");for(const P of u||[])A.addLineClass(P.line-1,"wrap",`source-line-${P.type}`);for(const P of $.current.widgets||[])A.removeLineWidget(P);for(const P of $.current.markers||[])P.clear();const Y=[],z=[];for(const P of u||[]){if(P.type!=="subtle-error"&&P.type!=="error")continue;const le=(j=$.current)==null?void 0:j.cm.getLine(P.line-1);if(le){const ue={};ue.title=P.message||"",z.push(A.markText({line:P.line-1,ch:0},{line:P.line-1,ch:P.column||le.length},{className:"source-line-error-underline",attributes:ue}))}if(P.type==="error"){const ue=document.createElement("div");ue.innerHTML=vg(P.message||""),ue.className="source-line-error-widget",Y.push(A.addLineWidget(P.line,ue,{above:!0,coverGutter:!1}))}}$.current.highlight=u,$.current.widgets=Y,$.current.markers=z}typeof f=="number"&&$.current.cm.lineCount()>=f&&A.scrollIntoView({line:Math.max(0,f-1),ch:0},50);let W;return S&&(W=()=>S(A.getValue()),A.on("change",W)),()=>{W&&A.off("change",W)}},[A,i,u,f,g,S]),H.jsx("div",{"data-testid":T,className:"cm-wrapper",ref:v,onClick:kg})};function kg(i){var r;if(!(i.target instanceof HTMLElement))return;let n;i.target.classList.contains("cm-linkified")?n=i.target.textContent:i.target.classList.contains("cm-link")&&((r=i.target.nextElementSibling)!=null&&r.classList.contains("cm-url"))&&(n=i.target.nextElementSibling.textContent.slice(1,-1)),n&&(i.preventDefault(),i.stopPropagation(),window.open(n,"_blank"))}let Sd=!1;function Eg(i){Sd||(Sd=!0,i.defineSimpleMode("text/linkified",{start:[{regex:sg,token:"linkified"}]}))}function Ng(i){if(i){if(i.includes("javascript")||i.includes("json"))return"javascript";if(i.includes("python"))return"python";if(i.includes("csharp"))return"text/x-csharp";if(i.includes("java"))return"text/x-java";if(i.includes("markdown"))return"markdown";if(i.includes("html")||i.includes("svg"))return"htmlmixed";if(i.includes("css"))return"css"}}function xg(i){if(i)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[i]}const Tg=50,_g=({sidebarSize:i,sidebarHidden:n=!1,sidebarIsFirst:r=!1,orientation:l="vertical",minSidebarSize:o=Tg,settingName:u,sidebar:f,main:h})=>{const p=Math.max(o,i)*window.devicePixelRatio,[g,x]=Fa(u?u+"."+l+":size":void 0,p),[S,T]=Fa(u?u+"."+l+":size":void 0,p),[E,O]=ye.useState(null),[v,w]=Dd();let $;l==="vertical"?($=S/window.devicePixelRatio,v&&v.height<$&&($=v.height-10)):($=g/window.devicePixelRatio,v&&v.width<$&&($=v.width-10)),document.body.style.userSelect=E?"none":"inherit";let A={};return l==="vertical"?r?A={top:E?0:$-4,bottom:E?0:void 0,height:E?"initial":8}:A={bottom:E?0:$-4,top:E?0:void 0,height:E?"initial":8}:r?A={left:E?0:$-4,right:E?0:void 0,width:E?"initial":8}:A={right:E?0:$-4,left:E?0:void 0,width:E?"initial":8},H.jsxs("div",{className:Vn("split-view",l,r&&"sidebar-first"),ref:w,children:[H.jsx("div",{className:"split-view-main",children:h}),!n&&H.jsx("div",{style:{flexBasis:$},className:"split-view-sidebar",children:f}),!n&&H.jsx("div",{style:A,className:"split-view-resizer",onMouseDown:B=>O({offset:l==="vertical"?B.clientY:B.clientX,size:$}),onMouseUp:()=>O(null),onMouseMove:B=>{if(!B.buttons)O(null);else if(E){const W=(l==="vertical"?B.clientY:B.clientX)-E.offset,j=r?E.size+W:E.size-W,z=B.target.parentElement.getBoundingClientRect(),P=Math.min(Math.max(o,j),(l==="vertical"?z.height:z.width)-o);l==="vertical"?T(P*window.devicePixelRatio):x(P*window.devicePixelRatio)}}})]})},bd=({noShadow:i,children:n,noMinHeight:r,className:l,sidebarBackground:o,onClick:u})=>H.jsx("div",{className:Vn("toolbar",i&&"no-shadow",r&&"no-min-height",l,o&&"toolbar-sidebar-background"),onClick:u,children:n}),Cg=({tabs:i,selectedTab:n,setSelectedTab:r,leftToolbar:l,rightToolbar:o,dataTestId:u,mode:f})=>{const h=ye.useId();return n||(n=i[0].id),f||(f="default"),H.jsx("div",{className:"tabbed-pane","data-testid":u,children:H.jsxs("div",{className:"vbox",children:[H.jsxs(bd,{children:[l&&H.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...l]}),f==="default"&&H.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...i.map(p=>H.jsx(Lg,{id:p.id,ariaControls:`${h}-${p.id}`,title:p.title,count:p.count,errorCount:p.errorCount,selected:n===p.id,onSelect:r},p.id))]}),f==="select"&&H.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:H.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:n,onChange:p=>{r==null||r(i[p.currentTarget.selectedIndex].id)},children:i.map(p=>{let g="";return p.count&&(g=` (${p.count})`),p.errorCount&&(g=` (${p.errorCount})`),H.jsxs("option",{value:p.id,role:"tab","aria-controls":`${h}-${p.id}`,children:[p.title,g]},p.id)})})}),o&&H.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...o]})]}),i.map(p=>{const g="tab-content tab-"+p.id;if(p.component)return H.jsx("div",{id:`${h}-${p.id}`,role:"tabpanel","aria-label":p.title,className:g,style:{display:n===p.id?"inherit":"none"},children:p.component},p.id);if(n===p.id)return H.jsx("div",{id:`${h}-${p.id}`,role:"tabpanel","aria-label":p.title,className:g,children:p.render()},p.id)})]})})},Lg=({id:i,title:n,count:r,errorCount:l,selected:o,onSelect:u,ariaControls:f})=>H.jsxs("div",{className:Vn("tabbed-pane-tab",o&&"selected"),onClick:()=>u==null?void 0:u(i),role:"tab",title:n,"aria-controls":f,children:[H.jsx("div",{className:"tabbed-pane-tab-label",children:n}),!!r&&H.jsx("div",{className:"tabbed-pane-tab-counter",children:r}),!!l&&H.jsx("div",{className:"tabbed-pane-tab-counter error",children:l})]}),Og=({sources:i,fileId:n,setFileId:r})=>H.jsx("select",{className:"source-chooser",hidden:!i.length,title:"Source chooser",value:n,onChange:l=>{r(l.target.selectedOptions[0].value)},children:Ig(i)});function Ig(i){const n=o=>o.replace(/.*[/\\]([^/\\]+)/,"$1"),r=o=>H.jsx("option",{value:o.id,children:n(o.label)},o.id),l=new Map;for(const o of i){let u=l.get(o.group||"Debugger");u||(u=[],l.set(o.group||"Debugger",u)),u.push(o)}return[...l.entries()].map(([o,u])=>H.jsx("optgroup",{label:o,children:u.filter(f=>(f.group||"Debugger")===o).map(f=>r(f))},o))}function $g(){return{id:"default",isRecorded:!1,text:"",language:"javascript",label:"",highlight:[]}}const vt=ye.forwardRef(function({children:n,title:r="",icon:l,disabled:o=!1,toggled:u=!1,onClick:f=()=>{},style:h,testId:p,className:g,ariaLabel:x},S){return H.jsxs("button",{ref:S,className:Vn(g,"toolbar-button",l,u&&"toggled"),onMouseDown:Ed,onClick:f,onDoubleClick:Ed,title:r,disabled:!!o,style:h,"data-testid":p,"aria-label":x||r,children:[l&&H.jsx("span",{className:`codicon codicon-${l}`,style:n?{marginRight:5}:{}}),n]})}),kd=({style:i})=>H.jsx("div",{className:"toolbar-separator",style:i}),Ed=i=>{i.stopPropagation(),i.preventDefault()};function Ag(i){var n,r,l,o,u,f,h,p,g;if(i=i??globalThis,!i.__playwright_builtins__){const x={setTimeout:(n=i.setTimeout)==null?void 0:n.bind(i),clearTimeout:(r=i.clearTimeout)==null?void 0:r.bind(i),setInterval:(l=i.setInterval)==null?void 0:l.bind(i),clearInterval:(o=i.clearInterval)==null?void 0:o.bind(i),requestAnimationFrame:(u=i.requestAnimationFrame)==null?void 0:u.bind(i),cancelAnimationFrame:(f=i.cancelAnimationFrame)==null?void 0:f.bind(i),requestIdleCallback:(h=i.requestIdleCallback)==null?void 0:h.bind(i),cancelIdleCallback:(p=i.cancelIdleCallback)==null?void 0:p.bind(i),performance:i.performance,eval:(g=i.eval)==null?void 0:g.bind(i),Intl:i.Intl,Date:i.Date,Map:i.Map,Set:i.Set};Object.defineProperty(i,"__playwright_builtins__",{value:x,configurable:!1,enumerable:!1,writable:!1})}return i.__playwright_builtins__}const St=Ag();St.setTimeout;St.clearTimeout;St.setInterval;St.clearInterval;St.requestAnimationFrame;St.cancelAnimationFrame;St.requestIdleCallback;St.cancelIdleCallback;St.performance;St.Intl;St.Date;St.Map;const hl=St.Set,De=function(i,n,r){return i>=n&&i<=r};function ct(i){return De(i,48,57)}function Nd(i){return ct(i)||De(i,65,70)||De(i,97,102)}function Pg(i){return De(i,65,90)}function Mg(i){return De(i,97,122)}function jg(i){return Pg(i)||Mg(i)}function Rg(i){return i>=128}function Xi(i){return jg(i)||Rg(i)||i===95}function xd(i){return Xi(i)||ct(i)||i===45}function Dg(i){return De(i,0,8)||i===11||De(i,14,31)||i===127}function Zi(i){return i===10}function Zt(i){return Zi(i)||i===9||i===32}const bg=1114111;class Ja extends Error{constructor(n){super(n),this.name="InvalidCharacterError"}}function Fg(i){const n=[];for(let r=0;r=n.length?-1:n[M]},f=function(M){if(M===void 0&&(M=1),M>3)throw"Spec Error: no more than three codepoints of lookahead.";return u(r+M)},h=function(M){return M===void 0&&(M=1),r+=M,o=u(r),!0},p=function(){return r-=1,!0},g=function(M){return M===void 0&&(M=o),M===-1},x=function(){if(S(),h(),Zt(o)){for(;Zt(f());)h();return new Ba}else{if(o===34)return O();if(o===35)if(xd(f())||$(f(1),f(2))){const M=new Zd("");return B(f(1),f(2),f(3))&&(M.type="id"),M.value=Y(),M}else return new Xe(o);else return o===36?f()===61?(h(),new Kg):new Xe(o):o===39?O():o===40?new Qd:o===41?new Jd:o===42?f()===61?(h(),new Wg):new Xe(o):o===43?j()?(p(),T()):new Xe(o):o===44?new Kd:o===45?j()?(p(),T()):f(1)===45&&f(2)===62?(h(2),new zd):V()?(p(),E()):new Xe(o):o===46?j()?(p(),T()):new Xe(o):o===58?new Ud:o===59?new Vd:o===60?f(1)===33&&f(2)===45&&f(3)===45?(h(3),new Bd):new Xe(o):o===64?B(f(1),f(2),f(3))?new Xd(Y()):new Xe(o):o===91?new Hd:o===92?A()?(p(),E()):new Xe(o):o===93?new za:o===94?f()===61?(h(),new Vg):new Xe(o):o===123?new Wd:o===124?f()===61?(h(),new Ug):f()===124?(h(),new Yd):new Xe(o):o===125?new qd:o===126?f()===61?(h(),new zg):new Xe(o):ct(o)?(p(),T()):Xi(o)?(p(),E()):g()?new tl:new Xe(o)}},S=function(){for(;f(1)===47&&f(2)===42;)for(h(2);;)if(h(),o===42&&f()===47){h();break}else if(g())return},T=function(){const M=z();if(B(f(1),f(2),f(3))){const ee=new qg;return ee.value=M.value,ee.repr=M.repr,ee.type=M.type,ee.unit=Y(),ee}else if(f()===37){h();const ee=new rh;return ee.value=M.value,ee.repr=M.repr,ee}else{const ee=new nh;return ee.value=M.value,ee.repr=M.repr,ee.type=M.type,ee}},E=function(){const M=Y();if(M.toLowerCase()==="url"&&f()===40){for(h();Zt(f(1))&&Zt(f(2));)h();return f()===34||f()===39?new nl(M):Zt(f())&&(f(2)===34||f(2)===39)?new nl(M):v()}else return f()===40?(h(),new nl(M)):new Gd(M)},O=function(M){M===void 0&&(M=o);let ee="";for(;h();){if(o===M||g())return new eh(ee);if(Zi(o))return p(),new Fd;o===92?g(f())||(Zi(f())?h():ee+=Be(w())):ee+=Be(o)}throw new Error("Internal error")},v=function(){const M=new th("");for(;Zt(f());)h();if(g(f()))return M;for(;h();){if(o===41||g())return M;if(Zt(o)){for(;Zt(f());)h();return f()===41||g(f())?(h(),M):(le(),new el)}else{if(o===34||o===39||o===40||Dg(o))return le(),new el;if(o===92)if(A())M.value+=Be(w());else return le(),new el;else M.value+=Be(o)}}throw new Error("Internal error")},w=function(){if(h(),Nd(o)){const M=[o];for(let ke=0;ke<5&&Nd(f());ke++)h(),M.push(o);Zt(f())&&h();let ee=parseInt(M.map(function(ke){return String.fromCharCode(ke)}).join(""),16);return ee>bg&&(ee=65533),ee}else return g()?65533:o},$=function(M,ee){return!(M!==92||Zi(ee))},A=function(){return $(o,f())},B=function(M,ee,ke){return M===45?Xi(ee)||ee===45||$(ee,ke):Xi(M)?!0:M===92?$(M,ee):!1},V=function(){return B(o,f(1),f(2))},W=function(M,ee,ke){return M===43||M===45?!!(ct(ee)||ee===46&&ct(ke)):M===46?!!ct(ee):!!ct(M)},j=function(){return W(o,f(1),f(2))},Y=function(){let M="";for(;h();)if(xd(o))M+=Be(o);else if(A())M+=Be(w());else return p(),M;throw new Error("Internal parse error")},z=function(){let M="",ee="integer";for((f()===43||f()===45)&&(h(),M+=Be(o));ct(f());)h(),M+=Be(o);if(f(1)===46&&ct(f(2)))for(h(),M+=Be(o),h(),M+=Be(o),ee="number";ct(f());)h(),M+=Be(o);const ke=f(1),rt=f(2),He=f(3);if((ke===69||ke===101)&&ct(rt))for(h(),M+=Be(o),h(),M+=Be(o),ee="number";ct(f());)h(),M+=Be(o);else if((ke===69||ke===101)&&(rt===43||rt===45)&&ct(He))for(h(),M+=Be(o),h(),M+=Be(o),h(),M+=Be(o),ee="number";ct(f());)h(),M+=Be(o);const xe=P(M);return{type:ee,value:xe,repr:M}},P=function(M){return+M},le=function(){for(;h();){if(o===41||g())return;A()&&w()}};let ue=0;for(;!g(f());)if(l.push(x()),ue++,ue>n.length*2)throw new Error("I'm infinite-looping!");return l}class je{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Fd extends je{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class el extends je{constructor(){super(...arguments),this.tokenType="BADURL"}}class Ba extends je{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class Bd extends je{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return""}}class Ud extends je{constructor(){super(...arguments),this.tokenType=":"}}class Vd extends je{constructor(){super(...arguments),this.tokenType=";"}}class Kd extends je{constructor(){super(...arguments),this.tokenType=","}}class $r extends je{constructor(){super(...arguments),this.value="",this.mirror=""}}class Wd extends $r{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class qd extends $r{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class Hd extends $r{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class za extends $r{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class Qd extends $r{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Jd extends $r{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class zg extends je{constructor(){super(...arguments),this.tokenType="~="}}class Ug extends je{constructor(){super(...arguments),this.tokenType="|="}}class Vg extends je{constructor(){super(...arguments),this.tokenType="^="}}class Kg extends je{constructor(){super(...arguments),this.tokenType="$="}}class Wg extends je{constructor(){super(...arguments),this.tokenType="*="}}class Yd extends je{constructor(){super(...arguments),this.tokenType="||"}}class tl extends je{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class Xe extends je{constructor(n){super(),this.tokenType="DELIM",this.value="",this.value=Be(n)}toString(){return"DELIM("+this.value+")"}toJSON(){const n=this.constructor.prototype.constructor.prototype.toJSON.call(this);return n.value=this.value,n}toSource(){return this.value==="\\"?`\\ `:this.value}}class Ar extends je{constructor(){super(...arguments),this.value=""}ASCIIMatch(n){return this.value.toLowerCase()===n.toLowerCase()}toJSON(){const n=this.constructor.prototype.constructor.prototype.toJSON.call(this);return n.value=this.value,n}}class Gd extends Ar{constructor(n){super(),this.tokenType="IDENT",this.value=n}toString(){return"IDENT("+this.value+")"}toSource(){return As(this.value)}}class nl extends Ar{constructor(n){super(),this.tokenType="FUNCTION",this.value=n,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return As(this.value)+"("}}class Xd extends Ar{constructor(n){super(),this.tokenType="AT-KEYWORD",this.value=n}toString(){return"AT("+this.value+")"}toSource(){return"@"+As(this.value)}}class Zd extends Ar{constructor(n){super(),this.tokenType="HASH",this.value=n,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const n=this.constructor.prototype.constructor.prototype.toJSON.call(this);return n.value=this.value,n.type=this.type,n}toSource(){return this.type==="id"?"#"+As(this.value):"#"+Hg(this.value)}}class eh extends Ar{constructor(n){super(),this.tokenType="STRING",this.value=n}toString(){return'"'+sh(this.value)+'"'}}class th extends Ar{constructor(n){super(),this.tokenType="URL",this.value=n}toString(){return"URL("+this.value+")"}toSource(){return'url("'+sh(this.value)+'")'}}class nh extends je{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const n=super.toJSON();return n.value=this.value,n.type=this.type,n.repr=this.repr,n}toSource(){return this.repr}}class rh extends je{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const n=this.constructor.prototype.constructor.prototype.toJSON.call(this);return n.value=this.value,n.repr=this.repr,n}toSource(){return this.repr+"%"}}class qg extends je{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const n=this.constructor.prototype.constructor.prototype.toJSON.call(this);return n.value=this.value,n.type=this.type,n.repr=this.repr,n.unit=this.unit,n}toSource(){const n=this.repr;let r=As(this.unit);return r[0].toLowerCase()==="e"&&(r[1]==="-"||De(r.charCodeAt(1),48,57))&&(r="\\65 "+r.slice(1,r.length)),n+r}}function As(i){i=""+i;let n="";const r=i.charCodeAt(0);for(let l=0;l=128||o===45||o===95||De(o,48,57)||De(o,65,90)||De(o,97,122)?n+=i[l]:n+="\\"+i[l]}return n}function Hg(i){i=""+i;let n="";for(let r=0;r=128||l===45||l===95||De(l,48,57)||De(l,65,90)||De(l,97,122)?n+=i[r]:n+="\\"+l.toString(16)+" "}return n}function sh(i){i=""+i;let n="";for(let r=0;rP instanceof Xd||P instanceof Fd||P instanceof el||P instanceof Yd||P instanceof Bd||P instanceof zd||P instanceof Vd||P instanceof Wd||P instanceof qd||P instanceof th||P instanceof rh);if(l)throw new ft(`Unsupported token "${l.toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`);let o=0;const u=new hl;function f(){return new ft(`Unexpected token "${r[o].toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`)}function h(){for(;r[o]instanceof Ba;)o++}function p(P=o){return r[P]instanceof Gd}function g(P=o){return r[P]instanceof eh}function x(P=o){return r[P]instanceof nh}function S(P=o){return r[P]instanceof Kd}function T(P=o){return r[P]instanceof Qd}function E(P=o){return r[P]instanceof Jd}function O(P=o){return r[P]instanceof nl}function v(P=o){return r[P]instanceof Xe&&r[P].value==="*"}function w(P=o){return r[P]instanceof tl}function $(P=o){return r[P]instanceof Xe&&[">","+","~"].includes(r[P].value)}function A(P=o){return S(P)||E(P)||w(P)||$(P)||r[P]instanceof Ba}function B(){const P=[V()];for(;h(),!!S();)o++,P.push(V());return P}function V(){return h(),x()||g()?r[o++].value:W()}function W(){const P={simples:[]};for(h(),$()?P.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):P.simples.push({selector:j(),combinator:""});;){if(h(),$())P.simples[P.simples.length-1].combinator=r[o++].value,h();else if(A())break;P.simples.push({combinator:"",selector:j()})}return P}function j(){let P="";const le=[];for(;!A();)if(p()||v())P+=r[o++].toSource();else if(r[o]instanceof Zd)P+=r[o++].toSource();else if(r[o]instanceof Xe&&r[o].value===".")if(o++,p())P+="."+r[o++].toSource();else throw f();else if(r[o]instanceof Ud)if(o++,p())if(!n.has(r[o].value.toLowerCase()))P+=":"+r[o++].toSource();else{const ue=r[o++].value.toLowerCase();le.push({name:ue,args:[]}),u.add(ue)}else if(O()){const ue=r[o++].value.toLowerCase();if(n.has(ue)?(le.push({name:ue,args:B()}),u.add(ue)):P+=`:${ue}(${Y()})`,h(),!E())throw f();o++}else throw f();else if(r[o]instanceof Hd){for(P+="[",o++;!(r[o]instanceof za)&&!w();)P+=r[o++].toSource();if(!(r[o]instanceof za))throw f();P+="]",o++}else throw f();if(!P&&!le.length)throw f();return{css:P||void 0,functions:le}}function Y(){let P="",le=1;for(;!w()&&((T()||O())&&le++,E()&&le--,!!le);)P+=r[o++].toSource();return P}const z=B();if(!w())throw f();if(z.some(P=>typeof P!="object"||!("simples"in P)))throw new ft(`Error while parsing css selector "${i}". Did you mean to CSS.escape it?`);return{selector:z,names:Array.from(u)}}const Td=new hl(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Jg=new hl(["left-of","right-of","above","below","near"]),Yg=new hl(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function ih(i){const n=Xg(i),r=[];for(const l of n.parts){if(l.name==="css"||l.name==="css:light"){l.name==="css:light"&&(l.body=":light("+l.body+")");const o=Qg(l.body,Yg);r.push({name:"css",body:o.selector,source:l.body});continue}if(Td.has(l.name)){let o,u;try{const g=JSON.parse("["+l.body+"]");if(!Array.isArray(g)||g.length<1||g.length>2||typeof g[0]!="string")throw new ft(`Malformed selector: ${l.name}=`+l.body);if(o=g[0],g.length===2){if(typeof g[1]!="number"||!Jg.has(l.name))throw new ft(`Malformed selector: ${l.name}=`+l.body);u=g[1]}}catch{throw new ft(`Malformed selector: ${l.name}=`+l.body)}const f={name:l.name,source:l.body,body:{parsed:ih(o),distance:u}},h=[...f.body.parsed.parts].reverse().find(g=>g.name==="internal:control"&&g.body==="enter-frame"),p=h?f.body.parsed.parts.indexOf(h):-1;p!==-1&&Gg(f.body.parsed.parts.slice(0,p+1),r.slice(0,p+1))&&f.body.parsed.parts.splice(0,p+1),r.push(f);continue}r.push({...l,source:l.body})}if(Td.has(r[0].name))throw new ft(`"${r[0].name}" selector cannot be first`);return{capture:n.capture,parts:r}}function Gg(i,n){return kr({parts:i})===kr({parts:n})}function kr(i,n){return typeof i=="string"?i:i.parts.map((r,l)=>{let o=!0;!n&&l!==i.capture&&(r.name==="css"||r.name==="xpath"&&r.source.startsWith("//")||r.source.startsWith(".."))&&(o=!1);const u=o?r.name+"=":"";return`${l===i.capture?"*":""}${u}${r.source}`}).join(" >> ")}function Xg(i){let n=0,r,l=0;const o={parts:[]},u=()=>{const h=i.substring(l,n).trim(),p=h.indexOf("=");let g,x;p!==-1&&h.substring(0,p).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(g=h.substring(0,p).trim(),x=h.substring(p+1)):h.length>1&&h[0]==='"'&&h[h.length-1]==='"'||h.length>1&&h[0]==="'"&&h[h.length-1]==="'"?(g="text",x=h):/^\(*\/\//.test(h)||h.startsWith("..")?(g="xpath",x=h):(g="css",x=h);let S=!1;if(g[0]==="*"&&(S=!0,g=g.substring(1)),o.parts.push({name:g,body:x}),S){if(o.capture!==void 0)throw new ft("Only one of the selectors can capture using * modifier");o.capture=o.parts.length-1}};if(!i.includes(">>"))return n=i.length,u(),o;const f=()=>{const p=i.substring(l,n).match(/^\s*text\s*=(.*)$/);return!!p&&!!p[1]};for(;n"&&i[n+1]===">"?(u(),n+=2,l=n):n++}return u(),o}function Ia(i,n){let r=0,l=i.length===0;const o=()=>i[r]||"",u=()=>{const w=o();return++r,l=r>=i.length,w},f=w=>{throw l?new ft(`Unexpected end of selector while parsing selector \`${i}\``):new ft(`Error while parsing selector \`${i}\` - unexpected symbol "${o()}" at position ${r}`+(w?" during "+w:""))};function h(){for(;!l&&/\s/.test(o());)u()}function p(w){return w>="€"||w>="0"&&w<="9"||w>="A"&&w<="Z"||w>="a"&&w<="z"||w>="0"&&w<="9"||w==="_"||w==="-"}function g(){let w="";for(h();!l&&p(o());)w+=u();return w}function x(w){let $=u();for($!==w&&f("parsing quoted string");!l&&o()!==w;)o()==="\\"&&u(),$+=u();return o()!==w&&f("parsing quoted string"),$+=u(),$}function S(){u()!=="/"&&f("parsing regular expression");let w="",$=!1;for(;!l;){if(o()==="\\")w+=u(),l&&f("parsing regular expression");else if($&&o()==="]")$=!1;else if(!$&&o()==="[")$=!0;else if(!$&&o()==="/")break;w+=u()}u()!=="/"&&f("parsing regular expression");let A="";for(;!l&&o().match(/[dgimsuy]/);)A+=u();try{return new RegExp(w,A)}catch(B){throw new ft(`Error while parsing selector \`${i}\`: ${B.message}`)}}function T(){let w="";return h(),o()==="'"||o()==='"'?w=x(o()).slice(1,-1):w=g(),w||f("parsing property path"),w}function E(){h();let w="";return l||(w+=u()),!l&&w!=="="&&(w+=u()),["=","*=","^=","$=","|=","~="].includes(w)||f("parsing operator"),w}function O(){u();const w=[];for(w.push(T()),h();o()===".";)u(),w.push(T()),h();if(o()==="]")return u(),{name:w.join("."),jsonPath:w,op:"",value:null,caseSensitive:!1};const $=E();let A,B=!0;if(h(),o()==="/"){if($!=="=")throw new ft(`Error while parsing selector \`${i}\` - cannot use ${$} in attribute with regular expression`);A=S()}else if(o()==="'"||o()==='"')A=x(o()).slice(1,-1),h(),o()==="i"||o()==="I"?(B=!1,u()):(o()==="s"||o()==="S")&&(B=!0,u());else{for(A="";!l&&(p(o())||o()==="+"||o()===".");)A+=u();A==="true"?A=!0:A==="false"&&(A=!1)}if(h(),o()!=="]"&&f("parsing attribute value"),u(),$!=="="&&typeof A!="string")throw new ft(`Error while parsing selector \`${i}\` - cannot use ${$} in attribute with non-string matching value - ${A}`);return{name:w.join("."),jsonPath:w,op:$,value:A,caseSensitive:B}}const v={name:"",attributes:[]};for(v.name=g(),h();o()==="[";)v.attributes.push(O()),h();if(l||f(void 0),!v.name&&!v.attributes.length)throw new ft(`Error while parsing selector \`${i}\` - selector cannot be empty`);return v}function pl(i,n="'"){const r=JSON.stringify(i),l=r.substring(1,r.length-1).replace(/\\"/g,'"');if(n==="'")return n+l.replace(/[']/g,"\\'")+n;if(n==='"')return n+l.replace(/["]/g,'\\"')+n;if(n==="`")return n+l.replace(/[`]/g,"`")+n;throw new Error("Invalid escape char")}function ol(i){return i.charAt(0).toUpperCase()+i.substring(1)}function lh(i){return i.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function ml(i){return i.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function oh(i,n,r=!1){return Zg(i,n,r,1)[0]}function Zg(i,n,r=!1,l=20,o){try{return Sr(new ly[i](o),ih(n),r,l)}catch{return[n]}}function Sr(i,n,r=!1,l=20){const o=[...n.parts],u=[];let f=r?"frame-locator":"page";for(let h=0;hi.generateLocator(g,"has",v)));continue}if(p.name==="internal:has-not"){const O=Sr(i,p.body.parsed,!1,l);u.push(O.map(v=>i.generateLocator(g,"hasNot",v)));continue}if(p.name==="internal:and"){const O=Sr(i,p.body.parsed,!1,l);u.push(O.map(v=>i.generateLocator(g,"and",v)));continue}if(p.name==="internal:or"){const O=Sr(i,p.body.parsed,!1,l);u.push(O.map(v=>i.generateLocator(g,"or",v)));continue}if(p.name==="internal:chain"){const O=Sr(i,p.body.parsed,!1,l);u.push(O.map(v=>i.generateLocator(g,"chain",v)));continue}if(p.name==="internal:label"){const{exact:O,text:v}=Ts(p.body);u.push([i.generateLocator(g,"label",v,{exact:O})]);continue}if(p.name==="internal:role"){const O=Ia(p.body),v={attrs:[]};for(const w of O.attributes)w.name==="name"?(v.exact=w.caseSensitive,v.name=w.value):(w.name==="level"&&typeof w.value=="string"&&(w.value=+w.value),v.attrs.push({name:w.name==="include-hidden"?"includeHidden":w.name,value:w.value}));u.push([i.generateLocator(g,"role",O.name,v)]);continue}if(p.name==="internal:testid"){const O=Ia(p.body),{value:v}=O.attributes[0];u.push([i.generateLocator(g,"test-id",v)]);continue}if(p.name==="internal:attr"){const O=Ia(p.body),{name:v,value:w,caseSensitive:$}=O.attributes[0],A=w,B=!!$;if(v==="placeholder"){u.push([i.generateLocator(g,"placeholder",A,{exact:B})]);continue}if(v==="alt"){u.push([i.generateLocator(g,"alt",A,{exact:B})]);continue}if(v==="title"){u.push([i.generateLocator(g,"title",A,{exact:B})]);continue}}if(p.name==="internal:control"&&p.body==="enter-frame"){const O=u[u.length-1],v=o[h-1],w=O.map($=>i.chainLocators([$,i.generateLocator(g,"frame","")]));["xpath","css"].includes(v.name)&&w.push(i.generateLocator(g,"frame-locator",kr({parts:[v]})),i.generateLocator(g,"frame-locator",kr({parts:[v]},!0))),O.splice(0,O.length,...w),f="frame-locator";continue}const x=o[h+1],S=kr({parts:[p]}),T=i.generateLocator(g,"default",S);if(x&&["internal:has-text","internal:has-not-text"].includes(x.name)){const{exact:O,text:v}=Ts(x.body);if(!O){const w=i.generateLocator("locator",x.name==="internal:has-text"?"has-text":"has-not-text",v,{exact:O}),$={};x.name==="internal:has-text"?$.hasText=v:$.hasNotText=v;const A=i.generateLocator(g,"default",S,$);u.push([i.chainLocators([T,w]),A]),h++;continue}}let E;if(["xpath","css"].includes(p.name)){const O=kr({parts:[p]},!0);E=i.generateLocator(g,"default",O)}u.push([T,E].filter(Boolean))}return ey(i,u,l)}function ey(i,n,r){const l=n.map(()=>""),o=[],u=f=>{if(f===n.length)return o.push(i.chainLocators(l)),o.lengthJSON.parse(l));for(let l=0;l{const r=ye.useRef(null),[l,o]=ye.useState(new Map);return ye.useLayoutEffect(()=>{var u;n.find(f=>f.reveal)&&((u=r.current)==null||u.scrollIntoView({block:"center",inline:"nearest"}))},[r,n]),H.jsxs("div",{className:"call-log",style:{flex:"auto"},children:[n.map(u=>{const f=l.get(u.id),h=typeof f=="boolean"?f:u.status!=="done",p=u.params.selector?oh(i,u.params.selector):null;let g=u.title,x="";return u.title.startsWith("expect.to")||u.title.startsWith("expect.not.to")?(g="expect(",x=`).${u.title.substring(7)}()`):u.title.startsWith("locator.")?(g="",x=`.${u.title.substring(8)}()`):(p||u.params.url)&&(g=u.title+"(",x=")"),H.jsxs("div",{className:Vn("call-log-call",u.status),children:[H.jsxs("div",{className:"call-log-call-header",children:[H.jsx("span",{className:Vn("codicon",`codicon-chevron-${h?"down":"right"}`),style:{cursor:"pointer"},onClick:()=>{const S=new Map(l);S.set(u.id,!h),o(S)}}),g,u.params.url?H.jsx("span",{className:"call-log-details",children:H.jsx("span",{className:"call-log-url",title:u.params.url,children:u.params.url})}):void 0,p?H.jsx("span",{className:"call-log-details",children:H.jsx("span",{className:"call-log-selector",title:`page.${p}`,children:`page.${p}`})}):void 0,x,H.jsx("span",{className:Vn("codicon",ay(u))}),typeof u.duration=="number"?H.jsxs("span",{className:"call-log-time",children:["— ",ng(u.duration)]}):void 0]}),(h?u.messages:[]).map((S,T)=>H.jsx("div",{className:"call-log-message",children:S.trim()},T)),!!u.error&&H.jsx("div",{className:"call-log-message error",hidden:!h,children:u.error})]},u.id)}),H.jsx("div",{ref:r})]})};function ay(i){switch(i.status){case"done":return"codicon-check";case"in-progress":return"codicon-clock";case"paused":return"codicon-debug-pause";case"error":return"codicon-error"}}const Ya=Symbol.for("yaml.alias"),Ua=Symbol.for("yaml.document"),En=Symbol.for("yaml.map"),ah=Symbol.for("yaml.pair"),Kt=Symbol.for("yaml.scalar"),Pr=Symbol.for("yaml.seq"),Lt=Symbol.for("yaml.node.type"),Wn=i=>!!i&&typeof i=="object"&&i[Lt]===Ya,qn=i=>!!i&&typeof i=="object"&&i[Lt]===Ua,Mr=i=>!!i&&typeof i=="object"&&i[Lt]===En,Ce=i=>!!i&&typeof i=="object"&&i[Lt]===ah,ve=i=>!!i&&typeof i=="object"&&i[Lt]===Kt,jr=i=>!!i&&typeof i=="object"&&i[Lt]===Pr;function Ie(i){if(i&&typeof i=="object")switch(i[Lt]){case En:case Pr:return!0}return!1}function $e(i){if(i&&typeof i=="object")switch(i[Lt]){case Ya:case En:case Kt:case Pr:return!0}return!1}const uy=i=>(ve(i)||Ie(i))&&!!i.anchor,dt=Symbol("break visit"),uh=Symbol("skip children"),Vt=Symbol("remove node");function Nn(i,n){const r=ch(n);qn(i)?Er(null,i.contents,r,Object.freeze([i]))===Vt&&(i.contents=null):Er(null,i,r,Object.freeze([]))}Nn.BREAK=dt;Nn.SKIP=uh;Nn.REMOVE=Vt;function Er(i,n,r,l){const o=fh(i,n,r,l);if($e(o)||Ce(o))return dh(i,l,o),Er(i,o,r,l);if(typeof o!="symbol"){if(Ie(n)){l=Object.freeze(l.concat(n));for(let u=0;ui.replace(/[!,[\]{}]/g,n=>cy[n]);class nt{constructor(n,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},nt.defaultYaml,n),this.tags=Object.assign({},nt.defaultTags,r)}clone(){const n=new nt(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new nt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:nt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},nt.defaultTags);break}return n}add(n,r){this.atNextDocument&&(this.yaml={explicit:nt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},nt.defaultTags),this.atNextDocument=!1);const l=n.trim().split(/[ \t]+/),o=l.shift();switch(o){case"%TAG":{if(l.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),l.length<2))return!1;const[u,f]=l;return this.tags[u]=f,!0}case"%YAML":{if(this.yaml.explicit=!0,l.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;const[u]=l;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;{const f=/^\d+\.\d+$/.test(u);return r(6,`Unsupported YAML version ${u}`,f),!1}}default:return r(0,`Unknown directive ${o}`,!0),!1}}tagName(n,r){if(n==="!")return"!";if(n[0]!=="!")return r(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const f=n.slice(2,-1);return f==="!"||f==="!!"?(r(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&r("Verbatim tags must end with a >"),f)}const[,l,o]=n.match(/^(.*!)([^!]*)$/s);o||r(`The ${n} tag has no suffix`);const u=this.tags[l];if(u)try{return u+decodeURIComponent(o)}catch(f){return r(String(f)),null}return l==="!"?n:(r(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[r,l]of Object.entries(this.tags))if(n.startsWith(l))return r+fy(n.substring(l.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],l=Object.entries(this.tags);let o;if(n&&l.length>0&&$e(n.contents)){const u={};Nn(n.contents,(f,h)=>{$e(h)&&h.tag&&(u[h.tag]=!0)}),o=Object.keys(u)}else o=[];for(const[u,f]of l)u==="!!"&&f==="tag:yaml.org,2002:"||(!n||o.some(h=>h.startsWith(f)))&&r.push(`%TAG ${u} ${f}`);return r.join(` `)}}nt.defaultYaml={explicit:!1,version:"1.2"};nt.defaultTags={"!!":"tag:yaml.org,2002:"};function hh(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(r)}return!0}function ph(i){const n=new Set;return Nn(i,{Value(r,l){l.anchor&&n.add(l.anchor)}}),n}function mh(i,n){for(let r=1;;++r){const l=`${i}${r}`;if(!n.has(l))return l}}function dy(i,n){const r=[],l=new Map;let o=null;return{onAnchor:u=>{r.push(u),o||(o=ph(i));const f=mh(n,o);return o.add(f),f},setAnchors:()=>{for(const u of r){const f=l.get(u);if(typeof f=="object"&&f.anchor&&(ve(f.node)||Ie(f.node)))f.node.anchor=f.anchor;else{const h=new Error("Failed to resolve repeated object (this should not happen)");throw h.source=u,h}}},sourceObjects:l}}function xr(i,n,r,l){if(l&&typeof l=="object")if(Array.isArray(l))for(let o=0,u=l.length;oCt(l,String(o),r));if(i&&typeof i.toJSON=="function"){if(!r||!uy(i))return i.toJSON(n,r);const l={aliasCount:0,count:1,res:void 0};r.anchors.set(i,l),r.onCreate=u=>{l.res=u,delete r.onCreate};const o=i.toJSON(n,r);return r.onCreate&&r.onCreate(o),o}return typeof i=="bigint"&&!(r!=null&&r.keep)?Number(i):i}class Ga{constructor(n){Object.defineProperty(this,Lt,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:r,maxAliasCount:l,onAnchor:o,reviver:u}={}){if(!qn(n))throw new TypeError("A document argument is required");const f={anchors:new Map,doc:n,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},h=Ct(this,"",f);if(typeof o=="function")for(const{count:p,res:g}of f.anchors.values())o(g,p);return typeof u=="function"?xr(u,{"":h},"",h):h}}class yl extends Ga{constructor(n){super(Ya),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n){let r;return Nn(n,{Node:(l,o)=>{if(o===this)return Nn.BREAK;o.anchor===this.source&&(r=o)}}),r}toJSON(n,r){if(!r)return{source:this.source};const{anchors:l,doc:o,maxAliasCount:u}=r,f=this.resolve(o);if(!f){const p=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(p)}let h=l.get(f);if(h||(Ct(f,null,r),h=l.get(f)),!h||h.res===void 0){const p="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(p)}if(u>=0&&(h.count+=1,h.aliasCount===0&&(h.aliasCount=rl(o,f,l)),h.count*h.aliasCount>u)){const p="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(p)}return h.res}toString(n,r,l){const o=`*${this.source}`;if(n){if(hh(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(u)}if(n.implicitKey)return`${o} `}return o}}function rl(i,n,r){if(Wn(n)){const l=n.resolve(i),o=r&&l&&r.get(l);return o?o.count*o.aliasCount:0}else if(Ie(n)){let l=0;for(const o of n.items){const u=rl(i,o,r);u>l&&(l=u)}return l}else if(Ce(n)){const l=rl(i,n.key,r),o=rl(i,n.value,r);return Math.max(l,o)}return 1}const gh=i=>!i||typeof i!="function"&&typeof i!="object";class ie extends Ga{constructor(n){super(Kt),this.value=n}toJSON(n,r){return r!=null&&r.keep?this.value:Ct(this.value,n,r)}toString(){return String(this.value)}}ie.BLOCK_FOLDED="BLOCK_FOLDED";ie.BLOCK_LITERAL="BLOCK_LITERAL";ie.PLAIN="PLAIN";ie.QUOTE_DOUBLE="QUOTE_DOUBLE";ie.QUOTE_SINGLE="QUOTE_SINGLE";const hy="tag:yaml.org,2002:";function py(i,n,r){if(n){const l=r.filter(u=>u.tag===n),o=l.find(u=>!u.format)??l[0];if(!o)throw new Error(`Tag ${n} not found`);return o}return r.find(l=>{var o;return((o=l.identify)==null?void 0:o.call(l,i))&&!l.format})}function Os(i,n,r){var S,T,E;if(qn(i)&&(i=i.contents),$e(i))return i;if(Ce(i)){const O=(T=(S=r.schema[En]).createNode)==null?void 0:T.call(S,r.schema,null,r);return O.items.push(i),O}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());const{aliasDuplicateObjects:l,onAnchor:o,onTagObj:u,schema:f,sourceObjects:h}=r;let p;if(l&&i&&typeof i=="object"){if(p=h.get(i),p)return p.anchor||(p.anchor=o(i)),new yl(p.anchor);p={anchor:null,node:null},h.set(i,p)}n!=null&&n.startsWith("!!")&&(n=hy+n.slice(2));let g=py(i,n,f.tags);if(!g){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){const O=new ie(i);return p&&(p.node=O),O}g=i instanceof Map?f[En]:Symbol.iterator in Object(i)?f[Pr]:f[En]}u&&(u(g),delete r.onTagObj);const x=g!=null&&g.createNode?g.createNode(r.schema,i,r):typeof((E=g==null?void 0:g.nodeClass)==null?void 0:E.from)=="function"?g.nodeClass.from(r.schema,i,r):new ie(i);return n?x.tag=n:g.default||(x.tag=g.tag),p&&(p.node=x),x}function al(i,n,r){let l=r;for(let o=n.length-1;o>=0;--o){const u=n[o];if(typeof u=="number"&&Number.isInteger(u)&&u>=0){const f=[];f[u]=l,l=f}else l=new Map([[u,l]])}return Os(l,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}const Cs=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done;class yh extends Ga{constructor(n,r){super(n),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(n){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(r.schema=n),r.items=r.items.map(l=>$e(l)||Ce(l)?l.clone(n):l),this.range&&(r.range=this.range.slice()),r}addIn(n,r){if(Cs(n))this.add(r);else{const[l,...o]=n,u=this.get(l,!0);if(Ie(u))u.addIn(o,r);else if(u===void 0&&this.schema)this.set(l,al(this.schema,o,r));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}deleteIn(n){const[r,...l]=n;if(l.length===0)return this.delete(r);const o=this.get(r,!0);if(Ie(o))return o.deleteIn(l);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}getIn(n,r){const[l,...o]=n,u=this.get(l,!0);return o.length===0?!r&&ve(u)?u.value:u:Ie(u)?u.getIn(o,r):void 0}hasAllNullValues(n){return this.items.every(r=>{if(!Ce(r))return!1;const l=r.value;return l==null||n&&ve(l)&&l.value==null&&!l.commentBefore&&!l.comment&&!l.tag})}hasIn(n){const[r,...l]=n;if(l.length===0)return this.has(r);const o=this.get(r,!0);return Ie(o)?o.hasIn(l):!1}setIn(n,r){const[l,...o]=n;if(o.length===0)this.set(l,r);else{const u=this.get(l,!0);if(Ie(u))u.setIn(o,r);else if(u===void 0&&this.schema)this.set(l,al(this.schema,o,r));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}}const my=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function en(i,n){return/^\n+$/.test(i)?i.substring(1):n?i.replace(/^(?! *$)/gm,n):i}const Bn=(i,n,r)=>i.endsWith(` `)?en(r,n):r.includes(` `)?` `+en(r,n):(i.endsWith(" ")?"":" ")+r,vh="flow",Va="block",sl="quoted";function vl(i,n,r="flow",{indentAtStart:l,lineWidth:o=80,minContentWidth:u=20,onFold:f,onOverflow:h}={}){if(!o||o<0)return i;oo-Math.max(2,u)?g.push(0):S=o-l);let T,E,O=!1,v=-1,w=-1,$=-1;r===Va&&(v=_d(i,v,n.length),v!==-1&&(S=v+p));for(let B;B=i[v+=1];){if(r===sl&&B==="\\"){switch(w=v,i[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}$=v}if(B===` `)r===Va&&(v=_d(i,v,n.length)),S=v+n.length+p,T=void 0;else{if(B===" "&&E&&E!==" "&&E!==` `&&E!==" "){const V=i[v+1];V&&V!==" "&&V!==` `&&V!==" "&&(T=v)}if(v>=S)if(T)g.push(T),S=T+p,T=void 0;else if(r===sl){for(;E===" "||E===" ";)E=B,B=i[v+=1],O=!0;const V=v>$+1?v-2:w-1;if(x[V])return i;g.push(V),x[V]=!0,S=V+p,T=void 0}else O=!0}E=B}if(O&&h&&h(),g.length===0)return i;f&&f();let A=i.slice(0,g[0]);for(let B=0;B({indentAtStart:n?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),Sl=i=>/^(%|---|\.\.\.)/m.test(i);function gy(i,n,r){if(!n||n<0)return!1;const l=n-r,o=i.length;if(o<=l)return!1;for(let u=0,f=0;ul)return!0;if(f=u+1,o-f<=l)return!1}return!0}function Ls(i,n){const r=JSON.stringify(i);if(n.options.doubleQuotedAsJSON)return r;const{implicitKey:l}=n,o=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(Sl(i)?" ":"");let f="",h=0;for(let p=0,g=r[p];g;g=r[++p])if(g===" "&&r[p+1]==="\\"&&r[p+2]==="n"&&(f+=r.slice(h,p)+"\\ ",p+=1,h=p,g="\\"),g==="\\")switch(r[p+1]){case"u":{f+=r.slice(h,p);const x=r.substr(p+2,4);switch(x){case"0000":f+="\\0";break;case"0007":f+="\\a";break;case"000b":f+="\\v";break;case"001b":f+="\\e";break;case"0085":f+="\\N";break;case"00a0":f+="\\_";break;case"2028":f+="\\L";break;case"2029":f+="\\P";break;default:x.substr(0,2)==="00"?f+="\\x"+x.substr(2):f+=r.substr(p,6)}p+=5,h=p+1}break;case"n":if(l||r[p+2]==='"'||r.length `;let S,T;for(T=r.length;T>0;--T){const j=r[T-1];if(j!==` `&&j!==" "&&j!==" ")break}let E=r.substring(T);const O=E.indexOf(` `);O===-1?S="-":r===E||O!==E.length-1?(S="+",u&&u()):S="",E&&(r=r.slice(0,-E.length),E[E.length-1]===` `&&(E=E.slice(0,-1)),E=E.replace(Wa,`$&${g}`));let v=!1,w,$=-1;for(w=0;w")+(v?g?"2":"1":"")+S;if(i&&(V+=" "+h(i.replace(/ ?[\r\n]+/g," ")),o&&o()),x)return r=r.replace(/\n+/g,`$&${g}`),`${V} ${g}${A}${r}${E}`;r=r.replace(/\n+/g,` $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);const W=vl(`${A}${r}${E}`,g,Va,wl(l,!0));return`${V} ${g}${W}`}function yy(i,n,r,l){const{type:o,value:u}=i,{actualString:f,implicitKey:h,indent:p,indentStep:g,inFlow:x}=n;if(h&&u.includes(` `)||x&&/[[\]{},]/.test(u))return Tr(u,n);if(!u||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return h||x||!u.includes(` `)?Tr(u,n):il(i,n,r,l);if(!h&&!x&&o!==ie.PLAIN&&u.includes(` `))return il(i,n,r,l);if(Sl(u)){if(p==="")return n.forceBlockIndent=!0,il(i,n,r,l);if(h&&p===g)return Tr(u,n)}const S=u.replace(/\n+/g,`$& ${p}`);if(f){const T=v=>{var w;return v.default&&v.tag!=="tag:yaml.org,2002:str"&&((w=v.test)==null?void 0:w.test(S))},{compat:E,tags:O}=n.doc.schema;if(O.some(T)||E!=null&&E.some(T))return Tr(u,n)}return h?S:vl(S,p,vh,wl(n,!1))}function Ps(i,n,r,l){const{implicitKey:o,inFlow:u}=n,f=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)});let{type:h}=i;h!==ie.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(f.value)&&(h=ie.QUOTE_DOUBLE);const p=x=>{switch(x){case ie.BLOCK_FOLDED:case ie.BLOCK_LITERAL:return o||u?Tr(f.value,n):il(f,n,r,l);case ie.QUOTE_DOUBLE:return Ls(f.value,n);case ie.QUOTE_SINGLE:return Ka(f.value,n);case ie.PLAIN:return yy(f,n,r,l);default:return null}};let g=p(h);if(g===null){const{defaultKeyType:x,defaultStringType:S}=n.options,T=o&&x||S;if(g=p(T),g===null)throw new Error(`Unsupported default string type ${T}`)}return g}function wh(i,n){const r=Object.assign({blockQuote:!0,commentString:my,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,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,n);let l;switch(r.collectionStyle){case"block":l=!1;break;case"flow":l=!0;break;default:l=null}return{anchors:new Set,doc:i,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:l,options:r}}function vy(i,n){var o;if(n.tag){const u=i.filter(f=>f.tag===n.tag);if(u.length>0)return u.find(f=>f.format===n.format)??u[0]}let r,l;if(ve(n)){l=n.value;let u=i.filter(f=>{var h;return(h=f.identify)==null?void 0:h.call(f,l)});if(u.length>1){const f=u.filter(h=>h.test);f.length>0&&(u=f)}r=u.find(f=>f.format===n.format)??u.find(f=>!f.format)}else l=n,r=i.find(u=>u.nodeClass&&l instanceof u.nodeClass);if(!r){const u=((o=l==null?void 0:l.constructor)==null?void 0:o.name)??typeof l;throw new Error(`Tag not resolved for ${u} value`)}return r}function wy(i,n,{anchors:r,doc:l}){if(!l.directives)return"";const o=[],u=(ve(i)||Ie(i))&&i.anchor;u&&hh(u)&&(r.add(u),o.push(`&${u}`));const f=i.tag?i.tag:n.default?null:n.tag;return f&&o.push(l.directives.tagString(f)),o.join(" ")}function Or(i,n,r,l){var p;if(Ce(i))return i.toString(n,r,l);if(Wn(i)){if(n.doc.directives)return i.toString(n);if((p=n.resolvedAliases)!=null&&p.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(i):n.resolvedAliases=new Set([i]),i=i.resolve(n.doc)}let o;const u=$e(i)?i:n.doc.createNode(i,{onTagObj:g=>o=g});o||(o=vy(n.doc.schema.tags,u));const f=wy(u,o,n);f.length>0&&(n.indentAtStart=(n.indentAtStart??0)+f.length+1);const h=typeof o.stringify=="function"?o.stringify(u,n,r,l):ve(u)?Ps(u,n,r,l):u.toString(n,r,l);return f?ve(u)||h[0]==="{"||h[0]==="["?`${f} ${h}`:`${f} ${n.indent}${h}`:h}function Sy({key:i,value:n},r,l,o){const{allNullValues:u,doc:f,indent:h,indentStep:p,options:{commentString:g,indentSeq:x,simpleKeys:S}}=r;let T=$e(i)&&i.comment||null;if(S){if(T)throw new Error("With simple keys, key nodes cannot have comments");if(Ie(i)||!$e(i)&&typeof i=="object"){const Y="With simple keys, collection cannot be used as a key value";throw new Error(Y)}}let E=!S&&(!i||T&&n==null&&!r.inFlow||Ie(i)||(ve(i)?i.type===ie.BLOCK_FOLDED||i.type===ie.BLOCK_LITERAL:typeof i=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!E&&(S||!u),indent:h+p});let O=!1,v=!1,w=Or(i,r,()=>O=!0,()=>v=!0);if(!E&&!r.inFlow&&w.length>1024){if(S)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");E=!0}if(r.inFlow){if(u||n==null)return O&&l&&l(),w===""?"?":E?`? ${w}`:w}else if(u&&!S||n==null&&E)return w=`? ${w}`,T&&!O?w+=Bn(w,r.indent,g(T)):v&&o&&o(),w;O&&(T=null),E?(T&&(w+=Bn(w,r.indent,g(T))),w=`? ${w} ${h}:`):(w=`${w}:`,T&&(w+=Bn(w,r.indent,g(T))));let $,A,B;$e(n)?($=!!n.spaceBefore,A=n.commentBefore,B=n.comment):($=!1,A=null,B=null,n&&typeof n=="object"&&(n=f.createNode(n))),r.implicitKey=!1,!E&&!T&&ve(n)&&(r.indentAtStart=w.length+1),v=!1,!x&&p.length>=2&&!r.inFlow&&!E&&jr(n)&&!n.flow&&!n.tag&&!n.anchor&&(r.indent=r.indent.substring(2));let V=!1;const W=Or(n,r,()=>V=!0,()=>v=!0);let j=" ";if(T||$||A){if(j=$?` `:"",A){const Y=g(A);j+=` ${en(Y,r.indent)}`}W===""&&!r.inFlow?j===` `&&(j=` `):j+=` ${r.indent}`}else if(!E&&Ie(n)){const Y=W[0],z=W.indexOf(` `),P=z!==-1,le=r.inFlow??n.flow??n.items.length===0;if(P||!le){let ue=!1;if(P&&(Y==="&"||Y==="!")){let M=W.indexOf(" ");Y==="&"&&M!==-1&&Mi===Hi||typeof i=="symbol"&&i.description===Hi,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ie(Symbol(Hi)),{addToJSMap:kh}),stringify:()=>Hi},ky=(i,n)=>(tn.identify(n)||ve(n)&&(!n.type||n.type===ie.PLAIN)&&tn.identify(n.value))&&(i==null?void 0:i.doc.schema.tags.some(r=>r.tag===tn.tag&&r.default));function kh(i,n,r){if(r=i&&Wn(r)?r.resolve(i.doc):r,jr(r))for(const l of r.items)$a(i,n,l);else if(Array.isArray(r))for(const l of r)$a(i,n,l);else $a(i,n,r)}function $a(i,n,r){const l=i&&Wn(r)?r.resolve(i.doc):r;if(!Mr(l))throw new Error("Merge sources must be maps or map aliases");const o=l.toJSON(null,i,Map);for(const[u,f]of o)n instanceof Map?n.has(u)||n.set(u,f):n instanceof Set?n.add(u):Object.prototype.hasOwnProperty.call(n,u)||Object.defineProperty(n,u,{value:f,writable:!0,enumerable:!0,configurable:!0});return n}function Eh(i,n,{key:r,value:l}){if($e(r)&&r.addToJSMap)r.addToJSMap(i,n,l);else if(ky(i,r))kh(i,n,l);else{const o=Ct(r,"",i);if(n instanceof Map)n.set(o,Ct(l,o,i));else if(n instanceof Set)n.add(o);else{const u=Ey(r,o,i),f=Ct(l,u,i);u in n?Object.defineProperty(n,u,{value:f,writable:!0,enumerable:!0,configurable:!0}):n[u]=f}}return n}function Ey(i,n,r){if(n===null)return"";if(typeof n!="object")return String(n);if($e(i)&&(r!=null&&r.doc)){const l=wh(r.doc,{});l.anchors=new Set;for(const u of r.anchors.keys())l.anchors.add(u.anchor);l.inFlow=!0,l.inStringifyKey=!0;const o=i.toString(l);if(!r.mapKeyWarned){let u=JSON.stringify(o);u.length>40&&(u=u.substring(0,36)+'..."'),Sh(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return o}return JSON.stringify(n)}function Xa(i,n,r){const l=Os(i,void 0,r),o=Os(n,void 0,r);return new Ze(l,o)}class Ze{constructor(n,r=null){Object.defineProperty(this,Lt,{value:ah}),this.key=n,this.value=r}clone(n){let{key:r,value:l}=this;return $e(r)&&(r=r.clone(n)),$e(l)&&(l=l.clone(n)),new Ze(r,l)}toJSON(n,r){const l=r!=null&&r.mapAsMap?new Map:{};return Eh(r,l,this)}toString(n,r,l){return n!=null&&n.doc?Sy(this,n,r,l):JSON.stringify(this)}}function Nh(i,n,r){return(n.inFlow??i.flow?xy:Ny)(i,n,r)}function Ny({comment:i,items:n},r,{blockItemPrefix:l,flowChars:o,itemIndent:u,onChompKeep:f,onComment:h}){const{indent:p,options:{commentString:g}}=r,x=Object.assign({},r,{indent:u,type:null});let S=!1;const T=[];for(let O=0;Ow=null,()=>S=!0);w&&($+=Bn($,u,g(w))),S&&w&&(S=!1),T.push(l+$)}let E;if(T.length===0)E=o.start+o.end;else{E=T[0];for(let O=1;Ow=null);Ox||$.includes(` `))&&(g=!0),S.push($),x=S.length}const{start:T,end:E}=r;if(S.length===0)return T+E;if(!g){const O=S.reduce((v,w)=>v+w.length+2,2);g=n.options.lineWidth>0&&O>n.options.lineWidth}if(g){let O=T;for(const v of S)O+=v?` ${u}${o}${v}`:` `;return`${O} ${o}${E}`}else return`${T}${f}${S.join(" ")}${f}${E}`}function ul({indent:i,options:{commentString:n}},r,l,o){if(l&&o&&(l=l.replace(/^\n+/,"")),l){const u=en(n(l),i);r.push(u.trimStart())}}function zn(i,n){const r=ve(n)?n.value:n;for(const l of i)if(Ce(l)&&(l.key===n||l.key===r||ve(l.key)&&l.key.value===r))return l}class wt extends yh{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(En,n),this.items=[]}static from(n,r,l){const{keepUndefined:o,replacer:u}=l,f=new this(n),h=(p,g)=>{if(typeof u=="function")g=u.call(r,p,g);else if(Array.isArray(u)&&!u.includes(p))return;(g!==void 0||o)&&f.items.push(Xa(p,g,l))};if(r instanceof Map)for(const[p,g]of r)h(p,g);else if(r&&typeof r=="object")for(const p of Object.keys(r))h(p,r[p]);return typeof n.sortMapEntries=="function"&&f.items.sort(n.sortMapEntries),f}add(n,r){var f;let l;Ce(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new Ze(n,n==null?void 0:n.value):l=new Ze(n.key,n.value);const o=zn(this.items,l.key),u=(f=this.schema)==null?void 0:f.sortMapEntries;if(o){if(!r)throw new Error(`Key ${l.key} already set`);ve(o.value)&&gh(l.value)?o.value.value=l.value:o.value=l.value}else if(u){const h=this.items.findIndex(p=>u(l,p)<0);h===-1?this.items.push(l):this.items.splice(h,0,l)}else this.items.push(l)}delete(n){const r=zn(this.items,n);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(n,r){const l=zn(this.items,n),o=l==null?void 0:l.value;return(!r&&ve(o)?o.value:o)??void 0}has(n){return!!zn(this.items,n)}set(n,r){this.add(new Ze(n,r),!0)}toJSON(n,r,l){const o=l?new l:r!=null&&r.mapAsMap?new Map:{};r!=null&&r.onCreate&&r.onCreate(o);for(const u of this.items)Eh(r,o,u);return o}toString(n,r,l){if(!n)return JSON.stringify(this);for(const o of this.items)if(!Ce(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),Nh(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:r})}}const Rr={collection:"map",default:!0,nodeClass:wt,tag:"tag:yaml.org,2002:map",resolve(i,n){return Mr(i)||n("Expected a mapping for this tag"),i},createNode:(i,n,r)=>wt.from(i,n,r)};class xn extends yh{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Pr,n),this.items=[]}add(n){this.items.push(n)}delete(n){const r=Qi(n);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(n,r){const l=Qi(n);if(typeof l!="number")return;const o=this.items[l];return!r&&ve(o)?o.value:o}has(n){const r=Qi(n);return typeof r=="number"&&r=0?n:null}const Dr={collection:"seq",default:!0,nodeClass:xn,tag:"tag:yaml.org,2002:seq",resolve(i,n){return jr(i)||n("Expected a sequence for this tag"),i},createNode:(i,n,r)=>xn.from(i,n,r)},kl={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,n,r,l){return n=Object.assign({actualString:!0},n),Ps(i,n,r,l)}},El={identify:i=>i==null,createNode:()=>new ie(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ie(null),stringify:({source:i},n)=>typeof i=="string"&&El.test.test(i)?i:n.options.nullStr},Za={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new ie(i[0]==="t"||i[0]==="T"),stringify({source:i,value:n},r){if(i&&Za.test.test(i)){const l=i[0]==="t"||i[0]==="T";if(n===l)return i}return n?r.options.trueStr:r.options.falseStr}};function Dt({format:i,minFractionDigits:n,tag:r,value:l}){if(typeof l=="bigint")return String(l);const o=typeof l=="number"?l:Number(l);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let u=JSON.stringify(l);if(!i&&n&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let f=u.indexOf(".");f<0&&(f=u.length,u+=".");let h=n-(u.length-f-1);for(;h-- >0;)u+="0"}return u}const xh={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Dt},Th={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():Dt(i)}},_h={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){const n=new ie(parseFloat(i)),r=i.indexOf(".");return r!==-1&&i[i.length-1]==="0"&&(n.minFractionDigits=i.length-r-1),n},stringify:Dt},Nl=i=>typeof i=="bigint"||Number.isInteger(i),eu=(i,n,r,{intAsBigInt:l})=>l?BigInt(i):parseInt(i.substring(n),r);function Ch(i,n,r){const{value:l}=i;return Nl(l)&&l>=0?r+l.toString(n):Dt(i)}const Lh={identify:i=>Nl(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,n,r)=>eu(i,2,8,r),stringify:i=>Ch(i,8,"0o")},Oh={identify:Nl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,n,r)=>eu(i,0,10,r),stringify:Dt},Ih={identify:i=>Nl(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,n,r)=>eu(i,2,16,r),stringify:i=>Ch(i,16,"0x")},Ty=[Rr,Dr,kl,El,Za,Lh,Oh,Ih,xh,Th,_h];function Cd(i){return typeof i=="bigint"||Number.isInteger(i)}const Ji=({value:i})=>JSON.stringify(i),_y=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:Ji},{identify:i=>i==null,createNode:()=>new ie(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ji},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:i=>i==="true",stringify:Ji},{identify:Cd,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,n,{intAsBigInt:r})=>r?BigInt(i):parseInt(i,10),stringify:({value:i})=>Cd(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:Ji}],Cy={default:!0,tag:"",test:/^/,resolve(i,n){return n(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},Ly=[Rr,Dr].concat(_y,Cy),tu={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,n){if(typeof Buffer=="function")return Buffer.from(i,"base64");if(typeof atob=="function"){const r=atob(i.replace(/[\n\r]/g,"")),l=new Uint8Array(r.length);for(let o=0;o1&&n("Each pair must have its own sequence indicator");const o=l.items[0]||new Ze(new ie(null));if(l.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${l.commentBefore} ${o.key.commentBefore}`:l.commentBefore),l.comment){const u=o.value??o.key;u.comment=u.comment?`${l.comment} ${u.comment}`:l.comment}l=o}i.items[r]=Ce(l)?l:new Ze(l)}}else n("Expected a sequence for this tag");return i}function Ah(i,n,r){const{replacer:l}=r,o=new xn(i);o.tag="tag:yaml.org,2002:pairs";let u=0;if(n&&Symbol.iterator in Object(n))for(let f of n){typeof l=="function"&&(f=l.call(n,String(u++),f));let h,p;if(Array.isArray(f))if(f.length===2)h=f[0],p=f[1];else throw new TypeError(`Expected [key, value] tuple: ${f}`);else if(f&&f instanceof Object){const g=Object.keys(f);if(g.length===1)h=g[0],p=f[h];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else h=f;o.items.push(Xa(h,p,r))}return o}const nu={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:$h,createNode:Ah};class Cr extends xn{constructor(){super(),this.add=wt.prototype.add.bind(this),this.delete=wt.prototype.delete.bind(this),this.get=wt.prototype.get.bind(this),this.has=wt.prototype.has.bind(this),this.set=wt.prototype.set.bind(this),this.tag=Cr.tag}toJSON(n,r){if(!r)return super.toJSON(n);const l=new Map;r!=null&&r.onCreate&&r.onCreate(l);for(const o of this.items){let u,f;if(Ce(o)?(u=Ct(o.key,"",r),f=Ct(o.value,u,r)):u=Ct(o,"",r),l.has(u))throw new Error("Ordered maps must not include duplicate keys");l.set(u,f)}return l}static from(n,r,l){const o=Ah(n,r,l),u=new this;return u.items=o.items,u}}Cr.tag="tag:yaml.org,2002:omap";const ru={collection:"seq",identify:i=>i instanceof Map,nodeClass:Cr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,n){const r=$h(i,n),l=[];for(const{key:o}of r.items)ve(o)&&(l.includes(o.value)?n(`Ordered maps must not include duplicate keys: ${o.value}`):l.push(o.value));return Object.assign(new Cr,r)},createNode:(i,n,r)=>Cr.from(i,n,r)};function Ph({value:i,source:n},r){return n&&(i?Mh:jh).test.test(n)?n:i?r.options.trueStr:r.options.falseStr}const Mh={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ie(!0),stringify:Ph},jh={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ie(!1),stringify:Ph},Oy={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Dt},Iy={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():Dt(i)}},$y={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){const n=new ie(parseFloat(i.replace(/_/g,""))),r=i.indexOf(".");if(r!==-1){const l=i.substring(r+1).replace(/_/g,"");l[l.length-1]==="0"&&(n.minFractionDigits=l.length)}return n},stringify:Dt},Ms=i=>typeof i=="bigint"||Number.isInteger(i);function xl(i,n,r,{intAsBigInt:l}){const o=i[0];if((o==="-"||o==="+")&&(n+=1),i=i.substring(n).replace(/_/g,""),l){switch(r){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}const f=BigInt(i);return o==="-"?BigInt(-1)*f:f}const u=parseInt(i,r);return o==="-"?-1*u:u}function su(i,n,r){const{value:l}=i;if(Ms(l)){const o=l.toString(n);return l<0?"-"+r+o.substr(1):r+o}return Dt(i)}const Ay={identify:Ms,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,n,r)=>xl(i,2,2,r),stringify:i=>su(i,2,"0b")},Py={identify:Ms,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,n,r)=>xl(i,1,8,r),stringify:i=>su(i,8,"0")},My={identify:Ms,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,n,r)=>xl(i,0,10,r),stringify:Dt},jy={identify:Ms,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,n,r)=>xl(i,2,16,r),stringify:i=>su(i,16,"0x")};class Lr extends wt{constructor(n){super(n),this.tag=Lr.tag}add(n){let r;Ce(n)?r=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?r=new Ze(n.key,null):r=new Ze(n,null),zn(this.items,r.key)||this.items.push(r)}get(n,r){const l=zn(this.items,n);return!r&&Ce(l)?ve(l.key)?l.key.value:l.key:l}set(n,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const l=zn(this.items,n);l&&!r?this.items.splice(this.items.indexOf(l),1):!l&&r&&this.items.push(new Ze(n))}toJSON(n,r){return super.toJSON(n,r,Set)}toString(n,r,l){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),r,l);throw new Error("Set items must all have null values")}static from(n,r,l){const{replacer:o}=l,u=new this(n);if(r&&Symbol.iterator in Object(r))for(let f of r)typeof o=="function"&&(f=o.call(r,f,f)),u.items.push(Xa(f,null,l));return u}}Lr.tag="tag:yaml.org,2002:set";const iu={collection:"map",identify:i=>i instanceof Set,nodeClass:Lr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,n,r)=>Lr.from(i,n,r),resolve(i,n){if(Mr(i)){if(i.hasAllNullValues(!0))return Object.assign(new Lr,i);n("Set items must all have null values")}else n("Expected a mapping for this tag");return i}};function lu(i,n){const r=i[0],l=r==="-"||r==="+"?i.substring(1):i,o=f=>n?BigInt(f):Number(f),u=l.replace(/_/g,"").split(":").reduce((f,h)=>f*o(60)+o(h),o(0));return r==="-"?o(-1)*u:u}function Rh(i){let{value:n}=i,r=f=>f;if(typeof n=="bigint")r=f=>BigInt(f);else if(isNaN(n)||!isFinite(n))return Dt(i);let l="";n<0&&(l="-",n*=r(-1));const o=r(60),u=[n%o];return n<60?u.unshift(0):(n=(n-u[0])/o,u.unshift(n%o),n>=60&&(n=(n-u[0])/o,u.unshift(n))),l+u.map(f=>String(f).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Dh={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,n,{intAsBigInt:r})=>lu(i,r),stringify:Rh},bh={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>lu(i,!1),stringify:Rh},Tl={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){const n=i.match(Tl.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,l,o,u,f,h]=n.map(Number),p=n[7]?Number((n[7]+"00").substr(1,3)):0;let g=Date.UTC(r,l-1,o,u||0,f||0,h||0,p);const x=n[8];if(x&&x!=="Z"){let S=lu(x,!1);Math.abs(S)<30&&(S*=60),g-=6e4*S}return new Date(g)},stringify:({value:i})=>i.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Ld=[Rr,Dr,kl,El,Mh,jh,Ay,Py,My,jy,Oy,Iy,$y,tu,tn,ru,nu,iu,Dh,bh,Tl],Od=new Map([["core",Ty],["failsafe",[Rr,Dr,kl]],["json",Ly],["yaml11",Ld],["yaml-1.1",Ld]]),Id={binary:tu,bool:Za,float:_h,floatExp:Th,floatNaN:xh,floatTime:bh,int:Oh,intHex:Ih,intOct:Lh,intTime:Dh,map:Rr,merge:tn,null:El,omap:ru,pairs:nu,seq:Dr,set:iu,timestamp:Tl},Ry={"tag:yaml.org,2002:binary":tu,"tag:yaml.org,2002:merge":tn,"tag:yaml.org,2002:omap":ru,"tag:yaml.org,2002:pairs":nu,"tag:yaml.org,2002:set":iu,"tag:yaml.org,2002:timestamp":Tl};function Aa(i,n,r){const l=Od.get(n);if(l&&!i)return r&&!l.includes(tn)?l.concat(tn):l.slice();let o=l;if(!o)if(Array.isArray(i))o=[];else{const u=Array.from(Od.keys()).filter(f=>f!=="yaml11").map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${u} or define customTags array`)}if(Array.isArray(i))for(const u of i)o=o.concat(u);else typeof i=="function"&&(o=i(o.slice()));return r&&(o=o.concat(tn)),o.reduce((u,f)=>{const h=typeof f=="string"?Id[f]:f;if(!h){const p=JSON.stringify(f),g=Object.keys(Id).map(x=>JSON.stringify(x)).join(", ");throw new Error(`Unknown custom tag ${p}; use one of ${g}`)}return u.includes(h)||u.push(h),u},[])}const Dy=(i,n)=>i.keyn.key?1:0;class _l{constructor({compat:n,customTags:r,merge:l,resolveKnownTags:o,schema:u,sortMapEntries:f,toStringDefaults:h}){this.compat=Array.isArray(n)?Aa(n,"compat"):n?Aa(null,n):null,this.name=typeof u=="string"&&u||"core",this.knownTags=o?Ry:{},this.tags=Aa(r,this.name,l),this.toStringOptions=h??null,Object.defineProperty(this,En,{value:Rr}),Object.defineProperty(this,Kt,{value:kl}),Object.defineProperty(this,Pr,{value:Dr}),this.sortMapEntries=typeof f=="function"?f:f===!0?Dy:null}clone(){const n=Object.create(_l.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function by(i,n){var p;const r=[];let l=n.directives===!0;if(n.directives!==!1&&i.directives){const g=i.directives.toString(i);g?(r.push(g),l=!0):i.directives.docStart&&(l=!0)}l&&r.push("---");const o=wh(i,n),{commentString:u}=o.options;if(i.commentBefore){r.length!==1&&r.unshift("");const g=u(i.commentBefore);r.unshift(en(g,""))}let f=!1,h=null;if(i.contents){if($e(i.contents)){if(i.contents.spaceBefore&&l&&r.push(""),i.contents.commentBefore){const S=u(i.contents.commentBefore);r.push(en(S,""))}o.forceBlockIndent=!!i.comment,h=i.contents.comment}const g=h?void 0:()=>f=!0;let x=Or(i.contents,o,()=>h=null,g);h&&(x+=Bn(x,"",u(h))),(x[0]==="|"||x[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${x}`:r.push(x)}else r.push(Or(i.contents,o));if((p=i.directives)!=null&&p.docEnd)if(i.comment){const g=u(i.comment);g.includes(` `)?(r.push("..."),r.push(en(g,""))):r.push(`... ${g}`)}else r.push("...");else{let g=i.comment;g&&f&&(g=g.replace(/^\n+/,"")),g&&((!f||h)&&r[r.length-1]!==""&&r.push(""),r.push(en(u(g),"")))}return r.join(` `)+` `}class br{constructor(n,r,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Lt,{value:Ua});let o=null;typeof r=="function"||Array.isArray(r)?o=r:l===void 0&&r&&(l=r,r=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},l);this.options=u;let{version:f}=u;l!=null&&l._directives?(this.directives=l._directives.atDocument(),this.directives.yaml.explicit&&(f=this.directives.yaml.version)):this.directives=new nt({version:f}),this.setSchema(f,l),this.contents=n===void 0?null:this.createNode(n,o,l)}clone(){const n=Object.create(br.prototype,{[Lt]:{value:Ua}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=$e(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){vr(this.contents)&&this.contents.add(n)}addIn(n,r){vr(this.contents)&&this.contents.addIn(n,r)}createAlias(n,r){if(!n.anchor){const l=ph(this);n.anchor=!r||l.has(r)?mh(r||"a",l):r}return new yl(n.anchor)}createNode(n,r,l){let o;if(typeof r=="function")n=r.call({"":n},"",n),o=r;else if(Array.isArray(r)){const w=A=>typeof A=="number"||A instanceof String||A instanceof Number,$=r.filter(w).map(String);$.length>0&&(r=r.concat($)),o=r}else l===void 0&&r&&(l=r,r=void 0);const{aliasDuplicateObjects:u,anchorPrefix:f,flow:h,keepUndefined:p,onTagObj:g,tag:x}=l??{},{onAnchor:S,setAnchors:T,sourceObjects:E}=dy(this,f||"a"),O={aliasDuplicateObjects:u??!0,keepUndefined:p??!1,onAnchor:S,onTagObj:g,replacer:o,schema:this.schema,sourceObjects:E},v=Os(n,x,O);return h&&Ie(v)&&(v.flow=!0),T(),v}createPair(n,r,l={}){const o=this.createNode(n,null,l),u=this.createNode(r,null,l);return new Ze(o,u)}delete(n){return vr(this.contents)?this.contents.delete(n):!1}deleteIn(n){return Cs(n)?this.contents==null?!1:(this.contents=null,!0):vr(this.contents)?this.contents.deleteIn(n):!1}get(n,r){return Ie(this.contents)?this.contents.get(n,r):void 0}getIn(n,r){return Cs(n)?!r&&ve(this.contents)?this.contents.value:this.contents:Ie(this.contents)?this.contents.getIn(n,r):void 0}has(n){return Ie(this.contents)?this.contents.has(n):!1}hasIn(n){return Cs(n)?this.contents!==void 0:Ie(this.contents)?this.contents.hasIn(n):!1}set(n,r){this.contents==null?this.contents=al(this.schema,[n],r):vr(this.contents)&&this.contents.set(n,r)}setIn(n,r){Cs(n)?this.contents=r:this.contents==null?this.contents=al(this.schema,Array.from(n),r):vr(this.contents)&&this.contents.setIn(n,r)}setSchema(n,r={}){typeof n=="number"&&(n=String(n));let l;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new nt({version:"1.1"}),l={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new nt({version:n}),l={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,l=null;break;default:{const o=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(l)this.schema=new _l(Object.assign(l,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:r,mapAsMap:l,maxAliasCount:o,onAnchor:u,reviver:f}={}){const h={anchors:new Map,doc:this,keep:!n,mapAsMap:l===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},p=Ct(this.contents,r??"",h);if(typeof u=="function")for(const{count:g,res:x}of h.anchors.values())u(x,g);return typeof f=="function"?xr(f,{"":p},"",p):p}toJSON(n,r){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:r})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const r=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return by(this,n)}}function vr(i){if(Ie(i))return!0;throw new Error("Expected a YAML collection as document contents")}class ou extends Error{constructor(n,r,l,o){super(),this.name=n,this.code=l,this.message=o,this.pos=r}}class Un extends ou{constructor(n,r,l){super("YAMLParseError",n,r,l)}}class Fh extends ou{constructor(n,r,l){super("YAMLWarning",n,r,l)}}const cl=(i,n)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(h=>n.linePos(h));const{line:l,col:o}=r.linePos[0];r.message+=` at line ${l}, column ${o}`;let u=o-1,f=i.substring(n.lineStarts[l-1],n.lineStarts[l]).replace(/[\n\r]+$/,"");if(u>=60&&f.length>80){const h=Math.min(u-39,f.length-79);f="…"+f.substring(h),u-=h-1}if(f.length>80&&(f=f.substring(0,79)+"…"),l>1&&/^ *$/.test(f.substring(0,u))){let h=i.substring(n.lineStarts[l-2],n.lineStarts[l-1]);h.length>80&&(h=h.substring(0,79)+`… `),f=h+f}if(/[^ ]/.test(f)){let h=1;const p=r.linePos[1];p&&p.line===l&&p.col>o&&(h=Math.max(1,Math.min(p.col-o,80-u)));const g=" ".repeat(u)+"^".repeat(h);r.message+=`: ${f} ${g} `}};function Ir(i,{flow:n,indicator:r,next:l,offset:o,onError:u,parentIndent:f,startOnNewline:h}){let p=!1,g=h,x=h,S="",T="",E=!1,O=!1,v=null,w=null,$=null,A=null,B=null,V=null,W=null;for(const z of i)switch(O&&(z.type!=="space"&&z.type!=="newline"&&z.type!=="comma"&&u(z.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),O=!1),v&&(g&&z.type!=="comment"&&z.type!=="newline"&&u(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),v=null),z.type){case"space":!n&&(r!=="doc-start"||(l==null?void 0:l.type)!=="flow-collection")&&z.source.includes(" ")&&(v=z),x=!0;break;case"comment":{x||u(z,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const P=z.source.substring(1)||" ";S?S+=T+P:S=P,T="",g=!1;break}case"newline":g?S?S+=z.source:p=!0:T+=z.source,g=!0,E=!0,(w||$)&&(A=z),x=!0;break;case"anchor":w&&u(z,"MULTIPLE_ANCHORS","A node can have at most one anchor"),z.source.endsWith(":")&&u(z.offset+z.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),w=z,W===null&&(W=z.offset),g=!1,x=!1,O=!0;break;case"tag":{$&&u(z,"MULTIPLE_TAGS","A node can have at most one tag"),$=z,W===null&&(W=z.offset),g=!1,x=!1,O=!0;break}case r:(w||$)&&u(z,"BAD_PROP_ORDER",`Anchors and tags must be after the ${z.source} indicator`),V&&u(z,"UNEXPECTED_TOKEN",`Unexpected ${z.source} in ${n??"collection"}`),V=z,g=r==="seq-item-ind"||r==="explicit-key-ind",x=!1;break;case"comma":if(n){B&&u(z,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),B=z,g=!1,x=!1;break}default:u(z,"UNEXPECTED_TOKEN",`Unexpected ${z.type} token`),g=!1,x=!1}const j=i[i.length-1],Y=j?j.offset+j.source.length:o;return O&&l&&l.type!=="space"&&l.type!=="newline"&&l.type!=="comma"&&(l.type!=="scalar"||l.source!=="")&&u(l.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v&&(g&&v.indent<=f||(l==null?void 0:l.type)==="block-map"||(l==null?void 0:l.type)==="block-seq")&&u(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:B,found:V,spaceBefore:p,comment:S,hasNewline:E,anchor:w,tag:$,newlineAfterProp:A,end:Y,start:W??Y}}function Is(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(` `))return!0;if(i.end){for(const n of i.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of i.items){for(const r of n.start)if(r.type==="newline")return!0;if(n.sep){for(const r of n.sep)if(r.type==="newline")return!0}if(Is(n.key)||Is(n.value))return!0}return!1;default:return!0}}function qa(i,n,r){if((n==null?void 0:n.type)==="flow-collection"){const l=n.end[0];l.indent===i&&(l.source==="]"||l.source==="}")&&Is(n)&&r(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Bh(i,n,r){const{uniqueKeys:l}=i.options;if(l===!1)return!1;const o=typeof l=="function"?l:(u,f)=>u===f||ve(u)&&ve(f)&&u.value===f.value;return n.some(u=>o(u.key,r))}const $d="All mapping items must start at the same column";function Fy({composeNode:i,composeEmptyNode:n},r,l,o,u){var x;const f=(u==null?void 0:u.nodeClass)??wt,h=new f(r.schema);r.atRoot&&(r.atRoot=!1);let p=l.offset,g=null;for(const S of l.items){const{start:T,key:E,sep:O,value:v}=S,w=Ir(T,{indicator:"explicit-key-ind",next:E??(O==null?void 0:O[0]),offset:p,onError:o,parentIndent:l.indent,startOnNewline:!0}),$=!w.found;if($){if(E&&(E.type==="block-seq"?o(p,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in E&&E.indent!==l.indent&&o(p,"BAD_INDENT",$d)),!w.anchor&&!w.tag&&!O){g=w.end,w.comment&&(h.comment?h.comment+=` `+w.comment:h.comment=w.comment);continue}(w.newlineAfterProp||Is(E))&&o(E??T[T.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((x=w.found)==null?void 0:x.indent)!==l.indent&&o(p,"BAD_INDENT",$d);r.atKey=!0;const A=w.end,B=E?i(r,E,w,o):n(r,A,T,null,w,o);r.schema.compat&&qa(l.indent,E,o),r.atKey=!1,Bh(r,h.items,B)&&o(A,"DUPLICATE_KEY","Map keys must be unique");const V=Ir(O??[],{indicator:"map-value-ind",next:v,offset:B.range[2],onError:o,parentIndent:l.indent,startOnNewline:!E||E.type==="block-scalar"});if(p=V.end,V.found){$&&((v==null?void 0:v.type)==="block-map"&&!V.hasNewline&&o(p,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&w.starti&&(i.type==="block-map"||i.type==="block-seq");function zy({composeNode:i,composeEmptyNode:n},r,l,o,u){const f=l.start.source==="{",h=f?"flow map":"flow sequence",p=(u==null?void 0:u.nodeClass)??(f?wt:xn),g=new p(r.schema);g.flow=!0;const x=r.atRoot;x&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let S=l.offset+l.start.source.length;for(let w=0;w0){const w=js(O,v,r.options.strict,o);w.comment&&(g.comment?g.comment+=` `+w.comment:g.comment=w.comment),g.range=[l.offset,v,w.offset]}else g.range=[l.offset,v,v];return g}function ja(i,n,r,l,o,u){const f=r.type==="block-map"?Fy(i,n,r,l,u):r.type==="block-seq"?By(i,n,r,l,u):zy(i,n,r,l,u),h=f.constructor;return o==="!"||o===h.tagName?(f.tag=h.tagName,f):(o&&(f.tag=o),f)}function Uy(i,n,r,l,o){var T;const u=l.tag,f=u?n.directives.tagName(u.source,E=>o(u,"TAG_RESOLVE_FAILED",E)):null;if(r.type==="block-seq"){const{anchor:E,newlineAfterProp:O}=l,v=E&&u?E.offset>u.offset?E:u:E??u;v&&(!O||O.offsetE.tag===f&&E.collection===h);if(!p){const E=n.schema.knownTags[f];if(E&&E.collection===h)n.schema.tags.push(Object.assign({},E,{default:!1})),p=E;else return E!=null&&E.collection?o(u,"BAD_COLLECTION_TYPE",`${E.tag} used for ${h} collection, but expects ${E.collection}`,!0):o(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),ja(i,n,r,o,f)}const g=ja(i,n,r,o,f,p),x=((T=p.resolve)==null?void 0:T.call(p,g,E=>o(u,"TAG_RESOLVE_FAILED",E),n.options))??g,S=$e(x)?x:new ie(x);return S.range=g.range,S.tag=f,p!=null&&p.format&&(S.format=p.format),S}function zh(i,n,r){const l=n.offset,o=Vy(n,i.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[l,l,l]};const u=o.mode===">"?ie.BLOCK_FOLDED:ie.BLOCK_LITERAL,f=n.source?Ky(n.source):[];let h=f.length;for(let v=f.length-1;v>=0;--v){const w=f[v][1];if(w===""||w==="\r")h=v;else break}if(h===0){const v=o.chomp==="+"&&f.length>0?` `.repeat(Math.max(1,f.length-1)):"";let w=l+o.length;return n.source&&(w+=n.source.length),{value:v,type:u,comment:o.comment,range:[l,w,w]}}let p=n.indent+o.indent,g=n.offset+o.length,x=0;for(let v=0;vp&&(p=w.length);else{w.length=h;--v)f[v][0].length>p&&(h=v+1);let S="",T="",E=!1;for(let v=0;vp||$[0]===" "?(T===" "?T=` `:!E&&T===` `&&(T=` `),S+=T+w.slice(p)+$,T=` `,E=!0):$===""?T===` `?S+=` `:T=` `:(S+=T+$,T=" ",E=!1)}switch(o.chomp){case"-":break;case"+":for(let v=h;vr(l+T,E,O);switch(o){case"scalar":h=ie.PLAIN,p=Wy(u,g);break;case"single-quoted-scalar":h=ie.QUOTE_SINGLE,p=qy(u,g);break;case"double-quoted-scalar":h=ie.QUOTE_DOUBLE,p=Hy(u,g);break;default:return r(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[l,l+u.length,l+u.length]}}const x=l+u.length,S=js(f,x,n,r);return{value:p,type:h,comment:S.comment,range:[l,x,S.offset]}}function Wy(i,n){let r="";switch(i[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${i[0]}`;break}case"@":case"`":{r=`reserved character ${i[0]}`;break}}return r&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Vh(i)}function qy(i,n){return(i[i.length-1]!=="'"||i.length===1)&&n(i.length,"MISSING_CHAR","Missing closing 'quote"),Vh(i.slice(1,-1)).replace(/''/g,"'")}function Vh(i){let n,r;try{n=new RegExp(`(.*?)(?u?i.slice(u,l+1):o)}else r+=o}return(i[i.length-1]!=='"'||i.length===1)&&n(i.length,"MISSING_CHAR",'Missing closing "quote'),r}function Qy(i,n){let r="",l=i[n+1];for(;(l===" "||l===" "||l===` `||l==="\r")&&!(l==="\r"&&i[n+2]!==` `);)l===` `&&(r+=` `),n+=1,l=i[n+1];return r||(r=" "),{fold:r,offset:n}}const Jy={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Yy(i,n,r,l){const o=i.substr(n,r),f=o.length===r&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(f)){const h=i.substr(n-2,r+2);return l(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),h}return String.fromCodePoint(f)}function Kh(i,n,r,l){const{value:o,type:u,comment:f,range:h}=n.type==="block-scalar"?zh(i,n,l):Uh(n,i.options.strict,l),p=r?i.directives.tagName(r.source,S=>l(r,"TAG_RESOLVE_FAILED",S)):null;let g;i.options.stringKeys&&i.atKey?g=i.schema[Kt]:p?g=Gy(i.schema,o,p,r,l):n.type==="scalar"?g=Xy(i,o,n,l):g=i.schema[Kt];let x;try{const S=g.resolve(o,T=>l(r??n,"TAG_RESOLVE_FAILED",T),i.options);x=ve(S)?S:new ie(S)}catch(S){const T=S instanceof Error?S.message:String(S);l(r??n,"TAG_RESOLVE_FAILED",T),x=new ie(o)}return x.range=h,x.source=o,u&&(x.type=u),p&&(x.tag=p),g.format&&(x.format=g.format),f&&(x.comment=f),x}function Gy(i,n,r,l,o){var h;if(r==="!")return i[Kt];const u=[];for(const p of i.tags)if(!p.collection&&p.tag===r)if(p.default&&p.test)u.push(p);else return p;for(const p of u)if((h=p.test)!=null&&h.test(n))return p;const f=i.knownTags[r];return f&&!f.collection?(i.tags.push(Object.assign({},f,{default:!1,test:void 0})),f):(o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),i[Kt])}function Xy({atKey:i,directives:n,schema:r},l,o,u){const f=r.tags.find(h=>{var p;return(h.default===!0||i&&h.default==="key")&&((p=h.test)==null?void 0:p.test(l))})||r[Kt];if(r.compat){const h=r.compat.find(p=>{var g;return p.default&&((g=p.test)==null?void 0:g.test(l))})??r[Kt];if(f.tag!==h.tag){const p=n.tagString(f.tag),g=n.tagString(h.tag),x=`Value may be parsed as either ${p} or ${g}`;u(o,"TAG_RESOLVE_FAILED",x,!0)}}return f}function Zy(i,n,r){if(n){r===null&&(r=n.length);for(let l=r-1;l>=0;--l){let o=n[l];switch(o.type){case"space":case"comment":case"newline":i-=o.source.length;continue}for(o=n[++l];(o==null?void 0:o.type)==="space";)i+=o.source.length,o=n[++l];break}}return i}const e0={composeNode:Wh,composeEmptyNode:au};function Wh(i,n,r,l){const o=i.atKey,{spaceBefore:u,comment:f,anchor:h,tag:p}=r;let g,x=!0;switch(n.type){case"alias":g=t0(i,n,l),(h||p)&&l(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=Kh(i,n,p,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=Uy(e0,i,n,r,l),h&&(g.anchor=h.source.substring(1));break;default:{const S=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;l(n,"UNEXPECTED_TOKEN",S),g=au(i,n.offset,void 0,null,r,l),x=!1}}return h&&g.anchor===""&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),o&&i.options.stringKeys&&(!ve(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&l(p??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),u&&(g.spaceBefore=!0),f&&(n.type==="scalar"&&n.source===""?g.comment=f:g.commentBefore=f),i.options.keepSourceTokens&&x&&(g.srcToken=n),g}function au(i,n,r,l,{spaceBefore:o,comment:u,anchor:f,tag:h,end:p},g){const x={type:"scalar",offset:Zy(n,r,l),indent:-1,source:""},S=Kh(i,x,h,g);return f&&(S.anchor=f.source.substring(1),S.anchor===""&&g(f,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(S.spaceBefore=!0),u&&(S.comment=u,S.range[2]=p),S}function t0({options:i},{offset:n,source:r,end:l},o){const u=new yl(r.substring(1));u.source===""&&o(n,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&o(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const f=n+r.length,h=js(l,f,i.strict,o);return u.range=[n,f,h.offset],h.comment&&(u.comment=h.comment),u}function n0(i,n,{offset:r,start:l,value:o,end:u},f){const h=Object.assign({_directives:n},i),p=new br(void 0,h),g={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},x=Ir(l,{indicator:"doc-start",next:o??(u==null?void 0:u[0]),offset:r,onError:f,parentIndent:0,startOnNewline:!0});x.found&&(p.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!x.hasNewline&&f(x.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=o?Wh(g,o,x,f):au(g,x.end,l,null,x,f);const S=p.contents.range[2],T=js(u,S,!1,f);return T.comment&&(p.comment=T.comment),p.range=[r,S,T.offset],p}function _s(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];const{offset:n,source:r}=i;return[n,n+(typeof r=="string"?r.length:1)]}function Ad(i){var o;let n="",r=!1,l=!1;for(let u=0;u{const f=_s(r);u?this.warnings.push(new Fh(f,l,o)):this.errors.push(new Un(f,l,o))},this.directives=new nt({version:n.version||"1.2"}),this.options=n}decorate(n,r){const{comment:l,afterEmptyLine:o}=Ad(this.prelude);if(l){const u=n.contents;if(r)n.comment=n.comment?`${n.comment} ${l}`:l;else if(o||n.directives.docStart||!u)n.commentBefore=l;else if(Ie(u)&&!u.flow&&u.items.length>0){let f=u.items[0];Ce(f)&&(f=f.key);const h=f.commentBefore;f.commentBefore=h?`${l} ${h}`:l}else{const f=u.commentBefore;u.commentBefore=f?`${l} ${f}`:l}}r?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ad(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,r=!1,l=-1){for(const o of n)yield*this.next(o);yield*this.end(r,l)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(r,l,o)=>{const u=_s(n);u[0]+=r,this.onError(u,"BAD_DIRECTIVE",l,o)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const r=n0(this.options,this.directives,n,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const r=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,l=new Un(_s(n),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(l):this.doc.errors.push(l);break}case"doc-end":{if(!this.doc){const l="Unexpected doc-end without preceding document";this.errors.push(new Un(_s(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const r=js(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const l=this.doc.comment;this.doc.comment=l?`${l} ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Un(_s(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const l=Object.assign({_directives:this.directives},this.options),o=new br(void 0,l);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,r,r],this.decorate(o,!1),yield o}}}function r0(i,n=!0,r){if(i){const l=(o,u,f)=>{const h=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(r)r(h,u,f);else throw new Un([h,h+1],u,f)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Uh(i,n,l);case"block-scalar":return zh({options:{strict:n}},i,l)}}return null}function s0(i,n){const{implicitKey:r=!1,indent:l,inFlow:o=!1,offset:u=-1,type:f="PLAIN"}=n,h=Ps({type:f,value:i},{implicitKey:r,indent:l>0?" ".repeat(l):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),p=n.end??[{type:"newline",offset:-1,indent:l,source:` `}];switch(h[0]){case"|":case">":{const g=h.indexOf(` `),x=h.substring(0,g),S=h.substring(g+1)+` `,T=[{type:"block-scalar-header",offset:u,indent:l,source:x}];return qh(T,p)||T.push({type:"newline",offset:-1,indent:l,source:` `}),{type:"block-scalar",offset:u,indent:l,props:T,source:S}}case'"':return{type:"double-quoted-scalar",offset:u,indent:l,source:h,end:p};case"'":return{type:"single-quoted-scalar",offset:u,indent:l,source:h,end:p};default:return{type:"scalar",offset:u,indent:l,source:h,end:p}}}function i0(i,n,r={}){let{afterKey:l=!1,implicitKey:o=!1,inFlow:u=!1,type:f}=r,h="indent"in i?i.indent:null;if(l&&typeof h=="number"&&(h+=2),!f)switch(i.type){case"single-quoted-scalar":f="QUOTE_SINGLE";break;case"double-quoted-scalar":f="QUOTE_DOUBLE";break;case"block-scalar":{const g=i.props[0];if(g.type!=="block-scalar-header")throw new Error("Invalid block scalar header");f=g.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:f="PLAIN"}const p=Ps({type:f,value:n},{implicitKey:o||h===null,indent:h!==null&&h>0?" ".repeat(h):"",inFlow:u,options:{blockQuote:!0,lineWidth:-1}});switch(p[0]){case"|":case">":l0(i,p);break;case'"':Ra(i,p,"double-quoted-scalar");break;case"'":Ra(i,p,"single-quoted-scalar");break;default:Ra(i,p,"scalar")}}function l0(i,n){const r=n.indexOf(` `),l=n.substring(0,r),o=n.substring(r+1)+` `;if(i.type==="block-scalar"){const u=i.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u.source=l,i.source=o}else{const{offset:u}=i,f="indent"in i?i.indent:-1,h=[{type:"block-scalar-header",offset:u,indent:f,source:l}];qh(h,"end"in i?i.end:void 0)||h.push({type:"newline",offset:-1,indent:f,source:` `});for(const p of Object.keys(i))p!=="type"&&p!=="offset"&&delete i[p];Object.assign(i,{type:"block-scalar",indent:f,props:h,source:o})}}function qh(i,n){if(n)for(const r of n)switch(r.type){case"space":case"comment":i.push(r);break;case"newline":return i.push(r),!0}return!1}function Ra(i,n,r){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=r,i.source=n;break;case"block-scalar":{const l=i.props.slice(1);let o=n.length;i.props[0].type==="block-scalar-header"&&(o-=i.props[0].source.length);for(const u of l)u.offset+=o;delete i.props,Object.assign(i,{type:r,source:n,end:l});break}case"block-map":case"block-seq":{const o={type:"newline",offset:i.offset+n.length,indent:i.indent,source:` `};delete i.items,Object.assign(i,{type:r,source:n,end:[o]});break}default:{const l="indent"in i?i.indent:-1,o="end"in i&&Array.isArray(i.end)?i.end.filter(u=>u.type==="space"||u.type==="comment"||u.type==="newline"):[];for(const u of Object.keys(i))u!=="type"&&u!=="offset"&&delete i[u];Object.assign(i,{type:r,indent:l,source:n,end:o})}}}const o0=i=>"type"in i?fl(i):ll(i);function fl(i){switch(i.type){case"block-scalar":{let n="";for(const r of i.props)n+=fl(r);return n+i.source}case"block-map":case"block-seq":{let n="";for(const r of i.items)n+=ll(r);return n}case"flow-collection":{let n=i.start.source;for(const r of i.items)n+=ll(r);for(const r of i.end)n+=r.source;return n}case"document":{let n=ll(i);if(i.end)for(const r of i.end)n+=r.source;return n}default:{let n=i.source;if("end"in i&&i.end)for(const r of i.end)n+=r.source;return n}}}function ll({start:i,key:n,sep:r,value:l}){let o="";for(const u of i)o+=u.source;if(n&&(o+=fl(n)),r)for(const u of r)o+=u.source;return l&&(o+=fl(l)),o}const Ha=Symbol("break visit"),a0=Symbol("skip children"),Hh=Symbol("remove item");function Kn(i,n){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),Qh(Object.freeze([]),i,n)}Kn.BREAK=Ha;Kn.SKIP=a0;Kn.REMOVE=Hh;Kn.itemAtPath=(i,n)=>{let r=i;for(const[l,o]of n){const u=r==null?void 0:r[l];if(u&&"items"in u)r=u.items[o];else return}return r};Kn.parentCollection=(i,n)=>{const r=Kn.itemAtPath(i,n.slice(0,-1)),l=n[n.length-1][0],o=r==null?void 0:r[l];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function Qh(i,n,r){let l=r(n,i);if(typeof l=="symbol")return l;for(const o of["key","value"]){const u=n[o];if(u&&"items"in u){for(let f=0;f