setta 0.0.5.dev2__py3-none-any.whl → 0.0.5.dev4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- setta/__init__.py +1 -1
- setta/static/frontend/assets/index-a5bd0f52.css +32 -0
- setta/static/frontend/assets/{index-7ca18a72.js → index-c3c6ddc0.js} +4 -4
- setta/static/frontend/index.html +2 -2
- {setta-0.0.5.dev2.dist-info → setta-0.0.5.dev4.dist-info}/METADATA +1 -1
- {setta-0.0.5.dev2.dist-info → setta-0.0.5.dev4.dist-info}/RECORD +10 -10
- setta/static/frontend/assets/index-df9034e0.css +0 -32
- {setta-0.0.5.dev2.dist-info → setta-0.0.5.dev4.dist-info}/LICENSE +0 -0
- {setta-0.0.5.dev2.dist-info → setta-0.0.5.dev4.dist-info}/WHEEL +0 -0
- {setta-0.0.5.dev2.dist-info → setta-0.0.5.dev4.dist-info}/entry_points.txt +0 -0
- {setta-0.0.5.dev2.dist-info → setta-0.0.5.dev4.dist-info}/top_level.txt +0 -0
@@ -88,7 +88,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
88
88
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Vz]=this[Vz]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Wg(o);r[a]||(JTe(i,o),r[a]=!0)}return Ie.isArray(e)?e.forEach(s):s(e),this}}_5.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ie.reduceDescriptors(_5.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});Ie.freezeMethods(_5);const Dc=_5;function _6(t,e){const n=this||u$,r=e||n,i=Dc.from(r.headers);let s=r.data;return Ie.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function pte(t){return!!(t&&t.__CANCEL__)}function Sy(t,e,n){tn.call(this,t??"canceled",tn.ERR_CANCELED,e,n),this.name="CanceledError"}Ie.inherits(Sy,tn,{__CANCEL__:!0});function ePe(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new tn("Request failed with status code "+n.status,[tn.ERR_BAD_REQUEST,tn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const tPe=pl.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];Ie.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Ie.isString(r)&&o.push("path="+r),Ie.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function nPe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function rPe(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function mte(t,e){return t&&!nPe(e)?rPe(t,e):e}const iPe=pl.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const a=Ie.isString(o)?i(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function sPe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function oPe(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let f=s,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const d=u&&c-u;return d?Math.round(h*1e3/d):void 0}}function Uz(t,e){let n=0;const r=oPe(50,250);return i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-n,l=r(a),c=s<=o;n=s;const u={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&c?(o-s)/l:void 0,event:i};u[e?"download":"upload"]=!0,t(u)}}const aPe=typeof XMLHttpRequest<"u",lPe=aPe&&function(t){return new Promise(function(n,r){let i=t.data;const s=Dc.from(t.headers).normalize();let{responseType:o,withXSRFToken:a}=t,l;function c(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let u;if(Ie.isFormData(i)){if(pl.hasStandardBrowserEnv||pl.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((u=s.getContentType())!==!1){const[g,...m]=u?u.split(";").map(v=>v.trim()).filter(Boolean):[];s.setContentType([g||"multipart/form-data",...m].join("; "))}}let f=new XMLHttpRequest;if(t.auth){const g=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(g+":"+m))}const h=mte(t.baseURL,t.url);f.open(t.method.toUpperCase(),ute(h,t.params,t.paramsSerializer),!0),f.timeout=t.timeout;function d(){if(!f)return;const g=Dc.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),v={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:g,config:t,request:f};ePe(function(b){n(b),c()},function(b){r(b),c()},v),f=null}if("onloadend"in f?f.onloadend=d:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(d)},f.onabort=function(){f&&(r(new tn("Request aborted",tn.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new tn("Network Error",tn.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const v=t.transitional||fte;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),r(new tn(m,v.clarifyTimeoutError?tn.ETIMEDOUT:tn.ECONNABORTED,t,f)),f=null},pl.hasStandardBrowserEnv&&(a&&Ie.isFunction(a)&&(a=a(t)),a||a!==!1&&iPe(h))){const g=t.xsrfHeaderName&&t.xsrfCookieName&&tPe.read(t.xsrfCookieName);g&&s.set(t.xsrfHeaderName,g)}i===void 0&&s.setContentType(null),"setRequestHeader"in f&&Ie.forEach(s.toJSON(),function(m,v){f.setRequestHeader(v,m)}),Ie.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),o&&o!=="json"&&(f.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&f.addEventListener("progress",Uz(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",Uz(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=g=>{f&&(r(!g||g.type?new Sy(null,t,f):g),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const p=sPe(h);if(p&&pl.protocols.indexOf(p)===-1){r(new tn("Unsupported protocol "+p+":",tn.ERR_BAD_REQUEST,t));return}f.send(i||null)})},OT={http:$Te,xhr:lPe};Ie.forEach(OT,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const qz=t=>`- ${t}`,cPe=t=>Ie.isFunction(t)||t===null||t===!1,gte={getAdapter:t=>{t=Ie.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let o;if(r=n,!cPe(n)&&(r=OT[(o=String(n)).toLowerCase()],r===void 0))throw new tn(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
|
89
89
|
`+s.map(qz).join(`
|
90
90
|
`):" "+qz(s[0]):"as no adapter specified";throw new tn("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:OT};function k6(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Sy(null,t)}function Xz(t){return k6(t),t.headers=Dc.from(t.headers),t.data=_6.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),gte.getAdapter(t.adapter||u$.adapter)(t).then(function(r){return k6(t),r.data=_6.call(t,t.transformResponse,r),r.headers=Dc.from(r.headers),r},function(r){return pte(r)||(k6(t),r&&r.response&&(r.response.data=_6.call(t,t.transformResponse,r.response),r.response.headers=Dc.from(r.response.headers))),Promise.reject(r)})}const Hz=t=>t instanceof Dc?t.toJSON():t;function nm(t,e){e=e||{};const n={};function r(c,u,f){return Ie.isPlainObject(c)&&Ie.isPlainObject(u)?Ie.merge.call({caseless:f},c,u):Ie.isPlainObject(u)?Ie.merge({},u):Ie.isArray(u)?u.slice():u}function i(c,u,f){if(Ie.isUndefined(u)){if(!Ie.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function s(c,u){if(!Ie.isUndefined(u))return r(void 0,u)}function o(c,u){if(Ie.isUndefined(u)){if(!Ie.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,f){if(f in e)return r(c,u);if(f in t)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u)=>i(Hz(c),Hz(u),!0)};return Ie.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=l[u]||i,h=f(t[u],e[u],u);Ie.isUndefined(h)&&f!==a||(n[u]=h)}),n}const vte="1.6.5",f$={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{f$[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Zz={};f$.transitional=function(e,n,r){function i(s,o){return"[Axios v"+vte+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new tn(i(o," has been removed"+(n?" in "+n:"")),tn.ERR_DEPRECATED);return n&&!Zz[o]&&(Zz[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};function uPe(t,e,n){if(typeof t!="object")throw new tn("options must be an object",tn.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],l=a===void 0||o(a,s,t);if(l!==!0)throw new tn("option "+s+" must be "+l,tn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new tn("Unknown option "+s,tn.ERR_BAD_OPTION)}}const yT={assertOptions:uPe,validators:f$},Cu=yT.validators;class f_{constructor(e){this.defaults=e,this.interceptors={request:new Wz,response:new Wz}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=nm(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&yT.assertOptions(r,{silentJSONParsing:Cu.transitional(Cu.boolean),forcedJSONParsing:Cu.transitional(Cu.boolean),clarifyTimeoutError:Cu.transitional(Cu.boolean)},!1),i!=null&&(Ie.isFunction(i)?n.paramsSerializer={serialize:i}:yT.assertOptions(i,{encode:Cu.function,serialize:Cu.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&Ie.merge(s.common,s[n.method]);s&&Ie.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=Dc.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,f=0,h;if(!l){const p=[Xz.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),h=p.length,u=Promise.resolve(n);f<h;)u=u.then(p[f++],p[f++]);return u}h=a.length;let d=n;for(f=0;f<h;){const p=a[f++],g=a[f++];try{d=p(d)}catch(m){g.call(this,m);break}}try{u=Xz.call(this,d)}catch(p){return Promise.reject(p)}for(f=0,h=c.length;f<h;)u=u.then(c[f++],c[f++]);return u}getUri(e){e=nm(this.defaults,e);const n=mte(e.baseURL,e.url);return ute(n,e.params,e.paramsSerializer)}}Ie.forEach(["delete","get","head","options"],function(e){f_.prototype[e]=function(n,r){return this.request(nm(r||{},{method:e,url:n,data:(r||{}).data}))}});Ie.forEach(["post","put","patch"],function(e){function n(r){return function(s,o,a){return this.request(nm(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}f_.prototype[e]=n(),f_.prototype[e+"Form"]=n(!0)});const MS=f_;class h${constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new Sy(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new h$(function(i){e=i}),cancel:e}}}const fPe=h$;function hPe(t){return function(n){return t.apply(null,n)}}function dPe(t){return Ie.isObject(t)&&t.isAxiosError===!0}const bT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bT).forEach(([t,e])=>{bT[e]=t});const pPe=bT;function Ote(t){const e=new MS(t),n=Kee(MS.prototype.request,e);return Ie.extend(n,MS.prototype,e,{allOwnKeys:!0}),Ie.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Ote(nm(t,i))},n}const Ur=Ote(u$);Ur.Axios=MS;Ur.CanceledError=Sy;Ur.CancelToken=fPe;Ur.isCancel=pte;Ur.VERSION=vte;Ur.toFormData=S5;Ur.AxiosError=tn;Ur.Cancel=Ur.CanceledError;Ur.all=function(e){return Promise.all(e)};Ur.spread=hPe;Ur.isAxiosError=dPe;Ur.mergeConfig=nm;Ur.AxiosHeaders=Dc;Ur.formToJSON=t=>dte(Ie.isHTMLForm(t)?new FormData(t):t);Ur.getAdapter=gte.getAdapter;Ur.HttpStatusCode=pPe;Ur.default=Ur;const mPe=Ur;async function jt({address:t,body:e}){return mPe.post(`${Zp.BACKEND}${t}`,e,{headers:{"Content-Type":"application/json"}}).then(n=>n).catch(n=>n)}function d$(t,e){let n=t;for(const[r,i]of Object.entries(e)){const s=new RegExp(`\\{${r}\\}`,"g");n=n.replace(s,i)}return n}async function gPe(t,e){return await jt({body:{project:yte(),sectionId:t,jsonSource:e},address:Y.ROUTE_LOAD_SECTION_JSON_SOURCE})}async function vPe(t,e){return await jt({body:{project:yte(),sectionId:t,forking_from:e},address:Y.ROUTE_SAVE_SECTION_JSON_SOURCE})}function yte(){const{x:t,codeInfoCols:e,variants:n,codeInfo:r}=te.getState();return{sections:t,codeInfo:r,codeInfoCols:e,sectionVariants:n}}async function OPe(t){return await jt({body:{variantName:t},address:Y.ROUTE_GET_JSON_SOURCE_PATH_TO_BE_DELETED})}async function yPe(t){return await jt({body:{filepath:t},address:Y.ROUTE_DELETE_FILE})}const Yz=t=>{t=1831565813+(t|=0)|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296};let bPe=class{constructor(e){this.dictionaries=void 0,this.length=void 0,this.separator=void 0,this.style=void 0,this.seed=void 0;const{length:n,separator:r,dictionaries:i,style:s,seed:o}=e;this.dictionaries=i,this.separator=r,this.length=n,this.style=s,this.seed=o}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries.
|
91
|
-
Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let e=this.seed;return this.dictionaries.slice(0,this.length).reduce((n,r)=>{let i;e?(i=(o=>{if(typeof o=="string"){const a=o.split("").map(c=>c.charCodeAt(0)).reduce((c,u)=>c+u,1),l=Math.floor(Number(a));return Yz(l)}return Yz(o)})(e),e=4294967296*i):i=Math.random();let s=r[Math.floor(i*r.length)]||"";if(this.style==="lowerCase")s=s.toLowerCase();else if(this.style==="capital"){const[o,...a]=s.split("");s=o.toUpperCase()+a.join("")}else this.style==="upperCase"&&(s=s.toUpperCase());return n?`${n}${this.separator}${s}`:`${s}`},"")}};const Gz={separator:"_",dictionaries:[]},bte=t=>{const e=[...t&&t.dictionaries||Gz.dictionaries],n={...Gz,...t,length:t&&t.length||e.length,dictionaries:e};if(!t||!t.dictionaries||!t.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new bPe(n).generate()};var xte=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","amused","ancient","angry","annoyed","annual","anonymous","anxious","appalling","apparent","applicable","appropriate","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","asleep","assistant","associated","atomic","attractive","automatic","autonomous","available","average","awake","aware","awful","awkward","back","bad","balanced","bare","basic","beautiful","beneficial","better","bewildered","big","binding","biological","bitter","bizarre","blank","blind","blonde","bloody","blushing","boiling","bold","bored","boring","bottom","brainy","brave","breakable","breezy","brief","bright","brilliant","broad","broken","bumpy","burning","busy","calm","capable","capitalist","careful","casual","causal","cautious","central","certain","changing","characteristic","charming","cheap","cheerful","chemical","chief","chilly","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clear","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concrete","condemned","confident","confidential","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","creative","creepy","criminal","critical","crooked","crowded","crucial","crude","cruel","cuddly","cultural","curious","curly","current","curved","cute","daily","damaged","damp","dangerous","dark","dead","deaf","deafening","dear","decent","decisive","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delighted","delightful","democratic","dependent","depressed","desirable","desperate","detailed","determined","developed","developing","devoted","different","difficult","digital","diplomatic","direct","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dual","due","dull","dusty","dutch","dying","dynamic","eager","early","eastern","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","eligible","embarrassed","embarrassing","emotional","empirical","empty","enchanting","encouraging","endless","energetic","enormous","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","eventual","everyday","evident","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","fair","faithful","familiar","famous","fancy","fantastic","far","fascinating","fashionable","fast","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","filthy","final","financial","fine","firm","fiscal","fit","fixed","flaky","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","frequent","fresh","friendly","frightened","front","frozen","full","fun","functional","fundamental","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","genuine","geographical","giant","gigantic","given","glad","glamorous","gleaming","global","glorious","golden","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","happy","hard","harsh","head","healthy","heavy","helpful","helpless","hidden","high","hilarious","hissing","historic","historical","hollow","holy","homeless","homely","hon","honest","horizontal","horrible","hostile","hot","huge","human","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","illegal","imaginative","immediate","immense","imperial","implicit","important","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","irrelevant","isolated","itchy","jealous","jittery","joint","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","known","labour","large","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","like","likely","limited","linear","linguistic","liquid","literary","little","live","lively","living","local","logical","lonely","long","loose","lost","loud","lovely","low","loyal","ltd","lucky","mad","magic","magnetic","magnificent","main","major","male","mammoth","managerial","managing","manual","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","naked","narrow","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","net","neutral","new","nice","noble","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","official","ok","okay","old","olympic","only","open","operational","opposite","optimistic","oral","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","overall","overseas","overwhelming","painful","pale","panicky","parallel","parental","parliamentary","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","permanent","persistent","personal","petite","philosophical","physical","plain","planned","plastic","pleasant","pleased","poised","polite","political","poor","popular","positive","possible","potential","powerful","practical","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","previous","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","provincial","psychiatric","psychological","public","puny","pure","purring","puzzled","quaint","qualified","quarrelsome","querulous","quick","quickest","quiet","quintessential","quixotic","racial","radical","rainy","random","rapid","rare","raspy","rational","ratty","raw","ready","real","realistic","rear","reasonable","recent","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","romantic","rotten","rough","round","royal","rubber","rude","ruling","running","rural","sacred","sad","safe","salty","satisfactory","satisfied","scared","scary","scattered","scientific","scornful","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shared","sharp","sheer","shiny","shivering","shocked","short","shrill","shy","sick","significant","silent","silky","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","small","smart","smiling","smoggy","smooth","social","socialist","soft","solar","sole","solid","sophisticated","sore","sorry","sound","sour","southern","soviet","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","spontaneous","sporting","spotless","spotty","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steep","sticky","stiff","still","stingy","stormy","straight","straightforward","strange","strategic","strict","striking","striped","strong","structural","stuck","stupid","subjective","subsequent","substantial","subtle","successful","successive","sudden","sufficient","suitable","sunny","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","swift","symbolic","sympathetic","systematic","tall","tame","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tense","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tiny","tired","top","tory","total","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","typical","ugliest","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unwilling","upper","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","verbal","vertical","very","vicarious","vicious","victorious","violent","visible","visiting","visual","vital","vitreous","vivacious","vivid","vocal","vocational","voiceless","voluminous","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","wealthy","weary","wee","weekly","weird","welcome","well","western","wet","whispering","whole","wicked","wide","widespread","wild","wilful","willing","willowy","wily","wise","wispy","wittering","witty","wonderful","wooden","working","worldwide","worried","worrying","worthwhile","worthy","written","wrong","xenacious","xenial","xenogeneic","xenophobic","xeric","xerothermic","yabbering","yammering","yappiest","yappy","yawning","yearling","yearning","yeasty","yelling","yelping","yielding","yodelling","young","youngest","youthful","ytterbic","yucky","yummy","zany","zealous","zeroth","zestful","zesty","zippy","zonal","zoophagous","zygomorphic","zygotic"],wte=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"];let Rx;const xPe=new Uint8Array(16);function wPe(){if(!Rx&&(Rx=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rx))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rx(xPe)}const vi=[];for(let t=0;t<256;++t)vi.push((t+256).toString(16).slice(1));function SPe(t,e=0){return(vi[t[e+0]]+vi[t[e+1]]+vi[t[e+2]]+vi[t[e+3]]+"-"+vi[t[e+4]]+vi[t[e+5]]+"-"+vi[t[e+6]]+vi[t[e+7]]+"-"+vi[t[e+8]]+vi[t[e+9]]+"-"+vi[t[e+10]]+vi[t[e+11]]+vi[t[e+12]]+vi[t[e+13]]+vi[t[e+14]]+vi[t[e+15]]).toLowerCase()}const _Pe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Kz={randomUUID:_Pe};function kPe(t,e,n){if(Kz.randomUUID&&!e&&!t)return Kz.randomUUID();t=t||{};const r=t.random||(t.rng||wPe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return SPe(r)}function Kn(){return kPe()}function xT(t){return t||Kn()}function CPe(t,e){const n=JSON.stringify({filenameGlob:e,key:t});return`${Y.JSON_SOURCE_PREFIX}${n}`}function Ste(t,e,n){return e?CPe([...n,...t],e):Kn()}function EPe(t){const e={dictionaries:[xte,wte],separator:"_",length:2};let n;for(;!n||t.includes(n);)n=bte(e);return n}function Fm(){return bte({dictionaries:[xte,wte],separator:"_",length:2})}const TPe={id:null,name:"",previewImgColor:"bg-blue-500/60 dark:bg-blue-600/30",viewport:null,children:{}},PPe={id:null,name:"",size:{width:"auto",height:"auto"},parentId:null,variantId:null,uiTypeId:null,uiTypeColId:null,social:"",artifactGroupIds:[],defaultVariantId:null,variantIds:[],paramSweepSectionId:null,nonPresetUITypeIds:[],codeLanguage:"python",configLanguage:"python",runInMemory:!1,isFrozen:!1,isHorizontalOrientation:!1,hideParams:!1,hideSearch:!1,hideUnpinnedParams:!1,displayMode:"GUI",pinnedAreaHeight:"auto",isMinimized:!1,canvasSettings:{activeLayerId:null,color:"#ff0000",brushSize:16,brushShape:"butt",eraserBrushSize:16,drawThrottleDelay:0,canvasTransferQueueLength:50,artifactIdUsedToSetCanvasSize:null,mode:"draw"},chartSettings:{type:"line",xAxisColumn:"",secondYAxisColumns:[],xAxisLog:!1,y1AxisLog:!1,y2AxisLog:!1},isTemporary:!1,isReadOnlyTerminal:!1,renderMarkdown:!1,positionAndSizeLocked:!1,jsonSource:"",jsonSourceKeys:[],selectedVariantIds:{},paramFilter:"",jsonSourceMissing:!1,isInOtherProjectConfigs:!1,aspectRatio:!1,aspectRatioExtraHeight:0,aspectRatioExtraWidth:0,columnWidth:null,renderedValue:null,subprocessStartMethod:"fork"},APe={name:"",values:{},children:[],selectedItem:null,code:"",codeInfoColId:null,description:"",evRefs:[],templateVars:[],isFrozen:!1,sweep:[],runGroup:{}},RPe={id:null,name:"",editable:!1,rcType:"parameter",defaultVal:"",description:"",positionalOnly:!1,isPinned:!1,isFrozen:!1,isSelected:!1,evRefs:[],ignoreTypeErrors:!1},$Pe={children:{null:[]}},MPe={id:null,type:"TEXT",name:"",presetType:"BASE",config:{}},IPe={value:"",evRefs:[]},DPe={selected:!0,paramSweeps:{},versions:{}},LPe={uiTypeId:"3fdaeb6a-e989-4888-b844-17a76f0b0192",nonPresetUITypeIds:[]},NPe={sectionId:null,paramInfoId:null,isArgsObj:!1,startPos:0,keyword:""},QPe={name:"",path:"",value:null,type:""},Ld={projectConfig:TPe,section:PPe,sectionVariant:APe,codeInfo:RPe,codeInfoCol:$Pe,uiType:MPe,evEntry:IPe,runGroupEntry:DPe,uiTypeColEntry:LPe,evRefEntry:NPe,artifact:QPe};function k5(){return ae.cloneDeep(Ld.codeInfoCol)}function p$({uiType:t,currValue:e}){switch(t.type){case Y.TEXT:case Y.PASSWORD:return jPe({currValue:e});case Y.SLIDER:return BPe({uiType:t,currValue:e});case Y.SWITCH:return zPe({currValue:e});case Y.COLOR_PICKER:return FPe({currValue:e});case Y.DROPDOWN:return WPe({currValue:e});default:return""}}function jPe({currValue:t}){return ae.isNil(t)?"":t}function BPe({uiType:t,currValue:e}){const n=ae.toNumber(e);return ae.isFinite(n)?ae.toString(Hc(n,t.config.min,t.config.max)):ae.toString(t.config.min)}function zPe({currValue:t}){return ae.isNil(t)||t==="0"?"false":"true"}function FPe({currValue:t}){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:"#ff0000"}function WPe({currValue:t}){return ae.isNil(t)?"":t}function Wm(){return ae.cloneDeep(Ld.evEntry)}function El(t){t?Ra.setState({open:t}):Ra.getState().reset()}function au(t,e){Ra.setState({modalType:t,modalData:e,open:!0})}function _te(){au(br.LOAD_PROJECT_CONFIG)}function kte(){au(br.SAVE_PROJECT_CONFIG_AS)}function VPe(){au(br.SAVE_PROJECT_CONFIG_AS_WITH_REFS)}function UPe(){au(br.EXPORT_JSON)}function qPe(){au(br.IMPORT_JSON)}function XPe(t){au(br.DELETE_PROJECT_WARNING,t)}function HPe(...t){au(br.RENAME_REFERENCES,t)}function ZPe(t){au(br.DELETE_JSON_SOURCE_FILE,t)}function YPe(t){au(br.ADD_ARTIFACT_BY_FILEPATH,t)}function m$(t){return t.split(";base64,")[1]}function Cte(t){return m$(t.toDataURL("image/png"))}async function g$(t){const e=GPe(t),n=new Image;return n.src=e,await n.decode(),n}function GPe(t){return t.startsWith("data:image/")?t:`data:image/png;base64,${t}`}async function KPe(t){return await jt({body:{artifactIds:t},address:Y.ROUTE_LOAD_ARTIFACTS})}async function JPe(t){return await jt({body:{sectionType:t},address:Y.ROUTE_LOAD_AVAILABLE_ARTIFACTS})}async function eAe(t){return await jt({body:{filepath:t},address:Y.ROUTE_CHECK_IF_FILE_EXISTS})}async function tAe(t,e){return await jt({body:{filepath:t,type:e},address:Y.ROUTE_LOAD_ARTIFACT_FROM_DISK})}async function nAe(t){return await jt({body:{base64Str:t},address:Y.ROUTE_READ_CSV_BASE64})}async function rAe(t){return await jt({body:{namesPathsTypes:t},address:Y.ROUTE_GET_ARTIFACT_IDS_FROM_NAME_PATH_TYPE})}function iAe(t,e){let n;for(let r of t)r>=e&&(n===void 0||r-e<n-e)&&(n=r);return n}function sAe(t,e){const n=[],{fullNameToInfo:r}=Dd.getState();for(const i of t){const s=e.substring(i.startPos,i.endPos);if(s in r){const o=r[s];n.push({sectionId:o.sectionId,paramInfoId:o.paramInfoId,isArgsObj:o.isArgsObj,startPos:i.startPos,keyword:s})}}return n}function oAe(t,e){const n=[],{fullNameToSectionId:r}=O5.getState();for(const i of t){const s=e.substring(i.startPos,i.endPos);s in r&&n.push({sectionId:r[s],startPos:i.startPos,keyword:s})}return n}function Ete(){const t={};for(const[e,n]of Object.entries(Dd.getState().fullNameToInfo))t[Tte({sectionId:n.sectionId,paramInfoId:n.paramInfoId,isArgsObj:n.isArgsObj})]=e;return t}function Tte({sectionId:t,paramInfoId:e=null,isArgsObj:n=!1}){return JSON.stringify([t,e,n])}function aAe({fullNameToInfo:t,keyword:e,sectionId:n,paramInfoId:r}){return!(t[e].sectionId===n&&!t[e].paramInfoId||t[e].sectionId===n&&t[e].paramInfoId===r)}function v$({sectionId:t,paramInfoId:e,value:n,regexPatternKey:r}){let i;const s=new Set,{[r]:o,fullNameToInfo:a}=Dd.getState();for(;i=o.exec(n);)aAe({fullNameToInfo:a,keyword:i[0],sectionId:t,paramInfoId:e})&&s.add([i[0],i.index]);return Array.from(s)}function O$(t,e){let n;const r=[],{pattern:i,fullNameToSectionId:s}=O5.getState();for(;n=i.exec(e);)s[n[0]]!==t&&r.push([n[0],n.index]);return r}function lAe(t){const e=t.indexOf(Y.TEMPLATE_PREFIX,t.indexOf(Y.TEMPLATE_PREFIX)+1);return t.substring(e)}async function cAe(){return await jt({body:{},address:Y.ROUTE_ALL_PROJECT_CONFIG_METADATA})}async function Jz(){return await jt({body:{},address:Y.ROUTE_LOAD_PROJECT_CONFIG_NAMES})}async function uAe(t){return await jt({body:{projectConfigName:t},address:Y.ROUTE_LOAD_PROJECT_CONFIG})}async function fAe({excludeProjectConfigName:t}){return await jt({body:{excludeProjectConfigName:t},address:Y.ROUTE_LOAD_FULL_PROJECT})}async function hAe({name:t,previewImgColor:e}){return await jt({address:Y.ROUTE_CREATE_PROJECT_CONFIG,body:{name:t,previewImgColor:e}})}async function dAe({project:t}){return await jt({address:Y.ROUTE_SAVE_PROJECT,body:{project:t}})}async function pAe({project:t,newConfigName:e,withRefs:n}){return await jt({address:Y.ROUTE_SAVE_AS_NEW_PROJECT_CONFIG,body:{project:t,newConfigName:e,withRefs:n}})}async function mAe({project:t,configName:e}){return await jt({address:Y.ROUTE_SAVE_AS_EXISTING_PROJECT_CONFIG,body:{project:t,configName:e}})}async function gAe(t){return await jt({address:Y.ROUTE_DELETE_PROJECT_CONFIGS,body:{ids:t}})}async function vAe(){return await jt({address:Y.ROUTE_GET_DEFAULT_CONFIG_NAME,body:{}})}async function OAe(t){return await jt({address:Y.ROUTE_SET_AS_DEFAULT_PROJECT,body:{projectId:t}})}async function yAe(t){return await jt({address:Y.ROUTE_FILTER_DATA_FOR_JSON_EXPORT,body:{project:t}})}async function bAe(t){return await jt({address:Y.ROUTE_ADD_DEFAULT_DATA_FOR_JSON_IMPORT,body:{project:t}})}async function eF(t){return await jt({address:Y.ROUTE_SAVE_SETTINGS,body:{settings:t}})}async function xAe(){return await jt({address:Y.ROUTE_LOAD_SETTINGS,body:{}})}async function wAe(t){return await jt({address:Y.ROUTE_SAVE_SETTINGS_PROJECT,body:{settingsProject:t}})}async function SAe(){return await jt({address:Y.ROUTE_LOAD_SETTINGS_PROJECT,body:{}})}function Pte({name:t,...e}){return ae.merge(ae.cloneDeep(Ld.artifact),{name:t??Fm()},e)}function Ate({name:t,...e}){return{name:t??Fm(),artifactTransforms:[],visible:!0,layerOpacity:.5,brushOpacity:1,...e}}function y$(t,e,n){return{artifactId:t,..._Ae(e,n)}}function _Ae(t,e){switch(t){case Y.DRAW:return{transform:[1,0,0,1,0,0],eraserStrokes:e==="img"?[]:{}};case Y.IMAGE:case Y.CHART:return{};default:return{}}}const b$=ae.throttle(()=>{if(c_.temporal.getState().pastStates.length<=1)return;const e=c_.getState().version;for(const n of Mm[Rd.PROJECT_STATE])n.temporal&&e===n.getState().version&&(n.temporal.getState().undo(2),kAe(n));w$(),Ut.setState({undoOrRedoWasTriggered:!0})},100);function kAe(t){t.temporal.setState(e=>({pastStates:[...e.pastStates,t.getState()],futureStates:Rte(e.futureStates)}))}function Rte(t){const e=[],n=new Set;for(const r of t)n.has(r.version)||(e.push(r),n.add(r.version));return e}const x$=ae.throttle(()=>{const t=c_.getState().version;for(const e of Mm[Rd.PROJECT_STATE])e.temporal&&t===e.getState().version&&(e.temporal.getState().redo(),CAe(e));w$(),Ut.setState({undoOrRedoWasTriggered:!0})},100);function CAe(t){t.temporal.setState(e=>({pastStates:Rte([...e.pastStates,t.getState()])}))}function EAe(t){let e=!1;for(const r of t)if(r.temporal&&!ae.isEqual(r.getState(),r.temporal.getState().pastStates.at(-1))){e=!0;break}if(!e)return;const n=c_.getState().version;for(const r of t)r.temporal&&(r.setState({version:n+1}),TAe(r,()=>r.setState({})))}function TAe(t,e){t.temporal.getState().resume(),e(),t.temporal.getState().pause()}const hn=ae.throttle((t,e=!0)=>{t&&(EAe(Mm[Rd.PROJECT_STATE]),e&&w$())},500),w$=ae.debounce(()=>{Nt.getState().backend.autosave&&j5()},1e3);async function PAe(t,e,n){const r=await KPe(e);if(r.status===200){const i=ae.cloneDeep(r.data);if(await AAe(i),n!=null&&n.aborted)return;fi.setState(s=>({x:{...s.x,...i}})),te.setState(s=>{Lte(e,t,s)}),hn(!0)}}async function AAe(t){for(const e of Object.values(t))e.value=await $te(e.type,e.value)}async function $te(t,e){switch(t){case"img":return await g$(e);case"list":case"brushStrokes":return e}}async function RAe(t,e){switch(t){case"img":return await g$(e);case"list":const n=await nAe(m$(e));if(n.status==200)return n.data;default:return null}}function $Ae(){const t={};for(const[e,n]of Object.entries(fi.getState().x))typeof n!="function"&&(n.type==="img"&&n.value instanceof Image?t[e]={...n,value:m$(n.value.src)}:t[e]=n);return t}function Mte(t,e){const n=Kn(),r="brushStrokes";fi.setState(s=>({x:{...s.x,[n]:Pte({type:r,value:[]})}}));const i=Kn();e.artifactGroups[i]=Ate({artifactTransforms:[y$(n,Y.DRAW,r)]}),e.x[t].artifactGroupIds.push(i),e.x[t].canvasSettings.activeLayerId=i}function Ite({sectionId:t,sectionTypeName:e,artifactId:n,artifactType:r,createNewArtifactGroup:i=!1,add:s,state:o}){let a=MAe(t,e,o),l;if(s){(!a||i)&&(a=Kn(),o.artifactGroups[a]=Ate({}),o.x[t].artifactGroupIds.unshift(a));const c=y$(n,e,r);l=o.artifactGroups[a],e===Y.DRAW||e===Y.CHART?l.artifactTransforms.push(c):l.artifactTransforms=[c]}else l=o.artifactGroups[a],l&&(l.artifactTransforms=l.artifactTransforms.filter(c=>c.artifactId!==n));l&&Lte(l.artifactTransforms.map(c=>c.artifactId),t,o)}async function Dte({sectionId:t,createNewArtifactGroup:e,value:n,artifactType:r,path:i=""}){const s=Kn();fi.setState(o=>({x:{...o.x,[s]:Pte({value:n,path:i,type:r})}})),te.setState(o=>{const a=dn(t,o);Ite({sectionId:t,sectionTypeName:a,artifactId:s,artifactType:r,createNewArtifactGroup:e,add:!0,state:o})})}function MAe(t,e,n){switch(e){case Y.DRAW:return n.x[t].canvasSettings.activeLayerId;case Y.IMAGE:case Y.CHART:return n.x[t].artifactGroupIds[0]}}function Lte(t,e,n){dn(e,n)===Y.CHART&&Nte(t,e,n)}function Nte(t,e,n){const{chartSettings:r}=n.x[e],i=S$(t.map(o=>fi.getState().x[o]),r.type),s=Object.keys(i);Ut.setState(o=>({chartDisplayedSeriesNames:{...o.chartDisplayedSeriesNames,[e]:s}})),s!==0&&(s.includes(r.xAxisColumn)||(r.xAxisColumn=s[0]))}function S$(t,e){switch(e){case"line":return IAe(t);case"scatter":return DAe(t);default:return{}}}function IAe(t){const e={};for(const n of t)for(const[r,i]of Object.entries(n.value)){const s=t.length===1?r:`${n.name}/${r}`;e[s]=[...i]}return e}function DAe(t){const e={};for(const n of t)for(const[r,i]of Object.entries(n.value))r in e||(e[r]=[]),e[r].push(...i);return e}function _$(t){return JSON.stringify([t.name,t.path,t.type])}function Qte(t,e,n,r,i,s=null,o=null){const a=[],l=n.filter(f=>i(t[f])).reverse(),c=new Set,u=s?{}:null;for(s&&l.forEach(f=>u[f]=s(t[f])?[f]:[]);l.length>0;){const f=l.pop();if(!f||c.has(f))continue;c.add(f);const h=t[f];if(r(h)&&a.push(h.id),i(h)){const d=e[h.id].slice().reverse();if(s){const p=u[f];d.forEach(g=>{u[g]=s(t[g])?[...p,g]:[...p]})}l.push(...d)}if(a.length>0&&(o!=null&&o(t[a[a.length-1]])))return{ids:a,pathMap:u,earlyReturnTriggered:!0}}return{ids:a,pathMap:u,earlyReturnTriggered:!1}}function k$({allCodeInfo:t,codeInfoChildren:e,startingId:n,additionalOutputCondition:r=null,paramPathCondition:i=null,earlyReturnCondition:s=null}){const o=n?[n]:e[n];return Qte(t,e,o??[],l=>(l==null?void 0:l.rcType)===Y.PARAMETER&&(!r||r(l)),n?()=>!0:l=>(l==null?void 0:l.rcType)===Y.PARAMETER,i,s)}function LAe(t,e){return Qte(t,e,e[null]??[],()=>!0,()=>!0)}function _y(t){return k$({...t,paramPathCondition:e=>e.rcType===Y.PARAMETER})}function rO(t,e,n,r){const{ids:i,pathMap:s}=_y({allCodeInfo:e,codeInfoChildren:n,startingId:r});i.reverse();let o=[];const a=new Set,l={};for(const c of i)if(Y8e(e[c].isPinned,t)&&(n[c].length===0||n[c].some(u=>u in l)))for(const u of s[c])l[u]=s[u],a.has(s[c][0])||(o.push(s[c][0]),a.add(s[c][0]));return o.reverse(),{requiredParamIdsToPaths:l,topLevelParamIds:o}}function C$(t,e,n){if(e[n].length===1)return t[e[n][0]].name;{let r="";for(const[i,s]of e[n].entries())i===0?r=t[s].name:r+=`["${t[s].name}"]`;return r}}function jte(t,e,n){const{selectedItem:r}=Yt(t,e),i=Jo(t,e).children,{earlyReturnTriggered:s}=k$({allCodeInfo:e.codeInfo,codeInfoChildren:i,startingId:r,earlyReturnCondition:n});return s}function NAe(t,e){return jte(t,e,n=>(n==null?void 0:n.rcType)===Y.PARAMETER)}function QAe(t,e){return jte(t,e,n=>n==null?void 0:n.isSelected)}function Bte(t,e){const{hideUnpinnedParams:n}=e.x[t],{codeInfoChildren:r,parentCodeInfoId:i}=Ry(t,e);let s=rO(!0,e.codeInfo,r,i);s=Object.keys(s.requiredParamIdsToPaths),s.reverse();let o=[];return n||(o=rO(!1,e.codeInfo,r,i),o=Object.keys(o.requiredParamIdsToPaths),o.reverse()),[...s,...o]}function jAe(t,e){return te(n=>{const r=Ll(t,n).values;return e in r?{value:r[e].value,evRefs:r[e].evRefs}:Wm()},ae.isEqual)}function zte(t){return te(e=>t?e.x[t].variantIds.map(n=>({id:n,name:e.variants[n].name})):[],ae.isEqual)}function BAe(t){return te(e=>{const n=e.x[t].parentId;return Ll(n).children.indexOf(t)})}function C5(t){return te(e=>Yt(t,e).isFrozen)}function Fte(t){return te(e=>({...Wte(t,e),variantIsFrozen:Yt(t,e).isFrozen}),ae.isEqual)}function Wte(t,e){return{renderMarkdown:e.x[t].renderMarkdown,description:Ll(t,e).description}}function zAe(t){return te(e=>{const n=z5(t,e),r=ky(t,e.x);return{forSectionId:r,variantId:n,paramSweep:e.variants[n].sweep,variantIsFrozen:Yt(t).isFrozen,showParamSweepSectionSearch:!e.x[r].hideSearch&&dn(r,e)!==Y.GLOBAL_VARIABLES}},ae.isEqual)}function FAe(t){const e=te(n=>n.x[t].paramSweepSectionId);return zte(e)}function ky(t,e){var n;return(n=Object.values(e).find(r=>r.paramSweepSectionId===t))==null?void 0:n.id}async function WAe(t,e){switch(dn(t)){case Y.PARAM_SWEEP:return await UAe(t,e);case Y.GLOBAL_PARAM_SWEEP:return await qAe(e);case Y.GLOBAL_VARIABLES:case Y.SECTION:return await VAe(e)}}async function VAe(t){const e=te.getState(),{codeInfoChildren:n,parentCodeInfoId:r}=Ry(null,e,t),i=e.codeInfo,s=rO(!0,i,n,r),o=rO(!1,i,n,r);s.requiredParamIds=Object.keys(s.requiredParamIdsToPaths),o.requiredParamIds=Object.keys(o.requiredParamIdsToPaths),delete s.requiredParamIdsToPaths,delete o.requiredParamIdsToPaths;const a=e.variants[t];return await jt({body:{codeInfo:i,codeInfoChildren:n,sectionVariant:a,pinnedIds:s,unpinnedIds:o},address:Y.ROUTE_SECTION_TO_YAML})}async function UAe(t,e){const n=te.getState(),r=ky(t,n.x),s=n.variants[e].sweep,o=n.codeInfo,l=(Nne(r,n)??k5()).children;return await jt({body:{sweep:s,codeInfo:o,codeInfoChildren:l},address:Y.ROUTE_PARAM_SWEEP_SECTION_TO_YAML})}async function qAe(t){const e=te.getState(),n=e.x,r=e.variants,i=r[t].runGroup;return await jt({body:{runGroup:i,sections:n,sectionVariants:r},address:Y.ROUTE_GLOBAL_PARAM_SWEEP_SECTION_TO_YAML})}function E5({id:t,...e}){return ae.merge(ae.cloneDeep(Ld.codeInfo),{id:xT(t)},e)}const E$=Symbol.for("yaml.alias"),wT=Symbol.for("yaml.document"),uf=Symbol.for("yaml.map"),Vte=Symbol.for("yaml.pair"),Zc=Symbol.for("yaml.scalar"),Vm=Symbol.for("yaml.seq"),Ko=Symbol.for("yaml.node.type"),Um=t=>!!t&&typeof t=="object"&&t[Ko]===E$,T5=t=>!!t&&typeof t=="object"&&t[Ko]===wT,Cy=t=>!!t&&typeof t=="object"&&t[Ko]===uf,Dr=t=>!!t&&typeof t=="object"&&t[Ko]===Vte,Jn=t=>!!t&&typeof t=="object"&&t[Ko]===Zc,Ey=t=>!!t&&typeof t=="object"&&t[Ko]===Vm;function Ar(t){if(t&&typeof t=="object")switch(t[Ko]){case uf:case Vm:return!0}return!1}function Vr(t){if(t&&typeof t=="object")switch(t[Ko]){case E$:case uf:case Zc:case Vm:return!0}return!1}const XAe=t=>(Jn(t)||Ar(t))&&!!t.anchor,Ch=Symbol("break visit"),HAe=Symbol("skip children"),ev=Symbol("remove node");function md(t,e){const n=ZAe(e);T5(t)?tp(null,t.contents,n,Object.freeze([t]))===ev&&(t.contents=null):tp(null,t,n,Object.freeze([]))}md.BREAK=Ch;md.SKIP=HAe;md.REMOVE=ev;function tp(t,e,n,r){const i=YAe(t,e,n,r);if(Vr(i)||Dr(i))return GAe(t,r,i),tp(t,i,n,r);if(typeof i!="symbol"){if(Ar(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=tp(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===Ch)return Ch;o===ev&&(e.items.splice(s,1),s-=1)}}}else if(Dr(e)){r=Object.freeze(r.concat(e));const s=tp("key",e.key,n,r);if(s===Ch)return Ch;s===ev&&(e.key=null);const o=tp("value",e.value,n,r);if(o===Ch)return Ch;o===ev&&(e.value=null)}}return i}function ZAe(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function YAe(t,e,n,r){var i,s,o,a,l;if(typeof n=="function")return n(t,e,r);if(Cy(e))return(i=n.Map)==null?void 0:i.call(n,t,e,r);if(Ey(e))return(s=n.Seq)==null?void 0:s.call(n,t,e,r);if(Dr(e))return(o=n.Pair)==null?void 0:o.call(n,t,e,r);if(Jn(e))return(a=n.Scalar)==null?void 0:a.call(n,t,e,r);if(Um(e))return(l=n.Alias)==null?void 0:l.call(n,t,e,r)}function GAe(t,e,n){const r=e[e.length-1];if(Ar(r))r.items[t]=n;else if(Dr(r))t==="key"?r.key=n:r.value=n;else if(T5(r))r.contents=n;else{const i=Um(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const KAe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},JAe=t=>t.replace(/[!,[\]{}]/g,e=>KAe[e]);class ts{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ts.defaultYaml,e),this.tags=Object.assign({},ts.defaultTags,n)}clone(){const e=new ts(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ts(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ts.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ts.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:ts.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ts.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const o=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+JAe(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&Vr(e.contents)){const s={};md(e.contents,(o,a)=>{Vr(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&n.push(`%TAG ${s} ${o}`);return n.join(`
|
91
|
+
Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let e=this.seed;return this.dictionaries.slice(0,this.length).reduce((n,r)=>{let i;e?(i=(o=>{if(typeof o=="string"){const a=o.split("").map(c=>c.charCodeAt(0)).reduce((c,u)=>c+u,1),l=Math.floor(Number(a));return Yz(l)}return Yz(o)})(e),e=4294967296*i):i=Math.random();let s=r[Math.floor(i*r.length)]||"";if(this.style==="lowerCase")s=s.toLowerCase();else if(this.style==="capital"){const[o,...a]=s.split("");s=o.toUpperCase()+a.join("")}else this.style==="upperCase"&&(s=s.toUpperCase());return n?`${n}${this.separator}${s}`:`${s}`},"")}};const Gz={separator:"_",dictionaries:[]},bte=t=>{const e=[...t&&t.dictionaries||Gz.dictionaries],n={...Gz,...t,length:t&&t.length||e.length,dictionaries:e};if(!t||!t.dictionaries||!t.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new bPe(n).generate()};var xte=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","amused","ancient","angry","annoyed","annual","anonymous","anxious","appalling","apparent","applicable","appropriate","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","asleep","assistant","associated","atomic","attractive","automatic","autonomous","available","average","awake","aware","awful","awkward","back","bad","balanced","bare","basic","beautiful","beneficial","better","bewildered","big","binding","biological","bitter","bizarre","blank","blind","blonde","bloody","blushing","boiling","bold","bored","boring","bottom","brainy","brave","breakable","breezy","brief","bright","brilliant","broad","broken","bumpy","burning","busy","calm","capable","capitalist","careful","casual","causal","cautious","central","certain","changing","characteristic","charming","cheap","cheerful","chemical","chief","chilly","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clear","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concrete","condemned","confident","confidential","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","creative","creepy","criminal","critical","crooked","crowded","crucial","crude","cruel","cuddly","cultural","curious","curly","current","curved","cute","daily","damaged","damp","dangerous","dark","dead","deaf","deafening","dear","decent","decisive","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delighted","delightful","democratic","dependent","depressed","desirable","desperate","detailed","determined","developed","developing","devoted","different","difficult","digital","diplomatic","direct","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dual","due","dull","dusty","dutch","dying","dynamic","eager","early","eastern","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","eligible","embarrassed","embarrassing","emotional","empirical","empty","enchanting","encouraging","endless","energetic","enormous","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","eventual","everyday","evident","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","fair","faithful","familiar","famous","fancy","fantastic","far","fascinating","fashionable","fast","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","filthy","final","financial","fine","firm","fiscal","fit","fixed","flaky","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","frequent","fresh","friendly","frightened","front","frozen","full","fun","functional","fundamental","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","genuine","geographical","giant","gigantic","given","glad","glamorous","gleaming","global","glorious","golden","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","happy","hard","harsh","head","healthy","heavy","helpful","helpless","hidden","high","hilarious","hissing","historic","historical","hollow","holy","homeless","homely","hon","honest","horizontal","horrible","hostile","hot","huge","human","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","illegal","imaginative","immediate","immense","imperial","implicit","important","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","irrelevant","isolated","itchy","jealous","jittery","joint","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","known","labour","large","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","like","likely","limited","linear","linguistic","liquid","literary","little","live","lively","living","local","logical","lonely","long","loose","lost","loud","lovely","low","loyal","ltd","lucky","mad","magic","magnetic","magnificent","main","major","male","mammoth","managerial","managing","manual","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","naked","narrow","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","net","neutral","new","nice","noble","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","official","ok","okay","old","olympic","only","open","operational","opposite","optimistic","oral","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","overall","overseas","overwhelming","painful","pale","panicky","parallel","parental","parliamentary","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","permanent","persistent","personal","petite","philosophical","physical","plain","planned","plastic","pleasant","pleased","poised","polite","political","poor","popular","positive","possible","potential","powerful","practical","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","previous","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","provincial","psychiatric","psychological","public","puny","pure","purring","puzzled","quaint","qualified","quarrelsome","querulous","quick","quickest","quiet","quintessential","quixotic","racial","radical","rainy","random","rapid","rare","raspy","rational","ratty","raw","ready","real","realistic","rear","reasonable","recent","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","romantic","rotten","rough","round","royal","rubber","rude","ruling","running","rural","sacred","sad","safe","salty","satisfactory","satisfied","scared","scary","scattered","scientific","scornful","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shared","sharp","sheer","shiny","shivering","shocked","short","shrill","shy","sick","significant","silent","silky","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","small","smart","smiling","smoggy","smooth","social","socialist","soft","solar","sole","solid","sophisticated","sore","sorry","sound","sour","southern","soviet","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","spontaneous","sporting","spotless","spotty","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steep","sticky","stiff","still","stingy","stormy","straight","straightforward","strange","strategic","strict","striking","striped","strong","structural","stuck","stupid","subjective","subsequent","substantial","subtle","successful","successive","sudden","sufficient","suitable","sunny","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","swift","symbolic","sympathetic","systematic","tall","tame","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tense","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tiny","tired","top","tory","total","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","typical","ugliest","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unwilling","upper","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","verbal","vertical","very","vicarious","vicious","victorious","violent","visible","visiting","visual","vital","vitreous","vivacious","vivid","vocal","vocational","voiceless","voluminous","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","wealthy","weary","wee","weekly","weird","welcome","well","western","wet","whispering","whole","wicked","wide","widespread","wild","wilful","willing","willowy","wily","wise","wispy","wittering","witty","wonderful","wooden","working","worldwide","worried","worrying","worthwhile","worthy","written","wrong","xenacious","xenial","xenogeneic","xenophobic","xeric","xerothermic","yabbering","yammering","yappiest","yappy","yawning","yearling","yearning","yeasty","yelling","yelping","yielding","yodelling","young","youngest","youthful","ytterbic","yucky","yummy","zany","zealous","zeroth","zestful","zesty","zippy","zonal","zoophagous","zygomorphic","zygotic"],wte=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"];let Rx;const xPe=new Uint8Array(16);function wPe(){if(!Rx&&(Rx=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rx))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rx(xPe)}const vi=[];for(let t=0;t<256;++t)vi.push((t+256).toString(16).slice(1));function SPe(t,e=0){return(vi[t[e+0]]+vi[t[e+1]]+vi[t[e+2]]+vi[t[e+3]]+"-"+vi[t[e+4]]+vi[t[e+5]]+"-"+vi[t[e+6]]+vi[t[e+7]]+"-"+vi[t[e+8]]+vi[t[e+9]]+"-"+vi[t[e+10]]+vi[t[e+11]]+vi[t[e+12]]+vi[t[e+13]]+vi[t[e+14]]+vi[t[e+15]]).toLowerCase()}const _Pe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Kz={randomUUID:_Pe};function kPe(t,e,n){if(Kz.randomUUID&&!e&&!t)return Kz.randomUUID();t=t||{};const r=t.random||(t.rng||wPe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return SPe(r)}function Kn(){return kPe()}function xT(t){return t||Kn()}function CPe(t,e){const n=JSON.stringify({filenameGlob:e,key:t});return`${Y.JSON_SOURCE_PREFIX}${n}`}function Ste(t,e,n){return e?CPe([...n,...t],e):Kn()}function EPe(t){const e={dictionaries:[xte,wte],separator:"_",length:2};let n;for(;!n||t.includes(n);)n=bte(e);return n}function Fm(){return bte({dictionaries:[xte,wte],separator:"_",length:2})}const TPe={id:null,name:"",previewImgColor:"bg-blue-500/60 dark:bg-blue-600/30",viewport:null,children:{}},PPe={id:null,name:"",size:{width:"auto",height:"auto"},parentId:null,variantId:null,uiTypeId:null,uiTypeColId:null,social:"",artifactGroupIds:[],defaultVariantId:null,variantIds:[],paramSweepSectionId:null,nonPresetUITypeIds:[],codeLanguage:"python",configLanguage:"python",runInMemory:!1,isFrozen:!1,isHorizontalOrientation:!1,hideParams:!1,hideSearch:!1,hideUnpinnedParams:!1,displayMode:"GUI",pinnedAreaHeight:"auto",isMinimized:!1,canvasSettings:{activeLayerId:null,color:"#ff0000",brushSize:16,brushShape:"butt",eraserBrushSize:16,drawThrottleDelay:0,canvasTransferQueueLength:50,artifactIdUsedToSetCanvasSize:null,mode:"draw"},chartSettings:{type:"line",xAxisColumn:"",secondYAxisColumns:[],xAxisLog:!1,y1AxisLog:!1,y2AxisLog:!1},isTemporary:!1,isReadOnlyTerminal:!1,renderMarkdown:!1,positionAndSizeLocked:!1,jsonSource:"",jsonSourceKeys:[],selectedVariantIds:{},paramFilter:"",jsonSourceMissing:!1,isInOtherProjectConfigs:!1,aspectRatio:!1,aspectRatioExtraHeight:0,aspectRatioExtraWidth:0,columnWidth:null,renderedValue:null,subprocessStartMethod:"fork"},APe={name:"",values:{},children:[],selectedItem:null,code:"",codeInfoColId:null,description:"",evRefs:[],templateVars:[],isFrozen:!1,sweep:[],runGroup:{}},RPe={id:null,name:"",editable:!1,rcType:"parameter",defaultVal:"",description:"",positionalOnly:!1,isPinned:!1,isFrozen:!1,isSelected:!1,evRefs:[],ignoreTypeErrors:!1},$Pe={children:{null:[]}},MPe={id:null,type:"TEXT",name:"",presetType:"BASE",config:{}},IPe={value:"",evRefs:[]},DPe={selected:!0,paramSweeps:{},versions:{}},LPe={uiTypeId:"3fdaeb6a-e989-4888-b844-17a76f0b0192",nonPresetUITypeIds:[]},NPe={sectionId:null,paramInfoId:null,isArgsObj:!1,startPos:0,keyword:""},QPe={name:"",path:"",value:null,type:""},Ld={projectConfig:TPe,section:PPe,sectionVariant:APe,codeInfo:RPe,codeInfoCol:$Pe,uiType:MPe,evEntry:IPe,runGroupEntry:DPe,uiTypeColEntry:LPe,evRefEntry:NPe,artifact:QPe};function k5(){return ae.cloneDeep(Ld.codeInfoCol)}function p$({uiType:t,currValue:e}){switch(t.type){case Y.TEXT:case Y.PASSWORD:return jPe({currValue:e});case Y.SLIDER:return BPe({uiType:t,currValue:e});case Y.SWITCH:return zPe({currValue:e});case Y.COLOR_PICKER:return FPe({currValue:e});case Y.DROPDOWN:return WPe({currValue:e});default:return""}}function jPe({currValue:t}){return ae.isNil(t)?"":t}function BPe({uiType:t,currValue:e}){const n=ae.toNumber(e);return ae.isFinite(n)?ae.toString(Hc(n,t.config.min,t.config.max)):ae.toString(t.config.min)}function zPe({currValue:t}){return ae.isNil(t)||t==="0"?"false":"true"}function FPe({currValue:t}){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:"#ff0000"}function WPe({currValue:t}){return ae.isNil(t)?"":t}function Wm(){return ae.cloneDeep(Ld.evEntry)}function El(t){t?Ra.setState({open:t}):Ra.getState().reset()}function au(t,e){Ra.setState({modalType:t,modalData:e,open:!0})}function _te(){au(br.LOAD_PROJECT_CONFIG)}function kte(){au(br.SAVE_PROJECT_CONFIG_AS)}function VPe(){au(br.SAVE_PROJECT_CONFIG_AS_WITH_REFS)}function UPe(){au(br.EXPORT_JSON)}function qPe(){au(br.IMPORT_JSON)}function XPe(t){au(br.DELETE_PROJECT_WARNING,t)}function HPe(...t){au(br.RENAME_REFERENCES,t)}function ZPe(t){au(br.DELETE_JSON_SOURCE_FILE,t)}function YPe(t){au(br.ADD_ARTIFACT_BY_FILEPATH,t)}function m$(t){return t.split(";base64,")[1]}function Cte(t){return m$(t.toDataURL("image/png"))}async function g$(t){const e=GPe(t),n=new Image;return n.src=e,await n.decode(),n}function GPe(t){return t.startsWith("data:image/")?t:`data:image/png;base64,${t}`}async function KPe(t){return await jt({body:{artifactIds:t},address:Y.ROUTE_LOAD_ARTIFACTS})}async function JPe(t){return await jt({body:{sectionType:t},address:Y.ROUTE_LOAD_AVAILABLE_ARTIFACTS})}async function eAe(t){return await jt({body:{filepath:t},address:Y.ROUTE_CHECK_IF_FILE_EXISTS})}async function tAe(t,e){return await jt({body:{filepath:t,type:e},address:Y.ROUTE_LOAD_ARTIFACT_FROM_DISK})}async function nAe(t){return await jt({body:{base64Str:t},address:Y.ROUTE_READ_CSV_BASE64})}async function rAe(t){return await jt({body:{namesPathsTypes:t},address:Y.ROUTE_GET_ARTIFACT_IDS_FROM_NAME_PATH_TYPE})}function iAe(t,e){let n;for(let r of t)r>=e&&(n===void 0||r-e<n-e)&&(n=r);return n}function sAe(t,e){const n=[],{fullNameToInfo:r}=Dd.getState();for(const i of t){const s=e.substring(i.startPos,i.endPos);if(s in r){const o=r[s];n.push({sectionId:o.sectionId,paramInfoId:o.paramInfoId,isArgsObj:o.isArgsObj,startPos:i.startPos,keyword:s})}}return n}function oAe(t,e){const n=[],{fullNameToSectionId:r}=O5.getState();for(const i of t){const s=e.substring(i.startPos,i.endPos);s in r&&n.push({sectionId:r[s],startPos:i.startPos,keyword:s})}return n}function Ete(){const t={};for(const[e,n]of Object.entries(Dd.getState().fullNameToInfo))t[Tte({sectionId:n.sectionId,paramInfoId:n.paramInfoId,isArgsObj:n.isArgsObj})]=e;return t}function Tte({sectionId:t,paramInfoId:e=null,isArgsObj:n=!1}){return JSON.stringify([t,e,n])}function aAe({fullNameToInfo:t,keyword:e,sectionId:n,paramInfoId:r}){return!(t[e].sectionId===n&&!t[e].paramInfoId||t[e].sectionId===n&&t[e].paramInfoId===r)}function v$({sectionId:t,paramInfoId:e,value:n,regexPatternKey:r}){let i;const s=new Set,{[r]:o,fullNameToInfo:a}=Dd.getState();for(;i=o.exec(n);)aAe({fullNameToInfo:a,keyword:i[0],sectionId:t,paramInfoId:e})&&s.add([i[0],i.index]);return Array.from(s)}function O$(t,e){let n;const r=[],{pattern:i,fullNameToSectionId:s}=O5.getState();for(;n=i.exec(e);)s[n[0]]!==t&&r.push([n[0],n.index]);return r}function lAe(t){const e=t.indexOf(Y.TEMPLATE_PREFIX,t.indexOf(Y.TEMPLATE_PREFIX)+1);return t.substring(e)}async function cAe(){return await jt({body:{},address:Y.ROUTE_ALL_PROJECT_CONFIG_METADATA})}async function Jz(){return await jt({body:{},address:Y.ROUTE_LOAD_PROJECT_CONFIG_NAMES})}async function uAe(t){return await jt({body:{projectConfigName:t},address:Y.ROUTE_LOAD_PROJECT_CONFIG})}async function fAe({excludeProjectConfigName:t}){return await jt({body:{excludeProjectConfigName:t},address:Y.ROUTE_LOAD_FULL_PROJECT})}async function hAe({name:t,previewImgColor:e}){return await jt({address:Y.ROUTE_CREATE_PROJECT_CONFIG,body:{name:t,previewImgColor:e}})}async function dAe({project:t}){return await jt({address:Y.ROUTE_SAVE_PROJECT,body:{project:t}})}async function pAe({project:t,newConfigName:e,withRefs:n}){return await jt({address:Y.ROUTE_SAVE_AS_NEW_PROJECT_CONFIG,body:{project:t,newConfigName:e,withRefs:n}})}async function mAe({project:t,configName:e}){return await jt({address:Y.ROUTE_SAVE_AS_EXISTING_PROJECT_CONFIG,body:{project:t,configName:e}})}async function gAe(t){return await jt({address:Y.ROUTE_DELETE_PROJECT_CONFIGS,body:{ids:t}})}async function vAe(){return await jt({address:Y.ROUTE_GET_DEFAULT_CONFIG_NAME,body:{}})}async function OAe(t){return await jt({address:Y.ROUTE_SET_AS_DEFAULT_PROJECT,body:{projectId:t}})}async function yAe(t){return await jt({address:Y.ROUTE_FILTER_DATA_FOR_JSON_EXPORT,body:{project:t}})}async function bAe(t){return await jt({address:Y.ROUTE_ADD_DEFAULT_DATA_FOR_JSON_IMPORT,body:{project:t}})}async function eF(t){return await jt({address:Y.ROUTE_SAVE_SETTINGS,body:{settings:t}})}async function xAe(){return await jt({address:Y.ROUTE_LOAD_SETTINGS,body:{}})}async function wAe(t){return await jt({address:Y.ROUTE_SAVE_SETTINGS_PROJECT,body:{settingsProject:t}})}async function SAe(){return await jt({address:Y.ROUTE_LOAD_SETTINGS_PROJECT,body:{}})}function Pte({name:t,...e}){return ae.merge(ae.cloneDeep(Ld.artifact),{name:t??Fm()},e)}function Ate({name:t,...e}){return{name:t??Fm(),artifactTransforms:[],visible:!0,layerOpacity:.5,brushOpacity:1,...e}}function y$(t,e,n){return{artifactId:t,..._Ae(e,n)}}function _Ae(t,e){switch(t){case Y.DRAW:return{transform:[1,0,0,1,0,0],eraserStrokes:e==="img"?[]:{}};case Y.IMAGE:case Y.CHART:return{};default:return{}}}const b$=ae.throttle(()=>{if(c_.temporal.getState().pastStates.length<=1)return;const e=c_.getState().version;for(const n of Mm[Rd.PROJECT_STATE])n.temporal&&e===n.getState().version&&(n.temporal.getState().undo(2),kAe(n));w$(),Ut.setState({undoOrRedoWasTriggered:!0})},100);function kAe(t){t.temporal.setState(e=>({pastStates:[...e.pastStates,t.getState()],futureStates:Rte(e.futureStates)}))}function Rte(t){const e=[],n=new Set;for(const r of t)n.has(r.version)||(e.push(r),n.add(r.version));return e}const x$=ae.throttle(()=>{const t=c_.getState().version;for(const e of Mm[Rd.PROJECT_STATE])e.temporal&&t===e.getState().version&&(e.temporal.getState().redo(),CAe(e));w$(),Ut.setState({undoOrRedoWasTriggered:!0})},100);function CAe(t){t.temporal.setState(e=>({pastStates:Rte([...e.pastStates,t.getState()])}))}function EAe(t){let e=!1;for(const r of t)if(r.temporal&&!ae.isEqual(r.getState(),r.temporal.getState().pastStates.at(-1))){e=!0;break}if(!e)return;const n=c_.getState().version;for(const r of t)r.temporal&&(r.setState({version:n+1}),TAe(r,()=>r.setState({})))}function TAe(t,e){t.temporal.getState().resume(),e(),t.temporal.getState().pause()}const hn=ae.throttle((t,e=!0)=>{t&&(EAe(Mm[Rd.PROJECT_STATE]),e&&w$())},500),w$=ae.debounce(()=>{Nt.getState().backend.autosave&&j5()},1e3);async function PAe(t,e,n){const r=await KPe(e);if(r.status===200){const i=ae.cloneDeep(r.data);if(await AAe(i),n!=null&&n.aborted)return;fi.setState(s=>({x:{...s.x,...i}})),te.setState(s=>{Lte(e,t,s)}),hn(!0)}}async function AAe(t){for(const e of Object.values(t))e.value=await $te(e.type,e.value)}async function $te(t,e){switch(t){case"img":return await g$(e);case"list":case"brushStrokes":return e}}async function RAe(t,e){switch(t){case"img":return await g$(e);case"list":const n=await nAe(m$(e));if(n.status==200)return n.data;default:return null}}function $Ae(){const t={};for(const[e,n]of Object.entries(fi.getState().x))typeof n!="function"&&(n.type==="img"&&n.value instanceof Image?t[e]={...n,value:m$(n.value.src)}:t[e]=n);return t}function Mte(t,e){const n=Kn(),r="brushStrokes";fi.setState(s=>({x:{...s.x,[n]:Pte({type:r,value:[]})}}));const i=Kn();e.artifactGroups[i]=Ate({artifactTransforms:[y$(n,Y.DRAW,r)]}),e.x[t].artifactGroupIds.push(i),e.x[t].canvasSettings.activeLayerId=i}function Ite({sectionId:t,sectionTypeName:e,artifactId:n,artifactType:r,createNewArtifactGroup:i=!1,add:s,state:o}){let a=MAe(t,e,o),l;if(s){(!a||i)&&(a=Kn(),o.artifactGroups[a]=Ate({}),o.x[t].artifactGroupIds.unshift(a));const c=y$(n,e,r);l=o.artifactGroups[a],e===Y.DRAW||e===Y.CHART?l.artifactTransforms.push(c):l.artifactTransforms=[c]}else l=o.artifactGroups[a],l&&(l.artifactTransforms=l.artifactTransforms.filter(c=>c.artifactId!==n));l&&Lte(l.artifactTransforms.map(c=>c.artifactId),t,o)}async function Dte({sectionId:t,createNewArtifactGroup:e,value:n,artifactType:r,path:i=""}){const s=Kn();fi.setState(o=>({x:{...o.x,[s]:Pte({value:n,path:i,type:r})}})),te.setState(o=>{const a=dn(t,o);Ite({sectionId:t,sectionTypeName:a,artifactId:s,artifactType:r,createNewArtifactGroup:e,add:!0,state:o})})}function MAe(t,e,n){switch(e){case Y.DRAW:return n.x[t].canvasSettings.activeLayerId;case Y.IMAGE:case Y.CHART:return n.x[t].artifactGroupIds[0]}}function Lte(t,e,n){dn(e,n)===Y.CHART&&Nte(t,e,n)}function Nte(t,e,n){const{chartSettings:r}=n.x[e],i=S$(t.map(o=>fi.getState().x[o]),r.type),s=Object.keys(i);Ut.setState(o=>({chartDisplayedSeriesNames:{...o.chartDisplayedSeriesNames,[e]:s}}))}function S$(t,e){switch(e){case"line":return IAe(t);case"scatter":return DAe(t);default:return{}}}function IAe(t){const e={};for(const n of t)for(const[r,i]of Object.entries(n.value)){const s=t.length===1?r:`${n.name}/${r}`;e[s]=[...i]}return e}function DAe(t){const e={};for(const n of t)for(const[r,i]of Object.entries(n.value))r in e||(e[r]=[]),e[r].push(...i);return e}function _$(t){return JSON.stringify([t.name,t.path,t.type])}function Qte(t,e,n,r,i,s=null,o=null){const a=[],l=n.filter(f=>i(t[f])).reverse(),c=new Set,u=s?{}:null;for(s&&l.forEach(f=>u[f]=s(t[f])?[f]:[]);l.length>0;){const f=l.pop();if(!f||c.has(f))continue;c.add(f);const h=t[f];if(r(h)&&a.push(h.id),i(h)){const d=e[h.id].slice().reverse();if(s){const p=u[f];d.forEach(g=>{u[g]=s(t[g])?[...p,g]:[...p]})}l.push(...d)}if(a.length>0&&(o!=null&&o(t[a[a.length-1]])))return{ids:a,pathMap:u,earlyReturnTriggered:!0}}return{ids:a,pathMap:u,earlyReturnTriggered:!1}}function k$({allCodeInfo:t,codeInfoChildren:e,startingId:n,additionalOutputCondition:r=null,paramPathCondition:i=null,earlyReturnCondition:s=null}){const o=n?[n]:e[n];return Qte(t,e,o??[],l=>(l==null?void 0:l.rcType)===Y.PARAMETER&&(!r||r(l)),n?()=>!0:l=>(l==null?void 0:l.rcType)===Y.PARAMETER,i,s)}function LAe(t,e){return Qte(t,e,e[null]??[],()=>!0,()=>!0)}function _y(t){return k$({...t,paramPathCondition:e=>e.rcType===Y.PARAMETER})}function rO(t,e,n,r){const{ids:i,pathMap:s}=_y({allCodeInfo:e,codeInfoChildren:n,startingId:r});i.reverse();let o=[];const a=new Set,l={};for(const c of i)if(Y8e(e[c].isPinned,t)&&(n[c].length===0||n[c].some(u=>u in l)))for(const u of s[c])l[u]=s[u],a.has(s[c][0])||(o.push(s[c][0]),a.add(s[c][0]));return o.reverse(),{requiredParamIdsToPaths:l,topLevelParamIds:o}}function C$(t,e,n){if(e[n].length===1)return t[e[n][0]].name;{let r="";for(const[i,s]of e[n].entries())i===0?r=t[s].name:r+=`["${t[s].name}"]`;return r}}function jte(t,e,n){const{selectedItem:r}=Yt(t,e),i=Jo(t,e).children,{earlyReturnTriggered:s}=k$({allCodeInfo:e.codeInfo,codeInfoChildren:i,startingId:r,earlyReturnCondition:n});return s}function NAe(t,e){return jte(t,e,n=>(n==null?void 0:n.rcType)===Y.PARAMETER)}function QAe(t,e){return jte(t,e,n=>n==null?void 0:n.isSelected)}function Bte(t,e){const{hideUnpinnedParams:n}=e.x[t],{codeInfoChildren:r,parentCodeInfoId:i}=Ry(t,e);let s=rO(!0,e.codeInfo,r,i);s=Object.keys(s.requiredParamIdsToPaths),s.reverse();let o=[];return n||(o=rO(!1,e.codeInfo,r,i),o=Object.keys(o.requiredParamIdsToPaths),o.reverse()),[...s,...o]}function jAe(t,e){return te(n=>{const r=Ll(t,n).values;return e in r?{value:r[e].value,evRefs:r[e].evRefs}:Wm()},ae.isEqual)}function zte(t){return te(e=>t?e.x[t].variantIds.map(n=>({id:n,name:e.variants[n].name})):[],ae.isEqual)}function BAe(t){return te(e=>{const n=e.x[t].parentId;return Ll(n).children.indexOf(t)})}function C5(t){return te(e=>Yt(t,e).isFrozen)}function Fte(t){return te(e=>({...Wte(t,e),variantIsFrozen:Yt(t,e).isFrozen}),ae.isEqual)}function Wte(t,e){return{renderMarkdown:e.x[t].renderMarkdown,description:Ll(t,e).description}}function zAe(t){return te(e=>{const n=z5(t,e),r=ky(t,e.x);return{forSectionId:r,variantId:n,paramSweep:e.variants[n].sweep,variantIsFrozen:Yt(t).isFrozen,showParamSweepSectionSearch:!e.x[r].hideSearch&&dn(r,e)!==Y.GLOBAL_VARIABLES}},ae.isEqual)}function FAe(t){const e=te(n=>n.x[t].paramSweepSectionId);return zte(e)}function ky(t,e){var n;return(n=Object.values(e).find(r=>r.paramSweepSectionId===t))==null?void 0:n.id}async function WAe(t,e){switch(dn(t)){case Y.PARAM_SWEEP:return await UAe(t,e);case Y.GLOBAL_PARAM_SWEEP:return await qAe(e);case Y.GLOBAL_VARIABLES:case Y.SECTION:return await VAe(e)}}async function VAe(t){const e=te.getState(),{codeInfoChildren:n,parentCodeInfoId:r}=Ry(null,e,t),i=e.codeInfo,s=rO(!0,i,n,r),o=rO(!1,i,n,r);s.requiredParamIds=Object.keys(s.requiredParamIdsToPaths),o.requiredParamIds=Object.keys(o.requiredParamIdsToPaths),delete s.requiredParamIdsToPaths,delete o.requiredParamIdsToPaths;const a=e.variants[t];return await jt({body:{codeInfo:i,codeInfoChildren:n,sectionVariant:a,pinnedIds:s,unpinnedIds:o},address:Y.ROUTE_SECTION_TO_YAML})}async function UAe(t,e){const n=te.getState(),r=ky(t,n.x),s=n.variants[e].sweep,o=n.codeInfo,l=(Nne(r,n)??k5()).children;return await jt({body:{sweep:s,codeInfo:o,codeInfoChildren:l},address:Y.ROUTE_PARAM_SWEEP_SECTION_TO_YAML})}async function qAe(t){const e=te.getState(),n=e.x,r=e.variants,i=r[t].runGroup;return await jt({body:{runGroup:i,sections:n,sectionVariants:r},address:Y.ROUTE_GLOBAL_PARAM_SWEEP_SECTION_TO_YAML})}function E5({id:t,...e}){return ae.merge(ae.cloneDeep(Ld.codeInfo),{id:xT(t)},e)}const E$=Symbol.for("yaml.alias"),wT=Symbol.for("yaml.document"),uf=Symbol.for("yaml.map"),Vte=Symbol.for("yaml.pair"),Zc=Symbol.for("yaml.scalar"),Vm=Symbol.for("yaml.seq"),Ko=Symbol.for("yaml.node.type"),Um=t=>!!t&&typeof t=="object"&&t[Ko]===E$,T5=t=>!!t&&typeof t=="object"&&t[Ko]===wT,Cy=t=>!!t&&typeof t=="object"&&t[Ko]===uf,Dr=t=>!!t&&typeof t=="object"&&t[Ko]===Vte,Jn=t=>!!t&&typeof t=="object"&&t[Ko]===Zc,Ey=t=>!!t&&typeof t=="object"&&t[Ko]===Vm;function Ar(t){if(t&&typeof t=="object")switch(t[Ko]){case uf:case Vm:return!0}return!1}function Vr(t){if(t&&typeof t=="object")switch(t[Ko]){case E$:case uf:case Zc:case Vm:return!0}return!1}const XAe=t=>(Jn(t)||Ar(t))&&!!t.anchor,Ch=Symbol("break visit"),HAe=Symbol("skip children"),ev=Symbol("remove node");function md(t,e){const n=ZAe(e);T5(t)?tp(null,t.contents,n,Object.freeze([t]))===ev&&(t.contents=null):tp(null,t,n,Object.freeze([]))}md.BREAK=Ch;md.SKIP=HAe;md.REMOVE=ev;function tp(t,e,n,r){const i=YAe(t,e,n,r);if(Vr(i)||Dr(i))return GAe(t,r,i),tp(t,i,n,r);if(typeof i!="symbol"){if(Ar(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=tp(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===Ch)return Ch;o===ev&&(e.items.splice(s,1),s-=1)}}}else if(Dr(e)){r=Object.freeze(r.concat(e));const s=tp("key",e.key,n,r);if(s===Ch)return Ch;s===ev&&(e.key=null);const o=tp("value",e.value,n,r);if(o===Ch)return Ch;o===ev&&(e.value=null)}}return i}function ZAe(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function YAe(t,e,n,r){var i,s,o,a,l;if(typeof n=="function")return n(t,e,r);if(Cy(e))return(i=n.Map)==null?void 0:i.call(n,t,e,r);if(Ey(e))return(s=n.Seq)==null?void 0:s.call(n,t,e,r);if(Dr(e))return(o=n.Pair)==null?void 0:o.call(n,t,e,r);if(Jn(e))return(a=n.Scalar)==null?void 0:a.call(n,t,e,r);if(Um(e))return(l=n.Alias)==null?void 0:l.call(n,t,e,r)}function GAe(t,e,n){const r=e[e.length-1];if(Ar(r))r.items[t]=n;else if(Dr(r))t==="key"?r.key=n:r.value=n;else if(T5(r))r.contents=n;else{const i=Um(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const KAe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},JAe=t=>t.replace(/[!,[\]{}]/g,e=>KAe[e]);class ts{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ts.defaultYaml,e),this.tags=Object.assign({},ts.defaultTags,n)}clone(){const e=new ts(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ts(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ts.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ts.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:ts.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ts.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const o=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+JAe(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&Vr(e.contents)){const s={};md(e.contents,(o,a)=>{Vr(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&n.push(`%TAG ${s} ${o}`);return n.join(`
|
92
92
|
`)}}ts.defaultYaml={explicit:!1,version:"1.2"};ts.defaultTags={"!!":"tag:yaml.org,2002:"};function Ute(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function qte(t){const e=new Set;return md(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Xte(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function e9e(t,e){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=qte(t));const o=Xte(e,i);return i.add(o),o},setAnchors:()=>{for(const s of n){const o=r.get(s);if(typeof o=="object"&&o.anchor&&(Jn(o.node)||Ar(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}function np(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const o=r[i],a=np(t,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),o=np(t,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const s=np(t,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const o=np(t,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return t.call(e,n,r)}function Vo(t,e,n){if(Array.isArray(t))return t.map((r,i)=>Vo(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!XAe(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}class T${constructor(e){Object.defineProperty(this,Ko,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!T5(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=Vo(this,"",o);if(typeof i=="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof s=="function"?np(s,{"":a},"",a):a}}let P$=class extends T${constructor(e){super(E$),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return md(e,{Node:(r,i)=>{if(i===this)return md.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(Vo(o,null,n),a=r.get(o)),!a||a.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=IS(i,o,r)),a.count*a.aliasCount>s)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,n,r){const i=`*${this.source}`;if(e){if(Ute(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function IS(t,e,n){if(Um(e)){const r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Ar(e)){let r=0;for(const i of e.items){const s=IS(t,i,n);s>r&&(r=s)}return r}else if(Dr(e)){const r=IS(t,e.key,n),i=IS(t,e.value,n);return Math.max(r,i)}return 1}const Hte=t=>!t||typeof t!="function"&&typeof t!="object";class Lt extends T${constructor(e){super(Zc),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:Vo(this.value,e,n)}toString(){return String(this.value)}}Lt.BLOCK_FOLDED="BLOCK_FOLDED";Lt.BLOCK_LITERAL="BLOCK_LITERAL";Lt.PLAIN="PLAIN";Lt.QUOTE_DOUBLE="QUOTE_DOUBLE";Lt.QUOTE_SINGLE="QUOTE_SINGLE";const t9e="tag:yaml.org,2002:";function n9e(t,e,n){if(e){const r=n.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return n.find(r=>{var i;return((i=r.identify)==null?void 0:i.call(r,t))&&!r.format})}function iO(t,e,n){var f,h,d;if(T5(t)&&(t=t.contents),Vr(t))return t;if(Dr(t)){const p=(h=(f=n.schema[uf]).createNode)==null?void 0:h.call(f,n.schema,null,n);return p.items.push(t),p}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=n;let l;if(r&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor||(l.anchor=i(t)),new P$(l.anchor);l={anchor:null,node:null},a.set(t,l)}e!=null&&e.startsWith("!!")&&(e=t9e+e.slice(2));let c=n9e(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const p=new Lt(t);return l&&(l.node=p),p}c=t instanceof Map?o[uf]:Symbol.iterator in Object(t)?o[Vm]:o[uf]}s&&(s(c),delete n.onTagObj);const u=c!=null&&c.createNode?c.createNode(n.schema,t,n):typeof((d=c==null?void 0:c.nodeClass)==null?void 0:d.from)=="function"?c.nodeClass.from(n.schema,t,n):new Lt(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}function h_(t,e,n){let r=n;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return iO(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const b1=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;let Zte=class extends T${constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>Vr(r)||Dr(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(b1(e))this.add(n);else{const[r,...i]=e,s=this.get(r,!0);if(Ar(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,h_(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Ar(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&Jn(s)?s.value:s:Ar(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!Dr(n))return!1;const r=n.value;return r==null||e&&Jn(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Ar(i)?i.hasIn(r):!1}setIn(e,n){const[r,...i]=e;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(Ar(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,h_(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}};const r9e=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Tc(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Xh=(t,e,n)=>t.endsWith(`
|
93
93
|
`)?Tc(n,e):n.includes(`
|
94
94
|
`)?`
|
@@ -299,7 +299,7 @@ WARNING: This link could potentially be dangerous`)){const v=window.open();if(v)
|
|
299
299
|
`:`
|
300
300
|
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(C){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),v.isLinux&&C&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(C){const A=this._getMouseBufferCoords(C),R=this._model.finalSelectionStart,Q=this._model.finalSelectionEnd;return!!(R&&Q&&A)&&this._areCoordsInSelection(A,R,Q)}isCellInSelection(C,A){const R=this._model.finalSelectionStart,Q=this._model.finalSelectionEnd;return!(!R||!Q)&&this._areCoordsInSelection([C,A],R,Q)}_areCoordsInSelection(C,A,R){return C[1]>A[1]&&C[1]<R[1]||A[1]===R[1]&&C[1]===A[1]&&C[0]>=A[0]&&C[0]<R[0]||A[1]<R[1]&&C[1]===R[1]&&C[0]<R[0]||A[1]<R[1]&&C[1]===A[1]&&C[0]>=A[0]}_selectWordAtCursor(C,A){var R,Q;const L=(Q=(R=this._linkifier.currentLink)===null||R===void 0?void 0:R.link)===null||Q===void 0?void 0:Q.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const z=this._getMouseBufferCoords(C);return!!z&&(this._selectWordAt(z,A),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(C,A){this._model.clearSelection(),C=Math.max(C,0),A=Math.min(A,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,C],this._model.selectionEnd=[this._bufferService.cols,A],this.refresh(),this._onSelectionChange.fire()}_handleTrim(C){this._model.handleTrim(C)&&this.refresh()}_getMouseBufferCoords(C){const A=this._mouseService.getCoords(C,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(A)return A[0]--,A[1]--,A[1]+=this._bufferService.buffer.ydisp,A}_getMouseEventScrollAmount(C){let A=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,C,this._screenElement)[1];const R=this._renderService.dimensions.css.canvas.height;return A>=0&&A<=R?0:(A>R&&(A-=R),A=Math.min(Math.max(A,-50),50),A/=50,A/Math.abs(A)+Math.round(14*A))}shouldForceSelection(C){return v.isMac?C.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:C.shiftKey}handleMouseDown(C){if(this._mouseDownTimeStamp=C.timeStamp,(C.button!==2||!this.hasSelection)&&C.button===0){if(!this._enabled){if(!this.shouldForceSelection(C))return;C.stopPropagation()}C.preventDefault(),this._dragScrollAmount=0,this._enabled&&C.shiftKey?this._handleIncrementalClick(C):C.detail===1?this._handleSingleClick(C):C.detail===2?this._handleDoubleClick(C):C.detail===3&&this._handleTripleClick(C),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(C){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(C))}_handleSingleClick(C){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(C)?3:0,this._model.selectionStart=this._getMouseBufferCoords(C),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const A=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);A&&A.length!==this._model.selectionStart[0]&&A.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(C){this._selectWordAtCursor(C,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(C){const A=this._getMouseBufferCoords(C);A&&(this._activeSelectionMode=2,this._selectLineAt(A[1]))}shouldColumnSelect(C){return C.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(C){if(C.stopImmediatePropagation(),!this._model.selectionStart)return;const A=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(C),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(C),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const R=this._bufferService.buffer;if(this._model.selectionEnd[1]<R.lines.length){const Q=R.lines.get(this._model.selectionEnd[1]);Q&&Q.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}A&&A[0]===this._model.selectionEnd[0]&&A[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const C=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(C.ydisp+this._bufferService.rows,C.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=C.ydisp),this.refresh()}}_handleMouseUp(C){const A=C.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&A<500&&C.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const R=this._mouseService.getCoords(C,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(R&&R[0]!==void 0&&R[1]!==void 0){const Q=(0,h.moveToCellSequence)(R[0]-1,R[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(Q,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const C=this._model.finalSelectionStart,A=this._model.finalSelectionEnd,R=!(!C||!A||C[0]===A[0]&&C[1]===A[1]);R?C&&A&&(this._oldSelectionStart&&this._oldSelectionEnd&&C[0]===this._oldSelectionStart[0]&&C[1]===this._oldSelectionStart[1]&&A[0]===this._oldSelectionEnd[0]&&A[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(C,A,R)):this._oldHasSelection&&this._fireOnSelectionChange(C,A,R)}_fireOnSelectionChange(C,A,R){this._oldSelectionStart=C,this._oldSelectionEnd=A,this._oldHasSelection=R,this._onSelectionChange.fire()}_handleBufferActivate(C){this.clearSelection(),this._trimListener.dispose(),this._trimListener=C.activeBuffer.lines.onTrim(A=>this._handleTrim(A))}_convertViewportColToCharacterIndex(C,A){let R=A;for(let Q=0;A>=Q;Q++){const L=C.loadCell(Q,this._workCell).getChars().length;this._workCell.getWidth()===0?R--:L>1&&A!==Q&&(R+=L-1)}return R}setSelection(C,A,R){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[C,A],this._model.selectionStartLength=R,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(C){this._isClickInSelection(C)||(this._selectWordAtCursor(C,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(C,A,R=!0,Q=!0){if(C[0]>=this._bufferService.cols)return;const L=this._bufferService.buffer,z=L.lines.get(C[1]);if(!z)return;const B=L.translateBufferLineToString(C[1],!1);let q=this._convertViewportColToCharacterIndex(z,C[0]),Z=q;const J=C[0]-q;let I=0,j=0,M=0,X=0;if(B.charAt(q)===" "){for(;q>0&&B.charAt(q-1)===" ";)q--;for(;Z<B.length&&B.charAt(Z+1)===" ";)Z++}else{let de=C[0],fe=C[0];z.getWidth(de)===0&&(I++,de--),z.getWidth(fe)===2&&(j++,fe++);const ve=z.getString(fe).length;for(ve>1&&(X+=ve-1,Z+=ve-1);de>0&&q>0&&!this._isCharWordSeparator(z.loadCell(de-1,this._workCell));){z.loadCell(de-1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===0?(I++,de--):F>1&&(M+=F-1,q-=F-1),q--,de--}for(;fe<z.length&&Z+1<B.length&&!this._isCharWordSeparator(z.loadCell(fe+1,this._workCell));){z.loadCell(fe+1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===2?(j++,fe++):F>1&&(X+=F-1,Z+=F-1),Z++,fe++}}Z++;let se=q+J-I+M,H=Math.min(this._bufferService.cols,Z-q+I+j-M-X);if(A||B.slice(q,Z).trim()!==""){if(R&&se===0&&z.getCodePoint(0)!==32){const de=L.lines.get(C[1]-1);if(de&&z.isWrapped&&de.getCodePoint(this._bufferService.cols-1)!==32){const fe=this._getWordAt([this._bufferService.cols-1,C[1]-1],!1,!0,!1);if(fe){const ve=this._bufferService.cols-fe.start;se-=ve,H+=ve}}}if(Q&&se+H===this._bufferService.cols&&z.getCodePoint(this._bufferService.cols-1)!==32){const de=L.lines.get(C[1]+1);if(de!=null&&de.isWrapped&&de.getCodePoint(0)!==32){const fe=this._getWordAt([0,C[1]+1],!1,!1,!0);fe&&(H+=fe.length)}}return{start:se,length:H}}}_selectWordAt(C,A){const R=this._getWordAt(C,A);if(R){for(;R.start<0;)R.start+=this._bufferService.cols,C[1]--;this._model.selectionStart=[R.start,C[1]],this._model.selectionStartLength=R.length}}_selectToWordAt(C){const A=this._getWordAt(C,!0);if(A){let R=C[1];for(;A.start<0;)A.start+=this._bufferService.cols,R--;if(!this._model.areSelectionValuesReversed())for(;A.start+A.length>this._bufferService.cols;)A.length-=this._bufferService.cols,R++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?A.start:A.start+A.length,R]}}_isCharWordSeparator(C){return C.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(C.getChars())>=0}_selectLineAt(C){const A=this._bufferService.buffer.getWrappedRangeForLine(C),R={start:{x:0,y:A.first},end:{x:this._bufferService.cols-1,y:A.last}};this._model.selectionStart=[0,A.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,y.getRangeLength)(R,this._bufferService.cols)}};a.SelectionService=T=c([u(3,S.IBufferService),u(4,S.ICoreService),u(5,p.IMouseService),u(6,S.IOptionsService),u(7,p.IRenderService),u(8,p.ICoreBrowserService)],T)},4725:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const c=l(8343);a.ICharSizeService=(0,c.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),a.IMouseService=(0,c.createDecorator)("MouseService"),a.IRenderService=(0,c.createDecorator)("RenderService"),a.ISelectionService=(0,c.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,c.createDecorator)("ThemeService")},6731:function(o,a,l){var c=this&&this.__decorate||function(T,C,A,R){var Q,L=arguments.length,z=L<3?C:R===null?R=Object.getOwnPropertyDescriptor(C,A):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(T,C,A,R);else for(var B=T.length-1;B>=0;B--)(Q=T[B])&&(z=(L<3?Q(z):L>3?Q(C,A,z):Q(C,A))||z);return L>3&&z&&Object.defineProperty(C,A,z),z},u=this&&this.__param||function(T,C){return function(A,R){C(A,R,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const f=l(7239),h=l(8055),d=l(8460),p=l(844),g=l(2585),m=h.css.toColor("#ffffff"),v=h.css.toColor("#000000"),y=h.css.toColor("#ffffff"),b=h.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[h.css.toColor("#2e3436"),h.css.toColor("#cc0000"),h.css.toColor("#4e9a06"),h.css.toColor("#c4a000"),h.css.toColor("#3465a4"),h.css.toColor("#75507b"),h.css.toColor("#06989a"),h.css.toColor("#d3d7cf"),h.css.toColor("#555753"),h.css.toColor("#ef2929"),h.css.toColor("#8ae234"),h.css.toColor("#fce94f"),h.css.toColor("#729fcf"),h.css.toColor("#ad7fa8"),h.css.toColor("#34e2e2"),h.css.toColor("#eeeeec")],C=[0,95,135,175,215,255];for(let A=0;A<216;A++){const R=C[A/36%6|0],Q=C[A/6%6|0],L=C[A%6];T.push({css:h.channels.toCss(R,Q,L),rgba:h.channels.toRgba(R,Q,L)})}for(let A=0;A<24;A++){const R=8+10*A;T.push({css:h.channels.toCss(R,R,R),rgba:h.channels.toRgba(R,R,R)})}return T})());let k=a.ThemeService=class extends p.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new d.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:m,background:v,cursor:y,cursorAccent:b,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:h.color.blend(v,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:h.color.blend(v,S),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(T={}){const C=this._colors;if(C.foreground=E(T.foreground,m),C.background=E(T.background,v),C.cursor=E(T.cursor,y),C.cursorAccent=E(T.cursorAccent,b),C.selectionBackgroundTransparent=E(T.selectionBackground,S),C.selectionBackgroundOpaque=h.color.blend(C.background,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundTransparent=E(T.selectionInactiveBackground,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundOpaque=h.color.blend(C.background,C.selectionInactiveBackgroundTransparent),C.selectionForeground=T.selectionForeground?E(T.selectionForeground,h.NULL_COLOR):void 0,C.selectionForeground===h.NULL_COLOR&&(C.selectionForeground=void 0),h.color.isOpaque(C.selectionBackgroundTransparent)&&(C.selectionBackgroundTransparent=h.color.opacity(C.selectionBackgroundTransparent,.3)),h.color.isOpaque(C.selectionInactiveBackgroundTransparent)&&(C.selectionInactiveBackgroundTransparent=h.color.opacity(C.selectionInactiveBackgroundTransparent,.3)),C.ansi=a.DEFAULT_ANSI_COLORS.slice(),C.ansi[0]=E(T.black,a.DEFAULT_ANSI_COLORS[0]),C.ansi[1]=E(T.red,a.DEFAULT_ANSI_COLORS[1]),C.ansi[2]=E(T.green,a.DEFAULT_ANSI_COLORS[2]),C.ansi[3]=E(T.yellow,a.DEFAULT_ANSI_COLORS[3]),C.ansi[4]=E(T.blue,a.DEFAULT_ANSI_COLORS[4]),C.ansi[5]=E(T.magenta,a.DEFAULT_ANSI_COLORS[5]),C.ansi[6]=E(T.cyan,a.DEFAULT_ANSI_COLORS[6]),C.ansi[7]=E(T.white,a.DEFAULT_ANSI_COLORS[7]),C.ansi[8]=E(T.brightBlack,a.DEFAULT_ANSI_COLORS[8]),C.ansi[9]=E(T.brightRed,a.DEFAULT_ANSI_COLORS[9]),C.ansi[10]=E(T.brightGreen,a.DEFAULT_ANSI_COLORS[10]),C.ansi[11]=E(T.brightYellow,a.DEFAULT_ANSI_COLORS[11]),C.ansi[12]=E(T.brightBlue,a.DEFAULT_ANSI_COLORS[12]),C.ansi[13]=E(T.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),C.ansi[14]=E(T.brightCyan,a.DEFAULT_ANSI_COLORS[14]),C.ansi[15]=E(T.brightWhite,a.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const A=Math.min(C.ansi.length-16,T.extendedAnsi.length);for(let R=0;R<A;R++)C.ansi[R+16]=E(T.extendedAnsi[R],a.DEFAULT_ANSI_COLORS[R+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(T){this._restoreColor(T),this._onChangeColors.fire(this.colors)}_restoreColor(T){if(T!==void 0)switch(T){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[T]=this._restoreColors.ansi[T]}else for(let C=0;C<this._restoreColors.ansi.length;++C)this._colors.ansi[C]=this._restoreColors.ansi[C]}modifyColors(T){T(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function E(T,C){if(T!==void 0)try{return h.css.toColor(T)}catch{}return C}a.ThemeService=k=c([u(0,g.IOptionsService)],k)},6349:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const c=l(8460),u=l(844);class f extends u.Disposable{constructor(d){super(),this._maxLength=d,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(d){if(this._maxLength===d)return;const p=new Array(d);for(let g=0;g<Math.min(d,this.length);g++)p[g]=this._array[this._getCyclicIndex(g)];this._array=p,this._maxLength=d,this._startIndex=0}get length(){return this._length}set length(d){if(d>this._length)for(let p=this._length;p<d;p++)this._array[p]=void 0;this._length=d}get(d){return this._array[this._getCyclicIndex(d)]}set(d,p){this._array[this._getCyclicIndex(d)]=p}push(d){this._array[this._getCyclicIndex(this._length)]=d,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(d,p,...g){if(p){for(let m=d;m<this._length-p;m++)this._array[this._getCyclicIndex(m)]=this._array[this._getCyclicIndex(m+p)];this._length-=p,this.onDeleteEmitter.fire({index:d,amount:p})}for(let m=this._length-1;m>=d;m--)this._array[this._getCyclicIndex(m+g.length)]=this._array[this._getCyclicIndex(m)];for(let m=0;m<g.length;m++)this._array[this._getCyclicIndex(d+m)]=g[m];if(g.length&&this.onInsertEmitter.fire({index:d,amount:g.length}),this._length+g.length>this._maxLength){const m=this._length+g.length-this._maxLength;this._startIndex+=m,this._length=this._maxLength,this.onTrimEmitter.fire(m)}else this._length+=g.length}trimStart(d){d>this._length&&(d=this._length),this._startIndex+=d,this._length-=d,this.onTrimEmitter.fire(d)}shiftElements(d,p,g){if(!(p<=0)){if(d<0||d>=this._length)throw new Error("start argument out of range");if(d+g<0)throw new Error("Cannot shift elements in list beyond index 0");if(g>0){for(let v=p-1;v>=0;v--)this.set(d+v+g,this.get(d+v));const m=d+p+g-this._length;if(m>0)for(this._length+=m;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let m=0;m<p;m++)this.set(d+m+g,this.get(d+m))}}_getCyclicIndex(d){return(this._startIndex+d)%this._maxLength}}a.CircularList=f},1439:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function l(c,u=5){if(typeof c!="object")return c;const f=Array.isArray(c)?[]:{};for(const h in c)f[h]=u<=1?c[h]:c[h]&&l(c[h],u-1);return f}},8055:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;const c=l(6114);let u=0,f=0,h=0,d=0;var p,g,m,v,y;function b(k){const E=k.toString(16);return E.length<2?"0"+E:E}function S(k,E){return k<E?(E+.05)/(k+.05):(k+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(k){k.toCss=function(E,T,C,A){return A!==void 0?`#${b(E)}${b(T)}${b(C)}${b(A)}`:`#${b(E)}${b(T)}${b(C)}`},k.toRgba=function(E,T,C,A=255){return(E<<24|T<<16|C<<8|A)>>>0}}(p||(a.channels=p={})),function(k){function E(T,C){return d=Math.round(255*C),[u,f,h]=y.toChannels(T.rgba),{css:p.toCss(u,f,h,d),rgba:p.toRgba(u,f,h,d)}}k.blend=function(T,C){if(d=(255&C.rgba)/255,d===1)return{css:C.css,rgba:C.rgba};const A=C.rgba>>24&255,R=C.rgba>>16&255,Q=C.rgba>>8&255,L=T.rgba>>24&255,z=T.rgba>>16&255,B=T.rgba>>8&255;return u=L+Math.round((A-L)*d),f=z+Math.round((R-z)*d),h=B+Math.round((Q-B)*d),{css:p.toCss(u,f,h),rgba:p.toRgba(u,f,h)}},k.isOpaque=function(T){return(255&T.rgba)==255},k.ensureContrastRatio=function(T,C,A){const R=y.ensureContrastRatio(T.rgba,C.rgba,A);if(R)return y.toColor(R>>24&255,R>>16&255,R>>8&255)},k.opaque=function(T){const C=(255|T.rgba)>>>0;return[u,f,h]=y.toChannels(C),{css:p.toCss(u,f,h),rgba:C}},k.opacity=E,k.multiplyOpacity=function(T,C){return d=255&T.rgba,E(T,d*C/255)},k.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(g||(a.color=g={})),function(k){let E,T;if(!c.isNode){const C=document.createElement("canvas");C.width=1,C.height=1;const A=C.getContext("2d",{willReadFrequently:!0});A&&(E=A,E.globalCompositeOperation="copy",T=E.createLinearGradient(0,0,1,1))}k.toColor=function(C){if(C.match(/#[\da-f]{3,8}/i))switch(C.length){case 4:return u=parseInt(C.slice(1,2).repeat(2),16),f=parseInt(C.slice(2,3).repeat(2),16),h=parseInt(C.slice(3,4).repeat(2),16),y.toColor(u,f,h);case 5:return u=parseInt(C.slice(1,2).repeat(2),16),f=parseInt(C.slice(2,3).repeat(2),16),h=parseInt(C.slice(3,4).repeat(2),16),d=parseInt(C.slice(4,5).repeat(2),16),y.toColor(u,f,h,d);case 7:return{css:C,rgba:(parseInt(C.slice(1),16)<<8|255)>>>0};case 9:return{css:C,rgba:parseInt(C.slice(1),16)>>>0}}const A=C.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return u=parseInt(A[1]),f=parseInt(A[2]),h=parseInt(A[3]),d=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),y.toColor(u,f,h,d);if(!E||!T)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=T,E.fillStyle=C,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,f,h,d]=E.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,h,d),css:C}}}(m||(a.css=m={})),function(k){function E(T,C,A){const R=T/255,Q=C/255,L=A/255;return .2126*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.7152*(Q<=.03928?Q/12.92:Math.pow((Q+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}k.relativeLuminance=function(T){return E(T>>16&255,T>>8&255,255&T)},k.relativeLuminance2=E}(v||(a.rgb=v={})),function(k){function E(C,A,R){const Q=C>>24&255,L=C>>16&255,z=C>>8&255;let B=A>>24&255,q=A>>16&255,Z=A>>8&255,J=S(v.relativeLuminance2(B,q,Z),v.relativeLuminance2(Q,L,z));for(;J<R&&(B>0||q>0||Z>0);)B-=Math.max(0,Math.ceil(.1*B)),q-=Math.max(0,Math.ceil(.1*q)),Z-=Math.max(0,Math.ceil(.1*Z)),J=S(v.relativeLuminance2(B,q,Z),v.relativeLuminance2(Q,L,z));return(B<<24|q<<16|Z<<8|255)>>>0}function T(C,A,R){const Q=C>>24&255,L=C>>16&255,z=C>>8&255;let B=A>>24&255,q=A>>16&255,Z=A>>8&255,J=S(v.relativeLuminance2(B,q,Z),v.relativeLuminance2(Q,L,z));for(;J<R&&(B<255||q<255||Z<255);)B=Math.min(255,B+Math.ceil(.1*(255-B))),q=Math.min(255,q+Math.ceil(.1*(255-q))),Z=Math.min(255,Z+Math.ceil(.1*(255-Z))),J=S(v.relativeLuminance2(B,q,Z),v.relativeLuminance2(Q,L,z));return(B<<24|q<<16|Z<<8|255)>>>0}k.ensureContrastRatio=function(C,A,R){const Q=v.relativeLuminance(C>>8),L=v.relativeLuminance(A>>8);if(S(Q,L)<R){if(L<Q){const q=E(C,A,R),Z=S(Q,v.relativeLuminance(q>>8));if(Z<R){const J=T(C,A,R);return Z>S(Q,v.relativeLuminance(J>>8))?q:J}return q}const z=T(C,A,R),B=S(Q,v.relativeLuminance(z>>8));if(B<R){const q=E(C,A,R);return B>S(Q,v.relativeLuminance(q>>8))?z:q}return z}},k.reduceLuminance=E,k.increaseLuminance=T,k.toChannels=function(C){return[C>>24&255,C>>16&255,C>>8&255,255&C]},k.toColor=function(C,A,R,Q){return{css:p.toCss(C,A,R,Q),rgba:p.toRgba(C,A,R,Q)}}}(y||(a.rgba=y={})),a.toPaddedHex=b,a.contrastRatio=S},8969:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const c=l(844),u=l(2585),f=l(4348),h=l(7866),d=l(744),p=l(7302),g=l(6975),m=l(8460),v=l(1753),y=l(1480),b=l(7994),S=l(9282),k=l(5435),E=l(5981),T=l(2660);let C=!1;class A extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new m.EventEmitter),this._onScroll.event(Q=>{var L;(L=this._onScrollApi)===null||L===void 0||L.fire(Q.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(Q){for(const L in Q)this.optionsService.options[L]=Q[L]}constructor(Q){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new m.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new m.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new m.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new p.OptionsService(Q)),this._instantiationService.setService(u.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(d.BufferService)),this._instantiationService.setService(u.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(h.LogService)),this._instantiationService.setService(u.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(g.CoreService)),this._instantiationService.setService(u.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(u.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(y.UnicodeService)),this._instantiationService.setService(u.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(b.CharsetService),this._instantiationService.setService(u.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(u.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new k.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,m.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,m.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,m.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,m.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(L=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(L=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new E.WriteBuffer((L,z)=>this._inputHandler.parse(L,z))),this.register((0,m.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(Q,L){this._writeBuffer.write(Q,L)}writeSync(Q,L){this._logService.logLevel<=u.LogLevelEnum.WARN&&!C&&(this._logService.warn("writeSync is unreliable and will be removed soon."),C=!0),this._writeBuffer.writeSync(Q,L)}resize(Q,L){isNaN(Q)||isNaN(L)||(Q=Math.max(Q,d.MINIMUM_COLS),L=Math.max(L,d.MINIMUM_ROWS),this._bufferService.resize(Q,L))}scroll(Q,L=!1){this._bufferService.scroll(Q,L)}scrollLines(Q,L,z){this._bufferService.scrollLines(Q,L,z)}scrollPages(Q){this.scrollLines(Q*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(Q){const L=Q-this._bufferService.buffer.ydisp;L!==0&&this.scrollLines(L)}registerEscHandler(Q,L){return this._inputHandler.registerEscHandler(Q,L)}registerDcsHandler(Q,L){return this._inputHandler.registerDcsHandler(Q,L)}registerCsiHandler(Q,L){return this._inputHandler.registerCsiHandler(Q,L)}registerOscHandler(Q,L){return this._inputHandler.registerOscHandler(Q,L)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let Q=!1;const L=this.optionsService.rawOptions.windowsPty;L&&L.buildNumber!==void 0&&L.buildNumber!==void 0?Q=L.backend==="conpty"&&L.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(Q=!0),Q?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const Q=[];Q.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),Q.push(this.registerCsiHandler({final:"H"},()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(const L of Q)L.dispose()})}}}a.CoreTerminal=A},8460:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===l)return void this._listeners.splice(c,1)}}})),this._event}fire(l,c){const u=[];for(let f=0;f<this._listeners.length;f++)u.push(this._listeners[f]);for(let f=0;f<u.length;f++)u[f].call(void 0,l,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(l,c){return l(u=>c.fire(u))}},5435:function(o,a,l){var c=this&&this.__decorate||function(J,I,j,M){var X,se=arguments.length,H=se<3?I:M===null?M=Object.getOwnPropertyDescriptor(I,j):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(J,I,j,M);else for(var de=J.length-1;de>=0;de--)(X=J[de])&&(H=(se<3?X(H):se>3?X(I,j,H):X(I,j))||H);return se>3&&H&&Object.defineProperty(I,j,H),H},u=this&&this.__param||function(J,I){return function(j,M){I(j,M,J)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const f=l(2584),h=l(7116),d=l(2015),p=l(844),g=l(482),m=l(8437),v=l(8460),y=l(643),b=l(511),S=l(3734),k=l(2585),E=l(6242),T=l(6351),C=l(5941),A={"(":0,")":1,"*":2,"+":3,"-":1,".":2},R=131072;function Q(J,I){if(J>24)return I.setWinLines||!1;switch(J){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var L;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(L||(a.WindowsOptionsReportType=L={}));let z=0;class B extends p.Disposable{getAttrData(){return this._curAttrData}constructor(I,j,M,X,se,H,de,fe,ve=new d.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=j,this._coreService=M,this._logService=X,this._optionsService=se,this._oscLinkService=H,this._coreMouseService=de,this._unicodeService=fe,this._parser=ve,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new g.StringToUtf32,this._utf8Decoder=new g.Utf8ToUtf32,this._workCell=new b.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=m.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(F=>this._activeBuffer=F.activeBuffer)),this._parser.setCsiHandlerFallback((F,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(F),params:oe.toArray()})}),this._parser.setEscHandlerFallback(F=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(F)})}),this._parser.setExecuteHandlerFallback(F=>{this._logService.debug("Unknown EXECUTE code: ",{code:F})}),this._parser.setOscHandlerFallback((F,oe,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:F,action:oe,data:le})}),this._parser.setDcsHandlerFallback((F,oe,le)=>{oe==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(F),action:oe,payload:le})}),this._parser.setPrintHandler((F,oe,le)=>this.print(F,oe,le)),this._parser.registerCsiHandler({final:"@"},F=>this.insertChars(F)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},F=>this.scrollLeft(F)),this._parser.registerCsiHandler({final:"A"},F=>this.cursorUp(F)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},F=>this.scrollRight(F)),this._parser.registerCsiHandler({final:"B"},F=>this.cursorDown(F)),this._parser.registerCsiHandler({final:"C"},F=>this.cursorForward(F)),this._parser.registerCsiHandler({final:"D"},F=>this.cursorBackward(F)),this._parser.registerCsiHandler({final:"E"},F=>this.cursorNextLine(F)),this._parser.registerCsiHandler({final:"F"},F=>this.cursorPrecedingLine(F)),this._parser.registerCsiHandler({final:"G"},F=>this.cursorCharAbsolute(F)),this._parser.registerCsiHandler({final:"H"},F=>this.cursorPosition(F)),this._parser.registerCsiHandler({final:"I"},F=>this.cursorForwardTab(F)),this._parser.registerCsiHandler({final:"J"},F=>this.eraseInDisplay(F,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},F=>this.eraseInDisplay(F,!0)),this._parser.registerCsiHandler({final:"K"},F=>this.eraseInLine(F,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},F=>this.eraseInLine(F,!0)),this._parser.registerCsiHandler({final:"L"},F=>this.insertLines(F)),this._parser.registerCsiHandler({final:"M"},F=>this.deleteLines(F)),this._parser.registerCsiHandler({final:"P"},F=>this.deleteChars(F)),this._parser.registerCsiHandler({final:"S"},F=>this.scrollUp(F)),this._parser.registerCsiHandler({final:"T"},F=>this.scrollDown(F)),this._parser.registerCsiHandler({final:"X"},F=>this.eraseChars(F)),this._parser.registerCsiHandler({final:"Z"},F=>this.cursorBackwardTab(F)),this._parser.registerCsiHandler({final:"`"},F=>this.charPosAbsolute(F)),this._parser.registerCsiHandler({final:"a"},F=>this.hPositionRelative(F)),this._parser.registerCsiHandler({final:"b"},F=>this.repeatPrecedingCharacter(F)),this._parser.registerCsiHandler({final:"c"},F=>this.sendDeviceAttributesPrimary(F)),this._parser.registerCsiHandler({prefix:">",final:"c"},F=>this.sendDeviceAttributesSecondary(F)),this._parser.registerCsiHandler({final:"d"},F=>this.linePosAbsolute(F)),this._parser.registerCsiHandler({final:"e"},F=>this.vPositionRelative(F)),this._parser.registerCsiHandler({final:"f"},F=>this.hVPosition(F)),this._parser.registerCsiHandler({final:"g"},F=>this.tabClear(F)),this._parser.registerCsiHandler({final:"h"},F=>this.setMode(F)),this._parser.registerCsiHandler({prefix:"?",final:"h"},F=>this.setModePrivate(F)),this._parser.registerCsiHandler({final:"l"},F=>this.resetMode(F)),this._parser.registerCsiHandler({prefix:"?",final:"l"},F=>this.resetModePrivate(F)),this._parser.registerCsiHandler({final:"m"},F=>this.charAttributes(F)),this._parser.registerCsiHandler({final:"n"},F=>this.deviceStatus(F)),this._parser.registerCsiHandler({prefix:"?",final:"n"},F=>this.deviceStatusPrivate(F)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},F=>this.softReset(F)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},F=>this.setCursorStyle(F)),this._parser.registerCsiHandler({final:"r"},F=>this.setScrollRegion(F)),this._parser.registerCsiHandler({final:"s"},F=>this.saveCursor(F)),this._parser.registerCsiHandler({final:"t"},F=>this.windowOptions(F)),this._parser.registerCsiHandler({final:"u"},F=>this.restoreCursor(F)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},F=>this.insertColumns(F)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},F=>this.deleteColumns(F)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},F=>this.selectProtected(F)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},F=>this.requestMode(F,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},F=>this.requestMode(F,!1)),this._parser.setExecuteHandler(f.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(f.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(f.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(f.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(f.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(f.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(f.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(f.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(f.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(f.C1.IND,()=>this.index()),this._parser.setExecuteHandler(f.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(f.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new E.OscHandler(F=>(this.setTitle(F),this.setIconName(F),!0))),this._parser.registerOscHandler(1,new E.OscHandler(F=>this.setIconName(F))),this._parser.registerOscHandler(2,new E.OscHandler(F=>this.setTitle(F))),this._parser.registerOscHandler(4,new E.OscHandler(F=>this.setOrReportIndexedColor(F))),this._parser.registerOscHandler(8,new E.OscHandler(F=>this.setHyperlink(F))),this._parser.registerOscHandler(10,new E.OscHandler(F=>this.setOrReportFgColor(F))),this._parser.registerOscHandler(11,new E.OscHandler(F=>this.setOrReportBgColor(F))),this._parser.registerOscHandler(12,new E.OscHandler(F=>this.setOrReportCursorColor(F))),this._parser.registerOscHandler(104,new E.OscHandler(F=>this.restoreIndexedColor(F))),this._parser.registerOscHandler(110,new E.OscHandler(F=>this.restoreFgColor(F))),this._parser.registerOscHandler(111,new E.OscHandler(F=>this.restoreBgColor(F))),this._parser.registerOscHandler(112,new E.OscHandler(F=>this.restoreCursorColor(F))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const F in h.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:F},()=>this.selectCharset("("+F)),this._parser.registerEscHandler({intermediates:")",final:F},()=>this.selectCharset(")"+F)),this._parser.registerEscHandler({intermediates:"*",final:F},()=>this.selectCharset("*"+F)),this._parser.registerEscHandler({intermediates:"+",final:F},()=>this.selectCharset("+"+F)),this._parser.registerEscHandler({intermediates:"-",final:F},()=>this.selectCharset("-"+F)),this._parser.registerEscHandler({intermediates:".",final:F},()=>this.selectCharset("."+F)),this._parser.registerEscHandler({intermediates:"/",final:F},()=>this.selectCharset("/"+F));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(F=>(this._logService.error("Parsing error: ",F),F)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler((F,oe)=>this.requestStatusString(F,oe)))}_preserveStack(I,j,M,X){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=j,this._parseStack.decodedLength=M,this._parseStack.position=X}_logSlowResolvingAsync(I){this._logService.logLevel<=k.LogLevelEnum.WARN&&Promise.race([I,new Promise((j,M)=>setTimeout(()=>M("#SLOW_TIMEOUT"),5e3))]).catch(j=>{if(j!=="#SLOW_TIMEOUT")throw j;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(I,j){let M,X=this._activeBuffer.x,se=this._activeBuffer.y,H=0;const de=this._parseStack.paused;if(de){if(M=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,j))return this._logSlowResolvingAsync(M),M;X=this._parseStack.cursorStartX,se=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>R&&(H=this._parseStack.position+R)}if(this._logService.logLevel<=k.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,fe=>String.fromCharCode(fe)).join("")}"`),typeof I=="string"?I.split("").map(fe=>fe.charCodeAt(0)):I),this._parseBuffer.length<I.length&&this._parseBuffer.length<R&&(this._parseBuffer=new Uint32Array(Math.min(I.length,R))),de||this._dirtyRowTracker.clearRange(),I.length>R)for(let fe=H;fe<I.length;fe+=R){const ve=fe+R<I.length?fe+R:I.length,F=typeof I=="string"?this._stringDecoder.decode(I.substring(fe,ve),this._parseBuffer):this._utf8Decoder.decode(I.subarray(fe,ve),this._parseBuffer);if(M=this._parser.parse(this._parseBuffer,F))return this._preserveStack(X,se,F,fe),this._logSlowResolvingAsync(M),M}else if(!de){const fe=typeof I=="string"?this._stringDecoder.decode(I,this._parseBuffer):this._utf8Decoder.decode(I,this._parseBuffer);if(M=this._parser.parse(this._parseBuffer,fe))return this._preserveStack(X,se,fe,0),this._logSlowResolvingAsync(M),M}this._activeBuffer.x===X&&this._activeBuffer.y===se||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(I,j,M){let X,se;const H=this._charsetService.charset,de=this._optionsService.rawOptions.screenReaderMode,fe=this._bufferService.cols,ve=this._coreService.decPrivateModes.wraparound,F=this._coreService.modes.insertMode,oe=this._curAttrData;let le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&M-j>0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodePoint(this._activeBuffer.x-1,0,1,oe.fg,oe.bg,oe.extended);for(let pe=j;pe<M;++pe){if(X=I[pe],se=this._unicodeService.wcwidth(X),X<127&&H){const De=H[String.fromCharCode(X)];De&&(X=De.charCodeAt(0))}if(de&&this._onA11yChar.fire((0,g.stringFromCodePoint)(X)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),se||!this._activeBuffer.x){if(this._activeBuffer.x+se-1>=fe){if(ve){for(;this._activeBuffer.x<fe;)le.setCellFromCodePoint(this._activeBuffer.x++,0,1,oe.fg,oe.bg,oe.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=fe-1,se===2)continue}if(F&&(le.insertCells(this._activeBuffer.x,se,this._activeBuffer.getNullCell(oe),oe),le.getWidth(fe-1)===2&&le.setCellFromCodePoint(fe-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,oe.fg,oe.bg,oe.extended)),le.setCellFromCodePoint(this._activeBuffer.x++,X,se,oe.fg,oe.bg,oe.extended),se>0)for(;--se;)le.setCellFromCodePoint(this._activeBuffer.x++,0,0,oe.fg,oe.bg,oe.extended)}else le.getWidth(this._activeBuffer.x-1)?le.addCodepointToCell(this._activeBuffer.x-1,X):le.addCodepointToCell(this._activeBuffer.x-2,X)}M-j>0&&(le.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<fe&&M-j>0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodePoint(this._activeBuffer.x,0,1,oe.fg,oe.bg,oe.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,j){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,j):this._parser.registerCsiHandler(I,M=>!Q(M.params[0],this._optionsService.rawOptions.windowOptions)||j(M))}registerDcsHandler(I,j){return this._parser.registerDcsHandler(I,new T.DcsHandler(j))}registerEscHandler(I,j){return this._parser.registerEscHandler(I,j)}registerOscHandler(I,j){return this._parser.registerOscHandler(I,new E.OscHandler(j))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var I;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(!((I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||I===void 0)&&I.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);j.hasWidth(this._activeBuffer.x)&&!j.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(I,j){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+j):(this._activeBuffer.x=I,this._activeBuffer.y=j),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,j){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+j)}cursorUp(I){const j=this._activeBuffer.y-this._activeBuffer.scrollTop;return j>=0?this._moveCursor(0,-Math.min(j,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const j=this._activeBuffer.scrollBottom-this._activeBuffer.y;return j>=0?this._moveCursor(0,Math.min(j,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const j=I.params[0];return j===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:j===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let j=I.params[0]||1;for(;j--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let j=I.params[0]||1;for(;j--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const j=I.params[0];return j===1&&(this._curAttrData.bg|=536870912),j!==2&&j!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,j,M,X=!1,se=!1){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);H.replaceCells(j,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),se),X&&(H.isWrapped=!1)}_resetBufferLine(I,j=!1){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);M&&(M.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),j),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),M.isWrapped=!1)}eraseInDisplay(I,j=!1){let M;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for(M=this._activeBuffer.y,this._dirtyRowTracker.markDirty(M),this._eraseInBufferLine(M++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,j);M<this._bufferService.rows;M++)this._resetBufferLine(M,j);this._dirtyRowTracker.markDirty(M);break;case 1:for(M=this._activeBuffer.y,this._dirtyRowTracker.markDirty(M),this._eraseInBufferLine(M,0,this._activeBuffer.x+1,!0,j),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(M+1).isWrapped=!1);M--;)this._resetBufferLine(M,j);this._dirtyRowTracker.markDirty(0);break;case 2:for(M=this._bufferService.rows,this._dirtyRowTracker.markDirty(M-1);M--;)this._resetBufferLine(M,j);this._dirtyRowTracker.markDirty(0);break;case 3:const X=this._activeBuffer.lines.length-this._bufferService.rows;X>0&&(this._activeBuffer.lines.trimStart(X),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-X,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-X,0),this._onScroll.fire(0))}return!0}eraseInLine(I,j=!1){switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,j);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,j);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,j)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(I){this._restrictCursor();let j=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=this._activeBuffer.ybase+this._activeBuffer.y,X=this._bufferService.rows-1-this._activeBuffer.scrollBottom,se=this._bufferService.rows-1+this._activeBuffer.ybase-X+1;for(;j--;)this._activeBuffer.lines.splice(se-1,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(I){this._restrictCursor();let j=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=this._activeBuffer.ybase+this._activeBuffer.y;let X;for(X=this._bufferService.rows-1-this._activeBuffer.scrollBottom,X=this._bufferService.rows-1+this._activeBuffer.ybase-X;j--;)this._activeBuffer.lines.splice(M,1),this._activeBuffer.lines.splice(X,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(I){this._restrictCursor();const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return j&&(j.insertCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(I){this._restrictCursor();const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return j&&(j.deleteCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(I){let j=I.params[0]||1;for(;j--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(I){let j=I.params[0]||1;for(;j--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(m.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=I.params[0]||1;for(let M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const X=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);X.deleteCells(0,j,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),X.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=I.params[0]||1;for(let M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const X=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);X.insertCells(0,j,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),X.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=I.params[0]||1;for(let M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const X=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);X.insertCells(this._activeBuffer.x,j,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),X.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=I.params[0]||1;for(let M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const X=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);X.deleteCells(this._activeBuffer.x,j,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),X.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(I){this._restrictCursor();const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return j&&(j.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(I.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(I){if(!this._parser.precedingCodepoint)return!0;const j=I.params[0]||1,M=new Uint32Array(j);for(let X=0;X<j;++X)M[X]=this._parser.precedingCodepoint;return this.print(M,0,M.length),!0}sendDeviceAttributesPrimary(I){return I.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(I){return I.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let j=0;j<I.length;j++)switch(I.params[j]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(I){for(let j=0;j<I.length;j++)switch(I.params[j]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,h.DEFAULT_CHARSET),this._charsetService.setgCharset(1,h.DEFAULT_CHARSET),this._charsetService.setgCharset(2,h.DEFAULT_CHARSET),this._charsetService.setgCharset(3,h.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(I){for(let j=0;j<I.length;j++)switch(I.params[j]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(I){for(let j=0;j<I.length;j++)switch(I.params[j]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),I.params[j]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(I,j){const M=this._coreService.decPrivateModes,{activeProtocol:X,activeEncoding:se}=this._coreMouseService,H=this._coreService,{buffers:de,cols:fe}=this._bufferService,{active:ve,alt:F}=de,oe=this._optionsService.rawOptions,le=je=>je?1:2,pe=I.params[0];return De=pe,xe=j?pe===2?4:pe===4?le(H.modes.insertMode):pe===12?3:pe===20?le(oe.convertEol):0:pe===1?le(M.applicationCursorKeys):pe===3?oe.windowOptions.setWinLines?fe===80?2:fe===132?1:0:0:pe===6?le(M.origin):pe===7?le(M.wraparound):pe===8?3:pe===9?le(X==="X10"):pe===12?le(oe.cursorBlink):pe===25?le(!H.isCursorHidden):pe===45?le(M.reverseWraparound):pe===66?le(M.applicationKeypad):pe===67?4:pe===1e3?le(X==="VT200"):pe===1002?le(X==="DRAG"):pe===1003?le(X==="ANY"):pe===1004?le(M.sendFocus):pe===1005?4:pe===1006?le(se==="SGR"):pe===1015?4:pe===1016?le(se==="SGR_PIXELS"):pe===1048?1:pe===47||pe===1047||pe===1049?le(ve===F):pe===2004?le(M.bracketedPasteMode):0,H.triggerDataEvent(`${f.C0.ESC}[${j?"":"?"}${De};${xe}$y`),!0;var De,xe}_updateAttrColor(I,j,M,X,se){return j===2?(I|=50331648,I&=-16777216,I|=S.AttributeData.fromColorRGB([M,X,se])):j===5&&(I&=-50331904,I|=33554432|255&M),I}_extractColor(I,j,M){const X=[0,0,-1,0,0,0];let se=0,H=0;do{if(X[H+se]=I.params[j+H],I.hasSubParams(j+H)){const de=I.getSubParams(j+H);let fe=0;do X[1]===5&&(se=1),X[H+fe+1+se]=de[fe];while(++fe<de.length&&fe+H+1+se<X.length);break}if(X[1]===5&&H+se>=2||X[1]===2&&H+se>=5)break;X[1]&&(se=1)}while(++H+j<I.length&&H+se<X.length);for(let de=2;de<X.length;++de)X[de]===-1&&(X[de]=0);switch(X[0]){case 38:M.fg=this._updateAttrColor(M.fg,X[1],X[3],X[4],X[5]);break;case 48:M.bg=this._updateAttrColor(M.bg,X[1],X[3],X[4],X[5]);break;case 58:M.extended=M.extended.clone(),M.extended.underlineColor=this._updateAttrColor(M.extended.underlineColor,X[1],X[3],X[4],X[5])}return H}_processUnderline(I,j){j.extended=j.extended.clone(),(!~I||I>5)&&(I=1),j.extended.underlineStyle=I,j.fg|=268435456,I===0&&(j.fg&=-268435457),j.updateExtended()}_processSGR0(I){I.fg=m.DEFAULT_ATTR_DATA.fg,I.bg=m.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const j=I.length;let M;const X=this._curAttrData;for(let se=0;se<j;se++)M=I.params[se],M>=30&&M<=37?(X.fg&=-50331904,X.fg|=16777216|M-30):M>=40&&M<=47?(X.bg&=-50331904,X.bg|=16777216|M-40):M>=90&&M<=97?(X.fg&=-50331904,X.fg|=16777224|M-90):M>=100&&M<=107?(X.bg&=-50331904,X.bg|=16777224|M-100):M===0?this._processSGR0(X):M===1?X.fg|=134217728:M===3?X.bg|=67108864:M===4?(X.fg|=268435456,this._processUnderline(I.hasSubParams(se)?I.getSubParams(se)[0]:1,X)):M===5?X.fg|=536870912:M===7?X.fg|=67108864:M===8?X.fg|=1073741824:M===9?X.fg|=2147483648:M===2?X.bg|=134217728:M===21?this._processUnderline(2,X):M===22?(X.fg&=-134217729,X.bg&=-134217729):M===23?X.bg&=-67108865:M===24?(X.fg&=-268435457,this._processUnderline(0,X)):M===25?X.fg&=-536870913:M===27?X.fg&=-67108865:M===28?X.fg&=-1073741825:M===29?X.fg&=2147483647:M===39?(X.fg&=-67108864,X.fg|=16777215&m.DEFAULT_ATTR_DATA.fg):M===49?(X.bg&=-67108864,X.bg|=16777215&m.DEFAULT_ATTR_DATA.bg):M===38||M===48||M===58?se+=this._extractColor(I,se,X):M===53?X.bg|=1073741824:M===55?X.bg&=-1073741825:M===59?(X.extended=X.extended.clone(),X.extended.underlineColor=-1,X.updateExtended()):M===100?(X.fg&=-67108864,X.fg|=16777215&m.DEFAULT_ATTR_DATA.fg,X.bg&=-67108864,X.bg|=16777215&m.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",M);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const j=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${j};${M}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const j=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${j};${M}R`)}return!0}softReset(I){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(I){const j=I.params[0]||1;switch(j){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const M=j%2==1;return this._optionsService.options.cursorBlink=M,!0}setScrollRegion(I){const j=I.params[0]||1;let M;return(I.length<2||(M=I.params[1])>this._bufferService.rows||M===0)&&(M=this._bufferService.rows),M>j&&(this._activeBuffer.scrollTop=j-1,this._activeBuffer.scrollBottom=M-1,this._setCursor(0,0)),!0}windowOptions(I){if(!Q(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const j=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:j!==2&&this._onRequestWindowsOptionsReport.fire(L.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(L.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:j!==0&&j!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),j!==0&&j!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:j!==0&&j!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),j!==0&&j!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(I){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(I){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const j=[],M=I.split(";");for(;M.length>1;){const X=M.shift(),se=M.shift();if(/^\d+$/.exec(X)){const H=parseInt(X);if(Z(H))if(se==="?")j.push({type:0,index:H});else{const de=(0,C.parseColor)(se);de&&j.push({type:1,index:H,color:de})}}}return j.length&&this._onColor.fire(j),!0}setHyperlink(I){const j=I.split(";");return!(j.length<2)&&(j[1]?this._createHyperlink(j[0],j[1]):!j[0]&&this._finishHyperlink())}_createHyperlink(I,j){this._getCurrentLinkId()&&this._finishHyperlink();const M=I.split(":");let X;const se=M.findIndex(H=>H.startsWith("id="));return se!==-1&&(X=M[se].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:X,uri:j}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(I,j){const M=I.split(";");for(let X=0;X<M.length&&!(j>=this._specialColors.length);++X,++j)if(M[X]==="?")this._onColor.fire([{type:0,index:this._specialColors[j]}]);else{const se=(0,C.parseColor)(M[X]);se&&this._onColor.fire([{type:1,index:this._specialColors[j],color:se}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const j=[],M=I.split(";");for(let X=0;X<M.length;++X)if(/^\d+$/.exec(M[X])){const se=parseInt(M[X]);Z(se)&&j.push({type:2,index:se})}return j.length&&this._onColor.fire(j),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,h.DEFAULT_CHARSET),!0}selectCharset(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(A[I[0]],h.CHARSETS[I[1]]||h.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=m.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new b.CellData;I.content=4194304|"E".charCodeAt(0),I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let j=0;j<this._bufferService.rows;++j){const M=this._activeBuffer.ybase+this._activeBuffer.y+j,X=this._activeBuffer.lines.get(M);X&&(X.fill(I),X.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(I,j){const M=this._bufferService.buffer,X=this._optionsService.rawOptions;return(se=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${se}${f.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${M.scrollTop+1};${M.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[X.cursorStyle]-(X.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,j){this._dirtyRowTracker.markRangeDirty(I,j)}}a.InputHandler=B;let q=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){J<this.start?this.start=J:J>this.end&&(this.end=J)}markRangeDirty(J,I){J>I&&(z=J,J=I,I=z),J<this.start&&(this.start=J),I>this.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(J){return 0<=J&&J<256}q=c([u(0,k.IBufferService)],q)},844:(o,a)=>{function l(c){for(const u of c)u.dispose();c.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const u=this._disposables.indexOf(c);u!==-1&&this._disposables.splice(u,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var u;this._isDisposed||c===this._value||((u=this._value)===null||u===void 0||u.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)===null||c===void 0||c.dispose(),this._value=void 0}},a.toDisposable=function(c){return{dispose:c}},a.disposeArray=l,a.getDisposeArrayDisposable=function(c){return{dispose:()=>l(c)}}},1505:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(u,f,h){this._data[u]||(this._data[u]={}),this._data[u][f]=h}get(u,f){return this._data[u]?this._data[u][f]:void 0}clear(){this._data={}}}a.TwoKeyMap=l,a.FourKeyMap=class{constructor(){this._data=new l}set(c,u,f,h,d){this._data.get(c,u)||this._data.set(c,u,new l),this._data.get(c,u).set(f,h,d)}get(c,u,f,h){var d;return(d=this._data.get(c,u))===null||d===void 0?void 0:d.get(f,h)}clear(){this._data.clear()}}},6114:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof navigator>"u";const l=a.isNode?"node":navigator.userAgent,c=a.isNode?"node":navigator.platform;a.isFirefox=l.includes("Firefox"),a.isLegacyEdge=l.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(l),a.getSafariVersion=function(){if(!a.isSafari)return 0;const u=l.match(/Version\/(\d+)/);return u===null||u.length<2?0:parseInt(u[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),a.isIpad=c==="iPad",a.isIphone=c==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),a.isLinux=c.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(l)},6106:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let l=0;a.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(l=this._search(this._getKey(c)),this._array.splice(l,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;const u=this._getKey(c);if(u===void 0||(l=this._search(u),l===-1)||this._getKey(this._array[l])!==u)return!1;do if(this._array[l]===c)return this._array.splice(l,1),!0;while(++l<this._array.length&&this._getKey(this._array[l])===u);return!1}*getKeyIterator(c){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do yield this._array[l];while(++l<this._array.length&&this._getKey(this._array[l])===c)}forEachByKey(c,u){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do u(this._array[l]);while(++l<this._array.length&&this._getKey(this._array[l])===c)}values(){return[...this._array].values()}_search(c){let u=0,f=this._array.length-1;for(;f>=u;){let h=u+f>>1;const d=this._getKey(this._array[h]);if(d>c)f=h-1;else{if(!(d<c)){for(;h>0&&this._getKey(this._array[h-1])===c;)h--;return h}u=h+1}}return u}}},7226:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const c=l(6114);class u{constructor(){this._tasks=[],this._i=0}enqueue(d){this._tasks.push(d),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(d){this._idleCallback=void 0;let p=0,g=0,m=d.timeRemaining(),v=0;for(;this._i<this._tasks.length;){if(p=Date.now(),this._tasks[this._i]()||this._i++,p=Math.max(1,Date.now()-p),g=Math.max(p,g),v=d.timeRemaining(),1.5*g>v)return m-p<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(m-p))}ms`),void this._start();m=v}this.clear()}}class f extends u{_requestCallback(d){return setTimeout(()=>d(this._createDeadline(16)))}_cancelCallback(d){clearTimeout(d)}_createDeadline(d){const p=Date.now()+d;return{timeRemaining:()=>Math.max(0,p-Date.now())}}}a.PriorityTaskQueue=f,a.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends u{_requestCallback(h){return requestIdleCallback(h)}_cancelCallback(h){cancelIdleCallback(h)}}:f,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(h){this._queue.clear(),this._queue.enqueue(h)}flush(){this._queue.flush()}}},9282:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const c=l(643);a.updateWindowsModeWrappedState=function(u){const f=u.buffer.lines.get(u.buffer.ybase+u.buffer.y-1),h=f==null?void 0:f.get(u.cols-1),d=u.buffer.lines.get(u.buffer.ybase+u.buffer.y);d&&h&&(d.isWrapped=h[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&h[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new l;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}a.AttributeData=l;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}constructor(f=0,h=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=h}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=c},9092:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const c=l(6349),u=l(7226),f=l(3734),h=l(8437),d=l(4634),p=l(511),g=l(643),m=l(4863),v=l(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(y,b,S){this._hasScrollback=y,this._optionsService=b,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=h.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=p.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),this._whitespaceCell=p.CellData.fromCharData([0,g.WHITESPACE_CELL_CHAR,g.WHITESPACE_CELL_WIDTH,g.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new u.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(y){return y?(this._nullCell.fg=y.fg,this._nullCell.bg=y.bg,this._nullCell.extended=y.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(y){return y?(this._whitespaceCell.fg=y.fg,this._whitespaceCell.bg=y.bg,this._whitespaceCell.extended=y.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(y,b){return new h.BufferLine(this._bufferService.cols,this.getNullCell(y),b)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const y=this.ybase+this.y-this.ydisp;return y>=0&&y<this._rows}_getCorrectBufferLength(y){if(!this._hasScrollback)return y;const b=y+this._optionsService.rawOptions.scrollback;return b>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:b}fillViewportRows(y){if(this.lines.length===0){y===void 0&&(y=h.DEFAULT_ATTR_DATA);let b=this._rows;for(;b--;)this.lines.push(this.getBlankLine(y))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(y,b){const S=this.getNullCell(h.DEFAULT_ATTR_DATA);let k=0;const E=this._getCorrectBufferLength(b);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols<y)for(let C=0;C<this.lines.length;C++)k+=+this.lines.get(C).resize(y,S);let T=0;if(this._rows<b)for(let C=this._rows;C<b;C++)this.lines.length<b+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new h.BufferLine(y,S)):this.ybase>0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new h.BufferLine(y,S)));else for(let C=this._rows;C>b;C--)this.lines.length>b+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E<this.lines.maxLength){const C=this.lines.length-E;C>0&&(this.lines.trimStart(C),this.ybase=Math.max(this.ybase-C,0),this.ydisp=Math.max(this.ydisp-C,0),this.savedY=Math.max(this.savedY-C,0)),this.lines.maxLength=E}this.x=Math.min(this.x,y-1),this.y=Math.min(this.y,b-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,y-1),this.scrollTop=0}if(this.scrollBottom=b-1,this._isReflowEnabled&&(this._reflow(y,b),this._cols>y))for(let T=0;T<this.lines.length;T++)k+=+this.lines.get(T).resize(y,S);this._cols=y,this._rows=b,this._memoryCleanupQueue.clear(),k>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let y=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,y=!1);let b=0;for(;this._memoryCleanupPosition<this.lines.length;)if(b+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),b>100)return!0;return y}get _isReflowEnabled(){const y=this._optionsService.rawOptions.windowsPty;return y&&y.buildNumber?this._hasScrollback&&y.backend==="conpty"&&y.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(y,b){this._cols!==y&&(y>this._cols?this._reflowLarger(y,b):this._reflowSmaller(y,b))}_reflowLarger(y,b){const S=(0,d.reflowLargerGetLinesToRemove)(this.lines,this._cols,y,this.ybase+this.y,this.getNullCell(h.DEFAULT_ATTR_DATA));if(S.length>0){const k=(0,d.reflowLargerCreateNewLayout)(this.lines,S);(0,d.reflowLargerApplyNewLayout)(this.lines,k.layout),this._reflowLargerAdjustViewport(y,b,k.countRemoved)}}_reflowLargerAdjustViewport(y,b,S){const k=this.getNullCell(h.DEFAULT_ATTR_DATA);let E=S;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<b&&this.lines.push(new h.BufferLine(y,k))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-S,0)}_reflowSmaller(y,b){const S=this.getNullCell(h.DEFAULT_ATTR_DATA),k=[];let E=0;for(let T=this.lines.length-1;T>=0;T--){let C=this.lines.get(T);if(!C||!C.isWrapped&&C.getTrimmedLength()<=y)continue;const A=[C];for(;C.isWrapped&&T>0;)C=this.lines.get(--T),A.unshift(C);const R=this.ybase+this.y;if(R>=T&&R<T+A.length)continue;const Q=A[A.length-1].getTrimmedLength(),L=(0,d.reflowSmallerGetNewLineLengths)(A,this._cols,y),z=L.length-A.length;let B;B=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+z):Math.max(0,this.lines.length-this.lines.maxLength+z);const q=[];for(let X=0;X<z;X++){const se=this.getBlankLine(h.DEFAULT_ATTR_DATA,!0);q.push(se)}q.length>0&&(k.push({start:T+A.length+E,newLines:q}),E+=q.length),A.push(...q);let Z=L.length-1,J=L[Z];J===0&&(Z--,J=L[Z]);let I=A.length-z-1,j=Q;for(;I>=0;){const X=Math.min(j,J);if(A[Z]===void 0)break;if(A[Z].copyCellsFrom(A[I],j-X,J-X,X,!0),J-=X,J===0&&(Z--,J=L[Z]),j-=X,j===0){I--;const se=Math.max(I,0);j=(0,d.getWrappedLineTrimmedLength)(A,se,this._cols)}}for(let X=0;X<A.length;X++)L[X]<y&&A[X].setCell(L[X],S);let M=z-B;for(;M-- >0;)this.ybase===0?this.y<b-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+E)-b&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+z,this.ybase+b-1)}if(k.length>0){const T=[],C=[];for(let Z=0;Z<this.lines.length;Z++)C.push(this.lines.get(Z));const A=this.lines.length;let R=A-1,Q=0,L=k[Q];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+E);let z=0;for(let Z=Math.min(this.lines.maxLength-1,A+E-1);Z>=0;Z--)if(L&&L.start>R+z){for(let J=L.newLines.length-1;J>=0;J--)this.lines.set(Z--,L.newLines[J]);Z++,T.push({index:R+1,amount:L.newLines.length}),z+=L.newLines.length,L=k[++Q]}else this.lines.set(Z,C[R--]);let B=0;for(let Z=T.length-1;Z>=0;Z--)T[Z].index+=B,this.lines.onInsertEmitter.fire(T[Z]),B+=T[Z].amount;const q=Math.max(0,A+E-this.lines.maxLength);q>0&&this.lines.onTrimEmitter.fire(q)}}translateBufferLineToString(y,b,S=0,k){const E=this.lines.get(y);return E?E.translateToString(b,S,k):""}getWrappedRangeForLine(y){let b=y,S=y;for(;b>0&&this.lines.get(b).isWrapped;)b--;for(;S+1<this.lines.length&&this.lines.get(S+1).isWrapped;)S++;return{first:b,last:S}}setupTabStops(y){for(y!=null?this.tabs[y]||(y=this.prevStop(y)):(this.tabs={},y=0);y<this._cols;y+=this._optionsService.rawOptions.tabStopWidth)this.tabs[y]=!0}prevStop(y){for(y==null&&(y=this.x);!this.tabs[--y]&&y>0;);return y>=this._cols?this._cols-1:y<0?0:y}nextStop(y){for(y==null&&(y=this.x);!this.tabs[++y]&&y<this._cols;);return y>=this._cols?this._cols-1:y<0?0:y}clearMarkers(y){this._isClearing=!0;for(let b=0;b<this.markers.length;b++)this.markers[b].line===y&&(this.markers[b].dispose(),this.markers.splice(b--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let y=0;y<this.markers.length;y++)this.markers[y].dispose(),this.markers.splice(y--,1);this._isClearing=!1}addMarker(y){const b=new m.Marker(y);return this.markers.push(b),b.register(this.lines.onTrim(S=>{b.line-=S,b.line<0&&b.dispose()})),b.register(this.lines.onInsert(S=>{b.line>=S.index&&(b.line+=S.amount)})),b.register(this.lines.onDelete(S=>{b.line>=S.index&&b.line<S.index+S.amount&&b.dispose(),b.line>S.index&&(b.line-=S.amount)})),b.register(b.onDispose(()=>this._removeMarker(b))),b}_removeMarker(y){this._isClearing||this.markers.splice(this.markers.indexOf(y),1)}}},8437:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const c=l(3734),u=l(511),f=l(643),h=l(482);a.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let d=0;class p{constructor(m,v,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*m);const b=v||u.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let S=0;S<m;++S)this.setCell(S,b);this.length=m}get(m){const v=this._data[3*m+0],y=2097151&v;return[this._data[3*m+1],2097152&v?this._combined[m]:y?(0,h.stringFromCodePoint)(y):"",v>>22,2097152&v?this._combined[m].charCodeAt(this._combined[m].length-1):y]}set(m,v){this._data[3*m+1]=v[f.CHAR_DATA_ATTR_INDEX],v[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[m]=v[1],this._data[3*m+0]=2097152|m|v[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*m+0]=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(m){return this._data[3*m+0]>>22}hasWidth(m){return 12582912&this._data[3*m+0]}getFg(m){return this._data[3*m+1]}getBg(m){return this._data[3*m+2]}hasContent(m){return 4194303&this._data[3*m+0]}getCodePoint(m){const v=this._data[3*m+0];return 2097152&v?this._combined[m].charCodeAt(this._combined[m].length-1):2097151&v}isCombined(m){return 2097152&this._data[3*m+0]}getString(m){const v=this._data[3*m+0];return 2097152&v?this._combined[m]:2097151&v?(0,h.stringFromCodePoint)(2097151&v):""}isProtected(m){return 536870912&this._data[3*m+2]}loadCell(m,v){return d=3*m,v.content=this._data[d+0],v.fg=this._data[d+1],v.bg=this._data[d+2],2097152&v.content&&(v.combinedData=this._combined[m]),268435456&v.bg&&(v.extended=this._extendedAttrs[m]),v}setCell(m,v){2097152&v.content&&(this._combined[m]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[m]=v.extended),this._data[3*m+0]=v.content,this._data[3*m+1]=v.fg,this._data[3*m+2]=v.bg}setCellFromCodePoint(m,v,y,b,S,k){268435456&S&&(this._extendedAttrs[m]=k),this._data[3*m+0]=v|y<<22,this._data[3*m+1]=b,this._data[3*m+2]=S}addCodepointToCell(m,v){let y=this._data[3*m+0];2097152&y?this._combined[m]+=(0,h.stringFromCodePoint)(v):(2097151&y?(this._combined[m]=(0,h.stringFromCodePoint)(2097151&y)+(0,h.stringFromCodePoint)(v),y&=-2097152,y|=2097152):y=v|4194304,this._data[3*m+0]=y)}insertCells(m,v,y,b){if((m%=this.length)&&this.getWidth(m-1)===2&&this.setCellFromCodePoint(m-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new c.ExtendedAttrs),v<this.length-m){const S=new u.CellData;for(let k=this.length-m-v-1;k>=0;--k)this.setCell(m+v+k,this.loadCell(m+k,S));for(let k=0;k<v;++k)this.setCell(m+k,y)}else for(let S=m;S<this.length;++S)this.setCell(S,y);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new c.ExtendedAttrs)}deleteCells(m,v,y,b){if(m%=this.length,v<this.length-m){const S=new u.CellData;for(let k=0;k<this.length-m-v;++k)this.setCell(m+k,this.loadCell(m+v+k,S));for(let k=this.length-v;k<this.length;++k)this.setCell(k,y)}else for(let S=m;S<this.length;++S)this.setCell(S,y);m&&this.getWidth(m-1)===2&&this.setCellFromCodePoint(m-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new c.ExtendedAttrs),this.getWidth(m)!==0||this.hasContent(m)||this.setCellFromCodePoint(m,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new c.ExtendedAttrs)}replaceCells(m,v,y,b,S=!1){if(S)for(m&&this.getWidth(m-1)===2&&!this.isProtected(m-1)&&this.setCellFromCodePoint(m-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new c.ExtendedAttrs),v<this.length&&this.getWidth(v-1)===2&&!this.isProtected(v)&&this.setCellFromCodePoint(v,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new c.ExtendedAttrs);m<v&&m<this.length;)this.isProtected(m)||this.setCell(m,y),m++;else for(m&&this.getWidth(m-1)===2&&this.setCellFromCodePoint(m-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new c.ExtendedAttrs),v<this.length&&this.getWidth(v-1)===2&&this.setCellFromCodePoint(v,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new c.ExtendedAttrs);m<v&&m<this.length;)this.setCell(m++,y)}resize(m,v){if(m===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const y=3*m;if(m>this.length){if(this._data.buffer.byteLength>=4*y)this._data=new Uint32Array(this._data.buffer,0,y);else{const b=new Uint32Array(y);b.set(this._data),this._data=b}for(let b=this.length;b<m;++b)this.setCell(b,v)}else{this._data=this._data.subarray(0,y);const b=Object.keys(this._combined);for(let k=0;k<b.length;k++){const E=parseInt(b[k],10);E>=m&&delete this._combined[E]}const S=Object.keys(this._extendedAttrs);for(let k=0;k<S.length;k++){const E=parseInt(S[k],10);E>=m&&delete this._extendedAttrs[E]}}return this.length=m,4*y*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const m=new Uint32Array(this._data.length);return m.set(this._data),this._data=m,1}return 0}fill(m,v=!1){if(v)for(let y=0;y<this.length;++y)this.isProtected(y)||this.setCell(y,m);else{this._combined={},this._extendedAttrs={};for(let y=0;y<this.length;++y)this.setCell(y,m)}}copyFrom(m){this.length!==m.length?this._data=new Uint32Array(m._data):this._data.set(m._data),this.length=m.length,this._combined={};for(const v in m._combined)this._combined[v]=m._combined[v];this._extendedAttrs={};for(const v in m._extendedAttrs)this._extendedAttrs[v]=m._extendedAttrs[v];this.isWrapped=m.isWrapped}clone(){const m=new p(0);m._data=new Uint32Array(this._data),m.length=this.length;for(const v in this._combined)m._combined[v]=this._combined[v];for(const v in this._extendedAttrs)m._extendedAttrs[v]=this._extendedAttrs[v];return m.isWrapped=this.isWrapped,m}getTrimmedLength(){for(let m=this.length-1;m>=0;--m)if(4194303&this._data[3*m+0])return m+(this._data[3*m+0]>>22);return 0}getNoBgTrimmedLength(){for(let m=this.length-1;m>=0;--m)if(4194303&this._data[3*m+0]||50331648&this._data[3*m+2])return m+(this._data[3*m+0]>>22);return 0}copyCellsFrom(m,v,y,b,S){const k=m._data;if(S)for(let T=b-1;T>=0;T--){for(let C=0;C<3;C++)this._data[3*(y+T)+C]=k[3*(v+T)+C];268435456&k[3*(v+T)+2]&&(this._extendedAttrs[y+T]=m._extendedAttrs[v+T])}else for(let T=0;T<b;T++){for(let C=0;C<3;C++)this._data[3*(y+T)+C]=k[3*(v+T)+C];268435456&k[3*(v+T)+2]&&(this._extendedAttrs[y+T]=m._extendedAttrs[v+T])}const E=Object.keys(m._combined);for(let T=0;T<E.length;T++){const C=parseInt(E[T],10);C>=v&&(this._combined[C-v+y]=m._combined[C])}}translateToString(m=!1,v=0,y=this.length){m&&(y=Math.min(y,this.getTrimmedLength()));let b="";for(;v<y;){const S=this._data[3*v+0],k=2097151&S;b+=2097152&S?this._combined[v]:k?(0,h.stringFromCodePoint)(k):f.WHITESPACE_CELL_CHAR,v+=S>>22||1}return b}}a.BufferLine=p},4841:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(l,c){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return c*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(o,a)=>{function l(c,u,f){if(u===c.length-1)return c[u].getTrimmedLength();const h=!c[u].hasContent(f-1)&&c[u].getWidth(f-1)===1,d=c[u+1].getWidth(0)===2;return h&&d?f-1:f}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(c,u,f,h,d){const p=[];for(let g=0;g<c.length-1;g++){let m=g,v=c.get(++m);if(!v.isWrapped)continue;const y=[c.get(g)];for(;m<c.length&&v.isWrapped;)y.push(v),v=c.get(++m);if(h>=g&&h<m){g+=y.length-1;continue}let b=0,S=l(y,b,u),k=1,E=0;for(;k<y.length;){const C=l(y,k,u),A=C-E,R=f-S,Q=Math.min(A,R);y[b].copyCellsFrom(y[k],E,S,Q,!1),S+=Q,S===f&&(b++,S=0),E+=Q,E===C&&(k++,E=0),S===0&&b!==0&&y[b-1].getWidth(f-1)===2&&(y[b].copyCellsFrom(y[b-1],f-1,S++,1,!1),y[b-1].setCell(f-1,d))}y[b].replaceCells(S,f,d);let T=0;for(let C=y.length-1;C>0&&(C>b||y[C].getTrimmedLength()===0);C--)T++;T>0&&(p.push(g+y.length-T),p.push(T)),g+=y.length-1}return p},a.reflowLargerCreateNewLayout=function(c,u){const f=[];let h=0,d=u[h],p=0;for(let g=0;g<c.length;g++)if(d===g){const m=u[++h];c.onDeleteEmitter.fire({index:g-p,amount:m}),g+=m-1,p+=m,d=u[++h]}else f.push(g);return{layout:f,countRemoved:p}},a.reflowLargerApplyNewLayout=function(c,u){const f=[];for(let h=0;h<u.length;h++)f.push(c.get(u[h]));for(let h=0;h<f.length;h++)c.set(h,f[h]);c.length=u.length},a.reflowSmallerGetNewLineLengths=function(c,u,f){const h=[],d=c.map((v,y)=>l(c,y,u)).reduce((v,y)=>v+y);let p=0,g=0,m=0;for(;m<d;){if(d-m<f){h.push(d-m);break}p+=f;const v=l(c,g,u);p>v&&(p-=v,g++);const y=c[g].getWidth(p-1)===2;y&&p--;const b=y?f-1:f;h.push(b),m+=b}return h},a.getWrappedLineTrimmedLength=l},5295:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const c=l(8460),u=l(844),f=l(9092);class h extends u.Disposable{constructor(p,g){super(),this._optionsService=p,this._bufferService=g,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(p){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(p),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(p,g){this._normal.resize(p,g),this._alt.resize(p,g),this.setupTabStops(p)}setupTabStops(p){this._normal.setupTabStops(p),this._alt.setupTabStops(p)}}a.BufferSet=h},511:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const c=l(482),u=l(643),f=l(3734);class h extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(p){const g=new h;return g.setFromCharData(p),g}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(p){this.fg=p[u.CHAR_DATA_ATTR_INDEX],this.bg=0;let g=!1;if(p[u.CHAR_DATA_CHAR_INDEX].length>2)g=!0;else if(p[u.CHAR_DATA_CHAR_INDEX].length===2){const m=p[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=m&&m<=56319){const v=p[u.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(m-55296)+v-56320+65536|p[u.CHAR_DATA_WIDTH_INDEX]<<22:g=!0}else g=!0}else this.content=p[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[u.CHAR_DATA_WIDTH_INDEX]<<22;g&&(this.combinedData=p[u.CHAR_DATA_CHAR_INDEX],this.content=2097152|p[u.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=h},643:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const c=l(8460),u=l(844);class f{get id(){return this._id}constructor(d){this.line=d,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,u.disposeArray)(this._disposables),this._disposables.length=0)}register(d){return this._disposables.push(d),d}}a.Marker=f,f._nextId=1},7116:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(o,a)=>{var l,c,u;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
|
301
301
|
`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""}(l||(a.C0=l={})),function(f){f.PAD="",f.HOP="",f.BPH="",f.NBH="",f.IND="",f.NEL="
",f.SSA="",f.ESA="",f.HTS="",f.HTJ="",f.VTS="",f.PLD="",f.PLU="",f.RI="",f.SS2="",f.SS3="",f.DCS="",f.PU1="",f.PU2="",f.STS="",f.CCH="",f.MW="",f.SPA="",f.EPA="",f.SOS="",f.SGCI="",f.SCI="",f.CSI="",f.ST="",f.OSC="",f.PM="",f.APC=""}(c||(a.C1=c={})),function(f){f.ST=`${l.ESC}\\`}(u||(a.C1_ESCAPED=u={}))},7399:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const c=l(2584),u={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(f,h,d,p){const g={type:0,cancel:!1,key:void 0},m=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?g.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?g.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?g.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(g.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:if(f.altKey){g.key=c.C0.ESC+c.C0.DEL;break}g.key=c.C0.DEL;break;case 9:if(f.shiftKey){g.key=c.C0.ESC+"[Z";break}g.key=c.C0.HT,g.cancel=!0;break;case 13:g.key=f.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,g.cancel=!0;break;case 27:g.key=c.C0.ESC,f.altKey&&(g.key=c.C0.ESC+c.C0.ESC),g.cancel=!0;break;case 37:if(f.metaKey)break;m?(g.key=c.C0.ESC+"[1;"+(m+1)+"D",g.key===c.C0.ESC+"[1;3D"&&(g.key=c.C0.ESC+(d?"b":"[1;5D"))):g.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(f.metaKey)break;m?(g.key=c.C0.ESC+"[1;"+(m+1)+"C",g.key===c.C0.ESC+"[1;3C"&&(g.key=c.C0.ESC+(d?"f":"[1;5C"))):g.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(f.metaKey)break;m?(g.key=c.C0.ESC+"[1;"+(m+1)+"A",d||g.key!==c.C0.ESC+"[1;3A"||(g.key=c.C0.ESC+"[1;5A")):g.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(f.metaKey)break;m?(g.key=c.C0.ESC+"[1;"+(m+1)+"B",d||g.key!==c.C0.ESC+"[1;3B"||(g.key=c.C0.ESC+"[1;5B")):g.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(g.key=c.C0.ESC+"[2~");break;case 46:g.key=m?c.C0.ESC+"[3;"+(m+1)+"~":c.C0.ESC+"[3~";break;case 36:g.key=m?c.C0.ESC+"[1;"+(m+1)+"H":h?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:g.key=m?c.C0.ESC+"[1;"+(m+1)+"F":h?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:f.shiftKey?g.type=2:f.ctrlKey?g.key=c.C0.ESC+"[5;"+(m+1)+"~":g.key=c.C0.ESC+"[5~";break;case 34:f.shiftKey?g.type=3:f.ctrlKey?g.key=c.C0.ESC+"[6;"+(m+1)+"~":g.key=c.C0.ESC+"[6~";break;case 112:g.key=m?c.C0.ESC+"[1;"+(m+1)+"P":c.C0.ESC+"OP";break;case 113:g.key=m?c.C0.ESC+"[1;"+(m+1)+"Q":c.C0.ESC+"OQ";break;case 114:g.key=m?c.C0.ESC+"[1;"+(m+1)+"R":c.C0.ESC+"OR";break;case 115:g.key=m?c.C0.ESC+"[1;"+(m+1)+"S":c.C0.ESC+"OS";break;case 116:g.key=m?c.C0.ESC+"[15;"+(m+1)+"~":c.C0.ESC+"[15~";break;case 117:g.key=m?c.C0.ESC+"[17;"+(m+1)+"~":c.C0.ESC+"[17~";break;case 118:g.key=m?c.C0.ESC+"[18;"+(m+1)+"~":c.C0.ESC+"[18~";break;case 119:g.key=m?c.C0.ESC+"[19;"+(m+1)+"~":c.C0.ESC+"[19~";break;case 120:g.key=m?c.C0.ESC+"[20;"+(m+1)+"~":c.C0.ESC+"[20~";break;case 121:g.key=m?c.C0.ESC+"[21;"+(m+1)+"~":c.C0.ESC+"[21~";break;case 122:g.key=m?c.C0.ESC+"[23;"+(m+1)+"~":c.C0.ESC+"[23~";break;case 123:g.key=m?c.C0.ESC+"[24;"+(m+1)+"~":c.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(d&&!p||!f.altKey||f.metaKey)!d||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?g.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(g.key=c.C0.US),f.key==="@"&&(g.key=c.C0.NUL)):f.keyCode===65&&(g.type=1);else{const v=u[f.keyCode],y=v==null?void 0:v[f.shiftKey?1:0];if(y)g.key=c.C0.ESC+y;else if(f.keyCode>=65&&f.keyCode<=90){const b=f.ctrlKey?f.keyCode-64:f.keyCode+32;let S=String.fromCharCode(b);f.shiftKey&&(S=S.toUpperCase()),g.key=c.C0.ESC+S}else if(f.keyCode===32)g.key=c.C0.ESC+(f.ctrlKey?c.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let b=f.code.slice(3,4);f.shiftKey||(b=b.toLowerCase()),g.key=c.C0.ESC+b,g.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?g.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?g.key=c.C0.NUL:f.keyCode>=51&&f.keyCode<=55?g.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?g.key=c.C0.DEL:f.keyCode===219?g.key=c.C0.ESC:f.keyCode===220?g.key=c.C0.FS:f.keyCode===221&&(g.key=c.C0.GS)}return g}},482:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},a.utf32ToString=function(l,c=0,u=l.length){let f="";for(let h=c;h<u;++h){let d=l[h];d>65535?(d-=65536,f+=String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):f+=String.fromCharCode(d)}return f},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,c){const u=l.length;if(!u)return 0;let f=0,h=0;if(this._interim){const d=l.charCodeAt(h++);56320<=d&&d<=57343?c[f++]=1024*(this._interim-55296)+d-56320+65536:(c[f++]=this._interim,c[f++]=d),this._interim=0}for(let d=h;d<u;++d){const p=l.charCodeAt(d);if(55296<=p&&p<=56319){if(++d>=u)return this._interim=p,f;const g=l.charCodeAt(d);56320<=g&&g<=57343?c[f++]=1024*(p-55296)+g-56320+65536:(c[f++]=p,c[f++]=g)}else p!==65279&&(c[f++]=p)}return f}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,c){const u=l.length;if(!u)return 0;let f,h,d,p,g=0,m=0,v=0;if(this.interim[0]){let S=!1,k=this.interim[0];k&=(224&k)==192?31:(240&k)==224?15:7;let E,T=0;for(;(E=63&this.interim[++T])&&T<4;)k<<=6,k|=E;const C=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,A=C-T;for(;v<A;){if(v>=u)return 0;if(E=l[v++],(192&E)!=128){v--,S=!0;break}this.interim[T++]=E,k<<=6,k|=63&E}S||(C===2?k<128?v--:c[g++]=k:C===3?k<2048||k>=55296&&k<=57343||k===65279||(c[g++]=k):k<65536||k>1114111||(c[g++]=k)),this.interim.fill(0)}const y=u-4;let b=v;for(;b<u;){for(;!(!(b<y)||128&(f=l[b])||128&(h=l[b+1])||128&(d=l[b+2])||128&(p=l[b+3]));)c[g++]=f,c[g++]=h,c[g++]=d,c[g++]=p,b+=4;if(f=l[b++],f<128)c[g++]=f;else if((224&f)==192){if(b>=u)return this.interim[0]=f,g;if(h=l[b++],(192&h)!=128){b--;continue}if(m=(31&f)<<6|63&h,m<128){b--;continue}c[g++]=m}else if((240&f)==224){if(b>=u)return this.interim[0]=f,g;if(h=l[b++],(192&h)!=128){b--;continue}if(b>=u)return this.interim[0]=f,this.interim[1]=h,g;if(d=l[b++],(192&d)!=128){b--;continue}if(m=(15&f)<<12|(63&h)<<6|63&d,m<2048||m>=55296&&m<=57343||m===65279)continue;c[g++]=m}else if((248&f)==240){if(b>=u)return this.interim[0]=f,g;if(h=l[b++],(192&h)!=128){b--;continue}if(b>=u)return this.interim[0]=f,this.interim[1]=h,g;if(d=l[b++],(192&d)!=128){b--;continue}if(b>=u)return this.interim[0]=f,this.interim[1]=h,this.interim[2]=d,g;if(p=l[b++],(192&p)!=128){b--;continue}if(m=(7&f)<<18|(63&h)<<12|(63&d)<<6|63&p,m<65536||m>1114111)continue;c[g++]=m}}return g}}},225:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const l=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],c=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let u;a.UnicodeV6=class{constructor(){if(this.version="6",!u){u=new Uint8Array(65536),u.fill(1),u[0]=0,u.fill(0,1,32),u.fill(0,127,160),u.fill(2,4352,4448),u[9001]=2,u[9002]=2,u.fill(2,11904,42192),u[12351]=1,u.fill(2,44032,55204),u.fill(2,63744,64256),u.fill(2,65040,65050),u.fill(2,65072,65136),u.fill(2,65280,65377),u.fill(2,65504,65511);for(let f=0;f<l.length;++f)u.fill(0,l[f][0],l[f][1]+1)}}wcwidth(f){return f<32?0:f<127?1:f<65536?u[f]:function(h,d){let p,g=0,m=d.length-1;if(h<d[0][0]||h>d[m][1])return!1;for(;m>=g;)if(p=g+m>>1,h>d[p][1])g=p+1;else{if(!(h<d[p][0]))return!0;m=p-1}return!1}(f,c)?0:f>=131072&&f<=196605||f>=196608&&f<=262141?2:1}}},5981:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const c=l(8460),u=l(844);class f extends u.Disposable{constructor(d){super(),this._action=d,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(d,p){if(p!==void 0&&this._syncCalls>p)return void(this._syncCalls=0);if(this._pendingData+=d.length,this._writeBuffer.push(d),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let g;for(this._isSyncWriting=!0;g=this._writeBuffer.shift();){this._action(g);const m=this._callbacks.shift();m&&m()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(d,p){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=d.length,this._writeBuffer.push(d),this._callbacks.push(p),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=d.length,this._writeBuffer.push(d),this._callbacks.push(p)}_innerWrite(d=0,p=!0){const g=d||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const m=this._writeBuffer[this._bufferOffset],v=this._action(m,p);if(v){const b=S=>Date.now()-g>=12?setTimeout(()=>this._innerWrite(0,S)):this._innerWrite(g,S);return void v.catch(S=>(queueMicrotask(()=>{throw S}),Promise.resolve(!1))).then(b)}const y=this._callbacks[this._bufferOffset];if(y&&y(),this._bufferOffset++,this._pendingData-=m.length,Date.now()-g>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=f},5941:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const l=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function u(f,h){const d=f.toString(16),p=d.length<2?"0"+d:d;switch(h){case 4:return d[0];case 8:return p;case 12:return(p+p).slice(0,3);default:return p+p}}a.parseColor=function(f){if(!f)return;let h=f.toLowerCase();if(h.indexOf("rgb:")===0){h=h.slice(4);const d=l.exec(h);if(d){const p=d[1]?15:d[4]?255:d[7]?4095:65535;return[Math.round(parseInt(d[1]||d[4]||d[7]||d[10],16)/p*255),Math.round(parseInt(d[2]||d[5]||d[8]||d[11],16)/p*255),Math.round(parseInt(d[3]||d[6]||d[9]||d[12],16)/p*255)]}}else if(h.indexOf("#")===0&&(h=h.slice(1),c.exec(h)&&[3,6,9,12].includes(h.length))){const d=h.length/3,p=[0,0,0];for(let g=0;g<3;++g){const m=parseInt(h.slice(d*g,d*g+d),16);p[g]=d===1?m<<4:d===2?m:d===3?m>>4:m>>8}return p}},a.toRgbString=function(f,h=16){const[d,p,g]=f;return`rgb:${u(d,h)}/${u(p,h)}/${u(g,h)}`}},5770:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const c=l(482),u=l(8742),f=l(5770),h=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=h,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}registerHandler(p,g){this._handlers[p]===void 0&&(this._handlers[p]=[]);const m=this._handlers[p];return m.push(g),{dispose:()=>{const v=m.indexOf(g);v!==-1&&m.splice(v,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}reset(){if(this._active.length)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].unhook(!1);this._stack.paused=!1,this._active=h,this._ident=0}hook(p,g){if(this.reset(),this._ident=p,this._active=this._handlers[p]||h,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].hook(g);else this._handlerFb(this._ident,"HOOK",g)}put(p,g,m){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(p,g,m);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(p,g,m))}unhook(p,g=!0){if(this._active.length){let m=!1,v=this._active.length-1,y=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,m=g,y=this._stack.fallThrough,this._stack.paused=!1),!y&&m===!1){for(;v>=0&&(m=this._active[v].unhook(p),m!==!0);v--)if(m instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,m;v--}for(;v>=0;v--)if(m=this._active[v].unhook(!1),m instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,m}else this._handlerFb(this._ident,"UNHOOK",p);this._active=h,this._ident=0}};const d=new u.Params;d.addParam(0),a.DcsHandler=class{constructor(p){this._handler=p,this._data="",this._params=d,this._hitLimit=!1}hook(p){this._params=p.length>1||p.params[0]?p.clone():d,this._data="",this._hitLimit=!1}put(p,g,m){this._hitLimit||(this._data+=(0,c.utf32ToString)(p,g,m),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(p){let g=!1;if(this._hitLimit)g=!1;else if(p&&(g=this._handler(this._data,this._params),g instanceof Promise))return g.then(m=>(this._params=d,this._data="",this._hitLimit=!1,m));return this._params=d,this._data="",this._hitLimit=!1,g}}},2015:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const c=l(844),u=l(8742),f=l(6242),h=l(6351);class d{constructor(v){this.table=new Uint8Array(v)}setDefault(v,y){this.table.fill(v<<4|y)}add(v,y,b,S){this.table[y<<8|v]=b<<4|S}addMany(v,y,b,S){for(let k=0;k<v.length;k++)this.table[y<<8|v[k]]=b<<4|S}}a.TransitionTable=d;const p=160;a.VT500_TRANSITION_TABLE=function(){const m=new d(4095),v=Array.apply(null,Array(256)).map((T,C)=>C),y=(T,C)=>v.slice(T,C),b=y(32,127),S=y(0,24);S.push(25),S.push.apply(S,y(28,32));const k=y(0,14);let E;for(E in m.setDefault(1,0),m.addMany(b,0,2,0),k)m.addMany([24,26,153,154],E,3,0),m.addMany(y(128,144),E,3,0),m.addMany(y(144,152),E,3,0),m.add(156,E,0,0),m.add(27,E,11,1),m.add(157,E,4,8),m.addMany([152,158,159],E,0,7),m.add(155,E,11,3),m.add(144,E,11,9);return m.addMany(S,0,3,0),m.addMany(S,1,3,1),m.add(127,1,0,1),m.addMany(S,8,0,8),m.addMany(S,3,3,3),m.add(127,3,0,3),m.addMany(S,4,3,4),m.add(127,4,0,4),m.addMany(S,6,3,6),m.addMany(S,5,3,5),m.add(127,5,0,5),m.addMany(S,2,3,2),m.add(127,2,0,2),m.add(93,1,4,8),m.addMany(b,8,5,8),m.add(127,8,5,8),m.addMany([156,27,24,26,7],8,6,0),m.addMany(y(28,32),8,0,8),m.addMany([88,94,95],1,0,7),m.addMany(b,7,0,7),m.addMany(S,7,0,7),m.add(156,7,0,0),m.add(127,7,0,7),m.add(91,1,11,3),m.addMany(y(64,127),3,7,0),m.addMany(y(48,60),3,8,4),m.addMany([60,61,62,63],3,9,4),m.addMany(y(48,60),4,8,4),m.addMany(y(64,127),4,7,0),m.addMany([60,61,62,63],4,0,6),m.addMany(y(32,64),6,0,6),m.add(127,6,0,6),m.addMany(y(64,127),6,0,0),m.addMany(y(32,48),3,9,5),m.addMany(y(32,48),5,9,5),m.addMany(y(48,64),5,0,6),m.addMany(y(64,127),5,7,0),m.addMany(y(32,48),4,9,5),m.addMany(y(32,48),1,9,2),m.addMany(y(32,48),2,9,2),m.addMany(y(48,127),2,10,0),m.addMany(y(48,80),1,10,0),m.addMany(y(81,88),1,10,0),m.addMany([89,90,92],1,10,0),m.addMany(y(96,127),1,10,0),m.add(80,1,11,9),m.addMany(S,9,0,9),m.add(127,9,0,9),m.addMany(y(28,32),9,0,9),m.addMany(y(32,48),9,9,12),m.addMany(y(48,60),9,8,10),m.addMany([60,61,62,63],9,9,10),m.addMany(S,11,0,11),m.addMany(y(32,128),11,0,11),m.addMany(y(28,32),11,0,11),m.addMany(S,10,0,10),m.add(127,10,0,10),m.addMany(y(28,32),10,0,10),m.addMany(y(48,60),10,8,10),m.addMany([60,61,62,63],10,0,11),m.addMany(y(32,48),10,9,12),m.addMany(S,12,0,12),m.add(127,12,0,12),m.addMany(y(28,32),12,0,12),m.addMany(y(32,48),12,9,12),m.addMany(y(48,64),12,0,11),m.addMany(y(64,127),12,12,13),m.addMany(y(64,127),10,12,13),m.addMany(y(64,127),9,12,13),m.addMany(S,13,13,13),m.addMany(b,13,13,13),m.add(127,13,0,13),m.addMany([27,156,24,26],13,14,0),m.add(p,0,2,0),m.add(p,8,5,8),m.add(p,6,0,6),m.add(p,11,0,11),m.add(p,13,13,13),m}();class g extends c.Disposable{constructor(v=a.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new u.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(y,b,S)=>{},this._executeHandlerFb=y=>{},this._csiHandlerFb=(y,b)=>{},this._escHandlerFb=y=>{},this._errorHandlerFb=y=>y,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new h.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(v,y=[64,126]){let b=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(b=v.prefix.charCodeAt(0),b&&60>b||b>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let k=0;k<v.intermediates.length;++k){const E=v.intermediates.charCodeAt(k);if(32>E||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");b<<=8,b|=E}}if(v.final.length!==1)throw new Error("final must be a single byte");const S=v.final.charCodeAt(0);if(y[0]>S||S>y[1])throw new Error(`final must be in range ${y[0]} .. ${y[1]}`);return b<<=8,b|=S,b}identToString(v){const y=[];for(;v;)y.push(String.fromCharCode(255&v)),v>>=8;return y.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,y){const b=this._identifier(v,[48,126]);this._escHandlers[b]===void 0&&(this._escHandlers[b]=[]);const S=this._escHandlers[b];return S.push(y),{dispose:()=>{const k=S.indexOf(y);k!==-1&&S.splice(k,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,y){this._executeHandlers[v.charCodeAt(0)]=y}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,y){const b=this._identifier(v);this._csiHandlers[b]===void 0&&(this._csiHandlers[b]=[]);const S=this._csiHandlers[b];return S.push(y),{dispose:()=>{const k=S.indexOf(y);k!==-1&&S.splice(k,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,y){return this._dcsParser.registerHandler(this._identifier(v),y)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,y){return this._oscParser.registerHandler(v,y)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(v,y,b,S,k){this._parseStack.state=v,this._parseStack.handlers=y,this._parseStack.handlerPos=b,this._parseStack.transition=S,this._parseStack.chunkPos=k}parse(v,y,b){let S,k=0,E=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(b===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const C=this._parseStack.handlers;let A=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(b===!1&&A>-1){for(;A>=0&&(S=C[A](this._params),S!==!0);A--)if(S instanceof Promise)return this._parseStack.handlerPos=A,S}this._parseStack.handlers=[];break;case 4:if(b===!1&&A>-1){for(;A>=0&&(S=C[A](),S!==!0);A--)if(S instanceof Promise)return this._parseStack.handlerPos=A,S}this._parseStack.handlers=[];break;case 6:if(k=v[this._parseStack.chunkPos],S=this._dcsParser.unhook(k!==24&&k!==26,b),S)return S;k===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(k=v[this._parseStack.chunkPos],S=this._oscParser.end(k!==24&&k!==26,b),S)return S;k===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,T=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let C=T;C<y;++C){switch(k=v[C],E=this._transitions.table[this.currentState<<8|(k<160?k:p)],E>>4){case 2:for(let z=C+1;;++z){if(z>=y||(k=v[z])<32||k>126&&k<p){this._printHandler(v,C,z),C=z-1;break}if(++z>=y||(k=v[z])<32||k>126&&k<p){this._printHandler(v,C,z),C=z-1;break}if(++z>=y||(k=v[z])<32||k>126&&k<p){this._printHandler(v,C,z),C=z-1;break}if(++z>=y||(k=v[z])<32||k>126&&k<p){this._printHandler(v,C,z),C=z-1;break}}break;case 3:this._executeHandlers[k]?this._executeHandlers[k]():this._executeHandlerFb(k),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:C,code:k,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const A=this._csiHandlers[this._collect<<8|k];let R=A?A.length-1:-1;for(;R>=0&&(S=A[R](this._params),S!==!0);R--)if(S instanceof Promise)return this._preserveStack(3,A,R,E,C),S;R<0&&this._csiHandlerFb(this._collect<<8|k,this._params),this.precedingCodepoint=0;break;case 8:do switch(k){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(k-48)}while(++C<y&&(k=v[C])>47&&k<60);C--;break;case 9:this._collect<<=8,this._collect|=k;break;case 10:const Q=this._escHandlers[this._collect<<8|k];let L=Q?Q.length-1:-1;for(;L>=0&&(S=Q[L](),S!==!0);L--)if(S instanceof Promise)return this._preserveStack(4,Q,L,E,C),S;L<0&&this._escHandlerFb(this._collect<<8|k),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|k,this._params);break;case 13:for(let z=C+1;;++z)if(z>=y||(k=v[z])===24||k===26||k===27||k>127&&k<p){this._dcsParser.put(v,C,z),C=z-1;break}break;case 14:if(S=this._dcsParser.unhook(k!==24&&k!==26),S)return this._preserveStack(6,[],0,E,C),S;k===27&&(E|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let z=C+1;;z++)if(z>=y||(k=v[z])<32||k>127&&k<p){this._oscParser.put(v,C,z),C=z-1;break}break;case 6:if(S=this._oscParser.end(k!==24&&k!==26),S)return this._preserveStack(5,[],0,E,C),S;k===27&&(E|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&E}}}a.EscapeSequenceParser=g},6242:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const c=l(5770),u=l(482),f=[];a.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(h,d){this._handlers[h]===void 0&&(this._handlers[h]=[]);const p=this._handlers[h];return p.push(d),{dispose:()=>{const g=p.indexOf(d);g!==-1&&p.splice(g,1)}}}clearHandler(h){this._handlers[h]&&delete this._handlers[h]}setHandlerFallback(h){this._handlerFb=h}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let h=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;h>=0;--h)this._active[h].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].start();else this._handlerFb(this._id,"START")}_put(h,d,p){if(this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].put(h,d,p);else this._handlerFb(this._id,"PUT",(0,u.utf32ToString)(h,d,p))}start(){this.reset(),this._state=1}put(h,d,p){if(this._state!==3){if(this._state===1)for(;d<p;){const g=h[d++];if(g===59){this._state=2,this._start();break}if(g<48||57<g)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+g-48}this._state===2&&p-d>0&&this._put(h,d,p)}}end(h,d=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let p=!1,g=this._active.length-1,m=!1;if(this._stack.paused&&(g=this._stack.loopPosition-1,p=d,m=this._stack.fallThrough,this._stack.paused=!1),!m&&p===!1){for(;g>=0&&(p=this._active[g].end(h),p!==!0);g--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!1,p;g--}for(;g>=0;g--)if(p=this._active[g].end(!1),p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!0,p}else this._handlerFb(this._id,"END",h);this._active=f,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(h){this._handler=h,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(h,d,p){this._hitLimit||(this._data+=(0,u.utf32ToString)(h,d,p),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(h){let d=!1;if(this._hitLimit)d=!1;else if(h&&(d=this._handler(this._data),d instanceof Promise))return d.then(p=>(this._data="",this._hitLimit=!1,p));return this._data="",this._hitLimit=!1,d}}},8742:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const l=2147483647;class c{static fromArray(f){const h=new c;if(!f.length)return h;for(let d=Array.isArray(f[0])?1:0;d<f.length;++d){const p=f[d];if(Array.isArray(p))for(let g=0;g<p.length;++g)h.addSubParam(p[g]);else h.addParam(p)}return h}constructor(f=32,h=32){if(this.maxLength=f,this.maxSubParamsLength=h,h>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new c(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let h=0;h<this.length;++h){f.push(this.params[h]);const d=this._subParamsIdx[h]>>8,p=255&this._subParamsIdx[h];p-d>0&&f.push(Array.prototype.slice.call(this._subParams,d,p))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>l?l:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>l?l:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const h=this._subParamsIdx[f]>>8,d=255&this._subParamsIdx[f];return d-h>0?this._subParams.subarray(h,d):null}getSubParamsAll(){const f={};for(let h=0;h<this.length;++h){const d=this._subParamsIdx[h]>>8,p=255&this._subParamsIdx[h];p-d>0&&(f[h]=this._subParams.slice(d,p))}return f}addDigit(f){let h;if(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const d=this._digitIsSub?this._subParams:this.params,p=d[h-1];d[h-1]=~p?Math.min(10*p+f,l):f}}a.Params=c},5741:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,c){const u={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(u),c.dispose=()=>this._wrappedAddonDispose(u),c.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let c=-1;for(let u=0;u<this._addons.length;u++)if(this._addons[u]===l){c=u;break}if(c===-1)throw new Error("Could not dispose an addon that has not been loaded");l.isDisposed=!0,l.dispose.apply(l.instance),this._addons.splice(c,1)}}},8771:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const c=l(3785),u=l(511);a.BufferApiView=class{constructor(f,h){this._buffer=f,this.type=h}init(f){return this._buffer=f,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(f){const h=this._buffer.lines.get(f);if(h)return new c.BufferLineApiView(h)}getNullCell(){return new u.CellData}}},3785:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const c=l(511);a.BufferLineApiView=class{constructor(u){this._line=u}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(u,f){if(!(u<0||u>=this._line.length))return f?(this._line.loadCell(u,f),f):this._line.loadCell(u,new c.CellData)}translateToString(u,f,h){return this._line.translateToString(u,f,h)}}},8285:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const c=l(8771),u=l(8460),f=l(844);class h extends f.Disposable{constructor(p){super(),this._core=p,this._onBufferChange=this.register(new u.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=h},7975:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,c){return this._core.registerCsiHandler(l,u=>c(u.toArray()))}addCsiHandler(l,c){return this.registerCsiHandler(l,c)}registerDcsHandler(l,c){return this._core.registerDcsHandler(l,(u,f)=>c(u,f.toArray()))}addDcsHandler(l,c){return this.registerDcsHandler(l,c)}registerEscHandler(l,c){return this._core.registerEscHandler(l,c)}addEscHandler(l,c){return this.registerEscHandler(l,c)}registerOscHandler(l,c){return this._core.registerOscHandler(l,c)}addOscHandler(l,c){return this.registerOscHandler(l,c)}}},7090:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(o,a,l){var c=this&&this.__decorate||function(m,v,y,b){var S,k=arguments.length,E=k<3?v:b===null?b=Object.getOwnPropertyDescriptor(v,y):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,v,y,b);else for(var T=m.length-1;T>=0;T--)(S=m[T])&&(E=(k<3?S(E):k>3?S(v,y,E):S(v,y))||E);return k>3&&E&&Object.defineProperty(v,y,E),E},u=this&&this.__param||function(m,v){return function(y,b){v(y,b,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const f=l(8460),h=l(844),d=l(5295),p=l(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let g=a.BufferService=class extends h.Disposable{get buffer(){return this.buffers.active}constructor(m){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(m.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(m.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new d.BufferSet(m,this))}resize(m,v){this.cols=m,this.rows=v,this.buffers.resize(m,v),this._onResize.fire({cols:m,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(m,v=!1){const y=this.buffer;let b;b=this._cachedBlankLine,b&&b.length===this.cols&&b.getFg(0)===m.fg&&b.getBg(0)===m.bg||(b=y.getBlankLine(m,v),this._cachedBlankLine=b),b.isWrapped=v;const S=y.ybase+y.scrollTop,k=y.ybase+y.scrollBottom;if(y.scrollTop===0){const E=y.lines.isFull;k===y.lines.length-1?E?y.lines.recycle().copyFrom(b):y.lines.push(b.clone()):y.lines.splice(k+1,0,b.clone()),E?this.isUserScrolling&&(y.ydisp=Math.max(y.ydisp-1,0)):(y.ybase++,this.isUserScrolling||y.ydisp++)}else{const E=k-S+1;y.lines.shiftElements(S+1,E-1,-1),y.lines.set(k,b.clone())}this.isUserScrolling||(y.ydisp=y.ybase),this._onScroll.fire(y.ydisp)}scrollLines(m,v,y){const b=this.buffer;if(m<0){if(b.ydisp===0)return;this.isUserScrolling=!0}else m+b.ydisp>=b.ybase&&(this.isUserScrolling=!1);const S=b.ydisp;b.ydisp=Math.max(Math.min(b.ydisp+m,b.ybase),0),S!==b.ydisp&&(v||this._onScroll.fire(b.ydisp))}};a.BufferService=g=c([u(0,p.IOptionsService)],g)},7994:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,c){this._charsets[l]=c,this.glevel===l&&(this.charset=c)}}},1753:function(o,a,l){var c=this&&this.__decorate||function(b,S,k,E){var T,C=arguments.length,A=C<3?S:E===null?E=Object.getOwnPropertyDescriptor(S,k):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,S,k,E);else for(var R=b.length-1;R>=0;R--)(T=b[R])&&(A=(C<3?T(A):C>3?T(S,k,A):T(S,k))||A);return C>3&&A&&Object.defineProperty(S,k,A),A},u=this&&this.__param||function(b,S){return function(k,E){S(k,E,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const f=l(2585),h=l(8460),d=l(844),p={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:b=>b.button!==4&&b.action===1&&(b.ctrl=!1,b.alt=!1,b.shift=!1,!0)},VT200:{events:19,restrict:b=>b.action!==32},DRAG:{events:23,restrict:b=>b.action!==32||b.button!==3},ANY:{events:31,restrict:b=>!0}};function g(b,S){let k=(b.ctrl?16:0)|(b.shift?4:0)|(b.alt?8:0);return b.button===4?(k|=64,k|=b.action):(k|=3&b.button,4&b.button&&(k|=64),8&b.button&&(k|=128),b.action===32?k|=32:b.action!==0||S||(k|=3)),k}const m=String.fromCharCode,v={DEFAULT:b=>{const S=[g(b,!1)+32,b.col+32,b.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${m(S[0])}${m(S[1])}${m(S[2])}`},SGR:b=>{const S=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${g(b,!0)};${b.col};${b.row}${S}`},SGR_PIXELS:b=>{const S=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${g(b,!0)};${b.x};${b.y}${S}`}};let y=a.CoreMouseService=class extends d.Disposable{constructor(b,S){super(),this._bufferService=b,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new h.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const k of Object.keys(p))this.addProtocol(k,p[k]);for(const k of Object.keys(v))this.addEncoding(k,v[k]);this.reset()}addProtocol(b,S){this._protocols[b]=S}addEncoding(b,S){this._encodings[b]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(b){if(!this._protocols[b])throw new Error(`unknown protocol "${b}"`);this._activeProtocol=b,this._onProtocolChange.fire(this._protocols[b].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(b){if(!this._encodings[b])throw new Error(`unknown encoding "${b}"`);this._activeEncoding=b}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(b){if(b.col<0||b.col>=this._bufferService.cols||b.row<0||b.row>=this._bufferService.rows||b.button===4&&b.action===32||b.button===3&&b.action!==32||b.button!==4&&(b.action===2||b.action===3)||(b.col++,b.row++,b.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,b,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(b))return!1;const S=this._encodings[this._activeEncoding](b);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=b,!0}explainEvents(b){return{down:!!(1&b),up:!!(2&b),drag:!!(4&b),move:!!(8&b),wheel:!!(16&b)}}_equalEvents(b,S,k){if(k){if(b.x!==S.x||b.y!==S.y)return!1}else if(b.col!==S.col||b.row!==S.row)return!1;return b.button===S.button&&b.action===S.action&&b.ctrl===S.ctrl&&b.alt===S.alt&&b.shift===S.shift}};a.CoreMouseService=y=c([u(0,f.IBufferService),u(1,f.ICoreService)],y)},6975:function(o,a,l){var c=this&&this.__decorate||function(y,b,S,k){var E,T=arguments.length,C=T<3?b:k===null?k=Object.getOwnPropertyDescriptor(b,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(y,b,S,k);else for(var A=y.length-1;A>=0;A--)(E=y[A])&&(C=(T<3?E(C):T>3?E(b,S,C):E(b,S))||C);return T>3&&C&&Object.defineProperty(b,S,C),C},u=this&&this.__param||function(y,b){return function(S,k){b(S,k,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const f=l(1439),h=l(8460),d=l(844),p=l(2585),g=Object.freeze({insertMode:!1}),m=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=a.CoreService=class extends d.Disposable{constructor(y,b,S){super(),this._bufferService=y,this._logService=b,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new h.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new h.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(g),this.decPrivateModes=(0,f.clone)(m)}reset(){this.modes=(0,f.clone)(g),this.decPrivateModes=(0,f.clone)(m)}triggerDataEvent(y,b=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;b&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),b&&this._onUserInput.fire(),this._logService.debug(`sending data "${y}"`,()=>y.split("").map(k=>k.charCodeAt(0))),this._onData.fire(y)}triggerBinaryEvent(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${y}"`,()=>y.split("").map(b=>b.charCodeAt(0))),this._onBinary.fire(y))}};a.CoreService=v=c([u(0,p.IBufferService),u(1,p.ILogService),u(2,p.IOptionsService)],v)},9074:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const c=l(8055),u=l(8460),f=l(844),h=l(6106);let d=0,p=0;class g extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new h.SortedList(y=>y==null?void 0:y.marker.line),this._onDecorationRegistered=this.register(new u.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new u.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)(()=>this.reset()))}registerDecoration(y){if(y.marker.isDisposed)return;const b=new m(y);if(b){const S=b.marker.onDispose(()=>b.dispose());b.onDispose(()=>{b&&(this._decorations.delete(b)&&this._onDecorationRemoved.fire(b),S.dispose())}),this._decorations.insert(b),this._onDecorationRegistered.fire(b)}return b}reset(){for(const y of this._decorations.values())y.dispose();this._decorations.clear()}*getDecorationsAtCell(y,b,S){var k,E,T;let C=0,A=0;for(const R of this._decorations.getKeyIterator(b))C=(k=R.options.x)!==null&&k!==void 0?k:0,A=C+((E=R.options.width)!==null&&E!==void 0?E:1),y>=C&&y<A&&(!S||((T=R.options.layer)!==null&&T!==void 0?T:"bottom")===S)&&(yield R)}forEachDecorationAtCell(y,b,S,k){this._decorations.forEachByKey(b,E=>{var T,C,A;d=(T=E.options.x)!==null&&T!==void 0?T:0,p=d+((C=E.options.width)!==null&&C!==void 0?C:1),y>=d&&y<p&&(!S||((A=E.options.layer)!==null&&A!==void 0?A:"bottom")===S)&&k(E)})}}a.DecorationService=g;class m extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=c.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=c.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(y){super(),this.options=y,this.onRenderEmitter=this.register(new u.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=y.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const c=l(2585),u=l(8343);class f{constructor(...d){this._entries=new Map;for(const[p,g]of d)this.set(p,g)}set(d,p){const g=this._entries.get(d);return this._entries.set(d,p),g}forEach(d){for(const[p,g]of this._entries.entries())d(p,g)}has(d){return this._entries.has(d)}get(d){return this._entries.get(d)}}a.ServiceCollection=f,a.InstantiationService=class{constructor(){this._services=new f,this._services.set(c.IInstantiationService,this)}setService(h,d){this._services.set(h,d)}getService(h){return this._services.get(h)}createInstance(h,...d){const p=(0,u.getServiceDependencies)(h).sort((v,y)=>v.index-y.index),g=[];for(const v of p){const y=this._services.get(v.id);if(!y)throw new Error(`[createInstance] ${h.name} depends on UNKNOWN service ${v.id}.`);g.push(y)}const m=p.length>0?p[0].index:d.length;if(d.length!==m)throw new Error(`[createInstance] First service dependency of ${h.name} at position ${m+1} conflicts with ${d.length} static arguments`);return new h(...d,...g)}}},7866:function(o,a,l){var c=this&&this.__decorate||function(m,v,y,b){var S,k=arguments.length,E=k<3?v:b===null?b=Object.getOwnPropertyDescriptor(v,y):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,v,y,b);else for(var T=m.length-1;T>=0;T--)(S=m[T])&&(E=(k<3?S(E):k>3?S(v,y,E):S(v,y))||E);return k>3&&E&&Object.defineProperty(v,y,E),E},u=this&&this.__param||function(m,v){return function(y,b){v(y,b,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const f=l(844),h=l(2585),d={trace:h.LogLevelEnum.TRACE,debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF};let p,g=a.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(m){super(),this._optionsService=m,this._logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),p=this}_updateLogLevel(){this._logLevel=d[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(m){for(let v=0;v<m.length;v++)typeof m[v]=="function"&&(m[v]=m[v]())}_log(m,v,y){this._evalLazyOptionalParams(y),m.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+v,...y)}trace(m,...v){var y,b;this._logLevel<=h.LogLevelEnum.TRACE&&this._log((b=(y=this._optionsService.options.logger)===null||y===void 0?void 0:y.trace.bind(this._optionsService.options.logger))!==null&&b!==void 0?b:console.log,m,v)}debug(m,...v){var y,b;this._logLevel<=h.LogLevelEnum.DEBUG&&this._log((b=(y=this._optionsService.options.logger)===null||y===void 0?void 0:y.debug.bind(this._optionsService.options.logger))!==null&&b!==void 0?b:console.log,m,v)}info(m,...v){var y,b;this._logLevel<=h.LogLevelEnum.INFO&&this._log((b=(y=this._optionsService.options.logger)===null||y===void 0?void 0:y.info.bind(this._optionsService.options.logger))!==null&&b!==void 0?b:console.info,m,v)}warn(m,...v){var y,b;this._logLevel<=h.LogLevelEnum.WARN&&this._log((b=(y=this._optionsService.options.logger)===null||y===void 0?void 0:y.warn.bind(this._optionsService.options.logger))!==null&&b!==void 0?b:console.warn,m,v)}error(m,...v){var y,b;this._logLevel<=h.LogLevelEnum.ERROR&&this._log((b=(y=this._optionsService.options.logger)===null||y===void 0?void 0:y.error.bind(this._optionsService.options.logger))!==null&&b!==void 0?b:console.error,m,v)}};a.LogService=g=c([u(0,h.IOptionsService)],g),a.setTraceLogger=function(m){p=m},a.traceCall=function(m,v,y){if(typeof y.value!="function")throw new Error("not supported");const b=y.value;y.value=function(...S){if(p.logLevel!==h.LogLevelEnum.TRACE)return b.apply(this,S);p.trace(`GlyphRenderer#${b.name}(${S.map(E=>JSON.stringify(E)).join(", ")})`);const k=b.apply(this,S);return p.trace(`GlyphRenderer#${b.name} return`,k),k}}},7302:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const c=l(8460),u=l(844),f=l(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const h=["normal","bold","100","200","300","400","500","600","700","800","900"];class d extends u.Disposable{constructor(g){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;const m=Object.assign({},a.DEFAULT_OPTIONS);for(const v in g)if(v in m)try{const y=g[v];m[v]=this._sanitizeAndValidateOption(v,y)}catch(y){console.error(y)}this.rawOptions=m,this.options=Object.assign({},m),this._setupOptions()}onSpecificOptionChange(g,m){return this.onOptionChange(v=>{v===g&&m(this.rawOptions[g])})}onMultipleOptionChange(g,m){return this.onOptionChange(v=>{g.indexOf(v)!==-1&&m()})}_setupOptions(){const g=v=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},m=(v,y)=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);y=this._sanitizeAndValidateOption(v,y),this.rawOptions[v]!==y&&(this.rawOptions[v]=y,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const y={get:g.bind(this,v),set:m.bind(this,v)};Object.defineProperty(this.options,v,y)}}_sanitizeAndValidateOption(g,m){switch(g){case"cursorStyle":if(m||(m=a.DEFAULT_OPTIONS[g]),!function(v){return v==="block"||v==="underline"||v==="bar"}(m))throw new Error(`"${m}" is not a valid value for ${g}`);break;case"wordSeparator":m||(m=a.DEFAULT_OPTIONS[g]);break;case"fontWeight":case"fontWeightBold":if(typeof m=="number"&&1<=m&&m<=1e3)break;m=h.includes(m)?m:a.DEFAULT_OPTIONS[g];break;case"cursorWidth":m=Math.floor(m);case"lineHeight":case"tabStopWidth":if(m<1)throw new Error(`${g} cannot be less than 1, value: ${m}`);break;case"minimumContrastRatio":m=Math.max(1,Math.min(21,Math.round(10*m)/10));break;case"scrollback":if((m=Math.min(m,4294967295))<0)throw new Error(`${g} cannot be less than 0, value: ${m}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(m<=0)throw new Error(`${g} cannot be less than or equal to 0, value: ${m}`);break;case"rows":case"cols":if(!m&&m!==0)throw new Error(`${g} must be numeric, value: ${m}`);break;case"windowsPty":m=m??{}}return m}}a.OptionsService=d},2660:function(o,a,l){var c=this&&this.__decorate||function(d,p,g,m){var v,y=arguments.length,b=y<3?p:m===null?m=Object.getOwnPropertyDescriptor(p,g):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(d,p,g,m);else for(var S=d.length-1;S>=0;S--)(v=d[S])&&(b=(y<3?v(b):y>3?v(p,g,b):v(p,g))||b);return y>3&&b&&Object.defineProperty(p,g,b),b},u=this&&this.__param||function(d,p){return function(g,m){p(g,m,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const f=l(2585);let h=a.OscLinkService=class{constructor(d){this._bufferService=d,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(d){const p=this._bufferService.buffer;if(d.id===void 0){const S=p.addMarker(p.ybase+p.y),k={data:d,id:this._nextId++,lines:[S]};return S.onDispose(()=>this._removeMarkerFromLink(k,S)),this._dataByLinkId.set(k.id,k),k.id}const g=d,m=this._getEntryIdKey(g),v=this._entriesWithId.get(m);if(v)return this.addLineToLink(v.id,p.ybase+p.y),v.id;const y=p.addMarker(p.ybase+p.y),b={id:this._nextId++,key:this._getEntryIdKey(g),data:g,lines:[y]};return y.onDispose(()=>this._removeMarkerFromLink(b,y)),this._entriesWithId.set(b.key,b),this._dataByLinkId.set(b.id,b),b.id}addLineToLink(d,p){const g=this._dataByLinkId.get(d);if(g&&g.lines.every(m=>m.line!==p)){const m=this._bufferService.buffer.addMarker(p);g.lines.push(m),m.onDispose(()=>this._removeMarkerFromLink(g,m))}}getLinkData(d){var p;return(p=this._dataByLinkId.get(d))===null||p===void 0?void 0:p.data}_getEntryIdKey(d){return`${d.id};;${d.uri}`}_removeMarkerFromLink(d,p){const g=d.lines.indexOf(p);g!==-1&&(d.lines.splice(g,1),d.lines.length===0&&(d.data.id!==void 0&&this._entriesWithId.delete(d.key),this._dataByLinkId.delete(d.id)))}};a.OscLinkService=h=c([u(0,f.IBufferService)],h)},8343:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const l="di$target",c="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(u){return u[c]||[]},a.createDecorator=function(u){if(a.serviceRegistry.has(u))return a.serviceRegistry.get(u);const f=function(h,d,p){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(g,m,v){m[l]===m?m[c].push({id:g,index:v}):(m[c]=[{id:g,index:v}],m[l]=m)})(f,h,p)};return f.toString=()=>u,a.serviceRegistry.set(u,f),f}},2585:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const c=l(8343);var u;a.IBufferService=(0,c.createDecorator)("BufferService"),a.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),a.ICoreService=(0,c.createDecorator)("CoreService"),a.ICharsetService=(0,c.createDecorator)("CharsetService"),a.IInstantiationService=(0,c.createDecorator)("InstantiationService"),function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"}(u||(a.LogLevelEnum=u={})),a.ILogService=(0,c.createDecorator)("LogService"),a.IOptionsService=(0,c.createDecorator)("OptionsService"),a.IOscLinkService=(0,c.createDecorator)("OscLinkService"),a.IUnicodeService=(0,c.createDecorator)("UnicodeService"),a.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const c=l(8460),u=l(225);a.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const f=new u.UnicodeV6;this.register(f),this._active=f.version,this._activeProvider=f}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(f){if(!this._providers[f])throw new Error(`unknown Unicode version "${f}"`);this._active=f,this._activeProvider=this._providers[f],this._onChange.fire(f)}register(f){this._providers[f.version]=f}wcwidth(f){return this._activeProvider.wcwidth(f)}getStringCellWidth(f){let h=0;const d=f.length;for(let p=0;p<d;++p){let g=f.charCodeAt(p);if(55296<=g&&g<=56319){if(++p>=d)return h+this.wcwidth(g);const m=f.charCodeAt(p);56320<=m&&m<=57343?g=1024*(g-55296)+m-56320+65536:h+=this.wcwidth(m)}h+=this.wcwidth(g)}return h}}}},r={};function i(o){var a=r[o];if(a!==void 0)return a.exports;var l=r[o]={exports:{}};return n[o].call(l.exports,l,l.exports,i),l.exports}var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const a=i(9042),l=i(3236),c=i(844),u=i(5741),f=i(8285),h=i(7975),d=i(7090),p=["cols","rows"];class g extends c.Disposable{constructor(v){super(),this._core=this.register(new l.Terminal(v)),this._addonManager=this.register(new u.AddonManager),this._publicOptions=Object.assign({},this._core.options);const y=S=>this._core.options[S],b=(S,k)=>{this._checkReadonlyOptions(S),this._core.options[S]=k};for(const S in this._core.options){const k={get:y.bind(this,S),set:b.bind(this,S)};Object.defineProperty(this._publicOptions,S,k)}}_checkReadonlyOptions(v){if(p.includes(v))throw new Error(`Option "${v}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new h.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new d.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const v=this._core.coreService.decPrivateModes;let y="none";switch(this._core.coreMouseService.activeProtocol){case"X10":y="x10";break;case"VT200":y="vt200";break;case"DRAG":y="drag";break;case"ANY":y="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:y,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const y in v)this._publicOptions[y]=v[y]}blur(){this._core.blur()}focus(){this._core.focus()}resize(v,y){this._verifyIntegers(v,y),this._core.resize(v,y)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){var y,b,S;return this._checkProposedApi(),this._verifyPositiveIntegers((y=v.x)!==null&&y!==void 0?y:0,(b=v.width)!==null&&b!==void 0?b:0,(S=v.height)!==null&&S!==void 0?S:0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,y,b){this._verifyIntegers(v,y,b),this._core.select(v,y,b)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,y){this._verifyIntegers(v,y),this._core.selectLines(v,y)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,y){this._core.write(v,y)}writeln(v,y){this._core.write(v),this._core.write(`\r
|
302
|
-
`,y)}paste(v){this._core.paste(v)}refresh(v,y){this._verifyIntegers(v,y),this._core.refresh(v,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return a}_verifyIntegers(...v){for(const y of v)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const y of v)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}o.Terminal=g})(),s})())})(kie);var Eie=kie.exports,Tie={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(self,()=>(()=>{var n={};return(()=>{var r=n;function i(s,o,a){return s.addEventListener(o,a),{dispose:()=>{a&&s.removeEventListener(o,a)}}}Object.defineProperty(r,"__esModule",{value:!0}),r.AttachAddon=void 0,r.AttachAddon=class{constructor(s,o){this._disposables=[],this._socket=s,this._socket.binaryType="arraybuffer",this._bidirectional=!(o&&o.bidirectional===!1)}activate(s){this._disposables.push(i(this._socket,"message",o=>{const a=o.data;s.write(typeof a=="string"?a:new Uint8Array(a))})),this._bidirectional&&(this._disposables.push(s.onData(o=>this._sendData(o))),this._disposables.push(s.onBinary(o=>this._sendBinary(o)))),this._disposables.push(i(this._socket,"close",()=>this.dispose())),this._disposables.push(i(this._socket,"error",()=>this.dispose()))}dispose(){for(const s of this._disposables)s.dispose()}_sendData(s){this._checkOpenSocket()&&this._socket.send(s)}_sendBinary(s){if(!this._checkOpenSocket())return;const o=new Uint8Array(s.length);for(let a=0;a<s.length;++a)o[a]=255&s.charCodeAt(a);this._socket.send(o)}_checkOpenSocket(){switch(this._socket.readyState){case WebSocket.OPEN:return!0;case WebSocket.CONNECTING:throw new Error("Attach addon was loaded before socket was open");case WebSocket.CLOSING:return console.warn("Attach addon socket is closing"),!1;case WebSocket.CLOSED:throw new Error("Attach addon socket is closed");default:throw new Error("Unexpected socket state")}}}})(),n})())})(Tie);var Pie=Tie.exports;var Aie={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(self,()=>(()=>{var n={};return(()=>{var r=n;Object.defineProperty(r,"__esModule",{value:!0}),r.FitAddon=void 0,r.FitAddon=class{activate(i){this._terminal=i}dispose(){}fit(){const i=this.proposeDimensions();if(!i||!this._terminal||isNaN(i.cols)||isNaN(i.rows))return;const s=this._terminal._core;this._terminal.rows===i.rows&&this._terminal.cols===i.cols||(s._renderService.clear(),this._terminal.resize(i.cols,i.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const i=this._terminal._core,s=i._renderService.dimensions;if(s.css.cell.width===0||s.css.cell.height===0)return;const o=this._terminal.options.scrollback===0?0:i.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(a.getPropertyValue("height")),c=Math.max(0,parseInt(a.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),f=l-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),h=c-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(h/s.css.cell.width)),rows:Math.max(1,Math.floor(f/s.css.cell.height))}}}})(),n})())})(Aie);var MNe=Aie.exports;const Rie={foreground:"#B8C2D5",background:"#06070A",cursor:"#B8C2D5",selection:"#49483e",black:"#272822",red:"#f92672",green:"#a6e22e",yellow:"#f4bf75",blue:"#66d9ef",magenta:"#ae81ff",cyan:"#a1efe4",white:"#f8f8f2",brightBlack:"#75715e",brightRed:"#f92672",brightGreen:"#a6e22e",brightYellow:"#f4bf75",brightBlue:"#66d9ef",brightMagenta:"#ae81ff",brightCyan:"#a1efe4",brightWhite:"#f9f8f5"};function $ie(){const t=_.useRef(null);return t.current||(t.current=new MNe.FitAddon),t.current}function Mie(t,e){return t.onRender(()=>{e(t.buffer.active.baseY>0)}),Ut.subscribe(r=>r.isPanScrolling,r=>{r?t.options.scrollSensitivity=Number.MIN_VALUE:t.options.scrollSensitivity=1})}function Iie(t,e){t.readyState===1?(t.close(),e.dispose()):t.addEventListener("open",()=>{t.close(),e.dispose()})}const Ph={},Uu={};function INe({sectionId:t,width:e,height:n,setHasScrollbar:r}){const i=_.useRef(null),s=$ie();return _.useEffect(()=>{const o=new Eie.Terminal({cursorBlink:!0,theme:Rie});o.loadAddon(s),o.open(i.current);const{ws:a}=DNe(t);o.onResize(u=>{const f=JSON.stringify({messageType:Y.WS_TERMINAL_RESIZE,cols:u.cols,rows:u.rows});a.readyState===1?a.send(f):Die(t,f)});function l(u){if(u.data===Y.SETTA_TERMINAL_READY){const f=new Pie.AttachAddon(a);o.loadAddon(f),a.removeEventListener("message",l)}}a.addEventListener("message",l);const c=Mie(o,r);return()=>{Iie(a,o),c()}},[]),_.useEffect(()=>{s.fit()},[e,n]),i}function DNe(t){const e=vo.getState().id,n=Kn(),r=!!te.getState().x[t].isTemporary,i=`${Zp.WEBSOCKET}${d$(Y.ROUTE_TERMINAL,{projectConfigId:e,sectionId:t,id:n,isTemporary:r})}`,s=new WebSocket(i);s.addEventListener("open",async()=>{var a;if(((a=Uu[t])==null?void 0:a.length)>0){const l=[];for(const[c,u]of Uu[t].entries())await new Promise(f=>setTimeout(f,0)),s.readyState===1&&(s.send(u),l.push(c));Uu[t]=Uu[t].filter((c,u)=>!l.includes(u))}});function o(){t in Ph&&(Ph[t]=NNe(Ph[t],s))}return s.addEventListener("close",o),s.addEventListener("error",o),t in Ph||(Ph[t]=[]),Ph[t].push(s),{ws:s,wsId:n}}function Die(t,e){t in Uu||(Uu[t]=[]),Uu[t].includes(e)||Uu[t].push(e)}function LNe(t,e){for(const n of Ph[t])if(n.readyState===1){n.send(e);break}}function NNe(t,e){return t.filter(n=>n!==e)}async function QNe(){const t=await pNe(vo.getState().id);if(t.status===200){const n=t.data.filter(r=>!(r.id in te.getState().x));if(n.length===0)return;te.setState(r=>{const i=Nie(r);for(const s of n)Lie(s.id,i,r)}),hn(!0)}}function Lie(t,e,n){l3({sectionProps:{id:t,parentId:e,uiTypeId:Nm[Y.TERMINAL],isTemporary:!0},state:n}),am(e,r=>[...r,t],n)}function Nie(t){let e=t.singletonSections.temporaryTerminalGroup;return e||(e=Qy({type:Y.GROUP,sectionProps:{name:jNe(),isTemporary:!0},state:t})),e}function jNe(){const t="Temporary Terminals",e=ae.map(te.getState().x,r=>r.name);let n=t;for(;e.includes(n);)n=`${t} ${createRandomName()}`;return n}function*BNe(t){const e={};for(const i of t)e[i.variantId]||(e[i.variantId]=[]),e[i.variantId].push(i);function*n(i,s=[],o={}){if(i.length===0){const f=[];for(const[h,d]of Object.entries(o))for(const p of Object.values(d))f.push(p);yield f;return}const a=i[0],l=i.slice(1),c=e[a];for(const f of c){let p=function(g,m={}){if(g.length===0){h.push({...m});return}const v=g[0],y=g.slice(1);for(const b of d[v])m[v]={paramSweepSectionId:f.paramSweepSectionId,variantId:f.variantId,selectedItem:f.selectedItem,paramInfoId:v,value:b},p(y,m)};var u=p;if(s.some(g=>g.variantId===f.variantId&&g.selectedItem!==f.selectedItem))continue;const h=[],d={};for(const g of f.params)d[g.paramInfoId]=g.values;p(Object.keys(d));for(const g of h){const m={...o},v=`${f.variantId}-${f.selectedItem}`;m[v]=g,yield*n(l,[...s,f],m)}}}const r=Object.keys(e);yield*n(r)}function*zNe(t){const e=new Map;t.forEach(l=>{e.has(l.sectionId)||e.set(l.sectionId,[]),e.get(l.sectionId).push(l)});const n=new Map;t.forEach(l=>{l.parentVersionId===null&&(n.has(l.sectionId)||n.set(l.sectionId,[]),n.get(l.sectionId).push(l))});const r=new Map;t.forEach(l=>{l.parentVersionId!==null&&(r.has(l.parentVersionId)||r.set(l.parentVersionId,[]),r.get(l.parentVersionId).push(l))});function i(l){const c=new Set;return l.forEach(u=>{(r.get(u.versionId)||[]).forEach(h=>{c.add(h)})}),Array.from(c)}function s(l){const c=new Set;for(const f of l){if(c.has(f.sectionId))return!1;c.add(f.sectionId)}for(const f of l)if(f.parentVersionId!==null&&!l.some(d=>d.versionId===f.parentVersionId))return!1;const u=i(l);for(const f of u)if(!l.some(d=>d.sectionId===f.sectionId))return!1;for(const[f]of n)if(!l.some(h=>h.sectionId===f))return!1;return!0}function*o(l=[],c=null,u=new Set){if(c===null&&(c=new Set(t.map(p=>p.sectionId))),c.size===0){if(s(l)){const p=JSON.stringify(l);u.has(p)||(u.add(p),yield l)}return}const f=Array.from(c)[0],h=new Set(c);h.delete(f);const d=e.get(f)||[];for(const p of d){if(p.parentVersionId!==null&&!l.some(b=>b.versionId===p.parentVersionId))continue;const g=[...l,p],m=i([p]),v=new Set;for(const y of m)!l.some(b=>b.sectionId===y.sectionId)&&!h.has(y.sectionId)&&v.add(y.sectionId);v.forEach(y=>h.add(y)),yield*o(g,h,u)}n.has(f)||(yield*o(l,h,u))}yield*o([],null,new Set)}async function jy({includeFullNameToInfo:t=!0,includeInfoToFullName:e=!0,includeFullNameToSectionId:n=!0,includeSectionPathFullNames:r=!0,includeDrawings:i=!1}){const s=Q5({});if(t&&(s.fullNameToInfo=Dd.getState().fullNameToInfo),e&&(s.infoToFullName=Ete()),n&&(s.fullNameToSectionId=O5.getState().fullNameToSectionId),r){s.sectionPathFullNames={};for(const o of Object.values(s.sections))s.sectionPathFullNames[o.id]=H$(o.id,te.getState())}if(i){const o=te.getState().x,a={};for(const l of Object.values(o)){const c=ae.cloneDeep(l);dn(l.id)===Y.DRAW&&(c.drawing=await Mne(l.id)),a[l.id]=c}s.sections=a}return s}async function bW(t,e=0){let r={id:Kn(),messageType:Y.WS_RUN_CODE,content:t};if(jm.getState().connectedTo!=="main"){Ay(r);return}const i=await dNe(t.projectConfig.id);if(i.status===200){const s=i.data;if(r=JSON.stringify(r),s)LNe(s,r);else{const o=Kn();Die(o,r),te.setState(a=>{const l=Nie(a);Lie(o,l,a)})}}}function*Qie(t){const e=te.getState().singletonSections[Y.GLOBAL_PARAM_SWEEP],n=e?Pi(e).selectedVariantIds:{};if(!e||ae.size(n)===0){const r=ae.cloneDeep(t),i={};for(const s of Object.values(r.sections))s.paramSweepSectionId&&(i[s.paramSweepSectionId]=r.sections[s.paramSweepSectionId].variantId);r.runCodeBlocks=wW(t,!1),yield*xW(r,i)}else for(const r of Object.keys(n)){const i=te.getState().variants[r].runGroup,s=jie(t,i,Object.keys(t.projectConfig.children),null);for(const o of zNe(s)){const a=ae.cloneDeep(t);a.projectConfig.children=ae.pick(a.projectConfig.children,o.map(c=>c.sectionId)),a.sections=ae.pick(a.sections,o.map(c=>c.sectionId));for(const c of Object.values(a.sectionVariants))c.children=c.children.filter(u=>u in a.sections);for(const c of o)c.versionId&&(a.sections[c.sectionId].variantId=c.versionId);const l={};for(const c of o)if(c.paramSweepId){const{paramSweepSectionId:u}=a.sections[c.sectionId];l[u]=c.paramSweepId}a.runCodeBlocks=wW(t,!0),yield*xW(a,l)}}}function jie(t,e,n,r){var s;const i=[];for(const o of n){const a=(s=e[o])==null?void 0:s[r];if(!a||!a.selected)continue;let l=!1;const c=t.sections[o].variantId;for(const[u,f]of Object.entries(a.paramSweeps))f&&(i.push({sectionId:o,paramSweepId:u,versionId:c,parentVersionId:r}),l=!0);for(const[u,f]of Object.entries(a.versions))if(f){(u!==c||!l)&&i.push({sectionId:o,paramSweepId:null,versionId:u,parentVersionId:r});const h=t.sectionVariants[u].children;i.push(...jie(t,e,h,u))}}return i}function*xW(t,e){const n=[];for(const[r,i]of Object.entries(e))for(const s of t.sectionVariants[i].sweep)s.params=s.params.filter(o=>o.paramInfoId),n.push({paramSweepSectionId:r,variantId:i,...s});if(n.length>0)for(const r of BNe(n)){const i=ae.cloneDeep(t);for(const s of r){const{paramSweepSectionId:o,selectedItem:a,paramInfoId:l,value:c}=s,u=ky(o,t.sections),{variantId:f}=t.sections[u],h=i.sectionVariants[f];if(h.selectedItem=a,l){const d=h.values[l]??Wm();d.value=c,h.values[l]=d}}yield i}else yield t}function wW(t,e){var n;if(e){const r=[];for(const i of Object.values(t.sections))(((n=t.uiTypes[i.uiTypeId])==null?void 0:n.type)??XR[i.uiTypeId].type)===Y.CODE&&r.push(i.id);if(r.length>0)return r}else for(const r of Object.values(t.sections))if(t.sectionVariants[r.variantId].templateVars.find(o=>o.keyword===o$(Y.SETTA_GENERATED_PYTHON)))return[r.id];return null}async function kM(t=!1){t&&(Vi("Checking types..."),vp.setState({userRequested:t}));const e=await jy({});Ay({content:e,id:Kn(),messageType:"typeCheck"})}const ZT=by(kM,500);async function FNe({sectionId:t,fullText:e,position:n}){return await zie({sectionId:t,paramInfoId:null,fullText:e,position:n,messageType:"parametersRequest"})}async function WNe({sectionId:t,paramInfoId:e}){const n=await jy({});await Ay({id:Kn(),messageType:"textFieldInitializeCode",content:{project:n,sectionId:t,paramInfoId:e}})}async function Bie(t){const e=await jy({});return await sm({id:Kn(),messageType:"codeAreaInitializeCode",content:{project:e,sectionId:t}})}async function VNe({sectionId:t,fullText:e,position:n,codeLanguage:r}){const{id:i,name:s}=vo.getState(),{name:o}=Pi(t),a=v$({sectionId:t,paramInfoId:null,value:e,regexPatternKey:"codeAreaPattern"}),l=O$(t,e),c={id:Kn(),messageType:"codeAreaAutocomplete",content:{projectConfigId:i,projectConfigName:s,codeLanguage:r,sectionId:t,sectionName:o,fullText:e,position:n,candidateEVRefs:a,candidateTemplateVars:l}},u=await sm(c);return u.data===Y.CODE_AREA_GEN_CODE_NOT_INITIALIZED?(await Bie(t)).data?await sm(c):[]:u}async function zie({sectionId:t,paramInfoId:e,fullText:n,position:r,messageType:i="textFieldCompletion"}){const{id:s,name:o}=vo.getState(),a=v$({sectionId:t,paramInfoId:e,value:n,regexPatternKey:"pattern"});return await sm({id:Kn(),messageType:i,content:{projectConfigId:s,projectConfigName:o,sectionId:t,paramInfoId:e,fullText:n,position:r,candidateEVRefs:a}})}async function CM({sectionId:t,paramInfoId:e,fullText:n,regexPatternKey:r="pattern",templateVars:i=null,onlyAfterGenCodeTemplateVar:s=!1}){let o=[],a=[];const l=v$({sectionId:t,paramInfoId:e,value:n,regexPatternKey:r});if(l.length>0){let c=0;a=[],await sm({id:Kn(),messageType:"findEVRefs",content:{sectionId:t,paramInfoId:e,candidateEVRefs:l,fullText:n,templateVars:i,onlyAfterGenCodeTemplateVar:s},condition:({data:{positions:u,numMessages:f}})=>(a.push(...u),c+=1,c===f)}),a.sort((u,f)=>u.startPos-f.startPos),o=sAe(a,n)}return o}async function UNe(t,e){let n=[],r=[];const i=O$(t,e);if(i.length>0){let s=0;r=[],await sm({id:Kn(),messageType:"codeAreaFindTemplateVars",content:{sectionId:t,candidateTemplateVars:i,fullText:e},condition:({data:{positions:o,numMessages:a}})=>(o!==null&&r.push(...o),s+=1,s===a)}),r.sort((o,a)=>o.startPos-a.startPos),n=oAe(r,e)}return n}async function qNe(t,e){const n=await UNe(t,e),r=await CM({sectionId:t,paramInfoId:null,fullText:e,regexPatternKey:"codeAreaPattern",templateVars:n,onlyAfterGenCodeTemplateVar:!0});return{templateVars:n,evRefs:r}}function XNe(){return x.jsx(xM,{trigger:"Edit",children:x.jsx(HNe,{})})}function HNe(){const t=Nt(e=>({newCardShortcut:Br(e.shortcuts.newCardShortcut),newGroupShortcut:Br(e.shortcuts.newGroupShortcut),typeCheckShortcut:Br(e.shortcuts.typeCheckShortcut),redoShortcut:Br(e.shortcuts.redoShortcut),undoShortcut:Br(e.shortcuts.undoShortcut),groupShortcut:Br(e.shortcuts.groupShortcut),restartLanguageServerShortcut:Br(e.shortcuts.restartLanguageServerShortcut)}),ae.isEqual);return x.jsxs(x.Fragment,{children:[x.jsxs(mn,{onClick:wie,shortcut:t.newCardShortcut,children:[x.jsx(j$e,{className:"h-4 w-4"})," Card"]}),x.jsxs(mn,{onClick:Sie,shortcut:t.newGroupShortcut,children:[x.jsx(hNe,{className:"h-4 w-4"}),"Group"]}),x.jsx(QS,{className:"dark: m-[5px] h-[1px] bg-setta-100 dark:bg-setta-600"}),x.jsx(mn,{onClick:()=>kM(!0),shortcut:t.typeCheckShortcut,children:"Type Check"}),x.jsx(mn,{onClick:vie,shortcut:t.restartLanguageServerShortcut,children:"Restart Language Server"}),x.jsx(mn,{onClick:TNe,children:"Auto Layout"}),x.jsx(QS,{className:"dark: m-[5px] h-[1px] bg-setta-100 dark:bg-setta-600"}),x.jsx(mn,{onClick:x$,shortcut:t.redoShortcut,children:"Redo"}),x.jsx(mn,{onClick:b$,shortcut:t.undoShortcut,children:"Undo"}),x.jsx(mn,{onClick:QRe,children:"Reset sections"}),x.jsx(QS,{className:"dark: m-[5px] h-[1px] bg-setta-100 dark:bg-setta-600"}),x.jsx(Ly,{to:ZR,children:x.jsx(mn,{children:"Settings"})})]})}async function ZNe({projectConfigName:t}){const e=await uAe(t);return e.status===200?await EM(e.data):!1}async function YNe(){const t=await SAe();return t.status===200?await EM(t.data):!1}async function EM({projectConfig:t,codeInfo:e,codeInfoCols:n,sections:r,sectionVariants:i,artifactGroups:s,uiTypes:o,uiTypeCols:a}){if(vo.setState({...ae.omit(t,["children","viewport"])}),!t.viewport)qe.setState({fitViewOnInit:!0,fitViewOnInitDone:!1});else{const{x:l,y:c,zoom:u}=t.viewport;qe.setState({fitViewOnInit:!1,fitViewOnInitDone:!0,transform:[l,c,u]})}return te.setState({x:r,variants:i,uiTypes:{...o,...XR},uiTypeCols:a,codeInfo:e,codeInfoCols:n,artifactGroups:s}),Bm.setState(ae.mapValues(r,l=>l.columnWidth)),mr.setState({x:KNe(t)}),await p_(),hn(!0,!1),!0}function Fie(){const t=TM();return async()=>{const e=GNe(),{data:n}=await hAe({previewImgColor:e});t(n)}}function GNe(){const t=Math.floor(Math.random()*kz.length);return kz[t]}function TM(){const t=tg();return e=>{t(h5(e),{state:{pageLoadType:Kp.LOAD_PROJECT_CONFIG}})}}function KNe(t){const e=new Map;for(let n of Object.keys(t.children)){const r=t.children[n];e.set(n,{id:n,position:{x:r.x,y:r.y},zIndex:r.zIndex,tempZIndex:r.zIndex})}return e}function JNe(){const t=Nt(n=>({newProjectConfigShortcut:Br(n.shortcuts.newProjectConfigShortcut),saveShortcut:Br(n.shortcuts.saveShortcut),saveAsShortcut:Br(n.shortcuts.saveAsShortcut),loadShortcut:Br(n.shortcuts.loadShortcut),undoShortcut:Br(n.shortcuts.undoShortcut),groupShortcut:Br(n.shortcuts.groupShortcut)}),ae.isEqual),e=Fie();return x.jsxs(xM,{trigger:"File",children:[x.jsx(mn,{onClick:e,shortcut:t.newProjectConfigShortcut,children:"New Config"}),x.jsx(mn,{onClick:_te,shortcut:t.loadShortcut,children:"Load"}),x.jsxs(mn,{onClick:j5,shortcut:t.saveShortcut,children:[x.jsx(cre,{}),"Save"]}),x.jsxs(mn,{onClick:kte,shortcut:t.saveAsShortcut,children:[x.jsx(SF,{}),"Save As"]}),x.jsxs(mn,{onClick:VPe,children:[x.jsx(SF,{}),"Save As (With Refs)"]}),x.jsx(QS,{className:"dark: m-[5px] h-[1px] bg-setta-100 dark:bg-setta-600"}),x.jsx(mn,{onClick:qPe,children:"Import JSON"}),x.jsx(mn,{onClick:UPe,children:"Export JSON"})]})}const By=_.forwardRef((t,e)=>{const{twClasses:n="",grid:r=!1,type:i,onClick:s,children:o,...a}=t,c=`focus-visible:ring-2 ${r?"grid place-items-center":"inline-flex items-center"} nodrag cursor-pointer ${n} `;return x.jsx("button",{className:c,...a,ref:e,type:i,onClick:s,children:o})}),$r=k3e(()=>({isFrozen:!1,isEnabled:!1,contentArray:null,idx:0,copied:!1}));let SW=!1;const PM="setta-tooltip-floating-box",eQe=()=>{const[t,e]=_.useState({x:0,y:0}),{isEnabled:n,contentArray:r,isFrozen:i,idx:s,copied:o}=$r(),a=_.useRef(null);return _.useEffect(()=>{const l=c=>{SW=!0,i||e({x:c.clientX+10,y:c.clientY+10})};return window.addEventListener("mousemove",l),()=>window.removeEventListener("mousemove",l)},[i]),_.useEffect(()=>{if(!a.current||!n)return;const l=a.current,c=l.getBoundingClientRect(),u=window.innerWidth,f=window.innerHeight;let{x:h,y:d}=t;h+c.width>u&&(h=u-c.width-8),d+c.height>f&&(d=f-c.height-8),l.style.transform=`translate(${h}px, ${d}px)`},[n,t]),!n||!r||r.length===0||!SW?null:x.jsxs("div",{id:PM,ref:a,className:`fixed left-0 top-0 z-50 flex max-h-96 w-64 flex-col rounded-2xl border border-setta-200 bg-white p-4 shadow-lg focus:outline focus:outline-2 focus:outline-blue-600 dark:border-setta-700 dark:bg-setta-950 ${r[s].wrapperClassName}`,style:{transform:`translate(${t.x}px, ${t.y}px)`},tabIndex:"0",children:[x.jsx(nQe,{item:r[s],copied:o}),x.jsx(tQe,{item:r[s],isFrozen:i}),x.jsx(rQe,{numPages:r.length,idx:s})]})},tQe=ke.memo(({item:t,isFrozen:e})=>x.jsxs(x.Fragment,{children:[t.title&&x.jsx("h3",{className:`break-words pb-1 text-xs font-black uppercase text-setta-500 dark:text-setta-600 ${t.titleClassName}`,children:t.title}),x.jsx("article",{className:`flex-1 overflow-y-auto break-words text-sm text-setta-700 dark:text-setta-300 ${t.contentClassName}`,children:t.content}),!!t.content&&x.jsx(iQe,{isFrozen:e})]}),ae.isEqual),nQe=ke.memo(({item:t,copied:e})=>{const n=async()=>{try{const i=t.content??t.title;await navigator.clipboard.writeText(i),setTimeout(()=>{$r.setState({copied:!1})},2e3)}catch(i){console.error("Failed to copy:",i)}};function r(){$r.setState({copied:!0})}return _.useEffect(()=>{e&&n()},[e]),x.jsx("button",{onClick:r,className:"tooltip-copy absolute right-2 top-2 cursor-pointer rounded-lg p-1.5 text-setta-500 hover:bg-setta-100 dark:text-setta-400 dark:hover:bg-setta-800","aria-label":e?"Copied!":"Copy to clipboard",children:e?x.jsx(are,{className:"h-4 w-4"}):x.jsx(U5,{className:"h-4 w-4"})})},ae.isEqual),rQe=ke.memo(({numPages:t,idx:e})=>t>1?x.jsx("div",{className:"tooltip-page mt-4 flex items-center justify-center gap-2",children:Array.from({length:t}).map((n,r)=>x.jsx("div",{className:`h-2 w-2 rounded-full ${r===e?"bg-blue-500":"bg-setta-300 dark:bg-setta-600"}`,"aria-label":`Page ${r+1} of ${t}${r===e?" (current)":""}`},r))}):null);function iQe({isFrozen:t}){const e="tooltip-footer mt-4 border-t border-solid border-setta-100 pt-1 text-[10px] text-setta-500 dark:border-setta-700 dark:text-setta-600";return t?x.jsx(sQe,{className:e}):x.jsx(oQe,{className:e})}function sQe({className:t}){const e=Nt(n=>({frozenTooltipToPlaintextShortcut:Br(n.shortcuts.frozenTooltipToPlaintextShortcut),frozenTooltipToMarkdownShortcut:Br(n.shortcuts.frozenTooltipToMarkdownShortcut)}),ae.isEqual);return x.jsxs("p",{className:t,children:["press ",x.jsx("span",{className:"font-black",children:'"Esc"'})," to close, or"," ",x.jsxs("span",{className:"font-black",children:['"',e.frozenTooltipToPlaintextShortcut,'"']})," ","(plaintext) or"," ",x.jsxs("span",{className:"font-black",children:['"',e.frozenTooltipToMarkdownShortcut,'"']})," ","(markdown) to open tooltip as new section"]})}function oQe({className:t}){const e=Nt(n=>({tooltipToPlaintextShortcut:Br(n.shortcuts.tooltipToPlaintextShortcut),tooltipToMarkdownShortcut:Br(n.shortcuts.tooltipToMarkdownShortcut),freezeTooltipShortcut:Br(n.shortcuts.freezeTooltipShortcut)}),ae.isEqual);return x.jsxs("ul",{className:t,children:[x.jsxs("li",{children:[x.jsxs("strong",{className:"font-black tracking-tighter",children:['"',e.tooltipToPlaintextShortcut,'"']})," ","convert to plaintext section"]}),x.jsxs("li",{children:[x.jsxs("strong",{className:"font-black tracking-tighter",children:['"',e.tooltipToMarkdownShortcut,'"']})," ","convert to markdown section"]}),x.jsxs("li",{children:[x.jsxs("strong",{className:"font-black tracking-tighter",children:['"',e.freezeTooltipShortcut,'"']})," ","freeze tooltip"]})]})}function Rr(...t){function e(){t&&!$r.getState().isFrozen&&$r.setState({contentArray:t})}function n(){$r.getState().isFrozen||$r.setState({contentArray:null,idx:0,copied:!1})}return{onMouseEnter:e,onMouseLeave:n}}function aQe(){$r.setState({isEnabled:!0})}function lQe(){$r.setState({isEnabled:!1,idx:0})}function Vx(t){return async()=>{const e=$r.getState();if(e.contentArray){const n=e.contentArray[e.idx],r=n.title?`## ${n.title}
|
302
|
+
`,y)}paste(v){this._core.paste(v)}refresh(v,y){this._verifyIntegers(v,y),this._core.refresh(v,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return a}_verifyIntegers(...v){for(const y of v)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const y of v)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}o.Terminal=g})(),s})())})(kie);var Eie=kie.exports,Tie={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(self,()=>(()=>{var n={};return(()=>{var r=n;function i(s,o,a){return s.addEventListener(o,a),{dispose:()=>{a&&s.removeEventListener(o,a)}}}Object.defineProperty(r,"__esModule",{value:!0}),r.AttachAddon=void 0,r.AttachAddon=class{constructor(s,o){this._disposables=[],this._socket=s,this._socket.binaryType="arraybuffer",this._bidirectional=!(o&&o.bidirectional===!1)}activate(s){this._disposables.push(i(this._socket,"message",o=>{const a=o.data;s.write(typeof a=="string"?a:new Uint8Array(a))})),this._bidirectional&&(this._disposables.push(s.onData(o=>this._sendData(o))),this._disposables.push(s.onBinary(o=>this._sendBinary(o)))),this._disposables.push(i(this._socket,"close",()=>this.dispose())),this._disposables.push(i(this._socket,"error",()=>this.dispose()))}dispose(){for(const s of this._disposables)s.dispose()}_sendData(s){this._checkOpenSocket()&&this._socket.send(s)}_sendBinary(s){if(!this._checkOpenSocket())return;const o=new Uint8Array(s.length);for(let a=0;a<s.length;++a)o[a]=255&s.charCodeAt(a);this._socket.send(o)}_checkOpenSocket(){switch(this._socket.readyState){case WebSocket.OPEN:return!0;case WebSocket.CONNECTING:throw new Error("Attach addon was loaded before socket was open");case WebSocket.CLOSING:return console.warn("Attach addon socket is closing"),!1;case WebSocket.CLOSED:throw new Error("Attach addon socket is closed");default:throw new Error("Unexpected socket state")}}}})(),n})())})(Tie);var Pie=Tie.exports;var Aie={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(self,()=>(()=>{var n={};return(()=>{var r=n;Object.defineProperty(r,"__esModule",{value:!0}),r.FitAddon=void 0,r.FitAddon=class{activate(i){this._terminal=i}dispose(){}fit(){const i=this.proposeDimensions();if(!i||!this._terminal||isNaN(i.cols)||isNaN(i.rows))return;const s=this._terminal._core;this._terminal.rows===i.rows&&this._terminal.cols===i.cols||(s._renderService.clear(),this._terminal.resize(i.cols,i.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const i=this._terminal._core,s=i._renderService.dimensions;if(s.css.cell.width===0||s.css.cell.height===0)return;const o=this._terminal.options.scrollback===0?0:i.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(a.getPropertyValue("height")),c=Math.max(0,parseInt(a.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),f=l-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),h=c-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(h/s.css.cell.width)),rows:Math.max(1,Math.floor(f/s.css.cell.height))}}}})(),n})())})(Aie);var MNe=Aie.exports;const Rie={foreground:"#B8C2D5",background:"#06070A",cursor:"#B8C2D5",selection:"#49483e",black:"#272822",red:"#f92672",green:"#a6e22e",yellow:"#f4bf75",blue:"#66d9ef",magenta:"#ae81ff",cyan:"#a1efe4",white:"#f8f8f2",brightBlack:"#75715e",brightRed:"#f92672",brightGreen:"#a6e22e",brightYellow:"#f4bf75",brightBlue:"#66d9ef",brightMagenta:"#ae81ff",brightCyan:"#a1efe4",brightWhite:"#f9f8f5"};function $ie(){const t=_.useRef(null);return t.current||(t.current=new MNe.FitAddon),t.current}function Mie(t,e){return t.onRender(()=>{e(t.buffer.active.baseY>0)}),Ut.subscribe(r=>r.isPanScrolling,r=>{r?t.options.scrollSensitivity=Number.MIN_VALUE:t.options.scrollSensitivity=1})}function Iie(t,e){t.readyState===1?(t.close(),e.dispose()):t.addEventListener("open",()=>{t.close(),e.dispose()})}const Ph={},Uu={};function INe({sectionId:t,width:e,height:n,setHasScrollbar:r}){const i=_.useRef(null),s=$ie();return _.useEffect(()=>{const o=new Eie.Terminal({cursorBlink:!0,theme:Rie});o.loadAddon(s),o.open(i.current);const{ws:a}=DNe(t);o.onResize(u=>{const f=JSON.stringify({messageType:Y.WS_TERMINAL_RESIZE,cols:u.cols,rows:u.rows});a.readyState===1?a.send(f):Die(t,f)});function l(u){if(u.data===Y.SETTA_TERMINAL_READY){const f=new Pie.AttachAddon(a);o.loadAddon(f),a.removeEventListener("message",l)}}a.addEventListener("message",l);const c=Mie(o,r);return()=>{Iie(a,o),c()}},[]),_.useEffect(()=>{s.fit()},[e,n]),i}function DNe(t){const e=vo.getState().id,n=Kn(),r=!!te.getState().x[t].isTemporary,i=`${Zp.WEBSOCKET}${d$(Y.ROUTE_TERMINAL,{projectConfigId:e,sectionId:t,id:n,isTemporary:r})}`,s=new WebSocket(i);s.addEventListener("open",async()=>{var a;if(((a=Uu[t])==null?void 0:a.length)>0){const l=[];for(const[c,u]of Uu[t].entries())await new Promise(f=>setTimeout(f,0)),s.readyState===1&&(s.send(u),l.push(c));Uu[t]=Uu[t].filter((c,u)=>!l.includes(u))}});function o(){t in Ph&&(Ph[t]=NNe(Ph[t],s))}return s.addEventListener("close",o),s.addEventListener("error",o),t in Ph||(Ph[t]=[]),Ph[t].push(s),{ws:s,wsId:n}}function Die(t,e){t in Uu||(Uu[t]=[]),Uu[t].includes(e)||Uu[t].push(e)}function LNe(t,e){for(const n of Ph[t])if(n.readyState===1){n.send(e);break}}function NNe(t,e){return t.filter(n=>n!==e)}async function QNe(){const t=await pNe(vo.getState().id);if(t.status===200){const n=t.data.filter(r=>!(r.id in te.getState().x));if(n.length===0)return;te.setState(r=>{const i=Nie(r);for(const s of n)Lie(s.id,i,r)}),hn(!0)}}function Lie(t,e,n){l3({sectionProps:{id:t,parentId:e,uiTypeId:Nm[Y.TERMINAL],isTemporary:!0},state:n}),am(e,r=>[...r,t],n)}function Nie(t){let e=t.singletonSections.temporaryTerminalGroup;return e||(e=Qy({type:Y.GROUP,sectionProps:{name:jNe(),isTemporary:!0},state:t})),e}function jNe(){const t="Temporary Terminals",e=ae.map(te.getState().x,r=>r.name);let n=t;for(;e.includes(n);)n=`${t} ${createRandomName()}`;return n}function*BNe(t){const e={};for(const i of t)e[i.variantId]||(e[i.variantId]=[]),e[i.variantId].push(i);function*n(i,s=[],o={}){if(i.length===0){const f=[];for(const[h,d]of Object.entries(o))for(const p of Object.values(d))f.push(p);yield f;return}const a=i[0],l=i.slice(1),c=e[a];for(const f of c){let p=function(g,m={}){if(g.length===0){h.push({...m});return}const v=g[0],y=g.slice(1);for(const b of d[v])m[v]={paramSweepSectionId:f.paramSweepSectionId,variantId:f.variantId,selectedItem:f.selectedItem,paramInfoId:v,value:b},p(y,m)};var u=p;if(s.some(g=>g.variantId===f.variantId&&g.selectedItem!==f.selectedItem))continue;const h=[],d={};for(const g of f.params)d[g.paramInfoId]=g.values;p(Object.keys(d));for(const g of h){const m={...o},v=`${f.variantId}-${f.selectedItem}`;m[v]=g,yield*n(l,[...s,f],m)}}}const r=Object.keys(e);yield*n(r)}function*zNe(t){const e=new Map;t.forEach(l=>{e.has(l.sectionId)||e.set(l.sectionId,[]),e.get(l.sectionId).push(l)});const n=new Map;t.forEach(l=>{l.parentVersionId===null&&(n.has(l.sectionId)||n.set(l.sectionId,[]),n.get(l.sectionId).push(l))});const r=new Map;t.forEach(l=>{l.parentVersionId!==null&&(r.has(l.parentVersionId)||r.set(l.parentVersionId,[]),r.get(l.parentVersionId).push(l))});function i(l){const c=new Set;return l.forEach(u=>{(r.get(u.versionId)||[]).forEach(h=>{c.add(h)})}),Array.from(c)}function s(l){const c=new Set;for(const f of l){if(c.has(f.sectionId))return!1;c.add(f.sectionId)}for(const f of l)if(f.parentVersionId!==null&&!l.some(d=>d.versionId===f.parentVersionId))return!1;const u=i(l);for(const f of u)if(!l.some(d=>d.sectionId===f.sectionId))return!1;for(const[f]of n)if(!l.some(h=>h.sectionId===f))return!1;return!0}function*o(l=[],c=null,u=new Set){if(c===null&&(c=new Set(t.map(p=>p.sectionId))),c.size===0){if(s(l)){const p=JSON.stringify(l);u.has(p)||(u.add(p),yield l)}return}const f=Array.from(c)[0],h=new Set(c);h.delete(f);const d=e.get(f)||[];for(const p of d){if(p.parentVersionId!==null&&!l.some(b=>b.versionId===p.parentVersionId))continue;const g=[...l,p],m=i([p]),v=new Set;for(const y of m)!l.some(b=>b.sectionId===y.sectionId)&&!h.has(y.sectionId)&&v.add(y.sectionId);v.forEach(y=>h.add(y)),yield*o(g,h,u)}n.has(f)||(yield*o(l,h,u))}yield*o([],null,new Set)}async function jy({includeFullNameToInfo:t=!0,includeInfoToFullName:e=!0,includeFullNameToSectionId:n=!0,includeSectionPathFullNames:r=!0,includeDrawings:i=!1}){const s=Q5({});if(t&&(s.fullNameToInfo=Dd.getState().fullNameToInfo),e&&(s.infoToFullName=Ete()),n&&(s.fullNameToSectionId=O5.getState().fullNameToSectionId),r){s.sectionPathFullNames={};for(const o of Object.values(s.sections))s.sectionPathFullNames[o.id]=H$(o.id,te.getState())}if(i){const o=te.getState().x,a={};for(const l of Object.values(o)){const c=ae.cloneDeep(l);dn(l.id)===Y.DRAW&&(c.drawing=await Mne(l.id)),a[l.id]=c}s.sections=a}return s}async function bW(t,e=0){let r={id:Kn(),messageType:Y.WS_RUN_CODE,content:t};if(jm.getState().connectedTo!=="main"){Ay(r);return}const i=await dNe(t.projectConfig.id);if(i.status===200){const s=i.data;if(r=JSON.stringify(r),s)LNe(s,r);else{const o=Kn();Die(o,r),te.setState(a=>{const l=Nie(a);Lie(o,l,a)})}}}function*Qie(t){const e=te.getState().singletonSections[Y.GLOBAL_PARAM_SWEEP],n=e?Pi(e).selectedVariantIds:{};if(!e||ae.size(n)===0){const r=ae.cloneDeep(t),i={};for(const s of Object.values(r.sections))s.paramSweepSectionId&&(i[s.paramSweepSectionId]=r.sections[s.paramSweepSectionId].variantId);r.runCodeBlocks=wW(t,!1),yield*xW(r,i)}else for(const r of Object.keys(n)){const i=te.getState().variants[r].runGroup,s=jie(t,i,Object.keys(t.projectConfig.children),null);for(const o of zNe(s)){const a=ae.cloneDeep(t);a.projectConfig.children=ae.pick(a.projectConfig.children,o.map(c=>c.sectionId)),a.sections=ae.pick(a.sections,o.map(c=>c.sectionId));for(const c of Object.values(a.sectionVariants))c.children=c.children.filter(u=>u in a.sections);for(const c of o)c.versionId&&(a.sections[c.sectionId].variantId=c.versionId);const l={};for(const c of o)if(c.paramSweepId){const{paramSweepSectionId:u}=a.sections[c.sectionId];l[u]=c.paramSweepId}a.runCodeBlocks=wW(t,!0),yield*xW(a,l)}}}function jie(t,e,n,r){var s;const i=[];for(const o of n){const a=(s=e[o])==null?void 0:s[r];if(!a||!a.selected)continue;let l=!1;const c=t.sections[o].variantId;for(const[u,f]of Object.entries(a.paramSweeps))f&&(i.push({sectionId:o,paramSweepId:u,versionId:c,parentVersionId:r}),l=!0);for(const[u,f]of Object.entries(a.versions))if(f){(u!==c||!l)&&i.push({sectionId:o,paramSweepId:null,versionId:u,parentVersionId:r});const h=t.sectionVariants[u].children;i.push(...jie(t,e,h,u))}}return i}function*xW(t,e){const n=[];for(const[r,i]of Object.entries(e))for(const s of t.sectionVariants[i].sweep)s.params=s.params.filter(o=>o.paramInfoId),n.push({paramSweepSectionId:r,variantId:i,...s});if(n.length>0)for(const r of BNe(n)){const i=ae.cloneDeep(t);for(const s of r){const{paramSweepSectionId:o,selectedItem:a,paramInfoId:l,value:c}=s,u=ky(o,t.sections),{variantId:f}=t.sections[u],h=i.sectionVariants[f];if(h.selectedItem=a,l){const d=h.values[l]??Wm();d.value=c,h.values[l]=d}}yield i}else yield t}function wW(t,e){var n;if(e){const r=[];for(const i of Object.values(t.sections))(((n=t.uiTypes[i.uiTypeId])==null?void 0:n.type)??XR[i.uiTypeId].type)===Y.CODE&&r.push(i.id);if(r.length>0)return r}else for(const r of Object.values(t.sections))if(t.sectionVariants[r.variantId].templateVars.find(o=>o.keyword===o$(Y.SETTA_GENERATED_PYTHON)))return[r.id];return null}async function kM(t=!1){t&&(Vi("Checking types..."),vp.setState({userRequested:t}));const e=await jy({});Ay({content:e,id:Kn(),messageType:"typeCheck"})}const ZT=by(kM,500);async function FNe({sectionId:t,fullText:e,position:n}){return await zie({sectionId:t,paramInfoId:null,fullText:e,position:n,messageType:"parametersRequest"})}async function WNe({sectionId:t,paramInfoId:e}){const n=await jy({});await Ay({id:Kn(),messageType:"textFieldInitializeCode",content:{project:n,sectionId:t,paramInfoId:e}})}async function Bie(t){const e=await jy({});return await sm({id:Kn(),messageType:"codeAreaInitializeCode",content:{project:e,sectionId:t}})}async function VNe({sectionId:t,fullText:e,position:n,codeLanguage:r}){const{id:i,name:s}=vo.getState(),{name:o}=Pi(t),a=v$({sectionId:t,paramInfoId:null,value:e,regexPatternKey:"codeAreaPattern"}),l=O$(t,e),c={id:Kn(),messageType:"codeAreaAutocomplete",content:{projectConfigId:i,projectConfigName:s,codeLanguage:r,sectionId:t,sectionName:o,fullText:e,position:n,candidateEVRefs:a,candidateTemplateVars:l}},u=await sm(c);return u.data===Y.CODE_AREA_GEN_CODE_NOT_INITIALIZED?(await Bie(t)).data?await sm(c):[]:u}async function zie({sectionId:t,paramInfoId:e,fullText:n,position:r,messageType:i="textFieldCompletion"}){const{id:s,name:o}=vo.getState(),a=v$({sectionId:t,paramInfoId:e,value:n,regexPatternKey:"pattern"});return await sm({id:Kn(),messageType:i,content:{projectConfigId:s,projectConfigName:o,sectionId:t,paramInfoId:e,fullText:n,position:r,candidateEVRefs:a}})}async function CM({sectionId:t,paramInfoId:e,fullText:n,regexPatternKey:r="pattern",templateVars:i=null,onlyAfterGenCodeTemplateVar:s=!1}){let o=[],a=[];const l=v$({sectionId:t,paramInfoId:e,value:n,regexPatternKey:r});if(l.length>0){let c=0;a=[],await sm({id:Kn(),messageType:"findEVRefs",content:{sectionId:t,paramInfoId:e,candidateEVRefs:l,fullText:n,templateVars:i,onlyAfterGenCodeTemplateVar:s},condition:({data:{positions:u,numMessages:f}})=>(a.push(...u),c+=1,c===f)}),a.sort((u,f)=>u.startPos-f.startPos),o=sAe(a,n)}return o}async function UNe(t,e){let n=[],r=[];const i=O$(t,e);if(i.length>0){let s=0;r=[],await sm({id:Kn(),messageType:"codeAreaFindTemplateVars",content:{sectionId:t,candidateTemplateVars:i,fullText:e},condition:({data:{positions:o,numMessages:a}})=>(o!==null&&r.push(...o),s+=1,s===a)}),r.sort((o,a)=>o.startPos-a.startPos),n=oAe(r,e)}return n}async function qNe(t,e){const n=await UNe(t,e),r=await CM({sectionId:t,paramInfoId:null,fullText:e,regexPatternKey:"codeAreaPattern",templateVars:n,onlyAfterGenCodeTemplateVar:!0});return{templateVars:n,evRefs:r}}function XNe(){return x.jsx(xM,{trigger:"Edit",children:x.jsx(HNe,{})})}function HNe(){const t=Nt(e=>({newCardShortcut:Br(e.shortcuts.newCardShortcut),newGroupShortcut:Br(e.shortcuts.newGroupShortcut),typeCheckShortcut:Br(e.shortcuts.typeCheckShortcut),redoShortcut:Br(e.shortcuts.redoShortcut),undoShortcut:Br(e.shortcuts.undoShortcut),groupShortcut:Br(e.shortcuts.groupShortcut),restartLanguageServerShortcut:Br(e.shortcuts.restartLanguageServerShortcut)}),ae.isEqual);return x.jsxs(x.Fragment,{children:[x.jsxs(mn,{onClick:wie,shortcut:t.newCardShortcut,children:[x.jsx(j$e,{className:"h-4 w-4"})," Card"]}),x.jsxs(mn,{onClick:Sie,shortcut:t.newGroupShortcut,children:[x.jsx(hNe,{className:"h-4 w-4"}),"Group"]}),x.jsx(QS,{className:"dark: m-[5px] h-[1px] bg-setta-100 dark:bg-setta-600"}),x.jsx(mn,{onClick:()=>kM(!0),shortcut:t.typeCheckShortcut,children:"Type Check"}),x.jsx(mn,{onClick:vie,shortcut:t.restartLanguageServerShortcut,children:"Restart Language Server"}),x.jsx(mn,{onClick:TNe,children:"Auto Layout"}),x.jsx(QS,{className:"dark: m-[5px] h-[1px] bg-setta-100 dark:bg-setta-600"}),x.jsx(mn,{onClick:x$,shortcut:t.redoShortcut,children:"Redo"}),x.jsx(mn,{onClick:b$,shortcut:t.undoShortcut,children:"Undo"}),x.jsx(mn,{onClick:QRe,children:"Reset sections"}),x.jsx(QS,{className:"dark: m-[5px] h-[1px] bg-setta-100 dark:bg-setta-600"}),x.jsx(Ly,{to:ZR,children:x.jsx(mn,{children:"Settings"})})]})}async function ZNe({projectConfigName:t}){const e=await uAe(t);return e.status===200?await EM(e.data):!1}async function YNe(){const t=await SAe();return t.status===200?await EM(t.data):!1}async function EM({projectConfig:t,codeInfo:e,codeInfoCols:n,sections:r,sectionVariants:i,artifactGroups:s,uiTypes:o,uiTypeCols:a}){if(vo.setState({...ae.omit(t,["children","viewport"])}),!t.viewport)qe.setState({fitViewOnInit:!0,fitViewOnInitDone:!1});else{const{x:l,y:c,zoom:u}=t.viewport;qe.setState({fitViewOnInit:!1,fitViewOnInitDone:!0,transform:[l,c,u]})}return te.setState({x:r,variants:i,uiTypes:{...o,...XR},uiTypeCols:a,codeInfo:e,codeInfoCols:n,artifactGroups:s}),Bm.setState(ae.mapValues(r,l=>l.columnWidth)),mr.setState({x:KNe(t)}),await p_(),hn(!0,!1),!0}function Fie(){const t=TM();return async()=>{const e=GNe(),{data:n}=await hAe({previewImgColor:e});t(n)}}function GNe(){const t=Math.floor(Math.random()*kz.length);return kz[t]}function TM(){const t=tg();return e=>{t(h5(e),{state:{pageLoadType:Kp.LOAD_PROJECT_CONFIG}})}}function KNe(t){const e=new Map;for(let n of Object.keys(t.children)){const r=t.children[n];e.set(n,{id:n,position:{x:r.x,y:r.y},zIndex:r.zIndex,tempZIndex:r.zIndex})}return e}function JNe(){const t=Nt(n=>({newProjectConfigShortcut:Br(n.shortcuts.newProjectConfigShortcut),saveShortcut:Br(n.shortcuts.saveShortcut),saveAsShortcut:Br(n.shortcuts.saveAsShortcut),loadShortcut:Br(n.shortcuts.loadShortcut),undoShortcut:Br(n.shortcuts.undoShortcut),groupShortcut:Br(n.shortcuts.groupShortcut)}),ae.isEqual),e=Fie();return x.jsxs(xM,{trigger:"File",children:[x.jsx(mn,{onClick:e,shortcut:t.newProjectConfigShortcut,children:"New Config"}),x.jsx(mn,{onClick:_te,shortcut:t.loadShortcut,children:"Load"}),x.jsxs(mn,{onClick:j5,shortcut:t.saveShortcut,children:[x.jsx(cre,{}),"Save"]}),x.jsxs(mn,{onClick:kte,shortcut:t.saveAsShortcut,children:[x.jsx(SF,{}),"Save As"]}),x.jsxs(mn,{onClick:VPe,children:[x.jsx(SF,{}),"Save As (With Refs)"]}),x.jsx(QS,{className:"dark: m-[5px] h-[1px] bg-setta-100 dark:bg-setta-600"}),x.jsx(mn,{onClick:qPe,children:"Import JSON"}),x.jsx(mn,{onClick:UPe,children:"Export JSON"})]})}const By=_.forwardRef((t,e)=>{const{twClasses:n="",grid:r=!1,type:i,onClick:s,children:o,...a}=t,c=`focus-visible:ring-2 ${r?"grid place-items-center":"inline-flex items-center"} nodrag cursor-pointer ${n} `;return x.jsx("button",{className:c,...a,ref:e,type:i,onClick:s,children:o})}),$r=k3e(()=>({isFrozen:!1,isEnabled:!1,contentArray:null,idx:0,copied:!1}));let SW=!1;const PM="setta-tooltip-floating-box",eQe=()=>{const[t,e]=_.useState({x:0,y:0}),{isEnabled:n,contentArray:r,isFrozen:i,idx:s,copied:o}=$r(),a=_.useRef(null);return _.useEffect(()=>{const l=c=>{SW=!0,i||e({x:c.clientX+10,y:c.clientY+10})};return window.addEventListener("mousemove",l),()=>window.removeEventListener("mousemove",l)},[i]),_.useEffect(()=>{if(!a.current||!n)return;const l=a.current,c=l.getBoundingClientRect(),u=window.innerWidth,f=window.innerHeight;let{x:h,y:d}=t;h+c.width>u&&(h=u-c.width-8),d+c.height>f&&(d=f-c.height-8),l.style.transform=`translate(${h}px, ${d}px)`},[n,t]),!n||!r||r.length===0||!SW?null:x.jsxs("div",{id:PM,ref:a,className:`fixed left-0 top-0 z-50 flex max-h-96 w-64 flex-col rounded-2xl border border-setta-200 bg-white p-4 shadow-lg focus:outline focus:outline-2 focus:outline-blue-600 dark:border-setta-700 dark:bg-setta-950 ${r[s].wrapperClassName}`,style:{transform:`translate(${t.x}px, ${t.y}px)`},tabIndex:"0",children:[x.jsx(nQe,{item:r[s],copied:o}),x.jsx(tQe,{item:r[s],isFrozen:i}),x.jsx(rQe,{numPages:r.length,idx:s})]})},tQe=ke.memo(({item:t,isFrozen:e})=>x.jsxs(x.Fragment,{children:[t.title&&x.jsx("h3",{className:`break-words pb-1 text-xs font-black uppercase text-setta-500 dark:text-setta-600 ${t.titleClassName}`,children:t.title}),x.jsx("article",{className:`flex-1 overflow-y-auto whitespace-pre-line break-words text-sm text-setta-700 dark:text-setta-300 ${t.contentClassName}`,children:t.content}),!!t.content&&x.jsx(iQe,{isFrozen:e})]}),ae.isEqual),nQe=ke.memo(({item:t,copied:e})=>{const n=async()=>{try{const i=t.content??t.title;await navigator.clipboard.writeText(i),setTimeout(()=>{$r.setState({copied:!1})},2e3)}catch(i){console.error("Failed to copy:",i)}};function r(){$r.setState({copied:!0})}return _.useEffect(()=>{e&&n()},[e]),x.jsx("button",{onClick:r,className:"tooltip-copy absolute right-2 top-2 cursor-pointer rounded-lg p-1.5 text-setta-500 hover:bg-setta-100 dark:text-setta-400 dark:hover:bg-setta-800","aria-label":e?"Copied!":"Copy to clipboard",children:e?x.jsx(are,{className:"h-4 w-4"}):x.jsx(U5,{className:"h-4 w-4"})})},ae.isEqual),rQe=ke.memo(({numPages:t,idx:e})=>t>1?x.jsx("div",{className:"tooltip-page mt-4 flex items-center justify-center gap-2",children:Array.from({length:t}).map((n,r)=>x.jsx("div",{className:`h-2 w-2 rounded-full ${r===e?"bg-blue-500":"bg-setta-300 dark:bg-setta-600"}`,"aria-label":`Page ${r+1} of ${t}${r===e?" (current)":""}`},r))}):null);function iQe({isFrozen:t}){const e="tooltip-footer mt-4 border-t border-solid border-setta-100 pt-1 text-[10px] text-setta-500 dark:border-setta-700 dark:text-setta-600";return t?x.jsx(sQe,{className:e}):x.jsx(oQe,{className:e})}function sQe({className:t}){const e=Nt(n=>({frozenTooltipToPlaintextShortcut:Br(n.shortcuts.frozenTooltipToPlaintextShortcut),frozenTooltipToMarkdownShortcut:Br(n.shortcuts.frozenTooltipToMarkdownShortcut)}),ae.isEqual);return x.jsxs("p",{className:t,children:["press ",x.jsx("span",{className:"font-black",children:'"Esc"'})," to close, or"," ",x.jsxs("span",{className:"font-black",children:['"',e.frozenTooltipToPlaintextShortcut,'"']})," ","(plaintext) or"," ",x.jsxs("span",{className:"font-black",children:['"',e.frozenTooltipToMarkdownShortcut,'"']})," ","(markdown) to open tooltip as new section"]})}function oQe({className:t}){const e=Nt(n=>({tooltipToPlaintextShortcut:Br(n.shortcuts.tooltipToPlaintextShortcut),tooltipToMarkdownShortcut:Br(n.shortcuts.tooltipToMarkdownShortcut),freezeTooltipShortcut:Br(n.shortcuts.freezeTooltipShortcut)}),ae.isEqual);return x.jsxs("ul",{className:t,children:[x.jsxs("li",{children:[x.jsxs("strong",{className:"font-black tracking-tighter",children:['"',e.tooltipToPlaintextShortcut,'"']})," ","convert to plaintext section"]}),x.jsxs("li",{children:[x.jsxs("strong",{className:"font-black tracking-tighter",children:['"',e.tooltipToMarkdownShortcut,'"']})," ","convert to markdown section"]}),x.jsxs("li",{children:[x.jsxs("strong",{className:"font-black tracking-tighter",children:['"',e.freezeTooltipShortcut,'"']})," ","freeze tooltip"]})]})}function Rr(...t){function e(){t&&!$r.getState().isFrozen&&$r.setState({contentArray:t})}function n(){$r.getState().isFrozen||$r.setState({contentArray:null,idx:0,copied:!1})}return{onMouseEnter:e,onMouseLeave:n}}function aQe(){$r.setState({isEnabled:!0})}function lQe(){$r.setState({isEnabled:!1,idx:0})}function Vx(t){return async()=>{const e=$r.getState();if(e.contentArray){const n=e.contentArray[e.idx],r=n.title?`## ${n.title}
|
303
303
|
|
304
304
|
${n.content}`:n.content;te.setState(i=>{Qy({type:Y.INFO,sectionProps:{name:e.title,size:{width:300,height:300},renderMarkdown:t},sectionVariantProps:{description:r},state:i})}),hn(!0)}Wie()}}function cQe(){var t;$r.setState({isEnabled:!0,isFrozen:!0}),(t=document.getElementById(PM))==null||t.focus({preventScroll:!0})}function Wie(){$r.setState({isEnabled:!1,isFrozen:!1})}function Vie(){$r.getState().contentArray&&$r.setState(t=>({idx:Yee(t.idx+1,t.contentArray.length)}))}function Uie(){$r.getState().contentArray&&$r.setState(t=>({idx:Yee(t.idx-1,t.contentArray.length)}))}async function qie(){$r.getState().contentArray&&$r.setState({copied:!0})}function uQe(){AM()&&Vie()}function fQe(){AM()&&Uie()}function hQe(){AM()&&qie()}function AM(){if($r.getState().isEnabled&&$r.getState().isFrozen){const t=document.getElementById(PM);return t==null?void 0:t.contains(document.activeElement)}return!1}async function RM(t,e=!1){Vi("Importing your code...");const n=await jy({includeDrawings:!0});let r=[];e?r.push(...Qie(n)):(n.runCodeBlocks=t,r.push(n));const i=await gRe(r);i.status===200&&(Ane(i.data.inMemorySubprocessInfo),await yRe(i.data.content),await Pne(i.data.content),Vi("Done importing"))}async function $M(t,e=!1){const n=await jy({});if(e){let r=0;for(const i of Qie(n))await bW(i,r),r+=1}else n.runCodeBlocks=t,await bW(n)}async function Xie(){const{inMemory:t,asSubprocess:e}=Hie();(e.length>0||t.length===0&&e.length===0)&&$M(e,!0),t.length>0&&RM(t,!0)}function dQe(){const{inMemory:t,asSubprocess:e}=Hie(!0);t.length>0&&RM(t),e.length>0&&$M(e)}function Hie(t=!1){const e=[],n=[],r=t?ir.getState().ids:Object.keys(te.getState().x);for(const i of r)dn(i)===Y.CODE&&(Pi(i).runInMemory?e.push(i):n.push(i));return{inMemory:e,asSubprocess:n}}function pQe(){const t="transition-colors text-xs font-semibold text-setta-700 dark:text-setta-100 py-1 px-2 rounded-md gap-1 select-none self-center flex items-center hover:bg-setta-100 dark:hover:bg-setta-800 bg-transparent active:!bg-blue-100 active:dark:!bg-blue-950";return x.jsxs(By,{onClick:Xie,twClasses:t,...Rr({content:"Run your code."}),children:[x.jsx(lre,{}),"Run"]})}function mQe(t){const{twClasses:e,text:n="text-xs font-bold",padding:r="px-1 py-[0.1rem]",rounded:i="rounded-md",children:s}=t,o=`inline-block whitespace-nowrap align-middle ${e} ${n} ${r} ${i}`;return x.jsx("span",{className:o,children:s})}function gQe(){return x.jsx(xM,{trigger:"CLI",children:x.jsx(vQe,{})})}function vQe(){const{connectedTo:t,connections:e}=jm(n=>({connectedTo:n.connectedTo,connections:n.connections.filter(r=>r.isCLI)}),ae.isEqual);return e.length>0?e.map(n=>x.jsx(OQe,{info:n,connectedTo:t},n.websocketId)):x.jsx(mn,{children:"No CLI connections"})}function OQe({info:t,connectedTo:e}){const n=e===t.websocketId?"bg-green-100 dark:bg-green-800 text-green-800 dark:text-green-100":"bg-grey-100 dark:bg-grey-800 text-grey-800 dark:text-grey-100";return x.jsxs(mn,{onClick:()=>RT(t.websocketId),children:[x.jsx(mQe,{twClasses:n,children:"CLI"}),t.websocketId]})}function yQe(){return x.jsx("nav",{className:"flex space-x-2",children:x.jsx(bQe,{})})}function bQe(){const{projectConfigName:t}=s3();return t&&x.jsxs("div",{className:"ml-4 flex gap-1",children:[x.jsxs(tie,{className:"contents",children:[x.jsx(JNe,{}),x.jsx(XNe,{}),x.jsx(gQe,{})]}),x.jsx(pQe,{})]})}const Ud=ke.forwardRef(({placeholder:t="Search",twClasses:e="",outerClasses:n="",noLeftElement:r=!1,leftElement:i=!1,leftElementStyles:s,rightElement:o=!1,inputStyles:a=!1,onChange:l,onFormSubmit:c,...u},f)=>{const h=` flex-grow outline-0 cursor-auto min-w-0 placeholder-setta-300 dark:placeholder-setta-700 ${e}`;return x.jsxs(xQe,{onFormSubmit:c,outerClasses:n,children:[!r&&x.jsx("div",{className:`absolute left-0 grid select-none place-items-center ${s}`,children:i||x.jsx("i",{className:"gg-sort-az ml-[.4rem] !scale-75 text-setta-300 dark:text-setta-600"})}),x.jsx("input",{className:a||h,placeholder:t,...u,ref:f,tabIndex:"0",onChange:l}),x.jsx("div",{className:`absolute right-0 grid select-none place-items-center ${s}`,children:o})]})});function xQe({onFormSubmit:t,children:e,outerClasses:n}){const r=`flex min-w-0 mx-[2px] items-center relative nodrag dark:text-setta-200 ${n}`;return t?x.jsx("form",{className:r,onSubmit:t,children:e}):x.jsx("search",{className:r,children:e})}function wQe(){const t=dT(e=>e.value);return x.jsx(Ud,{outerClasses:"self-center w-[clamp(10rem,_30vw,_15rem)] ml-4",inputStyles:"flex-grow cursor-auto overflow-hidden bg-setta-100 dark:bg-setta-950 border-setta-500 hover:bg-white outline-offset-2 focus:bg-white rounded-full text-xs text-setta-900 dark:text-setta-200 focus-visible:outline outline-blue-500 pl-7 py-1 placeholder-setta-300 dark:placeholder-setta-700",leftElementStyles:"pl-1",placeholder:"Filter Project Configs",value:t,onChange:e=>dT.setState({value:e.target.value})})}var c3={exports:{}},Zie={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",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̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},Yie=Object.keys(Zie).join("|"),SQe=new RegExp(Yie,"g"),_Qe=new RegExp(Yie,""),Gie=function(t){return t.replace(SQe,function(e){return Zie[e]})},kQe=function(t){return!!t.match(_Qe)};c3.exports=Gie;c3.exports.has=kQe;c3.exports.remove=Gie;var CQe=c3.exports;const EQe=ra(CQe);var ns={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};ig.rankings=ns;var TQe=function(e,n){return String(e.rankedValue).localeCompare(String(n.rankedValue))};function ig(t,e,n){n===void 0&&(n={});var r=n,i=r.keys,s=r.threshold,o=s===void 0?ns.MATCHES:s,a=r.baseSort,l=a===void 0?TQe:a,c=r.sorter,u=c===void 0?function(d){return d.sort(function(p,g){return $Qe(p,g,l)})}:c,f=t.reduce(h,[]);return u(f).map(function(d){var p=d.item;return p});function h(d,p,g){var m=PQe(p,i,e,n),v=m.rank,y=m.keyThreshold,b=y===void 0?o:y;return v>=b&&d.push(Ee({},m,{item:p,index:g})),d}}function PQe(t,e,n,r){if(!e){var i=t;return{rankedValue:i,rank:_W(i,n,r),keyIndex:-1,keyThreshold:r.threshold}}var s=DQe(t,e);return s.reduce(function(o,a,l){var c=o.rank,u=o.rankedValue,f=o.keyIndex,h=o.keyThreshold,d=a.itemValue,p=a.attributes,g=_W(d,n,r),m=u,v=p.minRanking,y=p.maxRanking,b=p.threshold;return g<v&&g>=ns.MATCHES?g=v:g>y&&(g=y),g>c&&(c=g,f=l,h=b,m=d),{rankedValue:m,rank:c,keyIndex:f,keyThreshold:h}},{rankedValue:t,rank:ns.NO_MATCH,keyIndex:-1,keyThreshold:r.threshold})}function _W(t,e,n){return t=kW(t,n),e=kW(e,n),e.length>t.length?ns.NO_MATCH:t===e?ns.CASE_SENSITIVE_EQUAL:(t=t.toLowerCase(),e=e.toLowerCase(),t===e?ns.EQUAL:t.startsWith(e)?ns.STARTS_WITH:t.includes(" "+e)?ns.WORD_STARTS_WITH:t.includes(e)?ns.CONTAINS:e.length===1?ns.NO_MATCH:AQe(t).includes(e)?ns.ACRONYM:RQe(t,e))}function AQe(t){var e="",n=t.split(" ");return n.forEach(function(r){var i=r.split("-");i.forEach(function(s){e+=s.substr(0,1)})}),e}function RQe(t,e){var n=0,r=0;function i(h,d,p){for(var g=p,m=d.length;g<m;g++){var v=d[g];if(v===h)return n+=1,g+1}return-1}function s(h){var d=1/h,p=n/e.length,g=ns.MATCHES+p*d;return g}var o=i(e[0],t,0);if(o<0)return ns.NO_MATCH;r=o;for(var a=1,l=e.length;a<l;a++){var c=e[a];r=i(c,t,r);var u=r>-1;if(!u)return ns.NO_MATCH}var f=r-o;return s(f)}function $Qe(t,e,n){var r=-1,i=1,s=t.rank,o=t.keyIndex,a=e.rank,l=e.keyIndex,c=s===a;return c?o===l?n(t,e):o<l?r:i:s>a?r:i}function kW(t,e){var n=e.keepDiacritics;return t=""+t,n||(t=EQe(t)),t}function MQe(t,e){typeof e=="object"&&(e=e.key);var n;if(typeof e=="function")n=e(t);else if(t==null)n=null;else if(Object.hasOwnProperty.call(t,e))n=t[e];else{if(e.includes("."))return IQe(e,t);n=null}return n==null?[]:Array.isArray(n)?n:[String(n)]}function IQe(t,e){for(var n=t.split("."),r=[e],i=0,s=n.length;i<s;i++){for(var o=n[i],a=[],l=0,c=r.length;l<c;l++){var u=r[l];if(u!=null)if(Object.hasOwnProperty.call(u,o)){var f=u[o];f!=null&&a.push(f)}else o==="*"&&(a=a.concat(u))}r=a}if(Array.isArray(r[0])){var h=[];return h.concat.apply(h,r)}return r}function DQe(t,e){for(var n=[],r=0,i=e.length;r<i;r++)for(var s=e[r],o=LQe(s),a=MQe(t,s),l=0,c=a.length;l<c;l++)n.push({itemValue:a[l],attributes:o});return n}var CW={maxRanking:1/0,minRanking:-1/0};function LQe(t){return typeof t=="string"?CW:Ee({},CW,t)}function MM(t,e,n){const[r,i]=_.useState(""),s=_.useCallback(ae.debounce(a=>i(a),n),[n]),o=r?ig(t,r,{keys:e}):t;return n?[o,s]:[o,i]}function NQe(){const[t,e]=_.useState({winWidth:void 0,winHeight:void 0});return _.useEffect(()=>{function n(){e({winWidth:window.innerWidth,winHeight:window.innerHeight})}return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),t}function Kie({value:t,onChange:e,onBlur:n,onKeyDown:r,titleProps:i,onMouseEnter:s,onMouseLeave:o,doubleClickToEdit:a=!1,blurTriggeredByEscapeKey:l}){const[c,u]=_.useState(!1),f=_.useRef(null);function h(p){const g=l.current;u(!1),n(p),g&&requestAnimationFrame(()=>{f.current.focus({preventScroll:!0})})}function d(p){(p.code==="Space"||a&&p.detail===2||!a)&&u(!0)}return c?x.jsx(QQe,{value:t,onChange:e,onBlur:h,onKeyDown:r,titleProps:i.editing}):x.jsx(jQe,{value:t,onClick:d,titleProps:i.notEditing,onMouseEnter:s,onMouseLeave:o,paragraphRef:f})}function QQe({value:t,onChange:e,onBlur:n,onKeyDown:r,titleProps:i}){const s=_.useRef(null);return _.useEffect(()=>{s.current.focus({preventScroll:!0});const o=t.length;s.current.setSelectionRange(0,o)},[]),x.jsx("input",{value:t,onChange:e,onBlur:n,onKeyDown:r,className:i,ref:s,size:"1"})}function jQe({value:t,onClick:e,titleProps:n,onMouseEnter:r,onMouseLeave:i,paragraphRef:s}){function o(a){a.code==="Space"&&(a.preventDefault(),e(a))}return x.jsx("p",{onClick:e,className:n,tabIndex:"0",onKeyDown:o,onMouseEnter:r,onMouseLeave:i,ref:s,children:t})}async function BQe(t){return await jt({body:{currProjectConfigName:vo.getState().name,newProjectConfigName:t},address:Y.ROUTE_SET_PROJECT_CONFIG_NAME})}function IM(t,e,n){const[r,i]=_.useState(t),s=_.useRef(!1);function o(c){i(c.target.value)}async function a(c){if(s.current){s.current=!1;return}s.current=!1;const u=c.target.value;u!=""&&u!=t&&await n(u)?e(u):i(t)}function l(c){c.code==="Escape"?(s.current=!0,c.target.blur(),i(t)):c.code==="Enter"&&c.target.blur()}return _.useEffect(()=>{i(t)},[t]),[r,o,a,l,s]}const zQe="flex-1 box-border [border-width:0_0_1px_0] border-solid bg-transparent focus:border-blue-300 focus-visible:ring-0 focus-visible:outline-none w-full ",FQe="flex-1 box-border border-b border-solid border-transparent bg-transparent focus-visible:border-blue-300 focus-visible:ring-0 focus-visible:outline-none w-full truncate";function WQe(){return x.jsx("header",{className:"mb-2 flex w-full flex-col flex-wrap tracking-tight ",...Rr({content:"Your Project's Name and Config Name, editable all in one spot!"}),children:x.jsx(VQe,{})})}function VQe(){const[t,e,n,r,i]=UQe();return x.jsx(Kie,{titleProps:{editing:`${zQe} text-xl text-setta-900 dark:text-setta-50 font-bold `,notEditing:`${FQe} text-xl text-setta-900 dark:text-setta-50 font-bold `},value:t,onChange:e,onBlur:n,onKeyDown:r,blurTriggeredByEscapeKey:i})}function UQe(){const t=vo(i=>i.name),e=tg();async function n(i){return(await BQe(i)).status===200}async function r(i){e(h5(i),{state:{pageLoadType:Kp.CHANGE_PROJECT_CONFIG_NAME}})}return IM(t,r,n)}function qQe({listOfSectionIdsAndNames:t=[],checkbox:e=!1}){return t.map((n,r)=>x.jsx(HQe,{sectionId:n.id,sectionHeading:n.name,checkbox:e,depth:n.depth},`SectionItem-${n.id}-${r}`))}function XQe({sectionId:t,sectionHeading:e,checkbox:n,depth:r}){const i=o=>{rg(t),ng(o,t)},s=o=>{o.code==="Space"&&i(o)};return n?x.jsxs("label",{className:"dark:text-rx-300 flex cursor-pointer items-center gap-2 truncate rounded px-1 py-0.5 text-sm text-setta-700 hover:bg-white hover:shadow-md dark:text-setta-200 dark:hover:bg-setta-700",children:[x.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded-md bg-setta-500/10 checked:bg-blue-500 hover:bg-setta-500/30 hover:checked:bg-blue-500"}),e]}):x.jsx("li",{id:`${t}-OverviewListItem`,className:"cursor-pointer truncate rounded px-2 py-0.5 text-xs text-setta-700 hover:bg-white hover:shadow-md focus-visible:border-transparent focus-visible:bg-blue-500 focus-visible:text-white focus-visible:outline-none focus-visible:ring-0 dark:text-setta-200 dark:hover:bg-setta-700 dark:focus-visible:!text-white",onClick:i,onKeyDown:s,style:{marginLeft:`${.75*r}rem`},tabIndex:"0",children:e})}const HQe=ke.memo(XQe),ZQe=ke.forwardRef(()=>{const t=Jie();return x.jsx(YQe,{sectionList:t})});function YQe({sectionList:t}){const[e,n]=MM(t,["name"]);return x.jsxs(x.Fragment,{children:[x.jsx(WQe,{}),x.jsx(Ud,{inputStyles:"flex-grow outline-0 min-w-0 cursor-auto bg-transparent [border-width:0_0_1px_0] border-solid border-setta-200 dark:border-setta-800 focus-visible:!border-blue-300 pl-5 py-1 truncate placeholder-setta-400 dark:placeholder-setta-700 text-sm",outerClasses:"pb-4",leftElementStyles:"pl-1",placeholder:"Filter",leftElement:x.jsx("i",{className:"gg-sort-az !scale-75 text-setta-600 dark:text-setta-400"}),onChange:r=>n(r.target.value),...Rr({content:"Search through your project's cards."})}),x.jsx("div",{className:"min-h-0 flex-grow overflow-y-scroll",children:x.jsx("ul",{className:"min-h-0 flex-grow",...Rr({content:"Click on a section name to pan to it."}),children:x.jsx(qQe,{listOfSectionIdsAndNames:e})})})]})}function Jie(){return te(t=>{const e=[];for(const n of Object.values(t.x))n.parentId||ese(n.id,0,t,e);return e},ae.isEqual)}function ese(t,e,n,r){const i=n.x[t];r.push({id:t,name:i.name,depth:e});const s=n.variants[i.variantId].children;if(s)for(const o of s)ese(o,e+1,n,r)}const Fa=ke.forwardRef(({twClasses:t="",size:e="w-3 h-3",padding:n="py-1 px-1",bg:r="bg-transparent hover:bg-setta-100 dark:hover:bg-setta-600",color:i="text-setta-500",rounded:s="rounded-full",icon:o,children:a,...l},c)=>x.jsxs(By,{twClasses:`flex justify-center ${r} ${i} ${s} ${n} ${e} ${t}`,...l,ref:c,children:[o,a]})),GQe=ke.forwardRef(({rounded:t,bg:e,size:n,icon:r,...i},s)=>x.jsx(Fa,{rounded:t||"rounded-full",bg:e||"bg-transparent",size:n||"w-10 h-10",padding:"p-0",grid:!0,twClasses:"absolute right-0 hover:bg-blue-500 dark:hover:bg-blue-700 hover:text-white dark:text-setta-500 dark:hover:text-setta-100",icon:r,...i,ref:s}));function KQe({divId:t,getInputProps:e,getToggleButtonProps:n,isOpen:r,small:i,onKeyDown:s,placeholder:o,bg:a="bg-white dark:bg-setta-900",isDisabled:l,inputRef:c}){return x.jsx(Ud,{inputStyles:`flex-grow truncate outline-0 cursor-auto ${a} rounded-full text-xs font-mono text-setta-600 font-medium pl-3 pr-4 focus-visible:border-white dark:text-setta-300 dark:focus-visible:border-setta-900 focus-visible:ring-2 border border-solid border-setta-100 dark:border-setta-800 placeholder:text-setta-200 dark:placeholder:text-setta-700 min-w-0 ${i?"h-4 my-auto":"h-7"}`,noLeftElement:!0,placeholder:o,...e({id:t,onKeyDown:s,ref:c,disabled:l}),rightElement:x.jsx(GQe,{...n({disabled:l}),icon:r?x.jsx("i",{className:"gg-chevron-up mr-[5px] mt-[4px] !h-3 !w-3"}):x.jsx("i",{className:"gg-chevron-down mb-[4px] mr-[5px] !h-3 !w-3"}),size:i?"w-4 h-4 !mr-[1px]":"w-7 h-7"})})}function tse({isOpen:t,children:e,getMenuProps:n,inputRef:r}){const[i,s]=_.useState({x:0,y:0,width:0}),o=t?"flex":"hidden";return _.useLayoutEffect(()=>{if(t&&r.current){const a=r.current.getBoundingClientRect(),l=-30;s({x:a.left,y:a.bottom+l,width:a.width})}},[t,r]),Qi.createPortal(x.jsx("div",{className:`nowheel nodrag absolute w-fit pb-2 ${o} z-20 mt-8 max-h-96 rounded-md border bg-white shadow-xl dark:border-setta-700/70 dark:bg-setta-800 dark:text-setta-200 dark:shadow-setta-900/50`,...n(),style:{left:`${i.x}px`,top:`${i.y}px`,minWidth:i.width},children:x.jsx("div",{className:"w-full overflow-y-scroll",children:e})}),document.body)}function JQe({getItemProps:t,item:e,index:n,isHighlighted:r,itemStyle:i="",itemString:s}){const o=r?"bg-setta-300/50 dark:bg-setta-900/50":"";return x.jsx("dd",{className:`mx-1 cursor-pointer truncate rounded-lg px-2 py-[.125rem] text-xs ${o} ${i}`,...t({item:e,index:n}),children:s})}const eje=ke.memo(JQe);function nse({filteredItems:t,getItemProps:e,highlightedIndex:n,itemToString:r}){return t.reduce((i,s,o)=>(i.groups.push(x.jsxs("dl",{children:[x.jsx("dt",{className:"mx-3 mb-1 truncate border-b border-solid border-setta-300/50 pt-3 text-[0.6rem] font-bold uppercase text-setta-400 first:pt-2",children:s.group}),s.items.map((a,l)=>{const c=i.itemIndex++;return x.jsx(eje,{getItemProps:e,item:a,index:c,isHighlighted:c===n,itemString:r?r(a):a},l)})]},o)),i),{groups:[],itemIndex:0}).groups}function w1(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var rse={exports:{}},tje="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",nje=tje,rje=nje;function ise(){}function sse(){}sse.resetWarningCache=ise;var ije=function(){function t(r,i,s,o,a,l){if(l!==rje){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:sse,resetWarningCache:ise};return n.PropTypes=n,n};rse.exports=ije();var sje=rse.exports;const Be=ra(sje);var _n={};/**
|
305
305
|
* @license React
|
@@ -341,7 +341,7 @@ M${m.x},${m.y}h${m.width}v${m.height}h${-m.width}z`,fill:v,fillRule:"evenodd",st
|
|
341
341
|
`);r=i<0?n:n.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,r=0){this.block=s4.create(e,r,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,r=0){this.startContext(this.parser.getNodeType(e),n,r)}addNode(e,n,r){typeof e=="number"&&(e=new yn(this.parser.nodeSet.types[e],vm,vm,(r??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(lA(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?sue(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let n=lA(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(Xe.Paragraph,e.content.length),e.start)}elt(e,n,r,i){return typeof e=="string"?en(this.parser.getNodeType(e),n,r,i):new lue(e,n)}get buffer(){return new aue(this.parser.nodeSet)}}function sue(t,e,n,r,i){let s=t[e].to,o=[],a=[],l=n.from+r;function c(u,f){for(;f?u>=s:u>s;){let h=t[e+1].from-s;r+=h,u+=h,e++,s=t[e].to}}for(let u=n.firstChild;u;u=u.nextSibling){c(u.from+r,!0);let f=u.from+r,h,d=i.get(u.tree);d?h=d:u.to+r>s?(h=sue(t,e,u,r,i),c(u.to+r,!1)):h=u.toTree(),o.push(h),a.push(f-l)}return c(n.to+r,!1),new yn(n.type,o,a,n.to+r-l,n.tree?n.tree.propValues:void 0)}class B3 extends _I{constructor(e,n,r,i,s,o,a,l,c){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=c,this.nodeTypes=Object.create(null);for(let u of e.types)this.nodeTypes[u.name]=u.id}createParse(e,n,r){let i=new yKe(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}configure(e){let n=oA(e);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),c=this.inlineNames.slice(),u=this.endLeafBlock.slice(),f=this.wrappers;if(e1(n.defineNodes)){i=Object.assign({},i);let h=r.types.slice(),d;for(let p of n.defineNodes){let{name:g,block:m,composite:v,style:y}=typeof p=="string"?{name:p}:p;if(h.some(k=>k.name==g))continue;v&&(i[h.length]=(k,E,T)=>v(E,T,k.value));let b=h.length,S=v?["Block","BlockContext"]:m?b>=Xe.ATXHeading1&&b<=Xe.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;h.push(ti.define({id:b,name:g,props:S&&[[Et.group,S]]})),y&&(d||(d={}),Array.isArray(y)||y instanceof yc?d[g]=y:Object.assign(d,y))}r=new Uy(h),d&&(r=r.extend(Fl(d)))}if(e1(n.props)&&(r=r.extend(...n.props)),e1(n.remove))for(let h of n.remove){let d=this.blockNames.indexOf(h),p=this.inlineNames.indexOf(h);d>-1&&(s[d]=o[d]=void 0),p>-1&&(l[p]=void 0)}if(e1(n.parseBlock))for(let h of n.parseBlock){let d=a.indexOf(h.name);if(d>-1)s[d]=h.parse,o[d]=h.leaf;else{let p=h.before?xw(a,h.before):h.after?xw(a,h.after)+1:a.length-1;s.splice(p,0,h.parse),o.splice(p,0,h.leaf),a.splice(p,0,h.name)}h.endLeaf&&u.push(h.endLeaf)}if(e1(n.parseInline))for(let h of n.parseInline){let d=c.indexOf(h.name);if(d>-1)l[d]=h.parse;else{let p=h.before?xw(c,h.before):h.after?xw(c,h.after)+1:c.length-1;l.splice(p,0,h.parse),c.splice(p,0,h.name)}}return n.wrap&&(f=f.concat(n.wrap)),new B3(r,s,o,a,u,i,l,c,f)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let r=new xKe(this,e,n);e:for(let i=n;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let a=o(r,s,i);if(a>=0){i=a;continue e}}i++}return r.resolveMarkers(0)}}function e1(t){return t!=null&&t.length>0}function oA(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=oA(t[0]);if(t.length==1)return e;let n=oA(t.slice(1));if(!n||!e)return e||n;let r=(o,a)=>(o||vm).concat(a||vm),i=e.wrap,s=n.wrap;return{props:r(e.props,n.props),defineNodes:r(e.defineNodes,n.defineNodes),parseBlock:r(e.parseBlock,n.parseBlock),parseInline:r(e.parseInline,n.parseInline),remove:r(e.remove,n.remove),wrap:i?s?(o,a,l,c)=>i(s(o,a,l,c),a,l,c):i:s}}function xw(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let oue=[ti.none];for(let t=1,e;e=Xe[t];t++)oue[t]=ti.define({id:t,name:e,props:t>=Xe.Escape?[]:[[Et.group,t in Zce?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const vm=[];let aue=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,r,i=0){return this.content.push(e,n,r,4+i*4),this}writeElements(e,n=0){for(let r of e)r.writeTo(this,n);return this}finish(e,n){return yn.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}},EO=class{constructor(e,n,r,i=vm){this.type=e,this.from=n,this.to=r,this.children=i}writeTo(e,n){let r=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-r)}toTree(e){return new aue(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class lue{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return vm}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function en(t,e,n,r){return new EO(t,e,n,r)}const cue={resolve:"Emphasis",mark:"EmphasisMark"},uue={resolve:"Emphasis",mark:"EmphasisMark"},B0={},aA={};class Po{constructor(e,n,r,i){this.type=e,this.from=n,this.to=r,this.side=i}}const aq="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let TO=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{TO=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const C7={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let r=t.char(n+1);for(let i=0;i<aq.length;i++)if(aq.charCodeAt(i)==r)return t.append(en(Xe.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return r?t.append(en(Xe.Entity,n,n+1+r[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let r=n+1;for(;r<t.end&&t.char(r)==96;)r++;let i=r-n,s=0;for(;r<t.end;r++)if(t.char(r)==96){if(s++,s==i&&t.char(r+1)!=96)return t.append(en(Xe.InlineCode,n,r+1,[en(Xe.CodeMark,n,n+i),en(Xe.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let r=t.slice(n+1,t.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return t.append(en(Xe.Autolink,n,n+1+i[0].length,[en(Xe.LinkMark,n,n+1),en(Xe.URL,n+1,n+i[0].length),en(Xe.LinkMark,n+i[0].length,n+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return t.append(en(Xe.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return t.append(en(Xe.ProcessingInstruction,n,n+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return a?t.append(en(Xe.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let r=n+1;for(;t.char(r)==e;)r++;let i=t.slice(n-1,n),s=t.slice(r,r+1),o=TO.test(i),a=TO.test(s),l=/\s|^$/.test(i),c=/\s|^$/.test(s),u=!c&&(!a||l||o),f=!l&&(!o||c||a),h=u&&(e==42||!f||o),d=f&&(e==42||!u||a);return t.append(new Po(e==95?cue:uue,n,r,(h?1:0)|(d?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(en(Xe.HardBreak,n,n+2));if(e==32){let r=n+1;for(;t.char(r)==32;)r++;if(t.char(r)==10&&r>=n+2)return t.append(en(Xe.HardBreak,n,r+1))}return-1},Link(t,e,n){return e==91?t.append(new Po(B0,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Po(aA,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let r=t.parts.length-1;r>=0;r--){let i=t.parts[r];if(i instanceof Po&&(i.type==B0||i.type==aA)){if(!i.side||t.skipSpace(i.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[r]=null,-1;let s=t.takeContent(r),o=t.parts[r]=bKe(t,s,i.type==B0?Xe.Link:Xe.Image,i.from,n+1);if(i.type==B0)for(let a=0;a<r;a++){let l=t.parts[a];l instanceof Po&&l.type==B0&&(l.side=0)}return o.to}}return-1}};function bKe(t,e,n,r,i){let{text:s}=t,o=t.char(i),a=i;if(e.unshift(en(Xe.LinkMark,r,r+(n==Xe.Image?2:1))),e.push(en(Xe.LinkMark,i-1,i)),o==40){let l=t.skipSpace(i+1),c=fue(s,l-t.offset,t.offset),u;c&&(l=t.skipSpace(c.to),l!=c.to&&(u=hue(s,l-t.offset,t.offset),u&&(l=t.skipSpace(u.to)))),t.char(l)==41&&(e.push(en(Xe.LinkMark,i,i+1)),a=l+1,c&&e.push(c),u&&e.push(u),e.push(en(Xe.LinkMark,l,a)))}else if(o==91){let l=due(s,i-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return en(n,r,a,e)}function fue(t,e,n){if(t.charCodeAt(e)==60){for(let i=e+1;i<t.length;i++){let s=t.charCodeAt(i);if(s==62)return en(Xe.URL,e+n,i+1+n);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<t.length;s++){let a=t.charCodeAt(s);if(oa(a))break;if(o)o=!1;else if(a==40)i++;else if(a==41){if(!i)break;i--}else a==92&&(o=!0)}return s>e?en(Xe.URL,e+n,s+n):s==t.length?null:!1}}function hue(t,e,n){let r=t.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<t.length;s++){let a=t.charCodeAt(s);if(o)o=!1;else{if(a==i)return en(Xe.LinkTitle,e+n,s+1+n);a==92&&(o=!0)}}return null}function due(t,e,n,r){for(let i=!1,s=e+1,o=Math.min(t.length,s+999);s<o;s++){let a=t.charCodeAt(s);if(i)i=!1;else{if(a==93)return r?!1:en(Xe.LinkLabel,e+n,s+1+n);if(r&&!oa(a)&&(r=!1),a==91)return!1;a==92&&(i=!0)}}return null}class xKe{constructor(e,n,r){this.parser=e,this.text=n,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,r,i,s){return this.append(new Po(e,n,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Po&&(n.type==B0||n.type==aA))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Po&&i.type.resolve&&i.side&2))continue;let s=i.type==cue||i.type==uue,o=i.to-i.from,a,l=r-1;for(;l>=e;l--){let g=this.parts[l];if(g instanceof Po&&g.side&1&&g.type==i.type&&!(s&&(i.side&1||g.side&2)&&(g.to-g.from+o)%3==0&&((g.to-g.from)%3||o%3))){a=g;break}}if(!a)continue;let c=i.type.resolve,u=[],f=a.from,h=i.to;if(s){let g=Math.min(2,a.to-a.from,o);f=a.to-g,h=i.from+g,c=g==1?"Emphasis":"StrongEmphasis"}a.type.mark&&u.push(this.elt(a.type.mark,f,a.to));for(let g=l+1;g<r;g++)this.parts[g]instanceof EO&&u.push(this.parts[g]),this.parts[g]=null;i.type.mark&&u.push(this.elt(i.type.mark,i.from,h));let d=this.elt(c,f,h,u);this.parts[l]=s&&a.from!=f?new Po(a.type,a.from,f,a.side):null,(this.parts[r]=s&&i.to!=h?new Po(i.type,h,i.to,i.side):null)?this.parts.splice(r,0,d):this.parts[r]=d}let n=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof EO&&n.push(i)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let r=this.parts[n];if(r instanceof Po&&r.type==e)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}skipSpace(e){return pv(this.text,e-this.offset)+this.offset}elt(e,n,r,i){return typeof e=="string"?en(this.parser.getNodeType(e),n,r,i):new lue(e,n)}}function lA(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),r=0;for(let i of e){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let s=n[r];s instanceof EO&&(n[r]=new EO(s.type,s.from,s.to,lA(s.children,[i])))}else n.splice(r++,0,i)}return n}const wKe=[Xe.CodeBlock,Xe.ListItem,Xe.OrderedList,Xe.BulletList];class SKe{constructor(e,n){this.fragments=e,this.input=n,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,n){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
|
342
342
|
`;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=n;if(!r.childAfter(i))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Et.contextHash)==e}takeNodes(e){let n=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,a=e.block.children.length,l=o,c=a;for(;;){if(n.to-r>i){if(n.type.isAnonymous&&n.firstChild())continue;break}let u=pue(n.from-r,e.ranges);if(n.to-r<=e.ranges[e.rangeI].to)e.addNode(n.tree,u);else{let f=new yn(e.parser.nodeSet.types[Xe.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,n.tree),e.addNode(f,u)}if(n.type.is("Block")&&(wKe.indexOf(n.type.id)<0?(o=n.to-r,a=e.block.children.length):(o=l,a=c,l=n.to-r,c=e.block.children.length)),!n.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-s}}function pue(t,e){let n=t;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<t&&(n-=s-i)}return n}const _Ke=Fl({"Blockquote/...":W.quote,HorizontalRule:W.contentSeparator,"ATXHeading1/... SetextHeading1/...":W.heading1,"ATXHeading2/... SetextHeading2/...":W.heading2,"ATXHeading3/...":W.heading3,"ATXHeading4/...":W.heading4,"ATXHeading5/...":W.heading5,"ATXHeading6/...":W.heading6,"Comment CommentBlock":W.comment,Escape:W.escape,Entity:W.character,"Emphasis/...":W.emphasis,"StrongEmphasis/...":W.strong,"Link/... Image/...":W.link,"OrderedList/... BulletList/...":W.list,"BlockQuote/...":W.quote,"InlineCode CodeText":W.monospace,"URL Autolink":W.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":W.processingInstruction,"CodeInfo LinkLabel":W.labelName,LinkTitle:W.string,Paragraph:W.content}),kKe=new B3(new Uy(oue).extend(_Ke),Object.keys(bw).map(t=>bw[t]),Object.keys(bw).map(t=>iue[t]),Object.keys(bw),vKe,Zce,Object.keys(C7).map(t=>C7[t]),Object.keys(C7),[]);function CKe(t,e,n){let r=[];for(let i=t.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:n;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function EKe(t){let{codeParser:e,htmlParser:n}=t;return{wrap:Vae((i,s)=>{let o=i.type.id;if(e&&(o==Xe.CodeBlock||o==Xe.FencedCode)){let a="";if(o==Xe.FencedCode){let c=i.node.getChild(Xe.CodeInfo);c&&(a=s.read(c.from,c.to))}let l=e(a);if(l)return{parser:l,overlay:c=>c.type.id==Xe.CodeText}}else if(n&&(o==Xe.HTMLBlock||o==Xe.HTMLTag))return{parser:n,overlay:CKe(i.node,i.from,i.to)};return null})}}const TKe={resolve:"Strikethrough",mark:"StrikethroughMark"},PKe={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":W.strikethrough}},{name:"StrikethroughMark",style:W.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let r=t.slice(n-1,n),i=t.slice(n+2,n+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),a=TO.test(r),l=TO.test(i);return t.addDelimiter(TKe,n,n+2,!o&&(!l||s||a),!s&&(!a||o||l))},after:"Emphasis"}]};function mv(t,e,n=0,r,i=0){let s=0,o=!0,a=-1,l=-1,c=!1,u=()=>{r.push(t.elt("TableCell",i+a,i+l,t.parser.parseInline(e.slice(a,l),i+a)))};for(let f=n;f<e.length;f++){let h=e.charCodeAt(f);h==124&&!c?((!o||a>-1)&&s++,o=!1,r&&(a>-1&&u(),r.push(t.elt("TableDelimiter",f+i,f+i+1))),a=l=-1):(c||h!=32&&h!=9)&&(a<0&&(a=f),l=f+1),c=!c&&h==92}return a>-1&&(s++,r&&u()),s}function lq(t,e){for(let n=e;n<t.length;n++){let r=t.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}const mue=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class cq{constructor(){this.rows=null}nextLine(e,n,r){if(this.rows==null){this.rows=!1;let i;if((n.next==45||n.next==58||n.next==124)&&mue.test(i=n.text.slice(n.pos))){let s=[];mv(e,r.content,0,s,r.start)==mv(e,i,n.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let i=[];mv(e,n.text,n.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,i))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const AKe={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":W.heading}},"TableRow",{name:"TableCell",style:W.content},{name:"TableDelimiter",style:W.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return lq(e.content,0)?new cq:null},endLeaf(t,e,n){if(n.parsers.some(i=>i instanceof cq)||!lq(e.text,e.basePos))return!1;let r=t.scanLine(t.absoluteLineEnd+1).text;return mue.test(r)&&mv(t,e.text,e.basePos)==mv(t,r,e.basePos)},before:"SetextHeading"}]};class RKe{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const $Ke={defineNodes:[{name:"Task",block:!0,style:W.list},{name:"TaskMarker",style:W.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new RKe:null},after:"SetextHeading"}]},uq=/(www\.)|(https?:\/\/)|([\w.+-]{,100}@)|(mailto:|xmpp:)/gy,fq=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,MKe=/[\w-]+\.[\w-]+($|\/)/,hq=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,dq=/\/[a-zA-Z\d@.]+/gy;function pq(t,e,n,r){let i=0;for(let s=e;s<n;s++)t[s]==r&&i++;return i}function IKe(t,e){fq.lastIndex=e;let n=fq.exec(t);if(!n||MKe.exec(n[0])[0].indexOf("_")>-1)return-1;let r=e+n[0].length;for(;;){let i=t[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&pq(t,e,r,")")>pq(t,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,r))))r=e+s.index;else break}return r}function mq(t,e){hq.lastIndex=e;let n=hq.exec(t);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:e+n[0].length-(r=="."?1:0)}const DKe={parseInline:[{name:"Autolink",parse(t,e,n){let r=n-t.offset;if(r&&/\w/.test(t.text[r-1]))return-1;uq.lastIndex=r;let i=uq.exec(t.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=IKe(t.text,r+i[0].length),s>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(r,s));s=r+o[0].length}}else i[3]?s=mq(t.text,r):(s=mq(t.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(dq.lastIndex=s,i=dq.exec(t.text),i&&(s=i.index+i[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},LKe=[AKe,$Ke,PKe,DKe];function gue(t,e,n){return(r,i,s)=>{if(i!=t||r.char(s+1)==t)return-1;let o=[r.elt(n,s,s+1)];for(let a=s+1;a<r.end;a++){let l=r.char(a);if(l==t)return r.addElement(r.elt(e,s,a+1,o.concat(r.elt(n,a,a+1))));if(l==92&&o.push(r.elt("Escape",a,a+++2)),oa(l))break}return-1}}const NKe={defineNodes:[{name:"Superscript",style:W.special(W.content)},{name:"SuperscriptMark",style:W.processingInstruction}],parseInline:[{name:"Superscript",parse:gue(94,"Superscript","SuperscriptMark")}]},QKe={defineNodes:[{name:"Subscript",style:W.special(W.content)},{name:"SubscriptMark",style:W.processingInstruction}],parseInline:[{name:"Subscript",parse:gue(126,"Subscript","SubscriptMark")}]},jKe={defineNodes:[{name:"Emoji",style:W.character}],parseInline:[{name:"Emoji",parse(t,e,n){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+r[0].length))}}]},BKe=54,zKe=1,FKe=55,WKe=2,VKe=56,UKe=3,gq=4,qKe=5,o4=6,vue=7,Oue=8,yue=9,bue=10,XKe=11,HKe=12,ZKe=13,E7=57,YKe=14,vq=58,xue=20,GKe=22,wue=23,KKe=24,cA=26,Sue=27,JKe=28,eJe=31,tJe=34,nJe=36,rJe=37,iJe=0,sJe=1,oJe={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},aJe={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Oq={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function lJe(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function _ue(t){return t==9||t==10||t==13||t==32}let yq=null,bq=null,xq=0;function uA(t,e){let n=t.pos+e;if(xq==n&&bq==t)return yq;let r=t.peek(e);for(;_ue(r);)r=t.peek(++e);let i="";for(;lJe(r);)i+=String.fromCharCode(r),r=t.peek(++e);return bq=t,xq=n,yq=i?i.toLowerCase():r==cJe||r==uJe?void 0:null}const kue=60,a4=62,nD=47,cJe=63,uJe=33,fJe=45;function wq(t,e){this.name=t,this.parent=e}const hJe=[o4,bue,vue,Oue,yue],dJe=new j3({start:null,shift(t,e,n,r){return hJe.indexOf(e)>-1?new wq(uA(r,1)||"",t):t},reduce(t,e){return e==xue&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==o4||i==nJe?new wq(uA(r,1)||"",t):t},strict:!1}),pJe=new ri((t,e)=>{if(t.next!=kue){t.next<0&&e.context&&t.acceptToken(E7);return}t.advance();let n=t.next==nD;n&&t.advance();let r=uA(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?YKe:o4);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(XKe);if(i&&aJe[i])return t.acceptToken(E7,-2);if(e.dialectEnabled(iJe))return t.acceptToken(HKe);for(let s=e.context;s;s=s.parent)if(s.name==r)return;t.acceptToken(ZKe)}else{if(r=="script")return t.acceptToken(vue);if(r=="style")return t.acceptToken(Oue);if(r=="textarea")return t.acceptToken(yue);if(oJe.hasOwnProperty(r))return t.acceptToken(bue);i&&Oq[i]&&Oq[i][r]?t.acceptToken(E7,-1):t.acceptToken(o4)}},{contextual:!0}),mJe=new ri(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(vq);break}if(t.next==fJe)e++;else if(t.next==a4&&e>=2){n>=3&&t.acceptToken(vq,-2);break}else e=0;t.advance()}});function gJe(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const vJe=new ri((t,e)=>{if(t.next==nD&&t.peek(1)==a4){let n=e.dialectEnabled(sJe)||gJe(e.context);t.acceptToken(n?qKe:gq,2)}else t.next==a4&&t.acceptToken(gq,1)});function rD(t,e,n){let r=2+t.length;return new ri(i=>{for(let s=0,o=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(s==0&&i.next==kue||s==1&&i.next==nD||s>=2&&s<r&&i.next==t.charCodeAt(s-2))s++,o++;else if((s==2||s==r)&&_ue(i.next))o++;else if(s==r&&i.next==a4){a>o?i.acceptToken(e,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const OJe=rD("script",BKe,zKe),yJe=rD("style",FKe,WKe),bJe=rD("textarea",VKe,UKe),xJe=Fl({"Text RawText":W.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":W.angleBracket,TagName:W.tagName,"MismatchedCloseTag/TagName":[W.tagName,W.invalid],AttributeName:W.attributeName,"AttributeValue UnquotedAttributeValue":W.attributeValue,Is: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_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:dJe,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[xJe],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpO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cA)||r.getChild(Sue);i&&(n[e.read(i.from,i.to)]=s?s.type.id==cA?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function Sq(t,e){let n=t.getChild(GKe);return n?e.read(n.from,n.to):" "}function T7(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=Cue(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function Eue(t=[],e=[]){let n=[],r=[],i=[],s=[];for(let a of t)(a.tag=="script"?n:a.tag=="style"?r:a.tag=="textarea"?i:s).push(a);let o=e.length?Object.create(null):null;for(let a of e)(o[a.name]||(o[a.name]=[])).push(a);return Vae((a,l)=>{let c=a.type.id;if(c==JKe)return T7(a,l,n);if(c==eJe)return T7(a,l,r);if(c==tJe)return T7(a,l,i);if(c==xue&&s.length){let u=a.node,f=u.firstChild,h=f&&Sq(f,l),d;if(h){for(let p of s)if(p.tag==h&&(!p.attrs||p.attrs(d||(d=Cue(f,l))))){let g=u.lastChild,m=g.type.id==rJe?g.from:u.to;if(m>f.to)return{parser:p.parser,overlay:[{from:f.to,to:m}]}}}}if(o&&c==wue){let u=a.node,f;if(f=u.firstChild){let h=o[l.read(f.from,f.to)];if(h)for(let d of h){if(d.tagName&&d.tagName!=Sq(u.parent,l))continue;let p=u.lastChild;if(p.type.id==cA){let g=p.from+1,m=p.lastChild,v=p.to-(m&&m.isError?0:1);if(v>g)return{parser:d.parser,overlay:[{from:g,to:v}]}}else if(p.type.id==Sue)return{parser:d.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const SJe=99,_q=1,_Je=100,kJe=101,kq=2,Tue=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],CJe=58,EJe=40,Pue=95,TJe=91,KS=45,PJe=46,AJe=35,RJe=37,$Je=38,MJe=92,IJe=10;function PO(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Aue(t){return t>=48&&t<=57}const DJe=new ri((t,e)=>{for(let n=!1,r=0,i=0;;i++){let{next:s}=t;if(PO(s)||s==KS||s==Pue||n&&Aue(s))!n&&(s!=KS||i>0)&&(n=!0),r===i&&s==KS&&r++,t.advance();else if(s==MJe&&t.peek(1)!=IJe)t.advance(),t.next>-1&&t.advance(),n=!0;else{n&&t.acceptToken(s==EJe?_Je:r==2&&e.canShift(kq)?kq:kJe);break}}}),LJe=new ri(t=>{if(Tue.includes(t.peek(-1))){let{next:e}=t;(PO(e)||e==Pue||e==AJe||e==PJe||e==TJe||e==CJe&&PO(t.peek(1))||e==KS||e==$Je)&&t.acceptToken(SJe)}}),NJe=new ri(t=>{if(!Tue.includes(t.peek(-1))){let{next:e}=t;if(e==RJe&&(t.advance(),t.acceptToken(_q)),PO(e)){do t.advance();while(PO(t.next)||Aue(t.next));t.acceptToken(_q)}}}),QJe=Fl({"AtKeyword import charset namespace keyframes media supports":W.definitionKeyword,"from to selector":W.keyword,NamespaceName:W.namespace,KeyframeName:W.labelName,KeyframeRangeName:W.operatorKeyword,TagName:W.tagName,ClassName:W.className,PseudoClassName:W.constant(W.className),IdName:W.labelName,"FeatureName PropertyName":W.propertyName,AttributeName:W.attributeName,NumberLiteral:W.number,KeywordQuery:W.keyword,UnaryQueryOp:W.operatorKeyword,"CallTag ValueName":W.atom,VariableName:W.variableName,Callee:W.operatorKeyword,Unit:W.unit,"UniversalSelector NestingSelector":W.definitionOperator,MatchOp:W.compareOperator,"ChildOp SiblingOp, LogicOp":W.logicOperator,BinOp:W.arithmeticOperator,Important:W.modifier,Comment:W.blockComment,ColorLiteral:W.color,"ParenthesizedContent StringLiteral":W.string,":":W.punctuation,"PseudoOp #":W.derefOperator,"; ,":W.separator,"( )":W.paren,"[ ]":W.squareBracket,"{ }":W.brace}),jJe={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},BJe={__proto__:null,"@import":118,"@media":142,"@charset":146,"@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^*d*n*t*zPPPPPPPPPP+Q+ZP+v+yP,o,r,x-RRkQ_bOPdhw!n#tkYOPdhotuvw!n#R#h#tkSOPdhotuvw!n#R#h#tQmTR!tnQ{VR!xqQ!x}Q#Z!XR#y!zq![Z]!T!m#S#U#X#q#{$Q$[$k$l$s$x%Up![Z]!T!m#S#U#X#q#{$Q$[$k$l$s$x%UU$f#m$h${R$z$eq!XZ]!T!m#S#U#X#q#{$Q$[$k$l$s$x%Up![Z]!T!m#S#U#X#q#{$Q$[$k$l$s$x%UQ!f^R#l!gT#^!Z#_Q|VR!yqQ!x|R#y!yQ!PWR!{rQ!RXR!|sQxUQ!wpQ#i!cQ#o!jQ#p!kQ$}$gR%Z$|SgPwQ!phQ#s!nR$n#tZfPhw!n#ta!b[`a!V!^!`#d#eR#b!^R!g^R!i_R#n!iS$g#m$hR%X${V$e#m$h${Q!rjR#w!rQdOShPwU!ldh#tR#t!nQ$Q#SU$r$Q$x%UQ$x$[R%U$sQ#_!ZR$Y#_Q$t$QR%V$tQpUS!vp$pR$p#}Q$l#qR%R$lQ!ogS#u!o#vR#v!pQ#f!_R$`#fQ$h#mR%O$hQ$|$gR%Y$|_cOPdhw!n#t^UOPdhw!n#tQ!uoQ!}tQ#OuQ#PvQ#}#RR$a#hR$R#SQ!VZQ!d]Q#V!TQ#q!m[$P#S$Q$[$s$x%UQ$S#UQ$U#XS$j#q$lQ$o#{R%Q$kR$O#RQiPR#QwQ!c[Q!kaR#Y!VU!_[a!VQ!j`Q#c!^Q#g!`Q$^#dR$_#e",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName , PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",maxTerm:117,nodeProps:[["isolate",-2,3,24,""],["openedBy",17,"(",32,"[",50,"{"],["closedBy",18,")",33,"]",51,"}"]],propSources:[QJe],skippedNodes:[0,3,87],repeatNodeCount:11,tokenData:"J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d#R#T$}#T#UGT#U#c$}#c#dHf#d#o$}#o#pH{#p#q6d#q#rI^#r#sIo#s#y$}#y#z%u#z$f$}$f$g%u$g#BY$}#BY#BZ%u#BZ$IS$}$IS$I_%u$I_$I|$}$I|$JO%u$JO$JT$}$JT$JU%u$JU$KV$}$KV$KW%u$KW&FU$}&FU&FV%u&FV;'S$};'S;=`JW<%lO$}`%QSOy%^z;'S%^;'S;=`%o<%lO%^`%cSo`Oy%^z;'S%^;'S;=`%o<%lO%^`%rP;=`<%l%^~%zh#Z~OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^~'mh#Z~o`OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f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,get:t=>zJe[t]||-1}],tokenPrec:1219});let P7=null;function A7(){if(!P7&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let r in t)r!="cssText"&&r!="cssFloat"&&typeof t[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(e.push(r),n.add(r)));P7=e.sort().map(r=>({type:"property",label:r}))}return P7||[]}const Cq=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),Eq=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),WJe=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),VJe=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),ac=/^(\w[\w-]*|-\w[\w-]*|)$/,UJe=/^-(-[\w-]*)?$/;function qJe(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let r=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const Tq=new SI,XJe=["Declaration"];function HJe(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function Rue(t,e,n){if(e.to-e.from>4096){let r=Tq.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(An.IncludeAnonymous);if(o.firstChild())do for(let a of Rue(t,o.node,n))s.has(a.label)||(s.add(a.label),i.push(a));while(o.nextSibling());return Tq.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(XJe)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);i.has(a)||(i.add(a),r.push({label:a,type:"variable"}))}}),r}}const ZJe=t=>e=>{let{state:n,pos:r}=e,i=Dn(n).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:A7(),validFor:ac};if(i.name=="ValueName")return{from:i.from,options:Eq,validFor:ac};if(i.name=="PseudoClassName")return{from:i.from,options:Cq,validFor:ac};if(t(i)||(e.explicit||s)&&qJe(i,n.doc))return{from:t(i)||s?i.from:r,options:Rue(n.doc,HJe(i),t),validFor:UJe};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:A7(),validFor:ac};return{from:i.from,options:WJe,validFor:ac}}if(i.name=="AtKeyword")return{from:i.from,options:VJe,validFor:ac};if(!e.explicit)return null;let o=i.resolve(r),a=o.childBefore(r);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:Cq,validFor:ac}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:Eq,validFor:ac}:o.name=="Block"||o.name=="Styles"?{from:r,options:A7(),validFor:ac}:null},YJe=ZJe(t=>t.name=="VariableName"),l4=Rl.define({name:"css",parser:FJe.configure({props:[Zf.add({Declaration:Ep()}),uu.add({"Block KeyframeList":qy})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function GJe(){return new Af(l4,l4.data.of({autocomplete:YJe}))}const t1=["_blank","_self","_top","_parent"],R7=["ascii","utf-8","utf-16","latin1","latin1"],$7=["get","post","put","delete"],M7=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Zs=["true","false"],pt={},KJe={a:{attrs:{href:null,ping:null,type:null,media:null,target:t1,hreflang:null}},abbr:pt,address:pt,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:pt,aside:pt,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:pt,base:{attrs:{href:null,target:t1}},bdi:pt,bdo:pt,blockquote:{attrs:{cite:null}},body:pt,br:pt,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:M7,formmethod:$7,formnovalidate:["novalidate"],formtarget:t1,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:pt,center:pt,cite:pt,code:pt,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:pt,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:pt,div:pt,dl:pt,dt:pt,em:pt,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:pt,figure:pt,footer:pt,form:{attrs:{action:null,name:null,"accept-charset":R7,autocomplete:["on","off"],enctype:M7,method:$7,novalidate:["novalidate"],target:t1}},h1:pt,h2:pt,h3:pt,h4:pt,h5:pt,h6:pt,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:pt,hgroup:pt,hr:pt,html:{attrs:{manifest:null}},i:pt,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:M7,formmethod:$7,formnovalidate:["novalidate"],formtarget:t1,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:pt,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:pt,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:pt,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:R7,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:pt,noscript:pt,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:pt,param:{attrs:{name:null,value:null}},pre:pt,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:pt,rt:pt,ruby:pt,samp:pt,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:R7}},section:pt,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:pt,source:{attrs:{src:null,type:null,media:null}},span:pt,strong:pt,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:pt,summary:pt,sup:pt,table:pt,tbody:pt,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:pt,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:pt,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:pt,time:{attrs:{datetime:null}},title:pt,tr:pt,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:pt,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:pt},$ue={accesskey:null,class:null,contenteditable:Zs,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Zs,autocorrect:Zs,autocapitalize:Zs,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Zs,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Zs,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Zs,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Zs,"aria-hidden":Zs,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Zs,"aria-multiselectable":Zs,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Zs,"aria-relevant":null,"aria-required":Zs,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Mue="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of Mue)$ue[t]=null;let AO=class{constructor(e,n){this.tags=Object.assign(Object.assign({},KJe),e),this.globalAttrs=Object.assign(Object.assign({},$ue),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};AO.default=new AO;function Om(t,e,n=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function ym(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function Iue(t,e,n){let r=n.tags[Om(t,ym(e))];return(r==null?void 0:r.children)||n.allTags}function iD(t,e){let n=[];for(let r=ym(e);r&&!r.type.isTop;r=ym(r.parent)){let i=Om(t,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&n.push(i)}return n}const Due=/^[:\-\.\w\u00b7-\uffff]*$/;function Pq(t,e,n,r,i){let s=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",o=ym(n,!0);return{from:r,to:i,options:Iue(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(iD(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Aq(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:iD(t.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:Due}}function JJe(t,e,n,r){let i=[],s=0;for(let o of Iue(t.doc,n,e))i.push({label:"<"+o,type:"type"});for(let o of iD(t.doc,n))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function eet(t,e,n,r,i){let s=ym(n),o=s?e.tags[Om(t.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:l.map(c=>({label:c,type:"property"})),validFor:Due}}function tet(t,e,n,r,i){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let c=t.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let f=ym(n),h=f?e.tags[Om(t.doc,f)]:null;u=(h==null?void 0:h.attrs)&&h.attrs[c]}if(u){let f=t.sliceDoc(r,i).toLowerCase(),h='"',d='"';/^['"]/.test(f)?(l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",d=t.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):l=/^[^\s<>='"]*$/;for(let p of u)a.push({label:p,apply:h+p+d,type:"constant"})}}return{from:r,to:i,options:a,validFor:l}}function Lue(t,e){let{state:n,pos:r}=e,i=Dn(n).resolveInner(r,-1),s=i.resolve(r);for(let o=r,a;s==i&&(a=i.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=i=a,o=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?Aq(n,i,i.from,r):Pq(n,t,i,i.from,r):i.name=="StartTag"?Pq(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?Aq(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?eet(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?tet(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?JJe(n,t,i,r):null}function net(t){return Lue(AO.default,t)}function ret(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new AO(e,n):AO.default;return i=>Lue(r,i)}const iet=Ca.parser.configure({top:"SingleExpression"}),Nue=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:Fce.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:Wce.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:Vce.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:iet},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Ca.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:l4.parser}],Que=[{name:"style",parser:l4.parser.configure({top:"Styles"})}].concat(Mue.map(t=>({name:t,parser:Ca.parser}))),jue=Rl.define({name:"html",parser:wJe.configure({props:[Zf.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let r=t.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),uu.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),cle.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),JS=jue.configure({wrap:Eue(Nue,Que)});function set(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=Eue((t.nestedLanguages||[]).concat(Nue),(t.nestedAttributes||[]).concat(Que)));let r=n?jue.configure({wrap:n,dialect:e}):e?JS.configure({dialect:e}):JS;return new Af(r,[JS.data.of({autocomplete:ret(t)}),t.autoCloseTags!==!1?oet:[],Xce().support,GJe().support])}const Rq=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),oet=Je.inputHandler.of((t,e,n,r,i)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!JS.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c,u,f;let h=o.doc.sliceString(l.from-1,l.to)==r,{head:d}=l,p=Dn(o).resolveInner(d,-1),g;if(h&&r==">"&&p.name=="EndTag"){let m=p.parent;if(((u=(c=m.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(g=Om(o.doc,m.parent,d))&&!Rq.has(g)){let v=d+(o.doc.sliceString(d,d+1)===">"?1:0),y=`</${g}>`;return{range:l,changes:{from:d,to:v,insert:y}}}}else if(h&&r=="/"&&p.name=="IncompleteCloseTag"){let m=p.parent;if(p.from==d-2&&((f=m.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(g=Om(o.doc,m,d))&&!Rq.has(g)){let v=d+(o.doc.sliceString(d,d+1)===">"?1:0),y=`${g}>`;return{range:Pe.cursor(d+y.length,-1),changes:{from:d,to:v,insert:y}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Bue=kI({commentTokens:{block:{open:"<!--",close:"-->"}}}),zue=new Et,Fue=kKe.configure({props:[uu.add(t=>!t.is("Block")||t.is("Document")||fA(t)!=null||aet(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),zue.add(fA),Zf.add({Document:()=>null}),Gh.add({Document:Bue})]});function fA(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function aet(t){return t.name=="OrderedList"||t.name=="BulletList"}function cet(t,e){let n=t;for(;;){let r=n.nextSibling,i;if(!r||(i=fA(r.type))!=null&&i<=e)break;n=r}return n.to}const uet=Kae.of((t,e,n)=>{for(let r=Dn(t).resolveInner(n,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(zue);if(i==null)continue;let s=cet(r,i);if(s>n)return{from:n,to:s}}return null});function sD(t){return new jo(Bue,t,[uet],"markdown")}const fet=sD(Fue),het=Fue.configure([LKe,QKe,NKe,jKe,{props:[uu.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Wue=sD(het);function det(t,e){return n=>{if(n&&t){let r=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?r=t(n):r=z_.matchLanguageName(t,n,!0),r instanceof z_)return r.support?r.support.language.parser:xO.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}let ww=class{constructor(e,n,r,i,s,o,a){this.node=e,this.from=n,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=a}blank(e,n=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(n?this.spaceAfter:"")}}marker(e,n){let r=this.node.name=="OrderedList"?String(+Uue(this.item,e)[2]+n):"";return this.spaceBefore+r+this.type+this.spaceAfter}};function Vue(t,e){let n=[];for(let i=t;i;i=i.parent)(i.name=="ListItem"||i.name=="Blockquote"||i.name=="FencedCode")&&n.push(i);let r=[];for(let i=n.length-1;i>=0;i--){let s=n[i],o,a=e.lineAt(s.from),l=s.from-a.from;if(s.name=="FencedCode")r.push(new ww(s,l,l,"","","",null));else if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))r.push(new ww(s,l,l+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let c=o[3],u=o[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),r.push(new ww(s.parent,l,l+u,o[1],c,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let c=o[4],u=o[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),r.push(new ww(s.parent,l,l+u,o[1],c,f,s))}}return r}function Uue(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function I7(t,e,n,r=0){for(let i=-1,s=t;;){if(s.name=="ListItem"){let a=Uue(s,e),l=+a[2];if(i>=0){if(l!=i+1)return;n.push({from:s.from+a[1].length,to:s.from+a[0].length,insert:String(i+2+r)})}i=l}let o=s.nextSibling;if(!o)break;s=o}}function oD(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(ag)!=" ")return t;let r=Ia(t,4,n),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+t.slice(n)}const pet=({state:t,dispatch:e})=>{let n=Dn(t),{doc:r}=t,i=null,s=t.changeByRange(o=>{if(!o.empty||!Wue.isActiveAt(t,o.from,0))return i={range:o};let a=o.from,l=r.lineAt(a),c=Vue(n.resolveInner(a,-1),r);for(;c.length&&c[c.length-1].from>a-l.from;)c.pop();if(!c.length)return i={range:o};let u=c[c.length-1];if(u.to-u.spaceAfter.length>a-l.from)return i={range:o};let f=a>=u.to-u.spaceAfter.length&&!/\S/.test(l.text.slice(u.to));if(u.item&&f){let m=u.node.firstChild,v=u.node.getChild("ListItem","ListItem");if(m.to>=a||v&&v.to<a||l.from>0&&!/[^\s>]/.test(r.lineAt(l.from-1).text)){let y=c.length>1?c[c.length-2]:null,b,S="";y&&y.item?(b=l.from+y.from,S=y.marker(r,1)):b=l.from+(y?y.to:0);let k=[{from:b,to:a,insert:S}];return u.node.name=="OrderedList"&&I7(u.item,r,k,-2),y&&y.node.name=="OrderedList"&&I7(y.item,r,k),{range:Pe.cursor(b+S.length),changes:k}}else{let y=Mq(c,t,l);return{range:Pe.cursor(a+y.length+1),changes:{from:l.from,insert:y+t.lineBreak}}}}if(u.node.name=="Blockquote"&&f&&l.from){let m=r.lineAt(l.from-1),v=/>\s*$/.exec(m.text);if(v&&v.index==u.from){let y=t.changes([{from:m.from+v.index,to:m.to},{from:l.from+u.from,to:l.to}]);return{range:o.map(y),changes:y}}}let h=[];u.node.name=="OrderedList"&&I7(u.item,r,h);let d=u.item&&u.item.from<l.from,p="";if(!d||/^[\s\d.)\-+*>]*/.exec(l.text)[0].length>=u.to)for(let m=0,v=c.length-1;m<=v;m++)p+=m==v&&!d?c[m].marker(r,1):c[m].blank(m<v?Ia(l.text,4,c[m+1].from)-p.length:null);let g=a;for(;g>l.from&&/\s/.test(l.text.charAt(g-l.from-1));)g--;return p=oD(p,t),met(u.node,t.doc)&&(p=Mq(c,t,l)+t.lineBreak+p),h.push({from:g,to:a,insert:t.lineBreak+p}),{range:Pe.cursor(g+p.length+1),changes:h}});return i?!1:(e(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0)};function $q(t){return t.name=="QuoteMark"||t.name=="ListMark"}function met(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,r=t.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(n.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function Mq(t,e,n){let r="";for(let i=0,s=t.length-2;i<=s;i++)r+=t[i].blank(i<s?Ia(n.text,4,t[i+1].from)-r.length:null,i<s);return oD(r,e)}function get(t,e){let n=t.resolveInner(e,-1),r=e;$q(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if($q(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}const vet=({state:t,dispatch:e})=>{let n=Dn(t),r=null,i=t.changeByRange(s=>{let o=s.from,{doc:a}=t;if(s.empty&&Wue.isActiveAt(t,s.from)){let l=a.lineAt(o),c=Vue(get(n,o),a);if(c.length){let u=c[c.length-1],f=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(o-l.from>f&&!/\S/.test(l.text.slice(f,o-l.from)))return{range:Pe.cursor(l.from+f),changes:{from:l.from+f,to:o}};if(o-l.from==f&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let h=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let d=u.blank(Ia(l.text,4,u.to)-Ia(l.text,4,u.from));return h==l.from&&(d=oD(d,t)),{range:Pe.cursor(h+d.length),changes:{from:h,to:l.from+u.to,insert:d}}}if(h<o)return{range:Pe.cursor(h),changes:{from:h,to:o}}}}}return r={range:s}});return r?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},Oet=[{key:"Enter",run:pet},{key:"Backspace",run:vet}],que=set({matchClosingTags:!1});function yet(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=fet,completeHTMLTags:s=!0,htmlTagLanguage:o=que}=t;if(!(i instanceof B3))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let a=t.extensions?[t.extensions]:[],l=[o.support],c;n instanceof Af?(l.push(n.support),c=n.language):n&&(c=n);let u=e||c?det(e,c):void 0;a.push(EKe({codeParser:u,htmlParser:o.language.parser})),r&&l.push(Ql.high(Xd.of(Oet)));let f=sD(i.configure(a));return s&&l.push(f.data.of({autocomplete:bet})),new Af(f,l)}function bet(t){let{state:e,pos:n}=t,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!r)return null;let i=Dn(e).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:n-r[0].length,to:n,options:xet(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let D7=null;function xet(){if(D7)return D7;let t=net(new VI(zt.create({extensions:que}),0,!0));return D7=t?t.options:[]}const wet=1,Xue=194,Hue=195,_et=196,Iq=197,ket=198,Cet=199,Eet=200,Tet=2,Zue=3,Dq=201,Pet=24,Aet=25,Ret=49,$et=50,Met=55,Iet=56,Det=57,Let=59,Net=60,Qet=61,jet=62,Bet=63,zet=65,Fet=238,Wet=71,Vet=241,Uet=242,qet=243,Xet=244,Het=245,Zet=246,Yet=247,Get=248,Yue=72,Ket=249,Jet=250,ett=251,ttt=252,ntt=253,rtt=254,itt=255,stt=256,ott=73,att=77,ltt=264,ctt=112,utt=130,ftt=151,htt=152,dtt=155,Sd=10,RO=13,aD=32,z3=9,lD=35,ptt=40,mtt=46,hA=123,Lq=125,Gue=39,Kue=34,gtt=92,vtt=111,Ott=120,ytt=78,btt=117,xtt=85,wtt=new Set([Aet,Ret,$et,ltt,zet,utt,Iet,Det,Fet,jet,Bet,Yue,ott,att,Net,Qet,ftt,htt,dtt,ctt]);function L7(t){return t==Sd||t==RO}function N7(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}const Stt=new ri((t,e)=>{let n;if(t.next<0)t.acceptToken(Cet);else if(e.context.flags&e2)L7(t.next)&&t.acceptToken(ket,1);else if(((n=t.peek(-1))<0||L7(n))&&e.canShift(Iq)){let r=0;for(;t.next==aD||t.next==z3;)t.advance(),r++;(t.next==Sd||t.next==RO||t.next==lD)&&t.acceptToken(Iq,-r)}else L7(t.next)&&t.acceptToken(_et,1)},{contextual:!0}),_tt=new ri((t,e)=>{let n=e.context;if(n.flags)return;let r=t.peek(-1);if(r==Sd||r==RO){let i=0,s=0;for(;;){if(t.next==aD)i++;else if(t.next==z3)i+=8-i%8;else break;t.advance(),s++}i!=n.indent&&t.next!=Sd&&t.next!=RO&&t.next!=lD&&(i<n.indent?t.acceptToken(Hue,-s):t.acceptToken(Xue))}}),e2=1,Jue=2,fc=4,hc=8,dc=16,pc=32;function t2(t,e,n){this.parent=t,this.indent=e,this.flags=n,this.hash=(t?t.hash+t.hash<<8:0)+e+(e<<4)+n+(n<<6)}const ktt=new t2(null,0,0);function Ctt(t){let e=0;for(let n=0;n<t.length;n++)e+=t.charCodeAt(n)==z3?8-e%8:1;return e}const Nq=new Map([[Vet,0],[Uet,fc],[qet,hc],[Xet,hc|fc],[Het,dc],[Zet,dc|fc],[Yet,dc|hc],[Get,dc|hc|fc],[Ket,pc],[Jet,pc|fc],[ett,pc|hc],[ttt,pc|hc|fc],[ntt,pc|dc],[rtt,pc|dc|fc],[itt,pc|dc|hc],[stt,pc|dc|hc|fc]].map(([t,e])=>[t,e|Jue])),Ett=new j3({start:ktt,reduce(t,e,n,r){return t.flags&e2&&wtt.has(e)||(e==Wet||e==Yue)&&t.flags&Jue?t.parent:t},shift(t,e,n,r){return e==Xue?new t2(t,Ctt(r.read(r.pos,n.pos)),0):e==Hue?t.parent:e==Pet||e==Met||e==Let||e==Zue?new t2(t,0,e2):Nq.has(e)?new t2(t,0,Nq.get(e)|t.flags&e2):t},hash(t){return t.hash}}),Ttt=new ri(t=>{for(let e=0;e<5;e++){if(t.next!="print".charCodeAt(e))return;t.advance()}if(!/\w/.test(String.fromCharCode(t.next)))for(let e=0;;e++){let n=t.peek(e);if(!(n==aD||n==z3)){n!=ptt&&n!=mtt&&n!=Sd&&n!=RO&&n!=lD&&t.acceptToken(wet);return}}}),Ptt=new ri((t,e)=>{let{flags:n}=e.context,r=n&fc?Kue:Gue,i=(n&hc)>0,s=!(n&dc),o=(n&pc)>0,a=t.pos;for(;!(t.next<0);)if(o&&t.next==hA)if(t.peek(1)==hA)t.advance(2);else{if(t.pos==a){t.acceptToken(Zue,1);return}break}else if(s&&t.next==gtt){if(t.pos==a){t.advance();let l=t.next;l>=0&&(t.advance(),Att(t,l)),t.acceptToken(Tet);return}break}else if(t.next==r&&(!i||t.peek(1)==r&&t.peek(2)==r)){if(t.pos==a){t.acceptToken(Dq,i?3:1);return}break}else if(t.next==Sd){if(i)t.advance();else if(t.pos==a){t.acceptToken(Dq);return}break}else t.advance();t.pos>a&&t.acceptToken(Eet)});function Att(t,e){if(e==vtt)for(let n=0;n<2&&t.next>=48&&t.next<=55;n++)t.advance();else if(e==Ott)for(let n=0;n<2&&N7(t.next);n++)t.advance();else if(e==btt)for(let n=0;n<4&&N7(t.next);n++)t.advance();else if(e==xtt)for(let n=0;n<8&&N7(t.next);n++)t.advance();else if(e==ytt&&t.next==hA){for(t.advance();t.next>=0&&t.next!=Lq&&t.next!=Gue&&t.next!=Kue&&t.next!=Sd;)t.advance();t.next==Lq&&t.advance()}}const Rtt=Fl({'async "*" "**" FormatConversion FormatSpec':W.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":W.controlKeyword,"in not and or is del":W.operatorKeyword,"from def class global nonlocal lambda":W.definitionKeyword,import:W.moduleKeyword,"with as print":W.keyword,Boolean:W.bool,None:W.null,VariableName:W.variableName,"CallExpression/VariableName":W.function(W.variableName),"FunctionDefinition/VariableName":W.function(W.definition(W.variableName)),"ClassDefinition/VariableName":W.definition(W.className),PropertyName:W.propertyName,"CallExpression/MemberExpression/PropertyName":W.function(W.propertyName),Comment:W.lineComment,Number:W.number,String:W.string,FormatString:W.special(W.string),Escape:W.escape,UpdateOp:W.updateOperator,"ArithOp!":W.arithmeticOperator,BitOp:W.bitwiseOperator,CompareOp:W.compareOperator,AssignOp:W.definitionOperator,Ellipsis:W.punctuation,At:W.meta,"( )":W.paren,"[ ]":W.squareBracket,"{ }":W.brace,".":W.derefOperator,", ;":W.separator}),$tt={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},Mtt=$l.deserialize({version:14,states:"##pO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO1XQdO'#EfO3rQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO3}QdO'#EyO4UQdO'#FOO4aQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4fQdO'#F[P4mOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO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nT+R(f+TQ$^}Q&e$QQ)g&zR+s)hQ#khQ$VzQ$Y{R&m$XQ(|&lR+a)PQ(|&lQ+`)OR+a)PR$[|R)Z&rXlOn)l+wQ$d!RR&{$eQ$k!UR&|$fR*P'YQ)}'YV-b,W-c.SQ.c-gQ/Q.]R/R.^U.[-g.].^Q/V.`Q/c.uQ/h.{U/j.}/k/zQ/o/SQ/}/pQ0P/uU0R/v0T0]Q0^0VQ0b0[R0c0_R/U._R/e.u",nodeNames:"⚠ print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:277,context:Ett,nodeProps:[["isolate",-5,4,71,72,73,77,""],["group",-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,"Statement Statement",-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,"Expression",-10,114,116,119,121,122,126,128,133,135,138,"Statement",-9,143,144,147,148,150,151,152,153,154,"Pattern"],["openedBy",23,"(",54,"[",58,"{"],["closedBy",24,")",55,"]",59,"}"]],propSources:[Rtt],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tuv,dvw-hwx.Uxy/tyz0[z{0r{|2S|}2p}!O3W!O!P4_!P!Q:Z!Q!R;k!R![>_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&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`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[Ttt,_tt,Stt,Ptt,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:t=>$tt[t]||-1}],tokenPrec:7646}),Qq=new SI,efe=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function Sw(t){return(e,n,r)=>{if(r)return!1;let i=e.node.getChild("VariableName");return i&&n(i,t),!0}}const Itt={FunctionDefinition:Sw("function"),ClassDefinition:Sw("class"),ForStatement(t,e,n){if(n){for(let r=t.node.firstChild;r;r=r.nextSibling)if(r.name=="VariableName")e(r,"variable");else if(r.name=="in")break}},ImportStatement(t,e){var n,r;let{node:i}=t,s=((n=i.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let o=i.getChild("import");o;o=o.nextSibling)o.name=="VariableName"&&((r=o.nextSibling)===null||r===void 0?void 0:r.name)!="as"&&e(o,s?"variable":"namespace")},AssignStatement(t,e){for(let n=t.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")e(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(t,e){for(let n=null,r=t.node.firstChild;r;r=r.nextSibling)r.name=="VariableName"&&(!n||!/\*|AssignOp/.test(n.name))&&e(r,"variable"),n=r},CapturePattern:Sw("variable"),AsPattern:Sw("variable"),__proto__:null};function tfe(t,e){let n=Qq.get(e);if(n)return n;let r=[],i=!0;function s(o,a){let l=t.sliceString(o.from,o.to);r.push({label:l,type:a})}return e.cursor(An.IncludeAnonymous).iterate(o=>{if(o.name){let a=Itt[o.name];if(a&&a(o,s,i)||!i&&efe.has(o.name))return!1;i=!1}else if(o.to-o.from>8192){for(let a of tfe(t,o.node))r.push(a);return!1}}),Qq.set(e,r),r}const jq=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,nfe=["String","FormatString","Comment","PropertyName"];function Dtt(t){let e=Dn(t.state).resolveInner(t.pos,-1);if(nfe.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&jq.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)efe.has(i.name)&&(r=r.concat(tfe(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:jq}}const Ltt=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(t=>({label:t,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(t=>({label:t,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(t=>({label:t,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(t=>({label:t,type:"function"}))),Ntt=[ur("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),ur("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),ur("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),ur("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),ur(`if \${}:
|
343
343
|
|
344
|
-
`,{label:"if",detail:"block",type:"keyword"}),ur("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),ur("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),ur("import ${module}",{label:"import",detail:"statement",type:"keyword"}),ur("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],Qtt=vce(nfe,UI(Ltt.concat(Ntt)));function Bq(t,e){let n=t.baseIndentFor(e),r=t.lineAt(t.pos,-1),i=r.from+r.text.length;return/^\s*($|#)/.test(r.text)&&t.node.to<i+100&&!/\S/.test(t.state.sliceDoc(i,t.node.to))&&t.lineIndent(t.pos,-1)<=n||/^\s*(else:|elif |except |finally:)/.test(t.textAfter)&&t.lineIndent(t.pos,-1)>n?null:n+t.unit}const n2=Rl.define({name:"python",parser:Mtt.configure({props:[Zf.add({Body:t=>{var e;return(e=Bq(t,t.node))!==null&&e!==void 0?e:t.continue()},IfStatement:t=>/^\s*(else:|elif )/.test(t.textAfter)?t.baseIndent:t.continue(),TryStatement:t=>/^\s*(except |finally:|else:)/.test(t.textAfter)?t.baseIndent:t.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":Cp({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":Cp({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":Cp({closing:"]"}),"String FormatString":()=>null,Script:t=>{if(t.pos+/\s*/.exec(t.textAfter)[0].length>=t.node.to){let e=null;for(let n=t.node,r=n.to;n=n.lastChild,!(!n||n.to!=r);)n.type.name=="Body"&&(e=n);if(e){let n=Bq(t,e);if(n!=null)return n}}return t.continue()}}),uu.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":qy,Body:(t,e)=>({from:t.from+1,to:t.to-(t.to==e.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});function jtt(){return new Af(n2,[n2.data.of({autocomplete:Dtt}),n2.data.of({autocomplete:Qtt})])}const z0=63,zq=64,Btt=1,ztt=2,rfe=3,Ftt=4,ife=5,Wtt=6,Vtt=7,sfe=65,Utt=66,qtt=8,Xtt=9,Htt=10,Ztt=11,Ytt=12,ofe=13,Gtt=19,Ktt=20,Jtt=29,ent=33,tnt=34,nnt=47,rnt=0,cD=1,dA=2,$O=3,pA=4;class jh{constructor(e,n,r){this.parent=e,this.depth=n,this.type=r,this.hash=(e?e.hash+e.hash<<8:0)+n+(n<<4)+r}}jh.top=new jh(null,-1,rnt);function gv(t,e){for(let n=0,r=e-t.pos-1;;r--,n++){let i=t.peek(r);if(Jc(i)||i==-1)return n}}function mA(t){return t==32||t==9}function Jc(t){return t==10||t==13}function afe(t){return mA(t)||Jc(t)}function Jh(t){return t<0||afe(t)}const int=new j3({start:jh.top,reduce(t,e){return t.type==$O&&(e==Ktt||e==tnt)?t.parent:t},shift(t,e,n,r){if(e==rfe)return new jh(t,gv(r,r.pos),cD);if(e==sfe||e==ife)return new jh(t,gv(r,r.pos),dA);if(e==z0)return t.parent;if(e==Gtt||e==ent)return new jh(t,0,$O);if(e==ofe&&t.type==pA)return t.parent;if(e==nnt){let i=/[1-9]/.exec(r.read(r.pos,n.pos));if(i)return new jh(t,t.depth+ +i[0],pA)}return t},hash(t){return t.hash}});function bm(t,e,n=0){return t.peek(n)==e&&t.peek(n+1)==e&&t.peek(n+2)==e&&Jh(t.peek(n+3))}const snt=new ri((t,e)=>{if(t.next==-1&&e.canShift(zq))return t.acceptToken(zq);let n=t.peek(-1);if((Jc(n)||n<0)&&e.context.type!=$O){if(bm(t,45))if(e.canShift(z0))t.acceptToken(z0);else return t.acceptToken(Btt,3);if(bm(t,46))if(e.canShift(z0))t.acceptToken(z0);else return t.acceptToken(ztt,3);let r=0;for(;t.next==32;)r++,t.advance();(r<e.context.depth||r==e.context.depth&&e.context.type==cD&&(t.next!=45||!Jh(t.peek(1))))&&t.next!=-1&&!Jc(t.next)&&t.next!=35&&t.acceptToken(z0,-r)}},{contextual:!0}),ont=new ri((t,e)=>{if(e.context.type==$O){t.next==63&&(t.advance(),Jh(t.next)&&t.acceptToken(Vtt));return}if(t.next==45)t.advance(),Jh(t.next)&&t.acceptToken(e.context.type==cD&&e.context.depth==gv(t,t.pos-1)?Ftt:rfe);else if(t.next==63)t.advance(),Jh(t.next)&&t.acceptToken(e.context.type==dA&&e.context.depth==gv(t,t.pos-1)?Wtt:ife);else{let n=t.pos;for(;;)if(mA(t.next)){if(t.pos==n)return;t.advance()}else if(t.next==33)lfe(t);else if(t.next==38)gA(t);else if(t.next==42){gA(t);break}else if(t.next==39||t.next==34){if(uD(t,!0))break;return}else if(t.next==91||t.next==123){if(!lnt(t))return;break}else{cfe(t,!0,!1,0);break}for(;mA(t.next);)t.advance();if(t.next==58){if(t.pos==n&&e.canShift(Jtt))return;let r=t.peek(1);Jh(r)&&t.acceptTokenTo(e.context.type==dA&&e.context.depth==gv(t,n)?Utt:sfe,n)}}},{contextual:!0});function ant(t){return t>32&&t<127&&t!=34&&t!=37&&t!=44&&t!=60&&t!=62&&t!=92&&t!=94&&t!=96&&t!=123&&t!=124&&t!=125}function Fq(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function Wq(t,e){return t.next==37?(t.advance(),Fq(t.next)&&t.advance(),Fq(t.next)&&t.advance(),!0):ant(t.next)||e&&t.next==44?(t.advance(),!0):!1}function lfe(t){if(t.advance(),t.next==60){for(t.advance();;)if(!Wq(t,!0)){t.next==62&&t.advance();break}}else for(;Wq(t,!1););}function gA(t){for(t.advance();!Jh(t.next)&&c4(t.tag)!="f";)t.advance()}function uD(t,e){let n=t.next,r=!1,i=t.pos;for(t.advance();;){let s=t.next;if(s<0)break;if(t.advance(),s==n)if(s==39)if(t.next==39)t.advance();else break;else break;else if(s==92&&n==34)t.next>=0&&t.advance();else if(Jc(s)){if(e)return!1;r=!0}else if(e&&t.pos>=i+1024)return!1}return!r}function lnt(t){for(let e=[],n=t.pos+1024;;)if(t.next==91||t.next==123)e.push(t.next),t.advance();else if(t.next==39||t.next==34){if(!uD(t,!0))return!1}else if(t.next==93||t.next==125){if(e[e.length-1]!=t.next-2)return!1;if(e.pop(),t.advance(),!e.length)return!0}else{if(t.next<0||t.pos>n||Jc(t.next))return!1;t.advance()}}const cnt="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function c4(t){return t<33?"u":t>125?"s":cnt[t-33]}function Q7(t,e){let n=c4(t);return n!="u"&&!(e&&n=="f")}function cfe(t,e,n,r){if(c4(t.next)=="s"||(t.next==63||t.next==58||t.next==45)&&Q7(t.peek(1),n))t.advance();else return!1;let i=t.pos;for(;;){let s=t.next,o=0,a=r+1;for(;afe(s);){if(Jc(s)){if(e)return!1;a=0}else a++;s=t.peek(++o)}if(!(s>=0&&(s==58?Q7(t.peek(o+1),n):s==35?t.peek(o-1)!=32:Q7(s,n)))||!n&&a<=r||a==0&&!n&&(bm(t,45,o)||bm(t,46,o)))break;if(e&&c4(s)=="f")return!1;for(let c=o;c>=0;c--)t.advance();if(e&&t.pos>i+1024)return!1}return!0}const unt=new ri((t,e)=>{if(t.next==33)lfe(t),t.acceptToken(Ytt);else if(t.next==38||t.next==42){let n=t.next==38?Htt:Ztt;gA(t),t.acceptToken(n)}else t.next==39||t.next==34?(uD(t,!1),t.acceptToken(Xtt)):cfe(t,!1,e.context.type==$O,e.context.depth)&&t.acceptToken(qtt)}),fnt=new ri((t,e)=>{let n=e.context.type==pA?e.context.depth:-1,r=t.pos;e:for(;;){let i=0,s=t.next;for(;s==32;)s=t.peek(++i);if(!i&&(bm(t,45,i)||bm(t,46,i))||!Jc(s)&&(n<0&&(n=Math.max(e.context.depth+1,i)),i<n))break;for(;;){if(t.next<0)break e;let o=Jc(t.next);if(t.advance(),o)continue e;r=t.pos}}t.acceptTokenTo(ofe,r)}),hnt=Fl({DirectiveName:W.keyword,DirectiveContent:W.attributeValue,"DirectiveEnd DocEnd":W.meta,QuotedLiteral:W.string,BlockLiteralHeader:W.special(W.string),BlockLiteralContent:W.content,Literal:W.content,"Key/Literal Key/QuotedLiteral":W.definition(W.propertyName),"Anchor Alias":W.labelName,Tag:W.typeName,Comment:W.lineComment,": , -":W.separator,"?":W.punctuation,"[ ]":W.squareBracket,"{ }":W.brace}),dnt=$l.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOO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!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:int,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[hnt],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[snt,ont,unt,fnt,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),pnt=$l.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"⚠ Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),mnt=Rl.define({name:"yaml",parser:dnt.configure({props:[Zf.add({Stream:t=>{for(let e=t.node.resolve(t.pos,-1);e&&e.to>=t.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.from<e.to)return t.baseIndentFor(e);if(e.name=="BlockLiteral")return t.baseIndentFor(e)+t.unit;if(e.name=="BlockSequence"||e.name=="BlockMapping")return t.column(e.from,1);if(e.name=="QuotedLiteral")return null;if(e.name=="Literal"){let n=t.column(e.from,1);if(n==t.lineIndent(e.from,1))return n;if(e.to>t.pos)return null}}return null},FlowMapping:Cp({closing:"}"}),FlowSequence:Cp({closing:"]"})}),uu.add({"FlowMapping FlowSequence":qy,"BlockSequence Pair BlockLiteral":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function gnt(){return new Af(mnt)}W.meta;function F3({sectionId:t,language:e,completionsFn:n,keywordStylizer:r,singleLine:i,tabToAutocomplete:s,indentWithTab:o,onTab:a,onEscape:l,keyComboActions:c,isDisabled:u}){const f=[Je.lineWrapping,IUe({parent:document.getElementById(`${t}-CustomResizable`)})];return e==="python"?f.push(jtt()):e==="javascript"?f.push(Xce()):e==="yaml"?f.push(gnt()):e==="json"?f.push(hKe()):e==="markdown"&&f.push(yet()),n&&f.push(Pce({override:[n],tooltipClass:()=>"nowheel"})),r&&f.push(r),i&&f.push(zt.transactionFilter.of(h=>h.newDoc.lines>1?[]:h)),u&&f.push(zt.readOnly.of(!0)),f.push(Ql.highest(Xd.of(vnt({indentWithTab:o,tabToAutocomplete:s,onTab:a,onEscape:l,keyComboActions:c})))),f}function vnt({indentWithTab:t,tabToAutocomplete:e,onTab:n,onEscape:r,keyComboActions:i}){const s=Nt.getState(),o=[{key:Ax(s.shortcuts.undoShortcut),run:()=>(b$(),!0)},{key:Ax(s.shortcuts.redoShortcut),run:()=>(x$(),!0)},{key:Ax(s.shortcuts.runCodeShortcut),run:()=>!0},{key:Ax(s.shortcuts.runAllCodeShortcut),run:()=>!0},{key:"Escape",run:a=>{if(r){const l=QU(a.state);r(l)}}}];if(t&&o.push({key:"Shift-Tab",preventDefault:!0,stopPropagation:!0,run:a=>{jI(a)}}),(e||t)&&o.push({key:"Tab",preventDefault:!1,stopPropagation:!0,run:a=>{let l=!1;return e&&QU(a.state)==="active"?l=wce(a):t&&QI(a),n&&n(l),t||l}}),i)for(const[a,l]of Object.entries(i))o.push({key:a,run:l});return o}const Ont=ht.mark({class:"italic"});function ufe(t){return Sr.fromClass(class{constructor(){Le(this,"decorations");Le(this,"positions");this.positions=[...t],this.decorations=this.buildDecorations()}update(n){n.docChanged&&(n.changes.iterChanges((r,i,s,o)=>{const a=o-s-(i-r);this.positions=this.positions.map(l=>l.startPos>r?{...l,startPos:l.startPos+a}:l)}),this.decorations=this.buildDecorations())}buildDecorations(){const n=new Al;for(const r of this.positions)n.add(r.startPos,r.startPos+r.keyword.length,Ont);return n.finish()}},{decorations:n=>n.decorations})}function ffe({category:t,id:e,delay:n=200}){const r=setTimeout(()=>{a_.setState(i=>{i[t][e]=!0})},n);return()=>{clearTimeout(r),a_.setState(i=>{i[t][e]=!1})}}function ynt({sectionId:t,paramInfoId:e}){const n=hfe({sectionId:t,paramInfoId:e});return ffe({category:"textFields",id:n})}function bnt(t){return ffe({category:"parametersRequest",id:t,delay:0})}function hfe({sectionId:t,paramInfoId:e}){return`${t}-${e}`}function xnt(t,e,n){!e&&n&&document.querySelectorAll(`#${t} .cm-cursor`).forEach(i=>{i.style.height=`${14*qe.getState().transform[2]}px`})}function wnt({evRefs:t,initialEvent:e,setRealIsInitialized:n,divId:r,value:i,defaultVal:s}){return o=>{if(o.focus(),e!=="tab"){const{clientX:a,clientY:l}=e,c=o.posAtCoords({x:a,y:l});o.dispatch({selection:{anchor:c,head:c}})}xnt(r,i,s),n(!0)}}function Snt(t,e,n){for(const r of t)if(r.from)return{from:r.from,to:r.to};return{from:e?e.from:n.pos}}function dfe(t,e,n,r){return r==="python"?async i=>{const s=i.state.doc.toString();if(!s.trim())return null;const o=i.matchBefore(/([^.=\\(+-\/ ]*)$/),a=ynt({sectionId:t,paramInfoId:e}),l=await n({sectionId:t,paramInfoId:e,fullText:s,position:i.pos,codeLanguage:r});return a(),l.data?{filter:!0,...Snt(l.data,o,i),options:l.data}:null}:()=>null}function _nt({editor:t,event:e,variable:n}){const{sectionId:r}=Dd.getState().fullNameToInfo[n];r&&(e.stopPropagation(),t&&t.contentDOM.blur(),rg(r))}function knt({sectionId:t}){const e=te(n=>n.x[t].codeLanguage);switch(e){case"python":return x.jsx(Ent,{sectionId:t,language:e});case"bash":return x.jsx(Tnt,{sectionId:t,language:e});case"javascript":return x.jsx(Pnt,{sectionId:t,language:e})}}const Cnt=ke.memo(knt);function Ent({sectionId:t,language:e}){const n=te(s=>Ll(t,s).evRefs,ae.isEqual),r=_.useMemo(()=>ufe(n),[JSON.stringify(n)]),i=_.useCallback(dfe(t,null,VNe,e),[t]);return x.jsx(fD,{sectionId:t,language:e,completionsFn:i,keywordStylizer:r})}function Tnt({sectionId:t,language:e}){return x.jsx(fD,{sectionId:t,language:e})}function Pnt({sectionId:t,language:e}){return x.jsx(fD,{sectionId:t,language:e})}function fD({sectionId:t,language:e,completionsFn:n,keywordStylizer:r}){const{value:i,variantIsFrozen:s}=te(S=>({value:Ll(t,S).code,variantIsFrozen:Yt(t).isFrozen}),ae.isEqual),{wrapperRef:o,handleCreateEditor:a,maxHeight:l,overflow:c,nowheel:u}=hD({sectionId:t}),f=R3(),[h,d]=_.useState(i),p=_.useRef();_.useEffect(()=>{i!==h&&d(i)},[i]);function g(S){var k;(k=p.current)==null||k.abort(),d(S),Ant(t,S,p)}function m(){Bie(t)}const{onArticleDivEnterKeyFocusOnCodeMirror:v,onEscapeFocusOnArticleDiv:y}=dD(o),b=F3({sectionId:t,language:e,completionsFn:n,keywordStylizer:r,onEscape:y,tabToAutocomplete:!0,indentWithTab:!0,isDisabled:s});return x.jsx("article",{ref:o,className:`${Cl} nodrag section-full-no-title cursor-auto rounded-lg focus:bg-blue-200/70 focus:outline-none dark:focus:bg-blue-950/70 [&_*]:!outline-0 [&_.cm-activeLineGutter]:focus:!bg-transparent [&_.cm-activeLine]:focus:!bg-transparent [&_.cm-gutters]:focus:!bg-transparent ${c} ${u}`,tabIndex:"0",onKeyDown:v,children:x.jsx(Ky,{maxHeight:l,value:h,theme:f,extensions:b,onMouseDown:m,onChange:g,onCreateEditor:a,indentWithTab:!1,basicSetup:{tabSize:4}})})}function hD({sectionId:t}){var m,v;const{resizeEvent:e,height:n}=te(y=>({resizeEvent:y.x[t].resizeEvent,height:y.x[t].size.height}),ae.isEqual),r=_.useRef(null),i=_.useRef(null),s=_.useRef(null),[o,a]=_.useState(""),l=qe(J$),[c,u]=_.useState(!1),f=_.useCallback(y=>{i.current=y;const b=new ResizeObserver(([S])=>{c||(Ut.setState(k=>{const E=k.numInitializedCodeAreas+1;return{numInitializedCodeAreas:E,requestUpdateNodeDimensions:E===k.numDisplayedCodeAreas}}),te.setState(k=>{const E=k.x[t];E.tempSavedSize&&(E.size=E.tempSavedSize,delete E.tempSavedSize)}),u(!0)),a(S.target.scrollHeight>S.target.clientHeight?"nowheel":"")});b.observe(i.current.scrollDOM),s.current=b},[]);_.useEffect(()=>(Ut.setState(y=>({numDisplayedCodeAreas:y.numDisplayedCodeAreas+1})),()=>{s.current&&s.current.disconnect(),Ut.setState(y=>{const b={numDisplayedCodeAreas:Math.max(0,y.numDisplayedCodeAreas-1)};return c&&(b.numInitializedCodeAreas=Math.max(0,y.numInitializedCodeAreas-1)),b})}),[]),_.useEffect(()=>{l&&i.current&&i.current.requestMeasure()},[l]);const h=n==="auto"||e==="start"?void 0:`${n-30}px`,d=e==="start"?"overflow-y-auto":"",p=(m=i.current)==null?void 0:m.scrollDOM.scrollTop,g=(v=r.current)==null?void 0:v.scrollTop;return _.useEffect(()=>{r.current&&e==="start"?r.current.scrollTop=p:i.current&&e==="end"&&(i.current.scrollDOM.scrollTop=g)},[e]),{wrapperRef:r,handleCreateEditor:f,maxHeight:h,overflow:d,nowheel:o}}function dD(t){function e(r){if(r.code==="Enter"){const i=r.target.querySelector("[contenteditable]");i&&i.focus({preventScroll:!0})}}function n(r){r||requestAnimationFrame(()=>{t.current.focus({preventScroll:!0})})}return{onArticleDivEnterKeyFocusOnCodeMirror:e,onEscapeFocusOnArticleDiv:n}}const Ant=by(async(t,e,n)=>{const r=new AbortController;if(n.current=r,r.signal.aborted)return;const{templateVars:i,evRefs:s}=await qNe(t,e);r.signal.aborted||(te.setState(o=>{const a=Yt(t,o);a.code=e,a.evRefs=s,a.templateVars=i}),hn(!0))},50);function Rnt({sectionId:t}){const e=_.useRef();return x.jsx(pfe,{sectionId:t,wrapperClassName:"cursor-auto overflow-y-scroll [&_*]:!outline-0",ref:e})}function $nt({sectionId:t}){const{wrapperRef:e,handleCreateEditor:n,maxHeight:r,overflow:i,nowheel:s}=hD({sectionId:t});return x.jsx(pfe,{sectionId:t,onCreateEditor:n,maxHeight:r,ref:e,wrapperClassName:`${Cl} nodrag section-full-no-title cursor-auto [&_*]:!outline-0 ${i} ${s}`})}const Mnt=ke.forwardRef(({sectionId:t,maxHeight:e,onCreateEditor:n,wrapperClassName:r},i)=>{const{renderMarkdown:s,description:o,variantIsFrozen:a}=Fte(t),[l,c]=_.useState(o);_.useEffect(()=>{o!==l&&c(o)},[o]);const u=_.useCallback(ae.debounce((m,v,y)=>{v!==y&&(te.setState(b=>{Yt(m,b).description=v,b.x[m].name=Int(v)??Nt.getState().sections[Y.INFO].name}),hn(!0))},200),[]);function f(m){c(m),u(t,m,o)}const{onArticleDivEnterKeyFocusOnCodeMirror:h,onEscapeFocusOnArticleDiv:d}=dD(i),p=R3(),g=F3({sectionId:t,language:s?"markdown":null,tabToAutocomplete:!0,indentWithTab:!0,isDisabled:a,onEscape:d});return x.jsx("article",{ref:i,className:r,onKeyDown:h,tabIndex:"0",children:x.jsx(Ky,{maxHeight:e,value:o,theme:p,extensions:g,onChange:f,onCreateEditor:n,indentWithTab:!1,basicSetup:{tabSize:4}})})}),pfe=ke.memo(Mnt);function Int(t){const e=/^(?:\n)?(#+\s*)(.*?)(\n|$)/m,n=t.trimStart(),r=n.match(e);let i="",s=!1;if(r&&r.index===0)i=r[2].trim(),s=!0;else{const o=n.match(/(#+\s*)(.*?)(\n|$)/);o?i=n.substring(0,Math.min(20,o.index)).trim():i=n.substring(0,20).trim()}return i===""?null:s?i:i+"..."}function mfe(t){return te(e=>{const{codeInfoChildren:n,parentCodeInfoId:r}=Ry(t,e),{ids:i,pathMap:s}=_y({allCodeInfo:e.codeInfo,codeInfoChildren:n,startingId:r,additionalOutputCondition:a=>{var l;return((l=n[a.id])==null?void 0:l.length)===0}}),o=[];for(const a of i)o.push({id:a,name:C$(e.codeInfo,s,a)});return o},ae.isEqual)}function gfe(t,e){return te(n=>{const{codeInfoChildren:r,parentCodeInfoId:i}=Ry(t,n);return rO(e,n.codeInfo,r,i)},ae.isEqual)}const Dnt=ke.memo(jnt,ae.isEqual),Lnt=ke.forwardRef(({sectionId:t},e)=>{const n=mfe(t);return x.jsx(Nnt,{sectionId:t,paramInfos:n})});function Nnt({sectionId:t,paramInfos:e}){const[n,r]=MM(e,["name"],50),i="flex-grow outline-0 min-w-0 w-full cursor-auto bg-transparent [border-width:0_0_1px_0] border-solid border-setta-200 dark:border-setta-800 focus-visible:!border-blue-300 pl-5 py-1 truncate placeholder-setta-400 dark:placeholder-setta-700 text-sm";return x.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-y-hidden",children:[x.jsx(Ud,{inputStyles:i,placeholder:"Filter",leftElement:x.jsx("i",{className:"gg-sort-az !scale-75 text-setta-600 dark:text-setta-400"}),onChange:s=>r(s.target.value)}),x.jsx("div",{className:"mt-4 flex flex-col gap-2 overflow-y-scroll [&>*]:mx-[2px]",children:t&&n.map((s,o)=>x.jsx(Dnt,{sectionId:t,paramInfo:s},`${s.name}-${o}`))})]})}const Qnt=ke.memo(Lnt);function jnt({paramInfo:t}){const{id:e,name:n,description:r}=t;return x.jsxs("div",{className:"flex flex-col gap-2 self-stretch text-left last:mb-[400px] hover:opacity-100 hover:duration-500 [&:hover_.uicfg-title]:text-black dark:[&:hover_.uicfg-title]:text-setta-200",children:[x.jsx("p",{className:"uicfg-title truncate text-xs font-semibold text-setta-500",children:n}),x.jsx("textarea",{className:"mx-[2px] mb-4 h-12 min-w-0 flex-grow cursor-auto rounded-lg border border-solid border-setta-100 bg-white px-2 py-1 font-mono text-xs font-medium text-setta-600 outline-0 placeholder:text-setta-200 focus-visible:border-white focus-visible:ring-2 dark:border-setta-800 dark:bg-setta-900 dark:text-setta-300 dark:placeholder:text-setta-700 dark:focus-visible:border-setta-900",value:r,onChange:i=>{state.codeInfo[e].description=i.target.value}})]})}function Yd({allItems:t,value:e,onSelectedItemChange:n,small:r,outerDivClasses:i="",placeholder:s,bg:o,isDisabled:a,inputDivId:l,selectedItemCanBeNull:c}){const u=_.useRef(),{isOpen:f,filteredItems:h,getToggleButtonProps:d,getMenuProps:p,getInputProps:g,highlightedIndex:m,getItemProps:v,itemToString:y,onKeyDown:b}=kse({allItems:t,onSelectedItemChange:n,value:e,selectedItemCanBeNull:c});return x.jsxs("search",{className:`flex ${r?"h-[20px]":"h-8"} relative w-full min-w-0 flex-col items-stretch overflow-visible ${i}`,children:[x.jsx(KQe,{divId:l,getInputProps:g,getToggleButtonProps:d,isOpen:f,small:r,onKeyDown:b,placeholder:s,bg:o,isDisabled:a,inputRef:u}),x.jsx(tse,{isOpen:f,getMenuProps:p,inputRef:u,children:x.jsx(nse,{filteredItems:h,getItemProps:v,highlightedIndex:m,itemToString:y})})]})}var Bnt=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Jy(t,e){var n=znt(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function znt(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=Bnt.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var Fnt=[".DS_Store","Thumbs.db"];function Wnt(t){return Gm(this,void 0,void 0,function(){return Km(this,function(e){return u4(t)&&Vnt(t.dataTransfer)?[2,Hnt(t.dataTransfer,t.type)]:Unt(t)?[2,qnt(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Xnt(t)]:[2,[]]})})}function Vnt(t){return u4(t)}function Unt(t){return u4(t)&&u4(t.target)}function u4(t){return typeof t=="object"&&t!==null}function qnt(t){return vA(t.target.files).map(function(e){return Jy(e)})}function Xnt(t){return Gm(this,void 0,void 0,function(){var e;return Km(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Jy(r)})]}})})}function Hnt(t,e){return Gm(this,void 0,void 0,function(){var n,r;return Km(this,function(i){switch(i.label){case 0:return t.items?(n=vA(t.items).filter(function(s){return s.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(Znt))]):[3,2];case 1:return r=i.sent(),[2,Vq(vfe(r))];case 2:return[2,Vq(vA(t.files).map(function(s){return Jy(s)}))]}})})}function Vq(t){return t.filter(function(e){return Fnt.indexOf(e.name)===-1})}function vA(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function Znt(t){if(typeof t.webkitGetAsEntry!="function")return Uq(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?Ofe(e):Uq(t)}function vfe(t){return t.reduce(function(e,n){return S_(S_([],zF(e),!1),zF(Array.isArray(n)?vfe(n):[n]),!1)},[])}function Uq(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Jy(e);return Promise.resolve(n)}function Ynt(t){return Gm(this,void 0,void 0,function(){return Km(this,function(e){return[2,t.isDirectory?Ofe(t):Gnt(t)]})})}function Ofe(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function s(){var o=this;e.readEntries(function(a){return Gm(o,void 0,void 0,function(){var l,c,u;return Km(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(Ynt)),i.push(u),s(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function Gnt(t){return Gm(this,void 0,void 0,function(){return Km(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var s=Jy(i,t.fullPath);n(s)},function(i){r(i)})})]})})}var j7=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(n.length===0)return!0;var r=t.name||"",i=(t.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):i===a})}return!0};function qq(t){return ert(t)||Jnt(t)||bfe(t)||Knt()}function Knt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
344
|
+
`,{label:"if",detail:"block",type:"keyword"}),ur("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),ur("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),ur("import ${module}",{label:"import",detail:"statement",type:"keyword"}),ur("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],Qtt=vce(nfe,UI(Ltt.concat(Ntt)));function Bq(t,e){let n=t.baseIndentFor(e),r=t.lineAt(t.pos,-1),i=r.from+r.text.length;return/^\s*($|#)/.test(r.text)&&t.node.to<i+100&&!/\S/.test(t.state.sliceDoc(i,t.node.to))&&t.lineIndent(t.pos,-1)<=n||/^\s*(else:|elif |except |finally:)/.test(t.textAfter)&&t.lineIndent(t.pos,-1)>n?null:n+t.unit}const n2=Rl.define({name:"python",parser:Mtt.configure({props:[Zf.add({Body:t=>{var e;return(e=Bq(t,t.node))!==null&&e!==void 0?e:t.continue()},IfStatement:t=>/^\s*(else:|elif )/.test(t.textAfter)?t.baseIndent:t.continue(),TryStatement:t=>/^\s*(except |finally:|else:)/.test(t.textAfter)?t.baseIndent:t.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":Cp({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":Cp({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":Cp({closing:"]"}),"String FormatString":()=>null,Script:t=>{if(t.pos+/\s*/.exec(t.textAfter)[0].length>=t.node.to){let e=null;for(let n=t.node,r=n.to;n=n.lastChild,!(!n||n.to!=r);)n.type.name=="Body"&&(e=n);if(e){let n=Bq(t,e);if(n!=null)return n}}return t.continue()}}),uu.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":qy,Body:(t,e)=>({from:t.from+1,to:t.to-(t.to==e.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});function jtt(){return new Af(n2,[n2.data.of({autocomplete:Dtt}),n2.data.of({autocomplete:Qtt})])}const z0=63,zq=64,Btt=1,ztt=2,rfe=3,Ftt=4,ife=5,Wtt=6,Vtt=7,sfe=65,Utt=66,qtt=8,Xtt=9,Htt=10,Ztt=11,Ytt=12,ofe=13,Gtt=19,Ktt=20,Jtt=29,ent=33,tnt=34,nnt=47,rnt=0,cD=1,dA=2,$O=3,pA=4;class jh{constructor(e,n,r){this.parent=e,this.depth=n,this.type=r,this.hash=(e?e.hash+e.hash<<8:0)+n+(n<<4)+r}}jh.top=new jh(null,-1,rnt);function gv(t,e){for(let n=0,r=e-t.pos-1;;r--,n++){let i=t.peek(r);if(Jc(i)||i==-1)return n}}function mA(t){return t==32||t==9}function Jc(t){return t==10||t==13}function afe(t){return mA(t)||Jc(t)}function Jh(t){return t<0||afe(t)}const int=new j3({start:jh.top,reduce(t,e){return t.type==$O&&(e==Ktt||e==tnt)?t.parent:t},shift(t,e,n,r){if(e==rfe)return new jh(t,gv(r,r.pos),cD);if(e==sfe||e==ife)return new jh(t,gv(r,r.pos),dA);if(e==z0)return t.parent;if(e==Gtt||e==ent)return new jh(t,0,$O);if(e==ofe&&t.type==pA)return t.parent;if(e==nnt){let i=/[1-9]/.exec(r.read(r.pos,n.pos));if(i)return new jh(t,t.depth+ +i[0],pA)}return t},hash(t){return t.hash}});function bm(t,e,n=0){return t.peek(n)==e&&t.peek(n+1)==e&&t.peek(n+2)==e&&Jh(t.peek(n+3))}const snt=new ri((t,e)=>{if(t.next==-1&&e.canShift(zq))return t.acceptToken(zq);let n=t.peek(-1);if((Jc(n)||n<0)&&e.context.type!=$O){if(bm(t,45))if(e.canShift(z0))t.acceptToken(z0);else return t.acceptToken(Btt,3);if(bm(t,46))if(e.canShift(z0))t.acceptToken(z0);else return t.acceptToken(ztt,3);let r=0;for(;t.next==32;)r++,t.advance();(r<e.context.depth||r==e.context.depth&&e.context.type==cD&&(t.next!=45||!Jh(t.peek(1))))&&t.next!=-1&&!Jc(t.next)&&t.next!=35&&t.acceptToken(z0,-r)}},{contextual:!0}),ont=new ri((t,e)=>{if(e.context.type==$O){t.next==63&&(t.advance(),Jh(t.next)&&t.acceptToken(Vtt));return}if(t.next==45)t.advance(),Jh(t.next)&&t.acceptToken(e.context.type==cD&&e.context.depth==gv(t,t.pos-1)?Ftt:rfe);else if(t.next==63)t.advance(),Jh(t.next)&&t.acceptToken(e.context.type==dA&&e.context.depth==gv(t,t.pos-1)?Wtt:ife);else{let n=t.pos;for(;;)if(mA(t.next)){if(t.pos==n)return;t.advance()}else if(t.next==33)lfe(t);else if(t.next==38)gA(t);else if(t.next==42){gA(t);break}else if(t.next==39||t.next==34){if(uD(t,!0))break;return}else if(t.next==91||t.next==123){if(!lnt(t))return;break}else{cfe(t,!0,!1,0);break}for(;mA(t.next);)t.advance();if(t.next==58){if(t.pos==n&&e.canShift(Jtt))return;let r=t.peek(1);Jh(r)&&t.acceptTokenTo(e.context.type==dA&&e.context.depth==gv(t,n)?Utt:sfe,n)}}},{contextual:!0});function ant(t){return t>32&&t<127&&t!=34&&t!=37&&t!=44&&t!=60&&t!=62&&t!=92&&t!=94&&t!=96&&t!=123&&t!=124&&t!=125}function Fq(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function Wq(t,e){return t.next==37?(t.advance(),Fq(t.next)&&t.advance(),Fq(t.next)&&t.advance(),!0):ant(t.next)||e&&t.next==44?(t.advance(),!0):!1}function lfe(t){if(t.advance(),t.next==60){for(t.advance();;)if(!Wq(t,!0)){t.next==62&&t.advance();break}}else for(;Wq(t,!1););}function gA(t){for(t.advance();!Jh(t.next)&&c4(t.tag)!="f";)t.advance()}function uD(t,e){let n=t.next,r=!1,i=t.pos;for(t.advance();;){let s=t.next;if(s<0)break;if(t.advance(),s==n)if(s==39)if(t.next==39)t.advance();else break;else break;else if(s==92&&n==34)t.next>=0&&t.advance();else if(Jc(s)){if(e)return!1;r=!0}else if(e&&t.pos>=i+1024)return!1}return!r}function lnt(t){for(let e=[],n=t.pos+1024;;)if(t.next==91||t.next==123)e.push(t.next),t.advance();else if(t.next==39||t.next==34){if(!uD(t,!0))return!1}else if(t.next==93||t.next==125){if(e[e.length-1]!=t.next-2)return!1;if(e.pop(),t.advance(),!e.length)return!0}else{if(t.next<0||t.pos>n||Jc(t.next))return!1;t.advance()}}const cnt="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function c4(t){return t<33?"u":t>125?"s":cnt[t-33]}function Q7(t,e){let n=c4(t);return n!="u"&&!(e&&n=="f")}function cfe(t,e,n,r){if(c4(t.next)=="s"||(t.next==63||t.next==58||t.next==45)&&Q7(t.peek(1),n))t.advance();else return!1;let i=t.pos;for(;;){let s=t.next,o=0,a=r+1;for(;afe(s);){if(Jc(s)){if(e)return!1;a=0}else a++;s=t.peek(++o)}if(!(s>=0&&(s==58?Q7(t.peek(o+1),n):s==35?t.peek(o-1)!=32:Q7(s,n)))||!n&&a<=r||a==0&&!n&&(bm(t,45,o)||bm(t,46,o)))break;if(e&&c4(s)=="f")return!1;for(let c=o;c>=0;c--)t.advance();if(e&&t.pos>i+1024)return!1}return!0}const unt=new ri((t,e)=>{if(t.next==33)lfe(t),t.acceptToken(Ytt);else if(t.next==38||t.next==42){let n=t.next==38?Htt:Ztt;gA(t),t.acceptToken(n)}else t.next==39||t.next==34?(uD(t,!1),t.acceptToken(Xtt)):cfe(t,!1,e.context.type==$O,e.context.depth)&&t.acceptToken(qtt)}),fnt=new ri((t,e)=>{let n=e.context.type==pA?e.context.depth:-1,r=t.pos;e:for(;;){let i=0,s=t.next;for(;s==32;)s=t.peek(++i);if(!i&&(bm(t,45,i)||bm(t,46,i))||!Jc(s)&&(n<0&&(n=Math.max(e.context.depth+1,i)),i<n))break;for(;;){if(t.next<0)break e;let o=Jc(t.next);if(t.advance(),o)continue e;r=t.pos}}t.acceptTokenTo(ofe,r)}),hnt=Fl({DirectiveName:W.keyword,DirectiveContent:W.attributeValue,"DirectiveEnd DocEnd":W.meta,QuotedLiteral:W.string,BlockLiteralHeader:W.special(W.string),BlockLiteralContent:W.content,Literal:W.content,"Key/Literal Key/QuotedLiteral":W.definition(W.propertyName),"Anchor Alias":W.labelName,Tag:W.typeName,Comment:W.lineComment,": , -":W.separator,"?":W.punctuation,"[ ]":W.squareBracket,"{ }":W.brace}),dnt=$l.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DU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",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:int,nodeProps:[["is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Zp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[snt,ont,unt,fnt,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),pnt=$l.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"⚠ Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),mnt=Rl.define({name:"yaml",parser:dnt.configure({props:[Zf.add({Stream:t=>{for(let e=t.node.resolve(t.pos,-1);e&&e.to>=t.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.from<e.to)return t.baseIndentFor(e);if(e.name=="BlockLiteral")return t.baseIndentFor(e)+t.unit;if(e.name=="BlockSequence"||e.name=="BlockMapping")return t.column(e.from,1);if(e.name=="QuotedLiteral")return null;if(e.name=="Literal"){let n=t.column(e.from,1);if(n==t.lineIndent(e.from,1))return n;if(e.to>t.pos)return null}}return null},FlowMapping:Cp({closing:"}"}),FlowSequence:Cp({closing:"]"})}),uu.add({"FlowMapping FlowSequence":qy,"BlockSequence Pair BlockLiteral":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function gnt(){return new Af(mnt)}W.meta;function F3({sectionId:t,language:e,completionsFn:n,keywordStylizer:r,singleLine:i,tabToAutocomplete:s,indentWithTab:o,onTab:a,onEscape:l,keyComboActions:c,isDisabled:u}){const f=[Je.lineWrapping,IUe({parent:document.getElementById(`${t}-CustomResizable`)})];return e==="python"?f.push(jtt()):e==="javascript"?f.push(Xce()):e==="yaml"?f.push(gnt()):e==="json"?f.push(hKe()):e==="markdown"&&f.push(yet()),n&&f.push(Pce({override:[n],tooltipClass:()=>"nowheel"})),r&&f.push(r),i&&f.push(zt.transactionFilter.of(h=>h.newDoc.lines>1?[]:h)),u&&f.push(zt.readOnly.of(!0)),f.push(Ql.highest(Xd.of(vnt({indentWithTab:o,tabToAutocomplete:s,onTab:a,onEscape:l,keyComboActions:c})))),f}function vnt({indentWithTab:t,tabToAutocomplete:e,onTab:n,onEscape:r,keyComboActions:i}){const s=Nt.getState(),o=[{key:Ax(s.shortcuts.undoShortcut),run:()=>(b$(),!0)},{key:Ax(s.shortcuts.redoShortcut),run:()=>(x$(),!0)},{key:Ax(s.shortcuts.runCodeShortcut),run:()=>!0},{key:Ax(s.shortcuts.runAllCodeShortcut),run:()=>!0},{key:"Escape",run:a=>{if(r){const l=QU(a.state);r(l)}}}];if(t&&o.push({key:"Shift-Tab",preventDefault:!0,stopPropagation:!0,run:a=>{jI(a)}}),(e||t)&&o.push({key:"Tab",preventDefault:!1,stopPropagation:!0,run:a=>{let l=!1;return e&&QU(a.state)==="active"?l=wce(a):t&&QI(a),n&&n(l),t||l}}),i)for(const[a,l]of Object.entries(i))o.push({key:a,run:l});return o}const Ont=ht.mark({class:"italic"});function ufe(t){return Sr.fromClass(class{constructor(){Le(this,"decorations");Le(this,"positions");this.positions=[...t],this.decorations=this.buildDecorations()}update(n){n.docChanged&&(n.changes.iterChanges((r,i,s,o)=>{const a=o-s-(i-r);this.positions=this.positions.map(l=>l.startPos>r?{...l,startPos:l.startPos+a}:l)}),this.decorations=this.buildDecorations())}buildDecorations(){const n=new Al;for(const r of this.positions)n.add(r.startPos,r.startPos+r.keyword.length,Ont);return n.finish()}},{decorations:n=>n.decorations})}function ffe({category:t,id:e,delay:n=200}){const r=setTimeout(()=>{a_.setState(i=>{i[t][e]=!0})},n);return()=>{clearTimeout(r),a_.setState(i=>{i[t][e]=!1})}}function ynt({sectionId:t,paramInfoId:e}){const n=hfe({sectionId:t,paramInfoId:e});return ffe({category:"textFields",id:n})}function bnt(t){return ffe({category:"parametersRequest",id:t,delay:0})}function hfe({sectionId:t,paramInfoId:e}){return`${t}-${e}`}function xnt(t,e,n){!e&&n&&document.querySelectorAll(`#${t} .cm-cursor`).forEach(i=>{i.style.height=`${14*qe.getState().transform[2]}px`})}function wnt({evRefs:t,initialEvent:e,setRealIsInitialized:n,divId:r,value:i,defaultVal:s}){return o=>{if(o.focus(),e!=="tab"){const{clientX:a,clientY:l}=e,c=o.posAtCoords({x:a,y:l});o.dispatch({selection:{anchor:c,head:c}})}xnt(r,i,s),n(!0)}}function Snt(t,e,n){for(const r of t)if(r.from)return{from:r.from,to:r.to};return{from:e?e.from:n.pos}}function dfe(t,e,n,r){return r==="python"?async i=>{const s=i.state.doc.toString();if(!s.trim())return null;const o=i.matchBefore(/([^.=\\(+-\/ ]*)$/),a=ynt({sectionId:t,paramInfoId:e}),l=await n({sectionId:t,paramInfoId:e,fullText:s,position:i.pos,codeLanguage:r});return a(),l.data?{filter:!0,...Snt(l.data,o,i),options:l.data}:null}:()=>null}function _nt({editor:t,event:e,variable:n}){const{sectionId:r}=Dd.getState().fullNameToInfo[n];r&&(e.stopPropagation(),t&&t.contentDOM.blur(),rg(r))}function knt({sectionId:t}){const e=te(n=>n.x[t].codeLanguage);switch(e){case"python":return x.jsx(Ent,{sectionId:t,language:e});case"bash":return x.jsx(Tnt,{sectionId:t,language:e});case"javascript":return x.jsx(Pnt,{sectionId:t,language:e})}}const Cnt=ke.memo(knt);function Ent({sectionId:t,language:e}){const n=te(s=>Ll(t,s).evRefs,ae.isEqual),r=_.useMemo(()=>ufe(n),[JSON.stringify(n)]),i=_.useCallback(dfe(t,null,VNe,e),[t]);return x.jsx(fD,{sectionId:t,language:e,completionsFn:i,keywordStylizer:r})}function Tnt({sectionId:t,language:e}){return x.jsx(fD,{sectionId:t,language:e})}function Pnt({sectionId:t,language:e}){return x.jsx(fD,{sectionId:t,language:e})}function fD({sectionId:t,language:e,completionsFn:n,keywordStylizer:r}){const{value:i,variantIsFrozen:s}=te(S=>({value:Ll(t,S).code,variantIsFrozen:Yt(t).isFrozen}),ae.isEqual),{wrapperRef:o,handleCreateEditor:a,maxHeight:l,overflow:c,nowheel:u}=hD({sectionId:t}),f=R3(),[h,d]=_.useState(i),p=_.useRef();_.useEffect(()=>{i!==h&&d(i)},[i]);function g(S){var k;(k=p.current)==null||k.abort(),d(S),Ant(t,S,p)}function m(){Bie(t)}const{onArticleDivEnterKeyFocusOnCodeMirror:v,onEscapeFocusOnArticleDiv:y}=dD(o),b=F3({sectionId:t,language:e,completionsFn:n,keywordStylizer:r,onEscape:y,tabToAutocomplete:!0,indentWithTab:!0,isDisabled:s});return x.jsx("article",{ref:o,className:`${Cl} nodrag section-full-no-title cursor-auto rounded-lg focus:bg-blue-200/70 focus:outline-none dark:focus:bg-blue-950/70 [&_*]:!outline-0 [&_.cm-activeLineGutter]:focus:!bg-transparent [&_.cm-activeLine]:focus:!bg-transparent [&_.cm-gutters]:focus:!bg-transparent ${c} ${u}`,tabIndex:"0",onKeyDown:v,children:x.jsx(Ky,{maxHeight:l,value:h,theme:f,extensions:b,onMouseDown:m,onChange:g,onCreateEditor:a,indentWithTab:!1,basicSetup:{tabSize:4}})})}function hD({sectionId:t}){var m,v;const{resizeEvent:e,height:n}=te(y=>({resizeEvent:y.x[t].resizeEvent,height:y.x[t].size.height}),ae.isEqual),r=_.useRef(null),i=_.useRef(null),s=_.useRef(null),[o,a]=_.useState(""),l=qe(J$),[c,u]=_.useState(!1),f=_.useCallback(y=>{i.current=y;const b=new ResizeObserver(([S])=>{c||(Ut.setState(k=>{const E=k.numInitializedCodeAreas+1;return{numInitializedCodeAreas:E,requestUpdateNodeDimensions:E===k.numDisplayedCodeAreas}}),te.setState(k=>{const E=k.x[t];E.tempSavedSize&&(E.size=E.tempSavedSize,delete E.tempSavedSize)}),u(!0)),a(S.target.scrollHeight>S.target.clientHeight?"nowheel":"")});b.observe(i.current.scrollDOM),s.current=b},[]);_.useEffect(()=>(Ut.setState(y=>({numDisplayedCodeAreas:y.numDisplayedCodeAreas+1})),()=>{s.current&&s.current.disconnect(),Ut.setState(y=>{const b={numDisplayedCodeAreas:Math.max(0,y.numDisplayedCodeAreas-1)};return c&&(b.numInitializedCodeAreas=Math.max(0,y.numInitializedCodeAreas-1)),b})}),[]),_.useEffect(()=>{l&&i.current&&i.current.requestMeasure()},[l]);const h=n==="auto"||e==="start"?void 0:`${n-30}px`,d=e==="start"?"overflow-y-auto":"",p=(m=i.current)==null?void 0:m.scrollDOM.scrollTop,g=(v=r.current)==null?void 0:v.scrollTop;return _.useEffect(()=>{r.current&&e==="start"?r.current.scrollTop=p:i.current&&e==="end"&&(i.current.scrollDOM.scrollTop=g)},[e]),{wrapperRef:r,handleCreateEditor:f,maxHeight:h,overflow:d,nowheel:o}}function dD(t){function e(r){if(r.code==="Enter"){const i=r.target.querySelector("[contenteditable]");i&&i.focus({preventScroll:!0})}}function n(r){r||requestAnimationFrame(()=>{t.current.focus({preventScroll:!0})})}return{onArticleDivEnterKeyFocusOnCodeMirror:e,onEscapeFocusOnArticleDiv:n}}const Ant=by(async(t,e,n)=>{const r=new AbortController;if(n.current=r,r.signal.aborted)return;const{templateVars:i,evRefs:s}=await qNe(t,e);r.signal.aborted||(te.setState(o=>{const a=Yt(t,o);a.code=e,a.evRefs=s,a.templateVars=i}),hn(!0))},50);function Rnt({sectionId:t}){const e=_.useRef();return x.jsx(pfe,{sectionId:t,wrapperClassName:"cursor-auto overflow-y-scroll [&_*]:!outline-0",ref:e})}function $nt({sectionId:t}){const{wrapperRef:e,handleCreateEditor:n,maxHeight:r,overflow:i,nowheel:s}=hD({sectionId:t});return x.jsx(pfe,{sectionId:t,onCreateEditor:n,maxHeight:r,ref:e,wrapperClassName:`${Cl} nodrag section-full-no-title cursor-auto [&_*]:!outline-0 ${i} ${s}`})}const Mnt=ke.forwardRef(({sectionId:t,maxHeight:e,onCreateEditor:n,wrapperClassName:r},i)=>{const{renderMarkdown:s,description:o,variantIsFrozen:a}=Fte(t),[l,c]=_.useState(o);_.useEffect(()=>{o!==l&&c(o)},[o]);const u=_.useCallback(ae.debounce((m,v,y)=>{v!==y&&(te.setState(b=>{Yt(m,b).description=v,b.x[m].name=Int(v)??Nt.getState().sections[Y.INFO].name}),hn(!0))},200),[]);function f(m){c(m),u(t,m,o)}const{onArticleDivEnterKeyFocusOnCodeMirror:h,onEscapeFocusOnArticleDiv:d}=dD(i),p=R3(),g=F3({sectionId:t,language:s?"markdown":null,tabToAutocomplete:!0,indentWithTab:!0,isDisabled:a,onEscape:d});return x.jsx("article",{ref:i,className:r,onKeyDown:h,tabIndex:"0",children:x.jsx(Ky,{maxHeight:e,value:o,theme:p,extensions:g,onChange:f,onCreateEditor:n,indentWithTab:!1,basicSetup:{tabSize:4}})})}),pfe=ke.memo(Mnt);function Int(t){const e=/^(?:\n)?(#+\s*)(.*?)(\n|$)/m,n=t.trimStart(),r=n.match(e);let i="",s=!1;if(r&&r.index===0)i=r[2].trim(),s=!0;else{const o=n.match(/(#+\s*)(.*?)(\n|$)/);o?i=n.substring(0,Math.min(20,o.index)).trim():i=n.substring(0,20).trim()}return i===""?null:s?i:i+"..."}function mfe(t){return te(e=>{const{codeInfoChildren:n,parentCodeInfoId:r}=Ry(t,e),{ids:i,pathMap:s}=_y({allCodeInfo:e.codeInfo,codeInfoChildren:n,startingId:r,additionalOutputCondition:a=>{var l;return((l=n[a.id])==null?void 0:l.length)===0}}),o=[];for(const a of i)o.push({id:a,name:C$(e.codeInfo,s,a)});return o},ae.isEqual)}function gfe(t,e){return te(n=>{const{codeInfoChildren:r,parentCodeInfoId:i}=Ry(t,n);return rO(e,n.codeInfo,r,i)},ae.isEqual)}const Dnt=ke.memo(jnt,ae.isEqual),Lnt=ke.forwardRef(({sectionId:t},e)=>{const n=mfe(t);return x.jsx(Nnt,{sectionId:t,paramInfos:n})});function Nnt({sectionId:t,paramInfos:e}){const[n,r]=MM(e,["name"],50),i="flex-grow outline-0 min-w-0 w-full cursor-auto bg-transparent [border-width:0_0_1px_0] border-solid border-setta-200 dark:border-setta-800 focus-visible:!border-blue-300 pl-5 py-1 truncate placeholder-setta-400 dark:placeholder-setta-700 text-sm";return x.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-y-hidden",children:[x.jsx(Ud,{inputStyles:i,placeholder:"Filter",leftElement:x.jsx("i",{className:"gg-sort-az !scale-75 text-setta-600 dark:text-setta-400"}),onChange:s=>r(s.target.value)}),x.jsx("div",{className:"mt-4 flex flex-col gap-2 overflow-y-scroll [&>*]:mx-[2px]",children:t&&n.map((s,o)=>x.jsx(Dnt,{sectionId:t,paramInfo:s},`${s.name}-${o}`))})]})}const Qnt=ke.memo(Lnt);function jnt({paramInfo:t}){const{id:e,name:n}=t,r=te(i=>i.codeInfo[e].description);return x.jsxs("div",{className:"flex flex-col gap-2 self-stretch text-left last:mb-[400px] hover:opacity-100 hover:duration-500 [&:hover_.uicfg-title]:text-black dark:[&:hover_.uicfg-title]:text-setta-200",children:[x.jsx("p",{className:"uicfg-title truncate text-xs font-semibold text-setta-500",children:n}),x.jsx("textarea",{className:"mx-[2px] mb-4 h-12 min-w-0 flex-grow cursor-auto rounded-lg border border-solid border-setta-100 bg-white px-2 py-1 font-mono text-xs font-medium text-setta-600 outline-0 placeholder:text-setta-200 focus-visible:border-white focus-visible:ring-2 dark:border-setta-800 dark:bg-setta-900 dark:text-setta-300 dark:placeholder:text-setta-700 dark:focus-visible:border-setta-900",value:r,onChange:i=>{te.setState(s=>{console.log("onCHange"),s.codeInfo[e].description=i.target.value})}})]})}function Yd({allItems:t,value:e,onSelectedItemChange:n,small:r,outerDivClasses:i="",placeholder:s,bg:o,isDisabled:a,inputDivId:l,selectedItemCanBeNull:c}){const u=_.useRef(),{isOpen:f,filteredItems:h,getToggleButtonProps:d,getMenuProps:p,getInputProps:g,highlightedIndex:m,getItemProps:v,itemToString:y,onKeyDown:b}=kse({allItems:t,onSelectedItemChange:n,value:e,selectedItemCanBeNull:c});return x.jsxs("search",{className:`flex ${r?"h-[20px]":"h-8"} relative w-full min-w-0 flex-col items-stretch overflow-visible ${i}`,children:[x.jsx(KQe,{divId:l,getInputProps:g,getToggleButtonProps:d,isOpen:f,small:r,onKeyDown:b,placeholder:s,bg:o,isDisabled:a,inputRef:u}),x.jsx(tse,{isOpen:f,getMenuProps:p,inputRef:u,children:x.jsx(nse,{filteredItems:h,getItemProps:v,highlightedIndex:m,itemToString:y})})]})}var Bnt=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Jy(t,e){var n=znt(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function znt(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=Bnt.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var Fnt=[".DS_Store","Thumbs.db"];function Wnt(t){return Gm(this,void 0,void 0,function(){return Km(this,function(e){return u4(t)&&Vnt(t.dataTransfer)?[2,Hnt(t.dataTransfer,t.type)]:Unt(t)?[2,qnt(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Xnt(t)]:[2,[]]})})}function Vnt(t){return u4(t)}function Unt(t){return u4(t)&&u4(t.target)}function u4(t){return typeof t=="object"&&t!==null}function qnt(t){return vA(t.target.files).map(function(e){return Jy(e)})}function Xnt(t){return Gm(this,void 0,void 0,function(){var e;return Km(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Jy(r)})]}})})}function Hnt(t,e){return Gm(this,void 0,void 0,function(){var n,r;return Km(this,function(i){switch(i.label){case 0:return t.items?(n=vA(t.items).filter(function(s){return s.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(Znt))]):[3,2];case 1:return r=i.sent(),[2,Vq(vfe(r))];case 2:return[2,Vq(vA(t.files).map(function(s){return Jy(s)}))]}})})}function Vq(t){return t.filter(function(e){return Fnt.indexOf(e.name)===-1})}function vA(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function Znt(t){if(typeof t.webkitGetAsEntry!="function")return Uq(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?Ofe(e):Uq(t)}function vfe(t){return t.reduce(function(e,n){return S_(S_([],zF(e),!1),zF(Array.isArray(n)?vfe(n):[n]),!1)},[])}function Uq(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Jy(e);return Promise.resolve(n)}function Ynt(t){return Gm(this,void 0,void 0,function(){return Km(this,function(e){return[2,t.isDirectory?Ofe(t):Gnt(t)]})})}function Ofe(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function s(){var o=this;e.readEntries(function(a){return Gm(o,void 0,void 0,function(){var l,c,u;return Km(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(Ynt)),i.push(u),s(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function Gnt(t){return Gm(this,void 0,void 0,function(){return Km(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var s=Jy(i,t.fullPath);n(s)},function(i){r(i)})})]})})}var j7=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(n.length===0)return!0;var r=t.name||"",i=(t.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):i===a})}return!0};function qq(t){return ert(t)||Jnt(t)||bfe(t)||Knt()}function Knt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
345
345
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jnt(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ert(t){if(Array.isArray(t))return OA(t)}function Xq(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hq(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xq(Object(n),!0).forEach(function(r){yfe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xq(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function yfe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function MO(t,e){return rrt(t)||nrt(t,e)||bfe(t,e)||trt()}function trt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
346
346
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bfe(t,e){if(t){if(typeof t=="string")return OA(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OA(t,e)}}function OA(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function nrt(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function rrt(t){if(Array.isArray(t))return t}var irt=typeof j7=="function"?j7:j7.default,srt="file-invalid-type",ort="file-too-large",art="file-too-small",lrt="too-many-files",crt=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:srt,message:"File type must be ".concat(n)}},Zq=function(e){return{code:ort,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},Yq=function(e){return{code:art,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},urt={code:lrt,message:"Too many files"};function xfe(t,e){var n=t.type==="application/x-moz-file"||irt(t,e);return[n,n?null:crt(e)]}function wfe(t,e,n){if(Bh(t.size))if(Bh(e)&&Bh(n)){if(t.size>n)return[!1,Zq(n)];if(t.size<e)return[!1,Yq(e)]}else{if(Bh(e)&&t.size<e)return[!1,Yq(e)];if(Bh(n)&&t.size>n)return[!1,Zq(n)]}return[!0,null]}function Bh(t){return t!=null}function frt(t){var e=t.files,n=t.accept,r=t.minSize,i=t.maxSize,s=t.multiple,o=t.maxFiles,a=t.validator;return!s&&e.length>1||s&&o>=1&&e.length>o?!1:e.every(function(l){var c=xfe(l,n),u=MO(c,1),f=u[0],h=wfe(l,r,i),d=MO(h,1),p=d[0],g=a?a(l):null;return f&&p&&!g})}function f4(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function _w(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function Gq(t){t.preventDefault()}function hrt(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function drt(t){return t.indexOf("Edge/")!==-1}function prt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return hrt(t)||drt(t)}function Ja(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return e.some(function(a){return!f4(r)&&a&&a.apply(void 0,[r].concat(s)),f4(r)})}}function mrt(){return"showOpenFilePicker"in window}function grt(t){if(Bh(t)){var e=Object.entries(t).filter(function(n){var r=MO(n,2),i=r[0],s=r[1],o=!0;return Sfe(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(s)||!s.every(_fe))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=MO(r,2),s=i[0],o=i[1];return Hq(Hq({},n),{},yfe({},s,o))},{});return[{description:"Files",accept:e}]}return t}function vrt(t){if(Bh(t))return Object.entries(t).reduce(function(e,n){var r=MO(n,2),i=r[0],s=r[1];return[].concat(qq(e),[i],qq(s))},[]).filter(function(e){return Sfe(e)||_fe(e)}).join(",")}function Ort(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function yrt(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function Sfe(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function _fe(t){return/^.*\.[\w]+$/.test(t)}var brt=["children"],xrt=["open"],wrt=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Srt=["refKey","onChange","onClick"];function _rt(t){return Ert(t)||Crt(t)||kfe(t)||krt()}function krt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
347
347
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Crt(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ert(t){if(Array.isArray(t))return yA(t)}function B7(t,e){return Art(t)||Prt(t,e)||kfe(t,e)||Trt()}function Trt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
@@ -353,7 +353,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
353
353
|
rounded-full border-2 border-setta-300 bg-white shadow-sm drop-shadow-md hover:!bg-setta-100 hover:dark:!bg-setta-700 focus-visible:!border-blue-500 focus-visible:bg-blue-500 focus-visible:dark:bg-blue-700 focus-visible:outline-none dark:border-setta-400 dark:bg-setta-600 data-[disabled]:pointer-events-none`,textInputClassName:"hidden my-auto mr-[1px] h-5/6 w-8 cursor-auto resize-none rounded-lg border border-solid border-setta-300/20 bg-white px-2 text-center font-mono text-xs focus-visible:border-blue-300 dark:border-setta-875 dark:bg-setta-875 dark:text-setta-300 @[132px]/slider:block"})}case Y.SWITCH:return x.jsx(WD,{value:n,defaultVal:c,onChange:r,onEscape:d,isDisabled:h,outerDivClassName:"section-value flex justify-self-start self-center",twRootClasses:"nodrag"});case Y.COLOR_PICKER:const{colorChoices:p}=a.config;return x.jsx(FD,{colorChoices:p,value:n,onChange:r,onEscape:d,wrapperClassName:"section-value single-cell-container min-w-0 w-[calc(100%_-_2px)] justify-self-start self-center h-[calc(100%_-_4px)] min-h-0",colorPickerChoicesClasses:"flex-1 cursor-pointer items-center overflow-hidden rounded-lg single-cell-container colorpicker h-full min-h-0 w-full min-w-0 items-center text-white",isDisabled:h});case Y.DROPDOWN:const{choices:g}=a.config;return x.jsx(Ode,{choices:g,value:n,onChange:r,outerDivClasses:"section-value flex justify-self-start self-center [&_search]:my-auto",isDisabled:h});case Y.PASSWORD:return x.jsxs(x.Fragment,{children:[x.jsx(yde,{className:`${h?"":"cursor-text select-text"} nodrag section-value peer/textinput flex min-w-0 max-w-[calc(100%_-_1.1rem)] self-center justify-self-start font-mono text-xs text-[rgb(3,_47,_98);] dark:text-[rgb(165,_214,_255)]`,value:n,onChange:r,onEscape:d,isDisabled:h}),x.jsx("span",{className:`section-value grid-row-start-1 border-box self-end border-b border-setta-200/50 dark:border-setta-600/30 ${o?"":"peer-focus-within/textinput:border-blue-400"}`})]})}}function xct({dataSectionId:t,visualSectionId:e,paramInfoId:n,value:r,defaultVal:i,onChange:s,evRefs:o,isDisabled:a}){const{uiType:l,configLanguage:c}=te(h=>({uiType:Hy(t,n,h),configLanguage:h.x[t].configLanguage}),ae.isEqual),u=VD({dataSectionId:t,paramInfoId:n}),f=Ut(h=>h.isSelectingParams);switch(l.type){default:return x.jsxs(x.Fragment,{children:[x.jsx(nk,{dataSectionId:t,visualSectionId:e,paramInfoId:n,value:r,defaultVal:i,onChange:s,dummyCodeClassName:"section-key-value peer/textinput self-end grid-row-start-1 mx-3 py-[.125rem] nodrag cursor-text select-text break-words px-0 font-mono text-xs [tab-size:4] [word-break:break-word]",realCodeClassName:"section-key-value peer/textinput self-end grid-row-start-1 py-[.125rem] mx-3 nodrag [&_*]:!outline-0 cursor-text select-text [&_.cm-activeLine]:!px-0 [&_.cm-activeLine]:!bg-setta-200/10 [&_.cm-content]:!py-0 [&_.cm-content]:!px-0 [&_.cm-line]:!px-0 [&_.cm-content]:text-xs first:[&_.cm-line>*]:mt-[3px]",language:c,evRefs:o,isDisabled:a}),u&&x.jsx("i",{className:"section-value gg-spinner self-center justify-self-end text-blue-500/70"}),x.jsx("span",{className:`section-key-value grid-row-start-1 border-box mx-3 self-end border-b border-setta-200/50 ${f?"":"peer-focus-within/textinput:border-blue-400"} dark:border-setta-600/30`})]});case Y.SLIDER:{const{min:p,max:g,step:m}=l.config;return x.jsx(wm,{value:r,defaultVal:i,onChange:s,min:p,max:g,step:m,isDisabled:a,wrapperDivClass:"section-key-value flex gap-1 ml-2",sliderRootClassName:"data[orientation='vertical']:flex-col data[orientation='vertical']:w-5 data[orientation='vertical']:h-24 SliderRoot relative flex w-full touch-none select-none items-center data-[orientation='horizontal']:h-5",sliderTrackClassName:"relative flex-grow rounded-full bg-setta-200 data-[orientation='horizontal']:h-[3px] data-[orientation='vertical']:w-[3px] dark:bg-setta-700",sliderRangeClassName:"absolute h-full rounded-full bg-blue-500",sliderThumbClassName:`${YR} block h-3 w-3 cursor-pointer
|
354
354
|
rounded-full border-2 border-setta-300 bg-white shadow-sm drop-shadow-md hover:bg-setta-100 focus:border-blue-500 focus-visible:outline-none dark:border-setta-400 dark:bg-setta-600`,textInputClassName:"w-8 cursor-auto resize-none rounded-lg border border-solid border-setta-300/20 bg-white px-2 text-center font-mono text-xs focus-visible:border-blue-300 dark:border-setta-875 dark:bg-setta-875 dark:text-setta-300"})}case Y.SWITCH:return x.jsx(WD,{value:r,defaultVal:i,onChange:s,isDisabled:a,outerDivClassName:"section-key-value flex justify-self-start self-center ml-2",twRootClasses:"nodrag"});case Y.COLOR_PICKER:const{colorChoices:h}=l.config;return x.jsx(FD,{colorChoices:h,value:r,onChange:s,wrapperClassName:"section-key-value single-cell-container w-[calc(100%_-_1.25rem)] min-h-0 flex justify-self-start self-center ml-2",colorPickerChoicesClasses:"flex-1 cursor-pointer items-center overflow-hidden rounded-lg single-cell-container colorpicker h-full min-h-0 w-full min-w-0 items-center text-white",isDisabled:a});case Y.DROPDOWN:const{choices:d}=l.config;return x.jsx(Ode,{choices:d,value:r,onChange:s,outerDivClasses:"section-key-value w-[calc(100%_-_1.15rem)] ml-2 flex justify-self-start self-center [&_search]:my-auto",isDisabled:a});case Y.PASSWORD:return x.jsx(yde,{className:`${a?"":"cursor-text select-text"} nodrag section-value flex self-center justify-self-start`,value:r,onChange:s,isDisabled:a})}}function wct(t){const e=pFe[t.type];return rI(t)?`${t.name} - (${e})`:e}function Sct(t,e,n,r){const i=[],s=ae.filter(t,n);for(const o of Object.values(t))if(!(!e(o)||!iI(o)))if(Jse(o))if(o.id===r)i.push(o);else{const a=s.find(l=>l.type===o.type);i.push(a??o)}else i.push(o);return i.map(o=>({id:o.id,name:wct(o),presetType:o.presetType,displayType:o.presetType??Y.PRESET_UI_TYPE_BASE}))}function _ct(t,e,n){return te(r=>{const i=Sle(t,e,"nonPresetUITypeIds",r),s=a=>Y.NON_SECTION_TYPES.includes(a.type),o=a=>toe(a,i);return Sct(r.uiTypes,s,o,n)},ae.isEqual)}function kct({onDropdownSelect:t,selectedId:e,availableUITypes:n}){const r=ae.groupBy(n,"displayType"),i=Object.keys(r).map(s=>({group:s,items:r[s]}));return x.jsx(Yd,{allItems:i,value:e,onSelectedItemChange:t})}function Cct({sectionId:t,paramInfoId:e,selectedId:n,...r}){const i=_ct(t,e,n);return x.jsx(kct,{availableUITypes:i,selectedId:n,...r})}function Ect({onDropdownSelect:t,selectedId:e,selectedType:n,onConfigChange:r,sectionId:i,paramInfoId:s,config:o}){return x.jsxs(x.Fragment,{children:[x.jsx(Cct,{sectionId:i,paramInfoId:s,onDropdownSelect:t,selectedId:e}),x.jsx(yct,{name:n,config:o,onChange:r})]})}const Tct=ke.memo($ct,ae.isEqual),Pct=ke.forwardRef(({sectionId:t},e)=>{const n=mfe(t);return x.jsx(Rct,{sectionId:t,paramInfos:n})}),Act=ke.memo(Pct);function Rct({sectionId:t,paramInfos:e}){const[n,r]=MM(e,["name"],50),i="flex-grow outline-0 min-w-0 w-full cursor-auto bg-transparent [border-width:0_0_1px_0] border-solid border-setta-200 dark:border-setta-800 focus-visible:!border-blue-300 pl-5 py-1 truncate placeholder-setta-400 dark:placeholder-setta-700 text-sm";return x.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-y-hidden",children:[x.jsx(Ud,{inputStyles:i,placeholder:"Filter",leftElement:x.jsx("i",{className:"gg-sort-az !scale-75 text-setta-600 dark:text-setta-400"}),onChange:s=>r(s.target.value)}),x.jsx("div",{className:"mt-4 flex flex-col gap-2 overflow-y-scroll [&>*]:mx-[2px]",children:t&&n.map((s,o)=>x.jsx(Tct,{sectionId:t,paramInfo:s},`${s.name}-${o}`))})]})}function $ct({sectionId:t,paramInfo:e}){const n=e.id,r=te(a=>Hy(t,n,a),ae.isEqual),i=e.name,s=a=>{te.setState(l=>{sI({uiTypeId:a,sectionId:t,paramInfoId:n,state:l})})},o=(a,l)=>{Tlt({sectionId:t,paramInfoId:n,configProps:{configName:a,newValueFn:l}})};return x.jsxs("div",{className:"flex flex-col self-stretch text-left last:mb-[400px] hover:opacity-100 hover:duration-500 [&:hover_.uicfg-title]:text-black dark:[&:hover_.uicfg-title]:text-setta-200",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("p",{className:"uicfg-title truncate text-xs font-semibold text-setta-500",children:i}),x.jsx("div",{className:"flex gap-[0.1rem] place-self-end",children:x.jsx(Mlt,{})})]}),x.jsx(Ect,{onDropdownSelect:s,selectedId:r.id,selectedType:r.type,onConfigChange:o,config:r.config,sectionId:t,paramInfoId:n})]})}const Mct=oT;function Ict(){const t=ir(u=>u.ids,ae.isEqual),{tab:e,requiredTabs:n,uiTypeName:r,renderMarkdown:i}=jXe(t[0]),[s]=Ot.uiEditorVis.hook(),[o]=Ot.uiEditorWidth.hook(),a=i?"Markdown Editor":"Text Editor",l=e===Gp?a:null,c={vis:s,tab:e,onTabClick:Cle(r),className:"flex h-10 w-10 cursor-pointer items-center justify-center text-2xl focus-visible:border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-light-blue-500",requiredTabs:n};return x.jsxs("div",{id:"UiEditorPane",className:"contents",onKeyDown:yNe,children:[x.jsxs("div",{className:"absolute right-0 z-[19] flex h-[calc(100%_-_48px)] w-[50px] flex-col items-center gap-1 border-l border-setta-200/75 bg-setta-50 py-3 dark:border-setta-850 dark:bg-setta-900",children:[x.jsx(Nh,{tabName:al,...c,...Rr({content:"Section Config"}),children:x.jsx(nHe,{})}),x.jsx(Nh,{tabName:Yp,...c,...Rr({content:"Parameter UI Config"}),children:x.jsx(KXe,{})}),x.jsx(Nh,{tabName:tO,...c,...Rr({content:"Parameter Info Editing"}),children:x.jsx(cHe,{})}),x.jsx(Nh,{tabName:Gp,...c,...Rr({content:a}),children:x.jsx(rHe,{})}),x.jsx(Nh,{tabName:Sc,...c,...Rr({content:"Section Variants"}),children:x.jsx(dHe,{})})]}),x.jsx(wle,{paneName:Mct,right:!0,minimumWidth:425,vis:s,width:o,children:t.length===1&&s?x.jsx(Dct,{sectionId:t[0],tab:e,inputTitle:l}):x.jsx(Nct,{})})]})}function Dct({sectionId:t,tab:e,inputTitle:n}){const r=n??K7e[e];return x.jsxs("div",{className:"flex h-full min-h-0 w-[calc(100%_-_3rem)] min-w-0 flex-1 flex-col overflow-hidden pr-1.5",children:[x.jsx("h2",{className:"mb-1 cursor-pointer select-none text-xs font-bold uppercase tracking-tight text-setta-300 dark:text-setta-500",children:r}),x.jsx(Lct,{sectionId:t,tab:e})]})}function Lct({sectionId:t,tab:e}){switch(e){case al:return x.jsx(dlt,{sectionId:t});case Yp:return x.jsx(Act,{sectionId:t});case tO:return x.jsx(Qnt,{sectionId:t});case Gp:return x.jsx(Rnt,{sectionId:t});case Sc:return x.jsx(_lt,{sectionId:t})}}function Nct(){return x.jsx("aside",{className:"grid h-full min-h-0 w-[calc(100%_-_2rem)]",children:x.jsxs("div",{className:"flex flex-col items-center gap-4 place-self-center",children:[x.jsx(Ple,{className:"h-20 w-20 text-setta-300 dark:text-setta-700 "}),x.jsx("h4",{className:"text-center text-lg font-bold tracking-widest text-setta-300 dark:text-setta-600",children:"Select A Section to Edit"})]})})}function Qct(t){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M2.99787498,0.999999992 L17.4999998,0.999999992 L20.9999998,4.50000005 L21,23 L3,23 L2.99787498,0.999999992 Z M16,1 L16,6 L21,6 M9,12 L15,18 M15,12 L9,18"},child:[]}]})(t)}function jct(t){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M12,17 C9.27272727,17 6,14.2222222 6,12 C6,9.77777778 9.27272727,7 12,7 C14.7272727,7 18,9.77777778 18,12 C18,14.2222222 14.7272727,17 12,17 Z M11,12 C11,12.55225 11.44775,13 12,13 C12.55225,13 13,12.55225 13,12 C13,11.44775 12.55225,11 12,11 C11.44775,11 11,11.44775 11,12 Z"},child:[]}]})(t)}function Bct(){return x.jsx("div",{className:"single-cell-container absolute inset-0 ",children:x.jsxs("div",{className:"single-cell-child my-auto flex flex-col items-center gap-6 text-setta-400 dark:text-setta-700",children:[x.jsx(Qct,{className:"h-24 w-24"}),x.jsx("h1",{className:"text-5xl font-black ",children:"Project Not Found"})]})})}function Yr({children:t,onClick:e,onMouseOver:n}){return x.jsx(ude,{className:"flex cursor-pointer flex-row items-center gap-2 rounded-md px-2 py-[0.15rem] font-sans text-xs font-semibold text-setta-700 outline-none hover:bg-setta-100 hover:ring-0 focus-visible:ring-1 dark:text-setta-100 dark:hover:bg-setta-700",onClick:e,onMouseOver:n,children:t})}function qD(t,e,n){t.preventDefault();const r={isOpen:!0,x:t.clientX,y:t.clientY,...n};xy.setState(i=>({[e]:{...i[e],...r}}))}function zct(t){qD(t,"pane")}function Fct(t,e){qD(t,"selection",{nodeIds:e})}function Wct(t,e){qD(t,"typeError",{paramInfoId:e})}function Sm(){xy.getState().reset()}function XD({children:t,x:e,y:n,isOpen:r,closeContextMenu:i}){const s=Vct(r,i),[o,a]=_.useState({top:-9999,left:-9999,opacity:0}),l=_.useRef(null);return _.useEffect(()=>{if(!r){a({top:-9999,left:-9999,opacity:0});return}requestAnimationFrame(()=>{if(l.current){const c=l.current.getBoundingClientRect(),u=window.innerHeight,f=window.innerWidth;let h=n,d=e;n+c.height>u&&(h=n-c.height),e+c.width>f&&(d=e-c.width),h<_z&&(n+c.height<=u?h=n:h=_z),d<0&&(d=0),a({top:h,left:d,opacity:1})}})},[e,n,r]),x.jsx(lde,{open:r,modal:!1,children:x.jsx(cde,{className:"absolute z-10 flex w-[clamp(5rem,_20vw,_10rem)] min-w-32 cursor-pointer flex-col rounded-md border border-solid border-setta-500/50 bg-white px-2 py-2 shadow-xl dark:bg-setta-900",style:{left:o.left,top:o.top,opacity:o.opacity},ref:c=>{s.current=c,l.current=c},children:t})})}function Vct(t,e){const n=_.useRef(null);return _.useEffect(()=>{function r(i){n.current&&!n.current.contains(i.target)&&t&&e()}return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[n,t]),n}function Uct(){const{isOpen:t,x:e,y:n}=xy(s=>s.pane,ae.isEqual),r=te(s=>s.singletonSections,ae.isEqual);function i(s){return()=>{te.setState(o=>{_M({position:Vf({x:e,y:n}),state:o,...s})}),hn(!0),Sm()}}return x.jsxs(XD,{x:e,y:n,closeContextMenu:Sm,isOpen:t,children:[x.jsx("p",{className:"mx-2 mb-2 min-w-[100px] border-b border-setta-100 py-1 text-xs font-bold uppercase text-setta-300 dark:border-setta-700 dark:text-setta-500",children:"Create New"}),x.jsx(Yr,{onClick:i({type:Y.SECTION}),children:"Section"}),x.jsx(Yr,{onClick:i({type:Y.LIST_ROOT}),children:"List"}),x.jsx(Yr,{onClick:i({type:Y.DICT_ROOT}),children:"Dict"}),x.jsx(Yr,{onClick:i({type:Y.GROUP}),children:"Group"}),x.jsx(Yr,{onClick:i({type:Y.INFO}),children:"Info"}),!r[Y.GLOBAL_VARIABLES]&&x.jsx(Yr,{onClick:i({type:Y.GLOBAL_VARIABLES}),children:"Global Variables"}),x.jsx(Yr,{onClick:i({type:Y.CODE,sectionProps:{codeLanguage:"python"}}),children:"Python Code"}),x.jsx(Yr,{onClick:i({type:Y.CODE,sectionProps:{codeLanguage:"bash"}}),children:"Bash Script"}),x.jsx(Yr,{onClick:i({type:Y.TERMINAL}),children:"Terminal"}),!r[Y.GLOBAL_PARAM_SWEEP]&&x.jsx(Yr,{onClick:i({type:Y.GLOBAL_PARAM_SWEEP}),children:"Global Param Sweep"}),x.jsx(Yr,{onClick:i({type:Y.DRAW}),children:"Drawing Area"}),x.jsx(Yr,{onClick:i({type:Y.IMAGE}),children:"Image"}),x.jsx(Yr,{onClick:i({type:Y.CHART}),children:"Chart"}),x.jsx(Yr,{onClick:i({type:Y.SOCIAL}),children:"Social"}),x.jsx(Yr,{onClick:i({type:Y.IFRAME}),children:"IFrame"})]})}function _m(t,e){const n=[...new Set(jne(t,e))],r=n.filter(i=>e.uiTypes[e.x[i].uiTypeId].type===Y.TERMINAL);Hct(n,e),r&&mNe(r),HT(n),Une(n)}function qct(t,e,n=1){te.setState(r=>{if(t){const i=Yt(e,r).children;_m(i.slice(0,n),r)}else{const i=r.x[e].parentId,s=Yt(i,r).children,o=s.indexOf(e)+1;_m(s.slice(o,o+n),r)}}),hn(!0)}function Xct(){const t=ir.getState().ids;te.setState(e=>{_m(t,e)}),hn(!0)}function Hct(t,e){var r,i;const n=new Set(t);for(const s of n){const o=(r=e.x[s])==null?void 0:r.parentId;o&&((i=e.x[o])!=null&&i.variantId)&&am(o,l=>l.filter(c=>c!==s),e);let a=!1;for(const l of Object.values(e.variants))if(l.children.includes(s)){a=!0;break}if(!a){for(const l of e.x[s].variantIds)delete e.variants[l];delete e.x[s]}}for(const[s,o]of Object.entries(e.x))n.has(o.paramSweepSectionId)&&(e.x[s].paramSweepSectionId=null)}async function Tde(t){return await jt({body:{sectionsAndOtherInfo:t},address:Y.ROUTE_COPY_SECTIONS})}async function Zct(){const t=ir.getState().ids;if(t.length>0&&window.getSelection().toString()===""){const e=Pde(t);await navigator.clipboard.writeText(JSON.stringify({data:e,copyType:"sections"}))}}function Pde(t){const e=te.getState(),n=Yct(t,e),r=Gct(n,e),i=Kct(n,e),s=Jct(n,i,e),o=eut(r,e),a=tut(o,e),l=nut(n);return{sections:n,sectionVariants:r,uiTypeCols:i,uiTypes:s,codeInfoCols:o,codeInfo:a,relativePositions:l}}function Yct(t,e){const n=jne(t,e),r=ae.pick(e.x,n),i=ae.pickBy(r,s=>dn(s.id)!==Y.PARAM_SWEEP?!0:!!ky(s.id,r));return ae.size(r)!==ae.size(i)&&Vi("Lone param sweeps won't be included in copy"),i}function Gct(t,e){const n={};for(const r of Object.values(t))Object.assign(n,ae.pick(e.variants,r.variantIds));return n}function Kct(t,e){return ae.pick(e.uiTypeCols,ae.map(t,n=>n.uiTypeColId))}function Jct(t,e,n){const r=[];for(const i of Object.values(t))r.push(i.uiTypeId),r.push(...i.nonPresetUITypeIds);for(const i of Object.values(e))for(const s of Object.values(i))r.push(s.uiTypeId),r.push(...s.nonPresetUITypeIds);return ae.pick(n.uiTypes,r)}function eut(t,e){return ae.pick(e.codeInfoCols,ae.map(t,n=>n.codeInfoColId))}function tut(t,e){let n=[];for(const r of Object.values(t)){const{ids:i}=LAe(e.codeInfo,r.children);for(const s of i)n.push(e.codeInfo[s])}return n=ae.keyBy(ae.cloneDeep(n),r=>r.id),n}function nut(t){const e={};for(const i of Object.keys(t)){const s=Uf(i);s&&(e[i]={x:s.x,y:s.y,zIndex:0})}let n=1/0,r=1/0;for(const i of Object.values(e))i.x<n&&(n=i.x),i.y<r&&(r=i.y);return ae.mapValues(e,i=>({x:i.x-n,y:i.y-r,zIndex:i.zIndex}))}function wX(t,e,n){BO(t,e,n),ae.isNil(e.width)||rut(t,e.width,n)}function rut(t,e,n){const i=B5(t,s=>{const{parentId:o}=n.x[s];return o&&!n.x[o].isHorizontalOrientation?o:null});MA({sectionId:i,exclude:t,width:e,state:n})}function MA({sectionId:t,exclude:e,width:n,state:r}){const i=RRe(t,r);for(const s of i)s!==e&&BO(s,{width:n},r)}function Ade(t,e,n,r){const i=e/t;return t<n||e<r?(t<n&&(t=n,e=t*i),e<r&&(e=r,t=e/i),{height:Math.round(t),width:Math.round(e)}):{height:t,width:e}}function iut(t,e,n,r){if(t==="auto"&&e==="auto")return{height:n,width:r};const i=r/n;if(t==="auto")return{height:e/i,width:e};if(e==="auto"){const o=t*i;return{height:t,width:o}}const s=e/t;if(s>i){const o=t*i;return{height:t,width:o}}else return s<i?{height:e/i,width:e}:{height:t,width:e}}function BO(t,e,n){n.x[t].size={...n.x[t].size,...e}}function Rde({sectionIds:t,oldParentIds:e,newParentIds:n,positions:r,oldParentId:i,newParentId:s,state:o}){for(const[a,l]of t.entries())$de({oldParentId:e?e[l]:i,newParentId:n?n[l]:s,oldSectionId:l,newSectionId:l,newIndex:a,position:r?r[l]:null,state:o})}function $de({oldParentId:t,newParentId:e,oldSectionId:n,newSectionId:r,newIndex:i,position:s,state:o}){sut({oldParentId:t,newParentId:e,oldSectionId:n,newSectionId:r,newIndex:i,position:s,state:o}),out(e,r,o)}function sut({oldParentId:t,newParentId:e,oldSectionId:n,newSectionId:r,newIndex:i,position:s,state:o}){t?am(t,a=>a.filter(l=>l!==n),o):Une([n]),e?am(e,a=>Zee(a,i,r),o):eM([{id:r,position:s,zIndex:0,tempZIndex:0}]),o.x[r].parentId=e}function out(t,e,n){if(!t)return;if(n.uiTypes[n.x[t].uiTypeId].type===Y.GROUP){const{isHorizontalOrientation:i}=n.x[t];if(!i){const s=n.variants[n.x[t].variantId].children;if(s.length>0){const o=n.x[s[0]].size.width;MA({sectionId:e,width:o,state:n})}}}else{const i=n.x[t].size.width;MA({sectionId:e,width:i,state:n})}}async function aut({sectionId:t,oldParentId:e,newParentId:n}){if(!e||e===n)return t;const{variantIds:r}=Pi(e);if(r.length<=1)return t;const{variantId:i}=Pi(t),s=te.getState().variants;let o=!1;for(const a of r){if(a===i)continue;if(s[a].children.findIndex(u=>u===t)!==-1){o=!0;break}}if(o){const a=await Tde(Pde([t]));if(a.status===200)return a.data}return t}function Mde({nodeIds:t,x:e,y:n}){let r;te.setState(i=>{r=_M({type:Y.GROUP,position:{x:e,y:n},state:i}),Rde({oldParentId:null,newParentId:r,sectionIds:t,state:i}),i.shouldRenameReferences=!0}),Vd([r]),hn(!0)}async function lut(){const t=ir.getState().ids,e=[...mr.getState().x].filter(r=>t.includes(r[0]));if(e.length>0){const r=e.map(o=>o[1].id),i=Math.min(...e.map(o=>o[1].position.x)),s=Math.min(...e.map(o=>o[1].position.y));Mde({nodeIds:r,x:i,y:s}),qe.setState({nodesSelectionDims:null})}}function Ide(t,e){if(dn(t,e)!==Y.GROUP)return;const n=Yt(t,e).children,r={};n.forEach(i=>{const{x:s,y:o}=Uf(i);r[i]={x:s,y:o}}),Rde({oldParentId:t,newParentId:null,sectionIds:n,positions:r,state:e}),_m([t],e),e.shouldRenameReferences=!0}function cut(){te.setState(t=>{const e=ir.getState().ids;e.length===1&&Ide(e[0],t)}),hn(!0)}function uut(){const{isOpen:t,x:e,y:n,nodeIds:r}=xy(u=>u.selection,ae.isEqual),i=te(u=>r.map(f=>u.x[f].positionAndSizeLocked).every(f=>f)),s=()=>{Sm(),qe.setState({nodesSelectionDims:null})};function o(){Mde({nodeIds:r,...Vf({x:e,y:n})}),s()}function a(){te.setState(u=>{_m(r,u)}),s(),E_(),hn(!0)}function l(){te.setState(u=>{for(const f of r)u.x[f].positionAndSizeLocked=!i}),s()}const c=i?"Unlock Position & Size":"Lock Position & Size";return x.jsxs(XD,{x:e,y:n,isOpen:t,closeContextMenu:s,children:[x.jsx(Yr,{onClick:o,children:"Create Group"}),x.jsx(Yr,{onClick:a,children:"Delete"}),x.jsx(Yr,{onClick:l,children:c})]})}function fut(){const{isOpen:t,x:e,y:n,paramInfoId:r}=xy(a=>a.typeError,ae.isEqual),i=te(a=>{var l;return!!((l=a.codeInfo[r])!=null&&l.ignoreTypeErrors)});function s(){let a;te.setState(l=>{a=!i,l.codeInfo[r].ignoreTypeErrors=a}),a&&vp.setState(l=>{_Re(r,l)}),Sm()}const o=i?"Enable Type Errors":"Ignore Type Errors";return x.jsx(XD,{x:e,y:n,isOpen:t,closeContextMenu:Sm,children:x.jsx(Yr,{onClick:s,children:o})})}const hut=ke.forwardRef(({},t)=>{const{width:e,height:n}=cn(r=>({width:r.width,height:r.height}),ae.isEqual);return x.jsxs(x.Fragment,{children:[x.jsx("div",{style:{width:`${e}px`,height:`${n}px`},className:"flex items-center justify-center rounded-xl bg-setta-100/70 shadow-inner dark:bg-setta-500/60",ref:t,children:x.jsx(lHe,{className:"scale-150 text-xl font-black text-setta-50 dark:text-setta-400/70"})}),x.jsx("div",{className:"flex-auto bg-transparent"})]})}),dut=ke.forwardRef(({},t)=>{const e=qe(o=>o.transform[2]),{width:n,height:r}=cn(o=>({width:o.width,height:o.height}),ae.isEqual),i=n*e,s=r*e;return x.jsx("div",{style:{width:`${i}px`,height:`${s}px`},className:"rounded-xl bg-blue-500/90 shadow-lg dark:bg-blue-700/90",ref:t})}),put=ke.forwardRef((t,e)=>cn(r=>r.activeId)&&x.jsx(T8e,{dropAnimation:null,children:x.jsx(dut,{ref:e})}));function mut(){return n8e(Lz(i$),Lz(r$,{coordinateGetter:X8e}))}const sb={INVALID:"INVALID"},gut={INVALID:"Invalid"};function vut({active:t}){const{width:e,height:n}=vEe(t.id),r=cn.getState();r.setActive({id:t.id,isTopLevel:t.data.current.isTopLevel,width:e,height:n}),r.isMovingFree&&qf.getState().replaceWithTemp(t.id)}function Out(){return cn(e=>e.isMovingFree)?yut:()=>{}}function yut({active:t,collisions:e}){var i;const n=(i=e[0])==null?void 0:i.triggerDistCondition,r=cn.getState();if(n!==r.triggerDistCondition){cn.setState({triggerDistCondition:n});const s=e[0];s&&s.id===r.overId&&Dde({active:t,over:s,collisions:e,calledFromOnDragMove:!0})}}function but(){return cn(e=>e.isMovingFree)?Dde:()=>{}}function Dde({active:t,over:e,collisions:n,calledFromOnDragMove:r}){const i=HD(e),s=cn.getState(),o=qf.getState(),a=$y(t.id),l=IA(a);if(n.length===0){o.removeChild(a),R1(null);return}if(r&&s.triggerDistCondition){SX({active:t,over:e,dndChildrenState:o,oldParentId:l,dndSectionId:a,collisions:n});return}if(!r&&i&&xut(s,i)<100){R1(i);return}if(s.setTime(i),!i){o.removeChild(a),R1(i);return}if(s.triggerDistCondition){SX({active:t,over:e,dndChildrenState:o,oldParentId:l,dndSectionId:a,collisions:n});return}if(a===i){R1(i);return}const c=IA(i)??i;Lde({active:t,over:e,dndSectionId:a,oldParentId:l,newParentId:c,dndChildrenState:o,collisions:n})}function Lde({active:t,over:e,dndSectionId:n,oldParentId:r,newParentId:i,dndChildrenState:s,collisions:o}){const a=HD(e),l=wut(t.id,i);if(l===sb.INVALID){s.removeChild(n),cn.setState({behaviorDropType:l,overId:a});return}const c=Yt(i).children.length;if(c===1&&om(t.id)===i){s.addChild({oldParentId:r,newParentId:i,childId:n,index:0});return}if(a===i&&c>0){s.removeChild(n);return}if(i!==r){const f=s.x[i].indexOf(a);let h=f;f>=0?o[0].pastHalfway&&(h=f+1):h=0,s.addChild({oldParentId:r,newParentId:i,childId:n,index:h})}R1(a)}function SX({active:t,over:e,dndChildrenState:n,oldParentId:r,dndSectionId:i,collisions:s}){const o=HD(e);o!==i&&Lde({active:t,over:e,dndSectionId:i,oldParentId:r,newParentId:o,dndChildrenState:n,collisions:s})}function R1(t){cn.setState({behaviorDropType:null,overId:t})}function xut(t,e){return Date.now()-(t.times[e]??0)}function IA(t){return qf.getState().y[t]}function wut(t,e){return!Cut(e)||Sut(t)&&!_ut(e)||Yt(e).isFrozen||kut(t)?sb.INVALID:null}function HD(t){return t?t.id:null}function Sut(t){return![Y.SECTION,Y.LIST_ROOT,Y.DICT_ROOT].includes(dn(t))}function _ut(t){return dn(t)===Y.GROUP}function kut(t){return te.getState().singletonSections[Y.GLOBAL_VARIABLES]===t}function Cut(t){return Gse(dn(t))}function Eut(){return{droppable:{frequency:cn(n=>n.isMovingFree&&!!n.activeId)?200:t$.Optimized}}}const Tut=({transform:t})=>({...t,y:0}),Put=({transform:t})=>({...t,x:0});function Aut(t,e){var o,a;if(!t)return e;if(!e)return t;const n=(o=t.data.droppableContainer.data.current.sortable)==null?void 0:o.containerId,r=(a=e.data.droppableContainer.data.current.sortable)==null?void 0:a.containerId;if(n&&!r)return t;if(!n&&r)return e;const i=t.data.intersectionRatio,s=e.data.intersectionRatio;if(n&&r){const l=t.data.absTriggerDist,c=e.data.absTriggerDist,u=t.data.triggerDist,f=e.data.triggerDist;if(l-c===0)return s-i>0?e:t;if(u>0&&f>0)return l-c>0?e:t;if(l-c>0)return f<0?e:t;if(c-l>0)return u<0?t:e}return s-i>0?e:t}function Rut(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),i=Math.min(e.left+e.width,t.left+t.width),s=Math.min(e.top+e.height,t.top+t.height),o=i-r,a=s-n;if(r<i&&n<s){const l=o*a;return Number(l.toFixed(4))}return 0}function $ut(t,e,n){return!(e!=null&&e.data.droppableContainer.data.current.isTopLevel)&&(!(e!=null&&e.data.droppableContainer.data.current.hasNested)||(e==null?void 0:e.data.droppableContainer.data.current.onlyChildId)===t)&&(e==null?void 0:e.data.triggerDist)>(n?20:100)*qe.getState().transform[2]}let Aw=null,H7=null;function Mut({active:t,collisionRect:e,droppableRects:n,droppableContainers:r}){var h,d,p,g;let i=null;const{left:s,top:o}=e;let a,l,c,u,f;for(const m of r)c=m.id,l=n.get(c),l&&t.id!==c&&(a=Rut(l,e),a&&(Aw===c&&(a*=1.1),f=(d=Pi((h=m.data.current.sortable)==null?void 0:h.containerId))==null?void 0:d.isHorizontalOrientation,u=f?o-l.top:s-l.left,i=Aut(i,{id:c,data:{droppableContainer:m,absTriggerDist:Math.abs(u),triggerDist:u,intersectionRatio:a}})));if(i){let m=0;Aw===i.id&&(H7===!0?m=10:H7===!1&&(m=-10));const v=(g=Pi((p=i.data.droppableContainer.data.current.sortable)==null?void 0:p.containerId))==null?void 0:g.isHorizontalOrientation;return v?i.pastHalfway=(e.left+e.right)/2+m>(n.get(i.id).left+n.get(i.id).right)/2:i.pastHalfway=(e.top+e.bottom)/2+m>(n.get(i.id).top+n.get(i.id).bottom)/2,i.triggerDistCondition=$ut(t.id,i,v),Aw=i.id,H7=i.pastHalfway,[i]}return Aw=null,[]}function Iut(t,e){return t?e?t.data.distance<e.data.distance?t:e:t:e}function _X(t,e){return e?[t.left,t.left+t.width]:[t.top,t.top+t.height]}const Dut=({active:t,collisionRect:e,droppableRects:n,droppableContainers:r})=>{var a;if(!t.data.current.sortable)return[];let i=null;const s=Pi(t.data.current.sortable.containerId).isHorizontalOrientation,o=_X(e,s);for(const l of r){const{id:c}=l,u=n.get(c);if(u&&t.data.current.sortable.containerId===((a=l.data.current.sortable)==null?void 0:a.containerId)){const f=_X(u,s),h=Math.abs(o[0]-f[0])+Math.abs(o[1]-f[1]);i=Iut(i,{id:c,data:{droppableContainer:l,distance:h}})}}return i?[i]:[]};function Lut(){const{isSorting:t,activeId:e}=cn(i=>({isSorting:i.isSorting,activeId:i.activeId}),ae.isEqual);return{modifiers:Nut(t,e),collisionDetection:t?Dut:Mut}}function Nut(t,e){if(t&&e){const n=om(e);if(n)return Pi(n).isHorizontalOrientation?[Tut]:[Put]}return null}function Qut({active:t,over:e}){e&&t.id!==e.id&&(te.setState(n=>{var r;am((r=t.data.current.sortable)==null?void 0:r.containerId,Z8e(t,e),n)}),hn(!0))}async function jut({active:t,over:e,collisions:n,dummyRef:r}){const i=qf.getState(),s=t.id,o=$y(s),a=e==null?void 0:e.id,l=om(s);let c=i.y[o]??null,u=null,f=null,h=null;const d=cn.getState().behaviorDropType;if(c){const m=i.x[c];u=m.indexOf(o);const v=m.indexOf(a),y=n[0].pastHalfway,b=m.length;f=s$(u,v,y,b)}else if(!a){f=0;const{x:m,y:v}=r.current.getBoundingClientRect();if(h=Vf({x:m,y:v}),!l){VRe(s,h);return}}if(d===sb.INVALID){m_();return}if(l===c&&Ll(l).children.indexOf(s)===f){m_();return}const p=await aut({sectionId:s,oldParentId:l,newParentId:c});let g;te.setState(m=>{p.sections?(Z$({...p,state:m}),g=Object.keys(p.sections)[0]):g=p,$de({oldParentId:l,newParentId:c,oldSectionId:s,newSectionId:g,newIndex:f,position:h,state:m}),m.shouldRenameReferences=!0})}function But(){const t=_.useRef(null);function e({active:n,over:r,collisions:i}){cn.getState().isSorting?Qut({active:n,over:r}):cn.getState().isMovingFree?jut({active:n,over:r,collisions:i,dummyRef:t}):m_();const s=o=>({isMovingFree:o.getState().isMovingFree,isSorting:o.getState().isSorting,disabled:o.getState().disabled});cn.getState().reset(s)}return{dummyRef:t,onDragEnd:e}}function zut({children:t}){const{dummyRef:e,onDragEnd:n}=But(),r=Out(),i=but(),{modifiers:s,collisionDetection:o}=Lut(),a=mut(),l=Eut();return x.jsxs(f8e,{sensors:a,collisionDetection:o,onDragStart:vut,onDragMove:r,onDragEnd:n,onDragOver:i,modifiers:s,measuring:l,autoScroll:!1,children:[t,x.jsx(put,{ref:e})]})}const Ah=({children:t,className:e,...n})=>x.jsx("button",{type:"button",className:qd(["react-flow__controls-button",e]),...n,children:t});Ah.displayName="ControlButton";function Fut(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:x.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Wut(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:x.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Vut(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:x.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Uut(){const{minZoom:t,maxZoom:e}=Nt(n=>({minZoom:n.gui.minZoom,maxZoom:n.gui.maxZoom}),Ma);return qe(n=>({minZoomReached:n.transform[2]<=t,maxZoomReached:n.transform[2]>=e}),Ma)}const Nde=({position:t="bottom-left"})=>{const[e,n]=_.useState(!1),{minZoomReached:r,maxZoomReached:i}=Uut();qe(h=>h.nodesDraggable||h.elementsSelectable,Ma);const s=qe(h=>h.fitViewOnInit),[o]=Ot.snapToGrid.hook(),[a]=Ot.overviewTrueWidth.hook(),[l]=Ot.showMinimap.hook(),c="!bg-blue-500 dark:!bg-blue-700 !text-white";if(_.useEffect(()=>{n(!0)},[]),!e)return null;const u=()=>{mee()},f=()=>{gee()};return x.jsxs(ooe,{className:"react-flow__controls overflow-hidden rounded-md border border-solid border-setta-800/10 shadow-lg transition-transform dark:border-setta-300/30",position:t,style:{transform:`translateX(${a}px)`},"data-testid":"rf__controls",children:[x.jsx(Ah,{onClick:u,className:"react-flow__controls-zoomin bg-setta-50 hover:bg-setta-200 dark:border-setta-800 dark:bg-setta-700 dark:text-setta-300 dark:hover:bg-setta-800 dark:[&_svg]:fill-setta-300",title:"zoom in","aria-label":"zoom in",disabled:i,children:x.jsx(Vut,{})}),x.jsx(Ah,{onClick:f,className:"react-flow__controls-zoomout bg-setta-50 hover:bg-setta-200 dark:border-setta-800 dark:bg-setta-700 dark:text-setta-300 dark:hover:bg-setta-800 dark:[&_svg]:fill-setta-300",title:"zoom out","aria-label":"zoom out",disabled:r,children:x.jsx(Wut,{})}),x.jsx(Ah,{className:`react-flow__controls-fitview hover:bg-setta-200 dark:border-setta-800 dark:text-setta-300 dark:hover:bg-setta-800 dark:[&_svg]:fill-setta-300 ${s?c:"bg-setta-50 dark:bg-setta-700"}`,onClick:Vne,title:"fit view","aria-label":"fit view",children:x.jsx(Fut,{})}),x.jsx(Ah,{onClick:q$e,className:`hover:bg-setta-200 dark:border-setta-800 dark:text-setta-300 dark:hover:bg-setta-800 dark:[&_svg]:fill-setta-300 ${o?c:"bg-setta-50 dark:bg-setta-700"}`,children:x.jsx(uHe,{})}),x.jsx(Ah,{className:"react-flow__controls-button dark: bg-setta-50 hover:bg-setta-200 dark:border-setta-800 dark:bg-setta-700 dark:text-setta-300 dark:hover:bg-setta-800",onClick:vee,children:x.jsx(pHe,{})}),x.jsx(Ah,{onClick:V$e,className:`hover:bg-setta-200 dark:border-setta-800 dark:text-setta-300 dark:hover:bg-setta-800 dark:[&_svg]:fill-setta-300 ${l?c:"bg-setta-50 dark:bg-setta-700"}`,children:x.jsx(UFe,{})})]})};Nde.displayName="Controls";const qut=_.memo(Nde);function Xut({color:t,dimensions:e,lineWidth:n}){return x.jsx("path",{stroke:t,strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})}function Hut({color:t,radius:e}){return x.jsx("circle",{cx:e,cy:e,r:e,fill:t})}var i2=(t=>(t.Lines="lines",t.Dots="dots",t.Cross="cross",t))(i2||{});function Qde(){const[e]=Ot.darkMode.hook(),n=Nt(c=>e?c.gui.gridColorDarkMode:c.gui.gridColor),r=Nt(c=>c.gui.gridPatternSize),i=Nt(c=>c.gui.snapGrid),s=Nt(c=>i2[c.gui.gridPattern]),o=_.useRef(null),a=s===i2.Dots,l=s===i2.Cross;return x.jsxs("svg",{className:"react-flow__background",style:{position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:o,"data-testid":"rf__background",children:[x.jsx(Yut,{offset:2,gapXY:i,patternColor:n,patternSize:r,isCross:l,isDots:a}),x.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#ReactFlowBackground)"})]})}Qde.displayName="Background";const Zut=_.memo(Qde),Yut=_.memo(({offset:t,gapXY:e,patternColor:n,patternSize:r,isCross:i,isDots:s})=>{const o=qe(f=>f.transform,Ma),a=[e[0]*o[2]||1,e[1]*o[2]||1],l=r*o[2],c=i?[l,l]:a,u=s?[l/t,l/t]:[c[0]/t,c[1]/t];return x.jsx("pattern",{id:"ReactFlowBackground",x:o[0]%a[0],y:o[1]%a[1],width:a[0],height:a[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${u[0]},-${u[1]})`,children:s?x.jsx(Hut,{color:n,radius:l/t}):x.jsx(Xut,{dimensions:c,color:n,lineWidth:r*o[2]})})});function Gut(){return _.useCallback(({sourceEvent:e})=>{const{transform:n}=qe.getState(),r=e.touches?e.touches[0].clientX:e.clientX,i=e.touches?e.touches[0].clientY:e.clientY,s={x:(r-n[0])/n[2],y:(i-n[1])/n[2]};return{xSnapped:s.x,ySnapped:s.y,...s}},[])}function Kut(t,e,n){let r=t;do{if(r!=null&&r.matches(e))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function Jut(t,e,n,r){const{ids:i}=ir.getState(),s=i.includes(r);return Array.from(t.values()).filter(o=>(!r&&i.includes(o.id)||s&&i.includes(o.id)||!s&&o.id===r)&&(o.draggable||e&&typeof o.draggable>"u")).map(o=>{var a,l;return{id:o.id,position:o.position||{x:0,y:0},distance:{x:n.x-(((a=o.position)==null?void 0:a.x)??0),y:n.y-(((l=o.position)==null?void 0:l.y)??0)},delta:{x:0,y:0},width:o.width,height:o.height}})}function jde({nodeRef:t,disabled:e=!1,nodeId:n,isSelectable:r}){const[i,s]=_.useState(!1),o=_.useRef([]),a=_.useRef({x:null,y:null}),l=_.useRef(0),c=_.useRef(null),u=_.useRef({x:0,y:0}),f=_.useRef(null),h=_.useRef(!1),d=_.useRef(!1),p=Gut();return _.useEffect(()=>{if(t!=null&&t.current){const g=Mo(t.current),m=({x:b,y:S},k=!1)=>{const{nodesSelectionDims:E,shiftNodesSelection:T,setNodesSelection:C}=qe.getState(),{snapGrid:A}=Nt.getState().gui,[R]=Ot.snapToGrid.state(),Q={x:b-a.current.x,y:S-a.current.y};a.current={x:b,y:S};let L=!1;o.current=o.current.map(z=>{const B={x:b-z.distance.x,y:S-z.distance.y};return k&&R&&(B.x=A[0]*Math.round(B.x/A[0]),B.y=A[1]*Math.round(B.y/A[1])),L=L||z.position.x!==B.x||z.position.y!==B.y,z.position=B,z}),L&&(Xne(o.current),!n&&E&&(k&&R?C(o.current.length):T(Q)),s(!0))},v=()=>{if(!c.current)return;const[b,S]=cEe(u.current,c.current);if(b!==0||S!==0){const{transform:k,panBy:E}=qe.getState(),T=(a.current.x??0)-b/k[2],C=(a.current.y??0)-S/k[2];E({x:b,y:S})&&m({x:T,y:C})}l.current=requestAnimationFrame(v)},y=b=>{const{multiSelectionActive:S,nodesDraggable:k}=qe.getState(),E=mr.getState().x;d.current=!0,!r&&!S&&n&&ir.getState().ids.includes(n);const T=p(b);a.current=T,o.current=Jut(E,k,T,n),o.current&&(WRe(o.current),Ut.setState({mouseDownDraggingSection:!0}))};if(e)g.on(".drag",null);else{const b=t6e().on("start",S=>{const{domNode:k,nodeDragThreshold:E}=qe.getState();E===0&&y(S);const T=p(S);a.current=T,c.current=(k==null?void 0:k.getBoundingClientRect())||null,u.current=i_(S.sourceEvent,c.current)}).on("drag",S=>{var C,A;const k=p(S),{autoPanOnNodeDrag:E,nodeDragThreshold:T}=qe.getState();if(!h.current&&d.current&&E&&(h.current=!0,v()),!d.current){const R=k.xSnapped-(((C=a==null?void 0:a.current)==null?void 0:C.x)??0),Q=k.ySnapped-(((A=a==null?void 0:a.current)==null?void 0:A.y)??0);Math.sqrt(R*R+Q*Q)>T&&y(S)}(a.current.x!==k.xSnapped||a.current.y!==k.ySnapped)&&o.current&&d.current&&(f.current=S.sourceEvent,u.current=i_(S.sourceEvent,c.current),m(k))}).on("end",S=>{Ut.setState({mouseDownDraggingSection:!1}),d.current&&(Ot.snapToGrid.state()[0]&&m(a.current,!0),s(!1),h.current=!1,d.current=!1,cancelAnimationFrame(l.current),o.current&&o3(o.current.map(k=>k.id),!0))}).filter(S=>{const k=S.target;return!S.button&&!Kut(k,`.${eEe}`,t)});return g.call(b),()=>{g.on(".drag",null)}}}},[t,e,r,n,p]),i}const Bde=t=>{const{nodesSelectionDims:e,nodesDraggable:n,shiftNodesSelection:r}=qe.getState(),{snapGrid:i}=Nt.getState().gui,[s]=Ot.snapToGrid.state(),o=ir.getState().ids,a=Hm().filter(p=>o.includes(p.id)&&(p.draggable||n&&typeof p.draggable>"u")),l=s?i[0]:5,c=s?i[1]:5,u=t.isShiftPressed?4:1,f=t.x*l*u,h=t.y*c*u,d=a.map(p=>{if(p.position){const g={x:p.position.x+f,y:p.position.y+h};s&&(g.x=i[0]*Math.round(g.x/i[0]),g.y=i[1]*Math.round(g.y/i[1])),p.position=g}return p});Xne(d),e&&r({x:f,y:h})};var zde={},Fde={},ZD={exports:{}},Vn=String,Wde=function(){return{isColorSupported:!1,reset:Vn,bold:Vn,dim:Vn,italic:Vn,underline:Vn,inverse:Vn,hidden:Vn,strikethrough:Vn,black:Vn,red:Vn,green:Vn,yellow:Vn,blue:Vn,magenta:Vn,cyan:Vn,white:Vn,gray:Vn,bgBlack:Vn,bgRed:Vn,bgGreen:Vn,bgYellow:Vn,bgBlue:Vn,bgMagenta:Vn,bgCyan:Vn,bgWhite:Vn}};ZD.exports=Wde();ZD.exports.createColors=Wde;var eft=ZD.exports;(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(l,c){for(var u in c)Object.defineProperty(l,u,{enumerable:!0,get:c[u]})}e(t,{dim:function(){return o},default:function(){return a}});const n=r(eft);function r(l){return l&&l.__esModule?l:{default:l}}let i=new Set;function s(l,c,u){typeof process<"u"&&{}.JEST_WORKER_ID||u&&i.has(u)||(u&&i.add(u),console.warn(""),c.forEach(f=>console.warn(l,"-",f)))}function o(l){return n.default.dim(l)}const a={info(l,c){s(n.default.bold(n.default.cyan("info")),...Array.isArray(l)?[l]:[c,l])},warn(l,c){s(n.default.bold(n.default.yellow("warn")),...Array.isArray(l)?[l]:[c,l])},risk(l,c){s(n.default.bold(n.default.magenta("risk")),...Array.isArray(l)?[l]:[c,l])}}})(Fde);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});const e=n(Fde);function n(s){return s&&s.__esModule?s:{default:s}}function r({version:s,from:o,to:a}){e.default.warn(`${o}-color-renamed`,[`As of Tailwind CSS ${s}, \`${o}\` has been renamed to \`${a}\`.`,"Update your configuration file to silence this warning."])}const i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return r({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return r({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return r({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return r({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return r({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(zde);let Z7=zde;var tft=(Z7.__esModule?Z7:{default:Z7}).default;const nft=ra(tft);function rft({sectionId:t,isGroup:e}){const n=e?"":"0.75rem",r=e?"":"-0.75rem";return cn(i=>{const s=i.overId===t?i.behaviorDropType:null;return{behaviorDropType:s,style:s===sb.INVALID?{borderRadius:"1.5rem",padding:n,margin:r,backgroundColor:nft.red[600]}:{}}},ae.isEqual)}function ift(t){const{isSorting:e,isMovingFree:n}=zne(),r=cn(c=>c.disabled[t]),i=cn(c=>c.setDisabled),s=C5(t);_.useEffect(()=>{i(t,{draggable:s,droppable:!0})},[s]);function o(c){let u=om(t);for(;u;){if(c===u)return!0;u=om(u)}return!1}function a({active:c}){var u;s||(n&&c.id!==t&&!o(c.id)?i(t,{draggable:!1,droppable:!1}):e&&((u=c.data.current.sortable)==null?void 0:u.containerId)===t&&i(t,{draggable:!1,droppable:!1}))}function l(){i(t,{draggable:s,droppable:!0})}return jJ({onDragStart:a,onDragEnd:l,onDragCancel:l}),r??{draggable:s,droppable:!0}}function Vde({sectionId:t,isTopLevel:e}){const{hasNested:n,disabled:r,onlyChildId:i}=te(s=>{var l,c,u;const o=(l=s.x[t])==null?void 0:l.variantId,a=o?s.variants[o].children:[];return{hasNested:a.length>0,onlyChildId:a.length===1?a[0]:null,disabled:(c=s.x[t])!=null&&c.positionAndSizeLocked?(u=s.x[t])==null?void 0:u.positionAndSizeLocked:null}},ae.isEqual);return{id:t,data:{isTopLevel:e,hasNested:n,onlyChildId:i},disabled:r}}function Ude(){const t=cn(n=>n.isSorting||n.isMovingFree),e=qe(n=>n.moveSectionActivationKeyPressed||n.selectionKeyPressed||n.multiSelectionActive||n.zoomActivationKeyPressed);return t||e}function sft({sectionId:t,withNested:e,selfOnly:n}){ka.setState(r=>{e?r.withNested[t]=e:r.selfOnly[t]=n})}function oft({sectionId:t}){ka.setState(e=>{delete e.withNested[t],delete e.selfOnly[t]})}function qde(t,e){const n=_.useRef(null);return _.useEffect(()=>(sft({sectionId:t,[e]:n.current}),()=>oft({sectionId:t})),[]),n}function aft({sectionId:t}){const e=te(r=>r.x[t].isHorizontalOrientation);function n(){$Re(t)}return x.jsx(Fa,{icon:e?x.jsx(oHe,{}):x.jsx(sHe,{}),color:"text-setta-400 dark:text-setta-600 hover:text-setta-500 dark:hover:text-setta-400",bg:"bg-transparent justify-content-center mr-1",size:"w-4 h-4",padding:"p-0",onClick:n})}function Xde({sectionId:t}){const{isGroup:e,positionAndSizeLocked:n}=te(o=>({isGroup:dn(t,o)===Y.GROUP,positionAndSizeLocked:o.x[t].positionAndSizeLocked}),ae.isEqual),r=n?"gg-lock":"gg-lock-unlock",i=e?n?"[&>i]:!-mt-[6px]":"[&>i]:!scale-50 [&>i]:!-mt-[9px]":"[&>i]:!scale-[.4]";function s(){MRe(t)}return x.jsx(Fa,{icon:x.jsx("i",{className:r}),color:`${n?"dark:text-orange-500 text-orange-600 hover:!text-orange-100 dark:hover:!text-orange-100":e?"text-setta-400 dark:text-setta-600":"text-setta-600"} hover:text-orange-500 dark:hover:text-orange-700`,bg:`${n?"shadow-[inset_0_1px_1px_0_rgb(0_0_0_/_0.1)] dark:shadow-none dark:border-transparent dark:bg-transparent hover:bg-orange-500 dark:hover:bg-orange-500":"bg-transparent"} ${i}`,size:e?"w-5 h-5":"w-4 h-4",padding:"p-0 mr-1",onClick:s})}function lft(t){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z"},child:[]}]})(t)}function cft(t){return ft({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21.038,4.9l-7.577-4.498C13.009,0.134,12.505,0,12,0c-0.505,0-1.009,0.134-1.462,0.403L2.961,4.9 C2.057,5.437,1.5,6.429,1.5,7.503v8.995c0,1.073,0.557,2.066,1.462,2.603l7.577,4.497C10.991,23.866,11.495,24,12,24 c0.505,0,1.009-0.134,1.461-0.402l7.577-4.497c0.904-0.537,1.462-1.529,1.462-2.603V7.503C22.5,6.429,21.943,5.437,21.038,4.9z M15.17,18.946l0.013,0.646c0.001,0.078-0.05,0.167-0.111,0.198l-0.383,0.22c-0.061,0.031-0.111-0.007-0.112-0.085L14.57,19.29 c-0.328,0.136-0.66,0.169-0.872,0.084c-0.04-0.016-0.057-0.075-0.041-0.142l0.139-0.584c0.011-0.046,0.036-0.092,0.069-0.121 c0.012-0.011,0.024-0.02,0.036-0.026c0.022-0.011,0.043-0.014,0.062-0.006c0.229,0.077,0.521,0.041,0.802-0.101 c0.357-0.181,0.596-0.545,0.592-0.907c-0.003-0.328-0.181-0.465-0.613-0.468c-0.55,0.001-1.064-0.107-1.072-0.917 c-0.007-0.667,0.34-1.361,0.889-1.8l-0.007-0.652c-0.001-0.08,0.048-0.168,0.111-0.2l0.37-0.236 c0.061-0.031,0.111,0.007,0.112,0.087l0.006,0.653c0.273-0.109,0.511-0.138,0.726-0.088c0.047,0.012,0.067,0.076,0.048,0.151 l-0.144,0.578c-0.011,0.044-0.036,0.088-0.065,0.116c-0.012,0.012-0.025,0.021-0.038,0.028c-0.019,0.01-0.038,0.013-0.057,0.009 c-0.098-0.022-0.332-0.073-0.699,0.113c-0.385,0.195-0.52,0.53-0.517,0.778c0.003,0.297,0.155,0.387,0.681,0.396 c0.7,0.012,1.003,0.318,1.01,1.023C16.105,17.747,15.736,18.491,15.17,18.946z M19.143,17.859c0,0.06-0.008,0.116-0.058,0.145 l-1.916,1.164c-0.05,0.029-0.09,0.004-0.09-0.056v-0.494c0-0.06,0.037-0.093,0.087-0.122l1.887-1.129 c0.05-0.029,0.09-0.004,0.09,0.056V17.859z M20.459,6.797l-7.168,4.427c-0.894,0.523-1.553,1.109-1.553,2.187v8.833 c0,0.645,0.26,1.063,0.66,1.184c-0.131,0.023-0.264,0.039-0.398,0.039c-0.42,0-0.833-0.114-1.197-0.33L3.226,18.64 c-0.741-0.44-1.201-1.261-1.201-2.142V7.503c0-0.881,0.46-1.702,1.201-2.142l7.577-4.498c0.363-0.216,0.777-0.33,1.197-0.33 c0.419,0,0.833,0.114,1.197,0.33l7.577,4.498c0.624,0.371,1.046,1.013,1.164,1.732C21.686,6.557,21.12,6.411,20.459,6.797z"},child:[]}]})(t)}function uft(t){return ft({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z"},child:[]}]})(t)}function fft(t,e){return dn(t)===Y.SOCIAL&&GD(e.x[t].social)}function hft(t,e){return dn(t)===Y.SOCIAL&&YD(e.x[t].social)}function YD(t){return t&&(t.includes("youtube")||t.includes("youtu.be"))}function GD(t){return t&&(t.includes("twitter")||t.includes("x.com"))}function kX({sectionId:t,sectionTypeName:e,isInOtherProjectConfigs:n,isListElement:r}){if(r)return x.jsx(gft,{sectionId:t});if(n)return x.jsx(dft,{sectionId:t});switch(e){case Y.CODE:return x.jsx(mft,{sectionId:t,classes:"text-setta-300 group-hover/card-section:text-blue-500 dark:group-hover/card-section:text-[#0084ff] dark:text-setta-500 transition-colors"});case Y.TERMINAL:return x.jsx(Oft,{sectionId:t});case Y.GLOBAL_PARAM_SWEEP:case Y.GLOBAL_VARIABLES:return x.jsx(B$e,{className:"text-setta-300 transition-colors group-hover/card-section:text-green-500 dark:text-setta-500 "});case Y.PARAM_SWEEP:return x.jsx(aHe,{className:"text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] "});case Y.INFO:return x.jsx(vft,{sectionId:t});case Y.IMAGE:return x.jsx("div",{className:"relative",children:x.jsx("i",{className:"gg-image absolute inset-0 !scale-50 text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff]"})});case Y.DRAW:return x.jsx(tI,{className:"p-0 text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] "});case Y.IFRAME:return x.jsx("div",{className:"relative flex w-2 justify-center",children:x.jsx("i",{className:"gg-code-slash !rotate-[14deg] !scale-50 text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff]"})});case Y.SOCIAL:return x.jsx(pft,{sectionId:t});case Y.GROUP:return x.jsx(lit,{className:`[&_*]:!scale-120 text-setta-400 transition-colors group-hover/group-section:text-blue-600 dark:text-setta-500 dark:group-hover/group-section:text-[#0084ff]
|
355
355
|
`});case Y.CHART:return x.jsx(ait,{className:`text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff]
|
356
|
-
`});default:return x.jsx("i",{className:"gg-menu group/card-section:hover:bg !scale-110 text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] "})}}function dft({sectionId:t}){const e=te(n=>dn(t,n)===Y.GROUP);return x.jsx("i",{className:`gg-link group/card-section:hover:bg transition-colors group-hover/card-section:text-pink-500 dark:group-hover/card-section:text-[#ff00ff] ${e?"-rotate-45 !scale-75 text-purple-600 dark:text-purple-700":"text-purple-500 dark:text-purple-500"}`})}function pft({sectionId:t}){const{isYouTube:e,isTwitter:n}=te(r=>({isYouTube:YD(r.x[t].social),isTwitter:GD(r.x[t].social)}),ae.isEqual);return e?x.jsx(vlt,{className:"fill-setta-300 transition-colors group-hover/card-section:fill-blue-500 dark:fill-setta-500 dark:group-hover/card-section:fill-[#0084ff] "}):n?x.jsx(oit,{className:"fill-setta-300 transition-colors group-hover/card-section:fill-blue-500 dark:fill-setta-500 dark:group-hover/card-section:fill-[#0084ff] "}):x.jsx(lft,{className:"text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] "})}function mft({sectionId:t,classes:e}){switch(te(r=>r.x[t].codeLanguage)){case"python":return x.jsx(uft,{className:e});case"javascript":return x.jsx(FFe,{className:e});case"bash":return x.jsx(cft,{className:e});default:return null}}function gft({sectionId:t}){const e=BAe(t);return x.jsxs("p",{className:"group/card-section:hover:bg font-mono text-[9px] tracking-tighter text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] ",children:["[",e,"]"]})}function vft({sectionId:t}){return te(n=>n.x[t].renderMarkdown)?x.jsx(glt,{className:"text-transparent transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:text-transparent dark:group-hover/card-section:text-[#0084ff]"}):x.jsx(iHe,{className:"text-transparent transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:text-transparent dark:group-hover/card-section:text-[#0084ff]"})}function Oft({sectionId:t}){return te(n=>n.x[t].isReadOnlyTerminal)?x.jsx(jct,{className:"text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] ",...Rr({title:"Read-only terminal"})}):x.jsx(ylt,{className:"text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] ",...Rr({title:"Read/write terminal"})})}function yft({sectionId:t}){async function e(){YPe(t)}return x.jsx(mn,{onClick:e,children:"Add artifact by filepath"})}function bft({sectionId:t}){function e(n){const r=te.getState().singletonSections.inMemoryFnStdoutTerminal;r?rg(r):te.setState(i=>{_ie(t,{isReadOnlyTerminal:!0,uiTypeId:Nm.TERMINAL},i)})}return x.jsx(mn,{onClick:e,children:"Add Stdout Terminal"})}function CX({sectionId:t}){function e(){const{variantId:n}=Pi(t);te.setState(r=>{for(const i of Object.keys(r.variants[n].values))r.variants[n].values[i]=Wm()}),hn(!0),Nd(t,n)}return x.jsx(mn,{onClick:e,children:"Clear Values"})}function n1({sectionId:t}){async function e(){dde(t)}return x.jsx(mn,{onClick:e,children:"New Version"})}function xft({sectionId:t}){const{hasParams:e,hideSearch:n,hideParams:r}=te(s=>({hasParams:NAe(t,s),hideSearch:s.x[t].hideSearch,hideParams:s.x[t].hideParams}),ae.isEqual);function i(){te.setState(s=>{s.x[t].hideParams=!r})}return!e&&!n&&x.jsx(mn,{onClick:i,children:r?"Show Params":"Hide Params"})}function wft({sectionId:t}){const{selectedItem:e,hideSearch:n,hideParams:r}=te(s=>({selectedItem:Yt(t,s).selectedItem,hideSearch:s.x[t].hideSearch,hideParams:s.x[t].hideParams}),ae.isEqual);function i(){te.setState(s=>{s.x[t].hideSearch=!n})}return!e&&!r&&x.jsx(mn,{onClick:i,children:n?"Show Search":"Hide Search"})}function EX({sectionId:t}){const e=te(r=>r.x[t].hideUnpinnedParams);function n(){te.setState(r=>{r.x[t].hideUnpinnedParams=!e})}return x.jsx(mn,{onClick:n,children:e?"Show Unpinned Params":"Hide Unpinned Params"})}function TX({sectionId:t}){function e(n){const{paramSweepSectionId:r}=te.getState().x[t];r?rg(r):Sft(t)}return x.jsx(mn,{onClick:e,children:"Add Param Sweep"})}function Sft(t){const e=Kn();te.setState(n=>{n.x[t].paramSweepSectionId=e,_ie(t,{id:e,name:Kse(n.x[t].name),uiTypeId:Nm.PARAM_SWEEP},n)})}function r1({sectionId:t}){function e(){Bne([t]);const{variantId:n}=Pi(t);Nd(t,n)}return x.jsx(mn,{onClick:e,children:"Reset To Default Version"})}function _ft({sectionId:t}){const{displayMode:e,renderMarkdown:n,variantIsFrozen:r}=te(o=>({displayMode:o.x[t].displayMode,renderMarkdown:o.x[t].renderMarkdown,variantIsFrozen:Yt(t,o).isFrozen}),ae.isEqual);function i(){te.setState(o=>{o.x[t].displayMode=e===so.RENDER?so.EDIT:so.RENDER})}const s=n?"Markdown":"Plaintext";return x.jsx(mn,{onClick:i,disabled:r,children:e===so.EDIT?`Render ${s}`:`Edit ${s}`})}function kft({sectionId:t}){const e=te(i=>i.x[t].renderMarkdown);function n(){te.setState(i=>{i.x[t].renderMarkdown=!e})}const r=e?"Plaintext":"Markdown";return x.jsx(mn,{onClick:n,children:`Convert to ${r}`})}function Rw({sectionId:t}){const e=te(r=>r.x[t].displayMode);function n(){te.setState(r=>{const i=e===so.YAML?so.GUI:so.YAML;r.x[t].displayMode=i;const{height:s,width:o}=r.x[t].size;if(i===so.YAML&&(s==="auto"||o==="auto")){r.x[t].tempSavedSize=r.x[t].size;const{width:a,height:l}=Uf(t);r.x[t].size={width:a,height:l}}})}return x.jsx(mn,{onClick:n,children:e===so.YAML?"Show GUI":"Show Yaml"})}function Cft({sectionId:t}){function e(){te.setState(n=>{Ide(t,n)}),hn(!0)}return x.jsx(mn,{onClick:e,children:"Ungroup"})}function Hde({sectionId:t,sectionTypeName:e,isInOtherProjectConfigs:n}){const r=Tft(e),i=QXe(t),s=`nodrag w-[14px] h-[14px] flex cursor-pointer select-none items-center justify-center rounded-full ${i?"ml-1 p-0.5":"p-1"} mr-1 -ml-0.5 aspect-square font-semibold leading-none text-setta-700 outline-none transition-colors duration-150 hover:bg-setta-100 focus-visible:ring-2 dark:text-setta-200 dark:hover:bg-setta-800 [&_*]:data-[state=open]:!text-setta-300 dark:[&_*]:data-[state=open]:!text-setta-500`,o=`nodrag flex select-none items-center justify-center rounded-full ${i?"ml-1 p-0.5":"p-0.5"} mr-1 aspect-square font-semibold leading-none text-setta-700 outline-none transition-colors duration-150 dark:text-setta-200`;return r.length===0?x.jsx("div",{className:o,children:x.jsx(kX,{sectionId:t,sectionTypeName:e,isInOtherProjectConfigs:n,isListElement:i})}):x.jsx(tie,{className:Cl,children:x.jsx(Eft,{triggerClassName:s,trigger:x.jsx(kX,{sectionId:t,sectionTypeName:e,isInOtherProjectConfigs:n,isListElement:i}),children:r.map((a,l)=>x.jsx(a,{sectionId:t},l))})})}function Eft({children:t,trigger:e,triggerClassName:n}){return x.jsx(gie,{triggerClassName:n,contentClassName:"z-20 min-w-[200px] rounded-md border border-solid border-setta-100 bg-white p-1 shadow-xl transition-all will-change-[transform,opacity] dark:border-setta-700/50 dark:bg-setta-850",contentAlign:"start",contentSideOffset:5,contentAlignOffset:-3,trigger:e,children:t})}function Tft(t){switch(t){case Y.INFO:return[_ft,kft,n1,r1];case Y.SECTION:return[n1,TX,wft,xft,EX,Rw,CX,r1];case Y.GLOBAL_VARIABLES:return[n1,TX,EX,Rw,CX,r1];case Y.PARAM_SWEEP:return[n1,Rw,r1];case Y.GLOBAL_PARAM_SWEEP:return[Rw];case Y.LIST_ROOT:case Y.DICT_ROOT:case Y.CODE:return[n1,r1,bft];case Y.GROUP:return[Cft];case Y.DRAW:case Y.IMAGE:case Y.CHART:return[yft];default:return[]}}function Zde({sectionId:t,titleProps:e}){const{sectionName:n,titleIsEditable:r}=$ft(t);return r?x.jsx(Aft,{sectionId:t,sectionName:n,titleProps:e,...Rr({title:n})}):x.jsx(Pft,{sectionName:n,className:e.fixed,...Rr({title:n})})}function Pft({sectionName:t,className:e,onMouseEnter:n,onMouseLeave:r}){return x.jsx("h2",{className:e,onMouseEnter:n,onMouseLeave:r,children:t})}function Aft({sectionId:t,sectionName:e,titleProps:n,onMouseEnter:r,onMouseLeave:i}){function s(h){Rft(t,h)}function o(h){return!Mft(t,h)}const[a,l,c,u,f]=IM(e,s,o);return x.jsx(Kie,{value:a,onChange:l,onBlur:c,onKeyDown:u,titleProps:n,doubleClickToEdit:!0,onMouseEnter:r,onMouseLeave:i,blurTriggeredByEscapeKey:f})}function Rft(t,e){te.setState(n=>{const r=n.x[t];r.name=e,r.paramSweepSectionId&&(n.x[paramSweepSectionId].name=Kse(e)),n.shouldRenameReferences=!0}),hn(!0)}function $ft(t){return te(e=>{const n=[Y.GLOBAL_VARIABLES,Y.PARAM_SWEEP,Y.GLOBAL_PARAM_SWEEP].includes(dn(t,e)),r=II(t,[Y.LIST_ROOT],e);return{sectionName:e.x[t].name,titleIsEditable:!r&&!n}})}function Mft(t,e){const n=te.getState(),{parentId:r}=n.x[t],i=r?Yt(r).children:mr.getState().x.keys();for(const s of i)if(n.x[s].name===e)return!0;return!1}function Ift(t){switch(t){case Y.CODE:return"bg-white dark:bg-setta-900";case Y.TERMINAL:return"bg-setta-950 overflow-clip";case Y.GLOBAL_PARAM_SWEEP:return"@container/multipane";case Y.GLOBAL_VARIABLES:return"bg-white dark:bg-black";default:return"bg-setta-50 dark:bg-setta-860"}}function Yde({jsonSourceMissing:t,isActiveSection:e,isGlobalVariables:n,isInOtherProjectConfigs:r}){return t?"outline-red-600 dark:outline-red-400":e&&n?"outline-green-600 dark:outline-turquoise-400":r?e?"outline-purple-600 dark:outline-purple-700":"outline-transparent [&:active:not(:has(button:active,:active.setta-prevent-section-active-css))]:outline-fuchsia-400":e?"outline-blue-600 dark:outline-blue-700":"outline-transparent [&:active:not(:has(button:active,:active.setta-prevent-section-active-css))]:outline-cyan-300"}function Gde(t,e){return n=>{if(n.target.closest(`button, [role="menuitem"], .${lT}`)||Dft())return;if(n.stopPropagation(),Ut.getState().mouseDownDrawArea){Ut.setState({mouseDownDrawArea:!1});return}if(Ut.getState().isSelectingParams){const i=QAe(t,te.getState());!e&&i?yW([t]):e&&!i&&HT([t])}else qe.getState().multiSelectionActive?e?HT([t]):yW([t]):Vd([t]);const r=B5(t);o3([r],!1)}}function Kde(t){return qf(e=>{var n;return((n=e.x[t])==null?void 0:n.length)>0})}function Dft(t=5){const{lastMouseDownLocation:e,lastMouseUpLocation:n}=Ut.getState();if(!e||!n)return!1;const r=n.x-e.x,i=n.y-e.y;return Math.sqrt(r*r+i*i)>t}function Lft({isGroup:t,sectionId:e,droppableRef:n,draggableRef:r,className:i,style:s,trueDragListeners:o,children:a}){const l=qde(e,"withNested");function c(f){l.current=f,n&&n(f),r&&r(f)}const u={ref:c,...o};return t?x.jsx(Qft,{sectionId:e,commonProps:u,refForPosition:l,className:i,style:s,children:a}):x.jsx("div",{className:`${i} focus-visible:outline-none`,style:s,...u,onKeyDown:f=>Oie(f,l,e),tabIndex:"-1",children:a})}const Nft=ke.memo(Lft,ae.isEqual);function Qft({sectionId:t,commonProps:e,refForPosition:n,className:r,style:i,children:s}){const o=Kde(t),a=ir(d=>d.ids.includes(t)),{positionAndSizeLocked:l,isInOtherProjectConfigs:c}=te(d=>({positionAndSizeLocked:d.x[t].positionAndSizeLocked,isInOtherProjectConfigs:d.x[t].isInOtherProjectConfigs}),ae.isEqual),f=Ude()?"pointer-events-none select-none":"",h=Yde({isActiveSection:a,isInOtherProjectConfigs:c});return x.jsxs("div",{className:`group/group-section flex min-w-[250px] flex-col items-stretch px-6 pb-6 pt-2 focus-visible:outline-none ${r}`,...e,onClick:Gde(t,a),onKeyDown:d=>Oie(d,n,t),tabIndex:"-1",style:i,children:[x.jsx("div",{className:`outline outline-4 ${h} transition-radius absolute left-0 right-0 top-0 z-0 h-full w-full ${l?"rounded-sm border-setta-400/90 dark:border-setta-975/35":"rounded-3xl border-setta-50/50 dark:border-setta-700"} border border-solid bg-setta-100/40 outline outline-2 outline-transparent backdrop-blur-[1px] dark:bg-setta-950/20`}),x.jsxs("div",{className:"z-10 flex min-h-10 w-full items-center",children:[x.jsx(Hde,{sectionId:t,sectionTypeName:Y.GROUP,isInOtherProjectConfigs:c}),x.jsx("div",{className:`${f} relative my-auto mr-2 flex min-h-10 w-full items-center overflow-hidden`,children:x.jsx(jft,{sectionId:t})}),x.jsxs("div",{className:"z-10 ml-auto flex items-center",children:[x.jsx(aft,{sectionId:t}),x.jsx(Xde,{sectionId:t})]})]}),!o&&x.jsx("div",{className:"z-10 -mx-4 mt-4 flex flex-row items-center justify-center rounded-xl border-4 border-dashed border-setta-300 px-4 py-3 text-sm text-setta-500/80 dark:border-setta-700 dark:text-setta-500",children:"Drop A Section Here."}),s]})}function jft({sectionId:t}){const e={editing:"absolute nodrag cursor-text box-border px-1 focus-visible:ring-0 focus-visible:outline-none focus-visible:border-blue-500 rounded-lg border border-solid border-transparent w-full tracking-tighter text-setta-500 dark:text-setta-500 cursor-pointer flex-shrink",notEditing:"absolute cursor-pointer box-border px-1 focus-visible:ring-0 focus-visible:outline-none focus-visible:border-blue-500 rounded-lg border border-solid border-transparent w-full truncate tracking-tighter text-setta-500 dark:text-setta-500 flex-shrink"};return x.jsx(Zde,{sectionId:t,titleProps:e})}function Bft({behaviorDropType:t,children:e,isGroup:n}){const r=gut[t];return x.jsxs(x.Fragment,{children:[t&&x.jsx(zft,{text:r,behaviorDropType:t,isGroup:n}),e]})}function zft({text:t,behaviorDropType:e,isGroup:n}){return x.jsx("div",{className:`absolute z-20 grid h-full w-full justify-center ${n?"[place-content:end_center]":"place-content-center"}`,children:x.jsx(Fft,{text:t,behaviorDropType:e,isGroup:n})})}function Fft({text:t,behaviorDropType:e,isGroup:n}){const r=e===sb.INVALID;return x.jsx("div",{className:`grid h-8 min-w-60 select-none place-items-center rounded-full text-sm font-bold uppercase tracking-widest text-white shadow-md backdrop-blur-sm transition-opacity ${r?"[background-color:rgba(220,_38,_38,_0.8)]":"[background-color:rgba(37,_99,_235,_0.8)]"} ${n&&"mb-8"}`,children:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(z$e,{}),t]})})}function Wft({isGroup:t,sectionId:e,isTopLevel:n,droppableRef:r,draggableRef:i,dragListeners:s,children:o}){const{style:a,behaviorDropType:l}=rft({sectionId:e,isGroup:t});return x.jsx(Bft,{behaviorDropType:l,isGroup:t,children:x.jsx(Uft,{isGroup:t,sectionId:e,isTopLevel:n,droppableRef:r,draggableRef:i,dragListeners:s,style:a,children:o})})}const Jde=ke.memo(Wft,(t,e)=>t.isGroup===e.isGroup&&t.children===e.children&&ae.isEqual(t.dragListeners,e.dragListeners));function Vft({isGroup:t,sectionId:e,isTopLevel:n,droppableRef:r,draggableRef:i,dragListeners:s,style:o,children:a}){const l=cn(p=>p.activeId===e),{isSorting:c,isMovingFree:u}=zne(),f=u||!n&&c?s:{},h=c||u?"nodrag":"",d=l?{...o,opacity:.5}:o;return x.jsx(Nft,{isGroup:t,sectionId:e,droppableRef:r,draggableRef:i,trueDragListeners:f,className:h,style:d,children:a})}const Uft=ke.memo(Vft,ae.isEqual);function qft({isGroup:t,sectionId:e,children:n}){const r=cn(l=>l.activeId===e),i=Vde({sectionId:e,isTopLevel:!0}),{setNodeRef:s}=Wee({...i,disabled:r}),{listeners:o,setNodeRef:a}=Fee(i);return x.jsx(Jde,{isGroup:t,sectionId:e,isTopLevel:!0,droppableRef:s,draggableRef:a,dragListeners:o,children:n})}function Xft({isGroup:t,sectionId:e,dragListeners:n,children:r,isTopLevel:i}){return i?x.jsx(qft,{isGroup:t,sectionId:e,children:r}):x.jsx(Jde,{isGroup:t,sectionId:e,isTopLevel:i,dragListeners:n,children:r})}function Hft({sectionId:t,items:e,children:n}){const r=ift(t),i=cn(s=>s.isSorting?s.activeId:s.overId);return x.jsx(L8e,{id:t,items:e,strategy:Zft(r,i),disabled:r,children:n})}function PX(){return[{x:0,y:0,scaleX:1,scaleY:1},-1]}function Zft(t,e){if(t.draggable||t.droppable)return PX;if(e){const n=IA(e);if(n)return Pi(n).isHorizontalOrientation?P8e:I8e}return PX}function Yft({sectionId:t}){return F5(t)?x.jsx(Jft,{sectionId:t}):x.jsx(e0e,{sectionId:t,forceApplyTransform:!1})}const Gft=ke.memo(Yft);function Kft({sectionId:t}){const[e,n]=_.useState(!0);return _.useEffect(()=>{n(!1)},[]),x.jsx(e0e,{sectionId:t,forceApplyTransform:e})}const Jft=ke.memo(Kft);function eht({sectionId:t,forceApplyTransform:e}){const n=sht(),r=Vde({sectionId:t,isTopLevel:!1}),{attributes:{role:i,...s},listeners:o,setNodeRef:a,transform:l,transition:c,overIndex:u,items:f}=V8e({...r,animateLayoutChanges:n});return x.jsx(rht,{sectionId:t,attributes:s,listeners:o,setNodeRef:a,transform:l,transition:c,applyTransform:e||u!==null&&u!==-1||f.length===1&&f[0]===t&&F5(t)})}const e0e=ke.memo(eht);function tht({sectionId:t,attributes:e,listeners:n,setNodeRef:r,transform:i,transition:s,applyTransform:o}){const a=cn(f=>f.overId===t),l=iht(o?i:null),u={style:{transform:wf.Translate.toString(l),transition:s,zIndex:a?500:void 0},ref:r,...e};return x.jsx("div",{className:"relative flex w-full outline-none",...u,tabIndex:"-1",children:x.jsx(nht,{sectionId:t,applyTransform:o,listeners:n})})}function nht({sectionId:t,applyTransform:e,listeners:n}){return F5(t)?e?x.jsx(hut,{}):null:x.jsx(e1e,{sectionId:t,dragListeners:n})}const rht=ke.memo(tht,(t,e)=>t.sectionId===e.sectionId&&t.transform===e.transform&&t.transition===e.transition&&ae.isEqual(t.listeners,e.listeners));function iht(t){if(t){const e=qe.getState().transform[2];return{...t,x:t.x/e,y:t.y/e}}return t}function sht(){const t=cn(e=>e.isSorting);return()=>t}function oht({sectionId:t,isGroup:e}){return Kde(t)&&x.jsx("div",{className:"flex flex-col",children:x.jsx(aht,{sectionId:t,isGroup:e})})}function aht({sectionId:t,isGroup:e}){const n=qf(r=>r.x[t]);return x.jsx(Hft,{sectionId:t,items:n,children:x.jsx(lht,{childIds:n,sectionId:t,isGroup:e})})}function lht({childIds:t,sectionId:e,isGroup:n}){const r=()=>{rg(e)},i=te(s=>s.x[e].isHorizontalOrientation);return x.jsxs("div",{className:"flex items-stretch",children:[!n&&x.jsx("div",{className:"mr-2 mt-2 min-h-full w-2 rounded-full bg-white/30 transition-all duration-75 hover:cursor-pointer hover:bg-white/50 dark:bg-setta-700 hover:dark:bg-setta-600",onClick:r}),x.jsx("div",{className:`mt-2 flex ${i?"flex-row":"flex-col "} items-start gap-2`,children:t.map(s=>x.jsx(Gft,{sectionId:s},`Nested-Sec-${s}`))})]})}const ks={any:"any",auto_only:"auto_only",manual_only:"manual_only"};function y4(t){return t==="auto"?t:parseInt(t)}function AX(t,e,n){return n!==ks.manual_only?t:e}function cht({direction:t,ref:e,sizeMode:n,aspectRatio:r}){const i=y4(e.style.width),s=y4(e.style.height),o=AX("auto",i,n.width),a=AX("auto",s,n.height);return t==="bottomRight"?{width:o,height:a}:t==="right"&&n.width?r?{width:o,height:a}:{width:o}:t==="bottom"&&n.height?r?{width:o,height:a}:{height:a}:{}}function uht({direction:t,ref:e,sizeMode:n,aspectRatio:r}){const i=y4(e.style.width),s=y4(e.style.height);return t==="bottomRight"?{width:i,height:s}:t==="right"&&n.width?r?{width:i,height:s}:{width:i}:t==="bottom"&&n.height?r?{width:i,height:s}:{height:s}:{}}function t0e({props:t,sizeMode:e,aspectRatio:n}){const[r,i,s,o]=t;return o.width===0&&o.height===0&&r.detail===2?cht({direction:i,ref:s,sizeMode:e,aspectRatio:n}):uht({direction:i,ref:s,sizeMode:e,aspectRatio:n})}const DA=1e5,fht=1e5,hht=64,n0e=50,r0e=32;function KD({sectionType:t,hideSearch:e,hideParams:n,isMinimized:r}){if(r)return r0e;if(t===Y.SECTION)return e?78:n?58:104;if(t===Y.LIST_ROOT||t===Y.DICT_ROOT)return n0e;if(t===Y.GLOBAL_VARIABLES)return 78;if(t===Y.CODE)return 58.2;if(t===Y.INFO)return 98;if(t===Y.PARAM_SWEEP)return 50;if(t===Y.TERMINAL)return 100;if(t===Y.GLOBAL_PARAM_SWEEP)return 112;if(t===Y.DRAW||t===Y.IMAGE)return 100;if(t===Y.CHART)return 300;if(t===Y.SOCIAL)return 50}function dht({sectionType:t,isMinimized:e}){return e?r0e:t===Y.LIST_ROOT||t===Y.DICT_ROOT?n0e:DA}function JD({sectionType:t,isTwitter:e}){return e?370:t===Y.DRAW?402:t===Y.CHART?300:200}function pht({isTwitter:t}){return t?574:fht}function mht({sectionType:t,hideParams:e,isTwitter:n}){if(t===Y.SECTION){if(e)return{height:ks.auto_only,width:ks.any}}else if(t===Y.TERMINAL||t===Y.CHART)return{height:ks.manual_only,width:ks.manual_only};return n?{height:ks.auto_only,width:ks.any}:{height:ks.any,width:ks.any}}function ght(t){return te(e=>{const n=fft(t,e),r=dn(t,e),i=e.x[t].hideSearch,s=e.x[t].hideParams,o=e.x[t].isMinimized,a=KD({sectionType:r,hideSearch:i,hideParams:s,isMinimized:o}),l=dht({sectionType:r,isMinimized:o}),c=JD({sectionType:r,isTwitter:n}),u=pht({isTwitter:n}),f=mht({sectionType:r,hideParams:s,isTwitter:n});return{minHeight:a,maxHeight:l,minWidth:c,maxWidth:u,sizeMode:f}},ae.isEqual)}function dg(){const[t,e]=_.useState(!1),n=_.useRef(null);return _.useEffect(()=>{if(!n.current)return;function r(){n.current&&e(n.current.scrollHeight>n.current.clientHeight)}const i=new ResizeObserver(()=>{r()}),s=new MutationObserver(()=>{r()});return i.observe(n.current),s.observe(n.current,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),r(),()=>{i.disconnect(),s.disconnect()}},[]),{ref:n,isScrollable:t}}async function LA(t,e){const n=dn(t),r=KD({sectionType:n}),i=JD({sectionType:n}),s=te.getState().x[t].size;let o=iut(s.height,s.width,e.height,e.width);o=Ade(o.height,o.width,r,i);const a=24;o.height+=a,te.setState(l=>{ik({sectionId:t,aspectRatio:e.width/e.height,aspectRatioExtraHeight:a,size:o,state:l})})}function vht(t,e){const[n,r]=_.useState(null),i=te(s=>{const{width:o,height:a}=s.x[t].size;return o==="auto"||a==="auto"});return _.useEffect(()=>{const s={width:e.width,height:e.height};ae.isEqual(s,n)||LA(t,s),r(s)},[e.src]),_.useEffect(()=>{n&&LA(t,n)},[i]),n!==null}function Oht({sectionId:t,imgSize:e,isNewImg:n,sectionWidth:r,sectionHeight:i,state:s}){let o={};if(e){if(r==="auto"||i==="auto"||n){const c=Y.DRAW,u=KD({sectionType:c}),f=JD({sectionType:c});o=Ade(e.height,e.width,u-120,f-24),BO(t,{width:o.width+24,height:o.height+120},s)}else o.width=r-24,o.height=i-120;n&&ik({sectionId:t,aspectRatio:e.width/e.height,aspectRatioExtraHeight:120,aspectRatioExtraWidth:24,state:s})}else{const[c,u]=[500,500];o.width=r==="auto"?c:r-24,o.height=i==="auto"?u:i-120,(r==="auto"||i==="auto")&&BO(t,{width:o.width+24,height:o.height+120},s)}return o}function yht(t){const n={width:640,height:360},{width:r,height:i}=te(a=>a.x[t].size,ae.isEqual);function s(){n.height+=22,te.setState(a=>{ik({sectionId:t,aspectRatio:16/9,aspectRatioExtraHeight:22,size:n,state:a})})}return _.useEffect(()=>{(r==="auto"||i==="auto")&&s()},[r,i]),_.useEffect(()=>{LA(t,n)},[]),r==="auto"||i==="auto"?{}:{width:r,height:i-22}}function bht(t){_.useEffect(()=>{te.setState(e=>{ik({sectionId:t,aspectRatio:null,aspectRatioExtraHeight:null,aspectRatioExtraWidth:null,size:{height:"auto"},state:e})})},[])}function ik({sectionId:t,size:e,aspectRatio:n,aspectRatioExtraHeight:r,aspectRatioExtraWidth:i,state:s}){const o=s.x[t];o.aspectRatio=n,o.aspectRatioExtraHeight=r,o.aspectRatioExtraWidth=i,e&&BO(t,e,s)}function eL({children:t,onResizeStart:e,as:n,...r}){const{scale:i,onResizeStart:s}=xht();function o(...a){e&&e(...a),s(...a)}return x.jsx(xle,{...r,scale:i,as:n,onResizeStart:o,children:t})}function xht(){const[t,e]=_.useState(1);function n(){e(qe.getState().transform[2])}return{scale:t,onResizeStart:n}}function wht({sectionId:t,bgColor:e,isYouTube:n,isActiveSection:r,positionAndSizeLocked:i,children:s,as:o}){const{minHeight:a,maxHeight:l,minWidth:c,maxWidth:u,sizeMode:f}=ght(t);return x.jsx(Sht,{sectionId:t,bgColor:e,isYouTube:n,isActiveSection:r,positionAndSizeLocked:i,minHeight:a,maxHeight:l,minWidth:c,maxWidth:u,sizeMode:f,as:o,children:s})}function Sht({sectionId:t,bgColor:e,isYouTube:n,isActiveSection:r,positionAndSizeLocked:i,minHeight:s,maxHeight:o,minWidth:a,maxWidth:l,sizeMode:c,children:u,as:f}){_.useEffect(()=>{const E={};c.height===ks.auto_only&&(E.height="auto"),c.width===ks.auto_only&&(E.width="auto"),ae.size(E)>0&&te.setState(T=>{wX(t,E,T)})},[c.height,c.width]);const{size:h,aspectRatio:d,aspectRatioExtraHeight:p,aspectRatioExtraWidth:g}=kht(t);function m(){te.setState(E=>{RX(t,"start",E)})}function v(...E){const T=t0e({props:E,sizeMode:c,aspectRatio:d});te.setState(C=>{wX(t,T,C),RX(t,"end",C)}),hn(!0)}const y=s!==o&&c.height!==ks.auto_only,b=c.width!==ks.auto_only,S=Nt(E=>E.gui.snapGrid),k=Ot.snapToGrid.hook()[0];return x.jsx(_ht,{sectionId:t,as:f,bgColor:e,isYouTube:n,isActiveSection:r,size:h,minHeight:s,maxHeight:o,minWidth:a,maxWidth:l,heightResizable:y,widthResizable:b,positionAndSizeLocked:i,onResizeStart:m,onResizeStop:v,aspectRatio:d,aspectRatioExtraHeight:p,aspectRatioExtraWidth:g,snapGrid:S,snapToGrid:k,children:u})}function _ht({sectionId:t,as:e,bgColor:n,isYouTube:r,isActiveSection:i,size:s,minHeight:o,maxHeight:a,minWidth:l,maxWidth:c,heightResizable:u,widthResizable:f,positionAndSizeLocked:h,onResizeStart:d,onResizeStop:p,aspectRatio:g,aspectRatioExtraHeight:m,aspectRatioExtraWidth:v,snapGrid:y,snapToGrid:b,children:S}){const k=Ude(),E=k||h?!1:{top:!1,left:!1,bottom:u,right:f,topRight:!1,bottomRight:u&&f,topLeft:!1,bottomLeft:!1},T=`${k?"pointer-events-none select-none":""} ${n} section-grid-cols section-grid-rows section-grid-areas grid h-full transition-radius ${h?"rounded-sm":"rounded-xl shadow-md"} before:content-none before:block before:absolute before:top-0 before:right-0 before:bottom-0 before:left-0 before:border before:border-white dark:before:border-setta-700 ${r?"overflow-clip":""} ${i?"z-[150]":"z-10"}`;return x.jsx(eL,{id:`${t}-CustomResizable`,as:e,size:s,minHeight:o,maxHeight:a,minWidth:l,maxWidth:c,onResizeStart:d,onResizeStop:p,lockAspectRatio:g,lockAspectRatioExtraHeight:m,lockAspectRatioExtraWidth:v,handleWrapperClass:"absolute pointer-events-none [&>*]:pointer-events-auto h-full bottom-0 w-full nodrag [&>div]:z-20",enable:E,className:T,handleStyles:{right:{right:"-8px"},bottom:{bottom:"-8px"}},handleClasses:{right:`${lT} ${Cl} ${Jp}`,bottom:`${lT} ${Cl} ${Jp}`},grid:b?y:null,children:S})}function kht(t){return te(e=>{const n=e.x[t];return n.isMinimized?{size:n.size,aspectRatio:!1,aspectRatioExtraHeight:0,aspectRatioExtraWidth:0}:{size:n.size,aspectRatio:n.aspectRatio??!1,aspectRatioExtraHeight:n.aspectRatioExtraHeight??0,aspectRatioExtraWidth:n.aspectRatioExtraWidth??0}},ae.isEqual)}function RX(t,e,n){n.x[t].resizeEvent=e}const i0e="Popover",[s0e,_Et]=Oo(i0e,[Z5]),sk=Z5(),[Cht,Jd]=s0e(i0e),Eht=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!1}=t,a=sk(e),l=_.useRef(null),[c,u]=_.useState(!1),[f=!1,h]=Nl({prop:r,defaultProp:i,onChange:s});return _.createElement(Ere,a,_.createElement(Cht,{scope:e,contentId:ff(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:_.useCallback(()=>h(d=>!d),[h]),hasCustomAnchor:c,onCustomAnchorAdd:_.useCallback(()=>u(!0),[]),onCustomAnchorRemove:_.useCallback(()=>u(!1),[]),modal:o},n))},Tht="PopoverTrigger",Pht=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Jd(Tht,n),s=sk(n),o=In(e,i.triggerRef),a=_.createElement(gn.button,Ee({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":l0e(i.open)},r,{ref:o,onClick:gt(t.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?a:_.createElement(Tre,Ee({asChild:!0},s),a)}),o0e="PopoverPortal",[Aht,Rht]=s0e(o0e,{forceMount:void 0}),$ht=t=>{const{__scopePopover:e,forceMount:n,children:r,container:i}=t,s=Jd(o0e,e);return _.createElement(Aht,{scope:e,forceMount:n},_.createElement(zd,{present:n||s.open},_.createElement(Are,{asChild:!0,container:i},r)))},zO="PopoverContent",Mht=_.forwardRef((t,e)=>{const n=Rht(zO,t.__scopePopover),{forceMount:r=n.forceMount,...i}=t,s=Jd(zO,t.__scopePopover);return _.createElement(zd,{present:r||s.open},s.modal?_.createElement(Iht,Ee({},i,{ref:e})):_.createElement(Dht,Ee({},i,{ref:e})))}),Iht=_.forwardRef((t,e)=>{const n=Jd(zO,t.__scopePopover),r=_.useRef(null),i=In(e,r),s=_.useRef(!1);return _.useEffect(()=>{const o=r.current;if(o)return G5(o)},[]),_.createElement(dM,{as:lm,allowPinchZoom:!0},_.createElement(a0e,Ee({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gt(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),s.current||(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:gt(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:gt(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),Dht=_.forwardRef((t,e)=>{const n=Jd(zO,t.__scopePopover),r=_.useRef(!1);return _.createElement(a0e,Ee({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=t.onCloseAutoFocus)===null||s===void 0||s.call(t,i),!i.defaultPrevented){var o;r.current||(o=n.triggerRef.current)===null||o===void 0||o.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var s,o;(s=t.onInteractOutside)===null||s===void 0||s.call(t,i),i.defaultPrevented||(r.current=!0);const a=i.target;((o=n.triggerRef.current)===null||o===void 0?void 0:o.contains(a))&&i.preventDefault()}}))}),a0e=_.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...f}=t,h=Jd(zO,n),d=sk(n);return hre(),_.createElement(dre,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s},_.createElement(ure,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1)},_.createElement(Pre,Ee({"data-state":l0e(h.open),role:"dialog",id:h.contentId},d,f,{ref:e,style:{...f.style,["--radix-popover-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))))}),Lht="PopoverClose",Nht=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Jd(Lht,n);return _.createElement(gn.button,Ee({type:"button"},r,{ref:e,onClick:gt(t.onClick,()=>i.onOpenChange(!1))}))}),Qht=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=sk(n);return _.createElement(GMe,Ee({},i,r,{ref:e}))});function l0e(t){return t?"open":"closed"}const jht=Eht,Bht=Pht,zht=$ht,Fht=Mht,Wht=Nht,Vht=Qht;function $1({trigger:t,contentClasses:e,children:n,open:r,close:i=!1,closeClasses:s,onOpenChange:o,arrowClasses:a}){return x.jsxs(jht,{open:r,onOpenChange:o,children:[x.jsx(Bht,{asChild:!0,children:t}),x.jsx(zht,{children:x.jsxs(Fht,{className:e,children:[i&&x.jsx(Wht,{className:s,children:i}),x.jsx(Vht,{className:a||"[fill:rgb(229,_231,_235)] dark:[fill:rgb(51,_65,_85)]"}),n]})})]})}function c0e({sectionId:t,isRoot:e,popover:n=!1}){const r=C5(t),i=c=>{$Ne(e,t,c)},s=c=>{qct(e,t,c)},o=c=>{c&&!isNaN(c)?l(parseInt(c)):l("")},[a,l]=_.useState(1);return x.jsxs("div",{className:`section-key-value section-row-main -mx-2 flex items-center gap-1 rounded-lg bg-setta-100 pl-2 pr-1 dark:bg-setta-950 ${n?"border border-solid border-white py-1 shadow-lg dark:border-setta-800":""}`,children:[e?x.jsxs(x.Fragment,{children:[x.jsx(hHe,{className:"text-setta-300 dark:text-setta-600"}),x.jsx("p",{className:"text-[10px] font-bold text-setta-500",children:"Children: "})]}):x.jsx("p",{className:"text-[10px] text-setta-500",children:"Siblings"}),x.jsx("input",{className:"nodrag max-w-[3ch] cursor-auto rounded-md bg-white px-2 text-xs focus-visible:ring-2 dark:bg-setta-800 dark:text-setta-300",value:a,onChange:c=>o(c.target.value),disabled:r}),x.jsx("button",{className:"nodrag gg-math-minus rounded-full focus-visible:ring-2 dark:text-setta-300",onClick:()=>s(a),role:"button",disabled:r}),x.jsx("button",{className:"nodrag gg-math-plus rounded-full focus-visible:ring-2 dark:text-setta-300",onClick:()=>i(a),role:"button",disabled:r})]})}function Uht({onClick:t,...e}){return x.jsx(Fa,{...e,icon:x.jsx("i",{className:"gg-close"}),color:"text-setta-600 hover:text-white",bg:"bg-transparent hover:bg-red-500",size:"min-w-4 h-4",padding:"p-0",onClick:t})}function qht({sectionId:t,twClasses:e,...n}){const r=te(s=>s.x[t].isMinimized);function i(){te.setState(s=>{s.x[t].isMinimized=!r})}return x.jsx(Fa,{...n,icon:r?x.jsx("i",{className:"gg-maximize !scale-[.4]"}):x.jsx("i",{className:"gg-math-minus"}),color:"text-setta-600 hover:text-white",bg:"bg-transparent hover:bg-blue-500 justify-content-center mr-1",size:"w-4 h-4",padding:"p-0",twClasses:e,onClick:i})}function Xht({sectionId:t}){function e(){const{runInMemory:n}=Pi(t);n?RM([t]):$M([t])}return x.jsx(Fa,{icon:x.jsx(lre,{}),color:"text-setta-600 hover:text-green-500 active:!text-blue-700",bg:"bg-transparent",size:"w-4 h-4",padding:"p-0 mr-1",onClick:e,...Rr({title:"Run this code block"})})}function Hht({sectionId:t}){const e=te(r=>r.x[t].runInMemory);function n(){te.setState(r=>{r.x[t].runInMemory=!e})}return x.jsx(Fa,{icon:x.jsx(tHe,{}),color:`${e?"text-blue-500 hover:!text-cyan-200":"text-setta-600 hover:!text-blue-500"} active:!text-blue-500`,bg:`${e?"hover:bg-blue-500":"bg-transparent"}`,size:"w-4 h-4",padding:"p-0 mr-1",onClick:n,...Rr({title:"Toggle In-Memory Code"})})}function Zht({sectionId:t,isActiveSection:e,sectionTypeName:n,isInOtherProjectConfigs:r,isRoot:i}){const s=()=>{te.setState(a=>{_m([t],a)}),hn(!0)},o=NXe(t)&&!i;return x.jsxs("header",{className:"section-title mx-2 flex flex-row items-center",children:[x.jsx(Hde,{sectionId:t,sectionTypeName:n,isInOtherProjectConfigs:r}),n!==Y.INFO&&x.jsx(x.Fragment,{children:x.jsx(Yht,{sectionId:t,isActiveSection:e,isInOtherProjectConfigs:r,sectionTypeName:n})}),x.jsxs("div",{className:"z-10 ml-auto flex items-center",children:[o&&x.jsx($1,{arrowClasses:"fill-white dark:fill-setta-800",contentClasses:"z-20",trigger:x.jsx(Fa,{twClasses:"[&_*]:hover:text-setta-500 [&_*]:dark:hover:text-setta-400",bg:"bg-transparent",children:x.jsx(fHe,{className:"text-setta-300 dark:text-setta-700"})}),children:x.jsx(c0e,{sectionId:t,isRoot:i,popover:!0})}),n===Y.CODE&&x.jsxs(x.Fragment,{children:[x.jsx(Xht,{sectionId:t})," ",x.jsx(Hht,{sectionId:t})," "]}),x.jsx(Xde,{sectionId:t}),!i&&x.jsx(qht,{sectionId:t}),x.jsx(Uht,{onClick:s})]})]})}function Yht({sectionId:t,isActiveSection:e,isInOtherProjectConfigs:n,sectionTypeName:r}){return x.jsx(Zde,{sectionId:t,titleProps:Kht({isActiveSection:e,isInOtherProjectConfigs:n,sectionTypeName:r})})}const Ght=ke.memo(Zht);function Kht({isActiveSection:t,isInOtherProjectConfigs:e,sectionTypeName:n}){const r="cursor-text nodrag px-1 py-0 leading-5 -ml-1 bg-setta-100 focus-visible:ring-0 focus-visible:outline-none rounded-md box-border border border-solid border-transparent focus-visible:border-blue-500 dark:bg-setta-800 w-3/5 dark:text-white font-bold text-[.7rem] tracking-tight",i=n===Y.GLOBAL_VARIABLES,s=Jht({isActiveSection:t,isInOtherProjectConfigs:e,isGlobalVariables:i,sectionTypeName:n});return i?{fixed:s}:{editing:r,notEditing:s,fixed:"select-none italic focus-visible:ring-0 focus-visible:outline-none box-border border border-solid border-transparent focus-visible:border-blue-500 tracking-tighter text-xs text-setta-400 max-w-full truncate pr-0.5"}}function Jht({isActiveSection:t,isInOtherProjectConfigs:e,isGlobalVariables:n,sectionTypeName:r}){let i="",s="font-bold";return t?e?i="text-purple-800 dark:text-purple-200":n?i="text-green-800 dark:text-green-200":r===Y.TERMINAL?i="text-blue-400":i="text-blue-600 dark:text-blue-400":r===Y.TERMINAL?i="text-setta-300":i="text-setta-700 dark:text-setta-300",n&&(s="uppercase font-bold"),`px-1 py-0 -ml-1 w-3/5 focus-visible:ring-0 focus-visible:outline-none box-border rounded-md border border-solid border-transparent focus-visible:border-blue-500 leading-5 font-bold tracking-tight cursor-pointer max-w-full text-[.7rem] truncate ${i} ${s}`}/*!
|
356
|
+
`});default:return x.jsx("i",{className:"gg-menu group/card-section:hover:bg !scale-110 text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] "})}}function dft({sectionId:t}){const e=te(n=>dn(t,n)===Y.GROUP);return x.jsx("i",{className:`gg-link group/card-section:hover:bg transition-colors group-hover/card-section:text-pink-500 dark:group-hover/card-section:text-[#ff00ff] ${e?"-rotate-45 !scale-75 text-purple-600 dark:text-purple-700":"text-purple-500 dark:text-purple-500"}`})}function pft({sectionId:t}){const{isYouTube:e,isTwitter:n}=te(r=>({isYouTube:YD(r.x[t].social),isTwitter:GD(r.x[t].social)}),ae.isEqual);return e?x.jsx(vlt,{className:"fill-setta-300 transition-colors group-hover/card-section:fill-blue-500 dark:fill-setta-500 dark:group-hover/card-section:fill-[#0084ff] "}):n?x.jsx(oit,{className:"fill-setta-300 transition-colors group-hover/card-section:fill-blue-500 dark:fill-setta-500 dark:group-hover/card-section:fill-[#0084ff] "}):x.jsx(lft,{className:"text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] "})}function mft({sectionId:t,classes:e}){switch(te(r=>r.x[t].codeLanguage)){case"python":return x.jsx(uft,{className:e});case"javascript":return x.jsx(FFe,{className:e});case"bash":return x.jsx(cft,{className:e});default:return null}}function gft({sectionId:t}){const e=BAe(t);return x.jsxs("p",{className:"group/card-section:hover:bg font-mono text-[9px] tracking-tighter text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] ",children:["[",e,"]"]})}function vft({sectionId:t}){return te(n=>n.x[t].renderMarkdown)?x.jsx(glt,{className:"text-transparent transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:text-transparent dark:group-hover/card-section:text-[#0084ff]"}):x.jsx(iHe,{className:"text-transparent transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:text-transparent dark:group-hover/card-section:text-[#0084ff]"})}function Oft({sectionId:t}){return te(n=>n.x[t].isReadOnlyTerminal)?x.jsx(jct,{className:"text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] ",...Rr({title:"Read-only terminal"})}):x.jsx(ylt,{className:"text-setta-300 transition-colors group-hover/card-section:text-blue-500 dark:text-setta-500 dark:group-hover/card-section:text-[#0084ff] ",...Rr({title:"Read/write terminal"})})}function yft({sectionId:t}){async function e(){YPe(t)}return x.jsx(mn,{onClick:e,children:"Add artifact by filepath"})}function bft({sectionId:t}){function e(n){const r=te.getState().singletonSections.inMemoryFnStdoutTerminal;r?rg(r):te.setState(i=>{_ie(t,{isReadOnlyTerminal:!0,uiTypeId:Nm.TERMINAL},i)})}return x.jsx(mn,{onClick:e,children:"Add Stdout Terminal"})}function CX({sectionId:t}){function e(){const{variantId:n}=Pi(t);te.setState(r=>{for(const i of Object.keys(r.variants[n].values))r.variants[n].values[i]=Wm()}),hn(!0),Nd(t,n)}return x.jsx(mn,{onClick:e,children:"Clear Values"})}function n1({sectionId:t}){async function e(){dde(t)}return x.jsx(mn,{onClick:e,children:"New Version"})}function xft({sectionId:t}){const{hasParams:e,hideSearch:n,hideParams:r}=te(s=>({hasParams:NAe(t,s),hideSearch:s.x[t].hideSearch,hideParams:s.x[t].hideParams}),ae.isEqual);function i(){te.setState(s=>{s.x[t].hideParams=!r})}return!e&&!n&&x.jsx(mn,{onClick:i,children:r?"Show Params":"Hide Params"})}function wft({sectionId:t}){const{selectedItem:e,hideSearch:n,hideParams:r}=te(s=>({selectedItem:Yt(t,s).selectedItem,hideSearch:s.x[t].hideSearch,hideParams:s.x[t].hideParams}),ae.isEqual);function i(){te.setState(s=>{s.x[t].hideSearch=!n})}return!e&&!r&&x.jsx(mn,{onClick:i,children:n?"Show Search":"Hide Search"})}function EX({sectionId:t}){const e=te(r=>r.x[t].hideUnpinnedParams);function n(){te.setState(r=>{r.x[t].hideUnpinnedParams=!e})}return x.jsx(mn,{onClick:n,children:e?"Show Unpinned Params":"Hide Unpinned Params"})}function TX({sectionId:t}){function e(n){const{paramSweepSectionId:r}=te.getState().x[t];r?rg(r):Sft(t)}return x.jsx(mn,{onClick:e,children:"Add Param Sweep"})}function Sft(t){const e=Kn();te.setState(n=>{n.x[t].paramSweepSectionId=e,_ie(t,{id:e,name:Kse(n.x[t].name),uiTypeId:Nm.PARAM_SWEEP},n)})}function r1({sectionId:t}){function e(){Bne([t]);const{variantId:n}=Pi(t);Nd(t,n)}return x.jsx(mn,{onClick:e,children:"Reset To Default Version"})}function _ft({sectionId:t}){const{displayMode:e,renderMarkdown:n,variantIsFrozen:r}=te(o=>({displayMode:o.x[t].displayMode,renderMarkdown:o.x[t].renderMarkdown,variantIsFrozen:Yt(t,o).isFrozen}),ae.isEqual);function i(){te.setState(o=>{o.x[t].displayMode=e===so.RENDER?so.EDIT:so.RENDER})}const s=n?"Markdown":"Plaintext";return x.jsx(mn,{onClick:i,disabled:r,children:e===so.EDIT?`Render ${s}`:`Edit ${s}`})}function kft({sectionId:t}){const e=te(i=>i.x[t].renderMarkdown);function n(){te.setState(i=>{i.x[t].renderMarkdown=!e})}const r=e?"Plaintext":"Markdown";return x.jsx(mn,{onClick:n,children:`Convert to ${r}`})}function Rw({sectionId:t}){const e=te(r=>r.x[t].displayMode);function n(){te.setState(r=>{const i=e===so.YAML?so.GUI:so.YAML;r.x[t].displayMode=i;const{height:s,width:o}=r.x[t].size;if(i===so.YAML&&(s==="auto"||o==="auto")){r.x[t].tempSavedSize=r.x[t].size;const{width:a,height:l}=Uf(t);r.x[t].size={width:a,height:l}}})}return x.jsx(mn,{onClick:n,children:e===so.YAML?"Show GUI":"Show Yaml"})}function Cft({sectionId:t}){function e(){te.setState(n=>{Ide(t,n)}),hn(!0)}return x.jsx(mn,{onClick:e,children:"Ungroup"})}function Hde({sectionId:t,sectionTypeName:e,isInOtherProjectConfigs:n}){const r=Tft(e),i=QXe(t),s=`nodrag w-[14px] h-[14px] flex cursor-pointer select-none items-center justify-center rounded-full ${i?"ml-1 p-0.5":"p-1"} mr-1 -ml-0.5 aspect-square font-semibold leading-none text-setta-700 outline-none transition-colors duration-150 hover:bg-setta-100 focus-visible:ring-2 dark:text-setta-200 dark:hover:bg-setta-800 [&_*]:data-[state=open]:!text-setta-300 dark:[&_*]:data-[state=open]:!text-setta-500`,o=`nodrag flex select-none items-center justify-center rounded-full ${i?"ml-1 p-0.5":"p-0.5"} mr-1 aspect-square font-semibold leading-none text-setta-700 outline-none transition-colors duration-150 dark:text-setta-200`;return r.length===0?x.jsx("div",{className:o,children:x.jsx(kX,{sectionId:t,sectionTypeName:e,isInOtherProjectConfigs:n,isListElement:i})}):x.jsx(tie,{className:Cl,children:x.jsx(Eft,{triggerClassName:s,trigger:x.jsx(kX,{sectionId:t,sectionTypeName:e,isInOtherProjectConfigs:n,isListElement:i}),children:r.map((a,l)=>x.jsx(a,{sectionId:t},l))})})}function Eft({children:t,trigger:e,triggerClassName:n}){return x.jsx(gie,{triggerClassName:n,contentClassName:"z-20 min-w-[200px] rounded-md border border-solid border-setta-100 bg-white p-1 shadow-xl transition-all will-change-[transform,opacity] dark:border-setta-700/50 dark:bg-setta-850",contentAlign:"start",contentSideOffset:5,contentAlignOffset:-3,trigger:e,children:t})}function Tft(t){switch(t){case Y.INFO:return[_ft,kft,n1,r1];case Y.SECTION:return[n1,TX,wft,xft,EX,Rw,CX,r1];case Y.GLOBAL_VARIABLES:return[n1,TX,EX,Rw,CX,r1];case Y.PARAM_SWEEP:return[n1,Rw,r1];case Y.GLOBAL_PARAM_SWEEP:return[Rw];case Y.LIST_ROOT:case Y.DICT_ROOT:case Y.CODE:return[n1,r1,bft];case Y.GROUP:return[Cft];case Y.DRAW:case Y.IMAGE:case Y.CHART:return[yft];default:return[]}}function Zde({sectionId:t,titleProps:e}){const{sectionName:n,titleIsEditable:r}=$ft(t);return r?x.jsx(Aft,{sectionId:t,sectionName:n,titleProps:e,...Rr({title:n})}):x.jsx(Pft,{sectionName:n,className:e.fixed,...Rr({title:n})})}function Pft({sectionName:t,className:e,onMouseEnter:n,onMouseLeave:r}){return x.jsx("h2",{className:e,onMouseEnter:n,onMouseLeave:r,children:t})}function Aft({sectionId:t,sectionName:e,titleProps:n,onMouseEnter:r,onMouseLeave:i}){function s(h){Rft(t,h)}function o(h){return!Mft(t,h)}const[a,l,c,u,f]=IM(e,s,o);return x.jsx(Kie,{value:a,onChange:l,onBlur:c,onKeyDown:u,titleProps:n,doubleClickToEdit:!0,onMouseEnter:r,onMouseLeave:i,blurTriggeredByEscapeKey:f})}function Rft(t,e){te.setState(n=>{const r=n.x[t];r.name=e,r.paramSweepSectionId&&(n.x[paramSweepSectionId].name=Kse(e)),n.shouldRenameReferences=!0}),hn(!0)}function $ft(t){return te(e=>{const n=[Y.GLOBAL_VARIABLES,Y.PARAM_SWEEP,Y.GLOBAL_PARAM_SWEEP].includes(dn(t,e)),r=II(t,[Y.LIST_ROOT],e);return{sectionName:e.x[t].name,titleIsEditable:!r&&!n}})}function Mft(t,e){const n=te.getState(),{parentId:r}=n.x[t],i=r?Yt(r).children:mr.getState().x.keys();for(const s of i)if(n.x[s].name===e)return!0;return!1}function Ift(t){switch(t){case Y.CODE:return"bg-white dark:bg-setta-900";case Y.TERMINAL:return"bg-setta-950 overflow-clip";case Y.GLOBAL_PARAM_SWEEP:return"@container/multipane";case Y.GLOBAL_VARIABLES:return"bg-white dark:bg-black";default:return"bg-setta-50 dark:bg-setta-860"}}function Yde({jsonSourceMissing:t,isActiveSection:e,isGlobalVariables:n,isInOtherProjectConfigs:r}){return t?"outline-red-600 dark:outline-red-400":e&&n?"outline-green-600 dark:outline-turquoise-400":r?e?"outline-purple-600 dark:outline-purple-700":"outline-transparent [&:active:not(:has(button:active,:active.setta-prevent-section-active-css))]:outline-fuchsia-400":e?"outline-blue-600 dark:outline-blue-700":"outline-transparent [&:active:not(:has(button:active,:active.setta-prevent-section-active-css))]:outline-cyan-300"}function Gde(t,e){return n=>{if(n.target.closest(`button, [role="menuitem"], .${lT}`)||Dft())return;if(n.stopPropagation(),Ut.getState().mouseDownDrawArea){Ut.setState({mouseDownDrawArea:!1});return}if(Ut.getState().isSelectingParams){const i=QAe(t,te.getState());!e&&i?yW([t]):e&&!i&&HT([t])}else qe.getState().multiSelectionActive?e?HT([t]):yW([t]):Vd([t]);const r=B5(t);o3([r],!1)}}function Kde(t){return qf(e=>{var n;return((n=e.x[t])==null?void 0:n.length)>0})}function Dft(t=5){const{lastMouseDownLocation:e,lastMouseUpLocation:n}=Ut.getState();if(!e||!n)return!1;const r=n.x-e.x,i=n.y-e.y;return Math.sqrt(r*r+i*i)>t}function Lft({isGroup:t,sectionId:e,droppableRef:n,draggableRef:r,className:i,style:s,trueDragListeners:o,children:a}){const l=qde(e,"withNested");function c(f){l.current=f,n&&n(f),r&&r(f)}const u={ref:c,...o};return t?x.jsx(Qft,{sectionId:e,commonProps:u,refForPosition:l,className:i,style:s,children:a}):x.jsx("div",{className:`${i} focus-visible:outline-none`,style:s,...u,onKeyDown:f=>Oie(f,l,e),tabIndex:"-1",children:a})}const Nft=ke.memo(Lft,ae.isEqual);function Qft({sectionId:t,commonProps:e,refForPosition:n,className:r,style:i,children:s}){const o=Kde(t),a=ir(d=>d.ids.includes(t)),{positionAndSizeLocked:l,isInOtherProjectConfigs:c}=te(d=>({positionAndSizeLocked:d.x[t].positionAndSizeLocked,isInOtherProjectConfigs:d.x[t].isInOtherProjectConfigs}),ae.isEqual),f=Ude()?"pointer-events-none select-none":"",h=Yde({isActiveSection:a,isInOtherProjectConfigs:c});return x.jsxs("div",{className:`group/group-section flex min-w-[250px] flex-col items-stretch px-6 pb-6 pt-2 focus-visible:outline-none ${r}`,...e,onClick:Gde(t,a),onKeyDown:d=>Oie(d,n,t),tabIndex:"-1",style:i,children:[x.jsx("div",{className:`outline outline-4 ${h} transition-radius absolute left-0 right-0 top-0 z-0 h-full w-full ${l?"rounded-sm border-setta-400/90 dark:border-setta-975/35":"rounded-3xl border-setta-50/50 dark:border-setta-700"} border border-solid bg-setta-100/40 outline outline-2 outline-transparent dark:bg-setta-860/50`}),x.jsxs("div",{className:"z-10 flex min-h-10 w-full items-center",children:[x.jsx(Hde,{sectionId:t,sectionTypeName:Y.GROUP,isInOtherProjectConfigs:c}),x.jsx("div",{className:`${f} relative my-auto mr-2 flex min-h-10 w-full items-center overflow-hidden`,children:x.jsx(jft,{sectionId:t})}),x.jsxs("div",{className:"z-10 ml-auto flex items-center",children:[x.jsx(aft,{sectionId:t}),x.jsx(Xde,{sectionId:t})]})]}),!o&&x.jsx("div",{className:"z-10 -mx-4 mt-4 flex flex-row items-center justify-center rounded-xl border-4 border-dashed border-setta-300 px-4 py-3 text-sm text-setta-500/80 dark:border-setta-700 dark:text-setta-500",children:"Drop A Section Here."}),s]})}function jft({sectionId:t}){const e={editing:"absolute nodrag cursor-text box-border px-1 focus-visible:ring-0 focus-visible:outline-none focus-visible:border-blue-500 rounded-lg border border-solid border-transparent w-full tracking-tighter text-setta-500 dark:text-setta-500 cursor-pointer flex-shrink",notEditing:"absolute cursor-pointer box-border px-1 focus-visible:ring-0 focus-visible:outline-none focus-visible:border-blue-500 rounded-lg border border-solid border-transparent w-full truncate tracking-tighter text-setta-500 dark:text-setta-500 flex-shrink"};return x.jsx(Zde,{sectionId:t,titleProps:e})}function Bft({behaviorDropType:t,children:e,isGroup:n}){const r=gut[t];return x.jsxs(x.Fragment,{children:[t&&x.jsx(zft,{text:r,behaviorDropType:t,isGroup:n}),e]})}function zft({text:t,behaviorDropType:e,isGroup:n}){return x.jsx("div",{className:`absolute z-20 grid h-full w-full justify-center ${n?"[place-content:end_center]":"place-content-center"}`,children:x.jsx(Fft,{text:t,behaviorDropType:e,isGroup:n})})}function Fft({text:t,behaviorDropType:e,isGroup:n}){const r=e===sb.INVALID;return x.jsx("div",{className:`grid h-8 min-w-60 select-none place-items-center rounded-full text-sm font-bold uppercase tracking-widest text-white shadow-md backdrop-blur-sm transition-opacity ${r?"[background-color:rgba(220,_38,_38,_0.8)]":"[background-color:rgba(37,_99,_235,_0.8)]"} ${n&&"mb-8"}`,children:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(z$e,{}),t]})})}function Wft({isGroup:t,sectionId:e,isTopLevel:n,droppableRef:r,draggableRef:i,dragListeners:s,children:o}){const{style:a,behaviorDropType:l}=rft({sectionId:e,isGroup:t});return x.jsx(Bft,{behaviorDropType:l,isGroup:t,children:x.jsx(Uft,{isGroup:t,sectionId:e,isTopLevel:n,droppableRef:r,draggableRef:i,dragListeners:s,style:a,children:o})})}const Jde=ke.memo(Wft,(t,e)=>t.isGroup===e.isGroup&&t.children===e.children&&ae.isEqual(t.dragListeners,e.dragListeners));function Vft({isGroup:t,sectionId:e,isTopLevel:n,droppableRef:r,draggableRef:i,dragListeners:s,style:o,children:a}){const l=cn(p=>p.activeId===e),{isSorting:c,isMovingFree:u}=zne(),f=u||!n&&c?s:{},h=c||u?"nodrag":"",d=l?{...o,opacity:.5}:o;return x.jsx(Nft,{isGroup:t,sectionId:e,droppableRef:r,draggableRef:i,trueDragListeners:f,className:h,style:d,children:a})}const Uft=ke.memo(Vft,ae.isEqual);function qft({isGroup:t,sectionId:e,children:n}){const r=cn(l=>l.activeId===e),i=Vde({sectionId:e,isTopLevel:!0}),{setNodeRef:s}=Wee({...i,disabled:r}),{listeners:o,setNodeRef:a}=Fee(i);return x.jsx(Jde,{isGroup:t,sectionId:e,isTopLevel:!0,droppableRef:s,draggableRef:a,dragListeners:o,children:n})}function Xft({isGroup:t,sectionId:e,dragListeners:n,children:r,isTopLevel:i}){return i?x.jsx(qft,{isGroup:t,sectionId:e,children:r}):x.jsx(Jde,{isGroup:t,sectionId:e,isTopLevel:i,dragListeners:n,children:r})}function Hft({sectionId:t,items:e,children:n}){const r=ift(t),i=cn(s=>s.isSorting?s.activeId:s.overId);return x.jsx(L8e,{id:t,items:e,strategy:Zft(r,i),disabled:r,children:n})}function PX(){return[{x:0,y:0,scaleX:1,scaleY:1},-1]}function Zft(t,e){if(t.draggable||t.droppable)return PX;if(e){const n=IA(e);if(n)return Pi(n).isHorizontalOrientation?P8e:I8e}return PX}function Yft({sectionId:t}){return F5(t)?x.jsx(Jft,{sectionId:t}):x.jsx(e0e,{sectionId:t,forceApplyTransform:!1})}const Gft=ke.memo(Yft);function Kft({sectionId:t}){const[e,n]=_.useState(!0);return _.useEffect(()=>{n(!1)},[]),x.jsx(e0e,{sectionId:t,forceApplyTransform:e})}const Jft=ke.memo(Kft);function eht({sectionId:t,forceApplyTransform:e}){const n=sht(),r=Vde({sectionId:t,isTopLevel:!1}),{attributes:{role:i,...s},listeners:o,setNodeRef:a,transform:l,transition:c,overIndex:u,items:f}=V8e({...r,animateLayoutChanges:n});return x.jsx(rht,{sectionId:t,attributes:s,listeners:o,setNodeRef:a,transform:l,transition:c,applyTransform:e||u!==null&&u!==-1||f.length===1&&f[0]===t&&F5(t)})}const e0e=ke.memo(eht);function tht({sectionId:t,attributes:e,listeners:n,setNodeRef:r,transform:i,transition:s,applyTransform:o}){const a=cn(f=>f.overId===t),l=iht(o?i:null),u={style:{transform:wf.Translate.toString(l),transition:s,zIndex:a?500:void 0},ref:r,...e};return x.jsx("div",{className:"relative flex w-full outline-none",...u,tabIndex:"-1",children:x.jsx(nht,{sectionId:t,applyTransform:o,listeners:n})})}function nht({sectionId:t,applyTransform:e,listeners:n}){return F5(t)?e?x.jsx(hut,{}):null:x.jsx(e1e,{sectionId:t,dragListeners:n})}const rht=ke.memo(tht,(t,e)=>t.sectionId===e.sectionId&&t.transform===e.transform&&t.transition===e.transition&&ae.isEqual(t.listeners,e.listeners));function iht(t){if(t){const e=qe.getState().transform[2];return{...t,x:t.x/e,y:t.y/e}}return t}function sht(){const t=cn(e=>e.isSorting);return()=>t}function oht({sectionId:t,isGroup:e}){return Kde(t)&&x.jsx("div",{className:"flex flex-col",children:x.jsx(aht,{sectionId:t,isGroup:e})})}function aht({sectionId:t,isGroup:e}){const n=qf(r=>r.x[t]);return x.jsx(Hft,{sectionId:t,items:n,children:x.jsx(lht,{childIds:n,sectionId:t,isGroup:e})})}function lht({childIds:t,sectionId:e,isGroup:n}){const r=()=>{rg(e)},i=te(s=>s.x[e].isHorizontalOrientation);return x.jsxs("div",{className:"flex items-stretch",children:[!n&&x.jsx("div",{className:"mr-2 mt-2 min-h-full w-2 rounded-full bg-white/30 transition-all duration-75 hover:cursor-pointer hover:bg-white/50 dark:bg-setta-700 hover:dark:bg-setta-600",onClick:r}),x.jsx("div",{className:`mt-2 flex ${i?"flex-row":"flex-col "} items-start gap-2`,children:t.map(s=>x.jsx(Gft,{sectionId:s},`Nested-Sec-${s}`))})]})}const ks={any:"any",auto_only:"auto_only",manual_only:"manual_only"};function y4(t){return t==="auto"?t:parseInt(t)}function AX(t,e,n){return n!==ks.manual_only?t:e}function cht({direction:t,ref:e,sizeMode:n,aspectRatio:r}){const i=y4(e.style.width),s=y4(e.style.height),o=AX("auto",i,n.width),a=AX("auto",s,n.height);return t==="bottomRight"?{width:o,height:a}:t==="right"&&n.width?r?{width:o,height:a}:{width:o}:t==="bottom"&&n.height?r?{width:o,height:a}:{height:a}:{}}function uht({direction:t,ref:e,sizeMode:n,aspectRatio:r}){const i=y4(e.style.width),s=y4(e.style.height);return t==="bottomRight"?{width:i,height:s}:t==="right"&&n.width?r?{width:i,height:s}:{width:i}:t==="bottom"&&n.height?r?{width:i,height:s}:{height:s}:{}}function t0e({props:t,sizeMode:e,aspectRatio:n}){const[r,i,s,o]=t;return o.width===0&&o.height===0&&r.detail===2?cht({direction:i,ref:s,sizeMode:e,aspectRatio:n}):uht({direction:i,ref:s,sizeMode:e,aspectRatio:n})}const DA=1e5,fht=1e5,hht=64,n0e=50,r0e=32;function KD({sectionType:t,hideSearch:e,hideParams:n,isMinimized:r}){if(r)return r0e;if(t===Y.SECTION)return e?78:n?58:104;if(t===Y.LIST_ROOT||t===Y.DICT_ROOT)return n0e;if(t===Y.GLOBAL_VARIABLES)return 78;if(t===Y.CODE)return 58.2;if(t===Y.INFO)return 98;if(t===Y.PARAM_SWEEP)return 50;if(t===Y.TERMINAL)return 100;if(t===Y.GLOBAL_PARAM_SWEEP)return 112;if(t===Y.DRAW||t===Y.IMAGE)return 100;if(t===Y.CHART)return 300;if(t===Y.SOCIAL)return 50}function dht({sectionType:t,isMinimized:e}){return e?r0e:t===Y.LIST_ROOT||t===Y.DICT_ROOT?n0e:DA}function JD({sectionType:t,isTwitter:e}){return e?370:t===Y.DRAW?402:t===Y.CHART?300:200}function pht({isTwitter:t}){return t?574:fht}function mht({sectionType:t,hideParams:e,isTwitter:n}){if(t===Y.SECTION){if(e)return{height:ks.auto_only,width:ks.any}}else if(t===Y.TERMINAL||t===Y.CHART)return{height:ks.manual_only,width:ks.manual_only};return n?{height:ks.auto_only,width:ks.any}:{height:ks.any,width:ks.any}}function ght(t){return te(e=>{const n=fft(t,e),r=dn(t,e),i=e.x[t].hideSearch,s=e.x[t].hideParams,o=e.x[t].isMinimized,a=KD({sectionType:r,hideSearch:i,hideParams:s,isMinimized:o}),l=dht({sectionType:r,isMinimized:o}),c=JD({sectionType:r,isTwitter:n}),u=pht({isTwitter:n}),f=mht({sectionType:r,hideParams:s,isTwitter:n});return{minHeight:a,maxHeight:l,minWidth:c,maxWidth:u,sizeMode:f}},ae.isEqual)}function dg(){const[t,e]=_.useState(!1),n=_.useRef(null);return _.useEffect(()=>{if(!n.current)return;function r(){n.current&&e(n.current.scrollHeight>n.current.clientHeight)}const i=new ResizeObserver(()=>{r()}),s=new MutationObserver(()=>{r()});return i.observe(n.current),s.observe(n.current,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),r(),()=>{i.disconnect(),s.disconnect()}},[]),{ref:n,isScrollable:t}}async function LA(t,e){const n=dn(t),r=KD({sectionType:n}),i=JD({sectionType:n}),s=te.getState().x[t].size;let o=iut(s.height,s.width,e.height,e.width);o=Ade(o.height,o.width,r,i);const a=24;o.height+=a,te.setState(l=>{ik({sectionId:t,aspectRatio:e.width/e.height,aspectRatioExtraHeight:a,size:o,state:l})})}function vht(t,e){const[n,r]=_.useState(null),i=te(s=>{const{width:o,height:a}=s.x[t].size;return o==="auto"||a==="auto"});return _.useEffect(()=>{const s={width:e.width,height:e.height};ae.isEqual(s,n)||LA(t,s),r(s)},[e.src]),_.useEffect(()=>{n&&LA(t,n)},[i]),n!==null}function Oht({sectionId:t,imgSize:e,isNewImg:n,sectionWidth:r,sectionHeight:i,state:s}){let o={};if(e){if(r==="auto"||i==="auto"||n){const c=Y.DRAW,u=KD({sectionType:c}),f=JD({sectionType:c});o=Ade(e.height,e.width,u-120,f-24),BO(t,{width:o.width+24,height:o.height+120},s)}else o.width=r-24,o.height=i-120;n&&ik({sectionId:t,aspectRatio:e.width/e.height,aspectRatioExtraHeight:120,aspectRatioExtraWidth:24,state:s})}else{const[c,u]=[500,500];o.width=r==="auto"?c:r-24,o.height=i==="auto"?u:i-120,(r==="auto"||i==="auto")&&BO(t,{width:o.width+24,height:o.height+120},s)}return o}function yht(t){const n={width:640,height:360},{width:r,height:i}=te(a=>a.x[t].size,ae.isEqual);function s(){n.height+=22,te.setState(a=>{ik({sectionId:t,aspectRatio:16/9,aspectRatioExtraHeight:22,size:n,state:a})})}return _.useEffect(()=>{(r==="auto"||i==="auto")&&s()},[r,i]),_.useEffect(()=>{LA(t,n)},[]),r==="auto"||i==="auto"?{}:{width:r,height:i-22}}function bht(t){_.useEffect(()=>{te.setState(e=>{ik({sectionId:t,aspectRatio:null,aspectRatioExtraHeight:null,aspectRatioExtraWidth:null,size:{height:"auto"},state:e})})},[])}function ik({sectionId:t,size:e,aspectRatio:n,aspectRatioExtraHeight:r,aspectRatioExtraWidth:i,state:s}){const o=s.x[t];o.aspectRatio=n,o.aspectRatioExtraHeight=r,o.aspectRatioExtraWidth=i,e&&BO(t,e,s)}function eL({children:t,onResizeStart:e,as:n,...r}){const{scale:i,onResizeStart:s}=xht();function o(...a){e&&e(...a),s(...a)}return x.jsx(xle,{...r,scale:i,as:n,onResizeStart:o,children:t})}function xht(){const[t,e]=_.useState(1);function n(){e(qe.getState().transform[2])}return{scale:t,onResizeStart:n}}function wht({sectionId:t,bgColor:e,isYouTube:n,isActiveSection:r,positionAndSizeLocked:i,children:s,as:o}){const{minHeight:a,maxHeight:l,minWidth:c,maxWidth:u,sizeMode:f}=ght(t);return x.jsx(Sht,{sectionId:t,bgColor:e,isYouTube:n,isActiveSection:r,positionAndSizeLocked:i,minHeight:a,maxHeight:l,minWidth:c,maxWidth:u,sizeMode:f,as:o,children:s})}function Sht({sectionId:t,bgColor:e,isYouTube:n,isActiveSection:r,positionAndSizeLocked:i,minHeight:s,maxHeight:o,minWidth:a,maxWidth:l,sizeMode:c,children:u,as:f}){_.useEffect(()=>{const E={};c.height===ks.auto_only&&(E.height="auto"),c.width===ks.auto_only&&(E.width="auto"),ae.size(E)>0&&te.setState(T=>{wX(t,E,T)})},[c.height,c.width]);const{size:h,aspectRatio:d,aspectRatioExtraHeight:p,aspectRatioExtraWidth:g}=kht(t);function m(){te.setState(E=>{RX(t,"start",E)})}function v(...E){const T=t0e({props:E,sizeMode:c,aspectRatio:d});te.setState(C=>{wX(t,T,C),RX(t,"end",C)}),hn(!0)}const y=s!==o&&c.height!==ks.auto_only,b=c.width!==ks.auto_only,S=Nt(E=>E.gui.snapGrid),k=Ot.snapToGrid.hook()[0];return x.jsx(_ht,{sectionId:t,as:f,bgColor:e,isYouTube:n,isActiveSection:r,size:h,minHeight:s,maxHeight:o,minWidth:a,maxWidth:l,heightResizable:y,widthResizable:b,positionAndSizeLocked:i,onResizeStart:m,onResizeStop:v,aspectRatio:d,aspectRatioExtraHeight:p,aspectRatioExtraWidth:g,snapGrid:S,snapToGrid:k,children:u})}function _ht({sectionId:t,as:e,bgColor:n,isYouTube:r,isActiveSection:i,size:s,minHeight:o,maxHeight:a,minWidth:l,maxWidth:c,heightResizable:u,widthResizable:f,positionAndSizeLocked:h,onResizeStart:d,onResizeStop:p,aspectRatio:g,aspectRatioExtraHeight:m,aspectRatioExtraWidth:v,snapGrid:y,snapToGrid:b,children:S}){const k=Ude(),E=k||h?!1:{top:!1,left:!1,bottom:u,right:f,topRight:!1,bottomRight:u&&f,topLeft:!1,bottomLeft:!1},T=`${k?"pointer-events-none select-none":""} ${n} section-grid-cols section-grid-rows section-grid-areas grid h-full transition-radius ${h?"rounded-sm":"rounded-xl shadow-md"} before:content-none before:block before:absolute before:top-0 before:right-0 before:bottom-0 before:left-0 before:border before:border-white dark:before:border-setta-700 ${r?"overflow-clip":""} ${i?"z-[150]":"z-10"}`;return x.jsx(eL,{id:`${t}-CustomResizable`,as:e,size:s,minHeight:o,maxHeight:a,minWidth:l,maxWidth:c,onResizeStart:d,onResizeStop:p,lockAspectRatio:g,lockAspectRatioExtraHeight:m,lockAspectRatioExtraWidth:v,handleWrapperClass:"absolute pointer-events-none [&>*]:pointer-events-auto h-full bottom-0 w-full nodrag [&>div]:z-20",enable:E,className:T,handleStyles:{right:{right:"-8px"},bottom:{bottom:"-8px"}},handleClasses:{right:`${lT} ${Cl} ${Jp}`,bottom:`${lT} ${Cl} ${Jp}`},grid:b?y:null,children:S})}function kht(t){return te(e=>{const n=e.x[t];return n.isMinimized?{size:n.size,aspectRatio:!1,aspectRatioExtraHeight:0,aspectRatioExtraWidth:0}:{size:n.size,aspectRatio:n.aspectRatio??!1,aspectRatioExtraHeight:n.aspectRatioExtraHeight??0,aspectRatioExtraWidth:n.aspectRatioExtraWidth??0}},ae.isEqual)}function RX(t,e,n){n.x[t].resizeEvent=e}const i0e="Popover",[s0e,_Et]=Oo(i0e,[Z5]),sk=Z5(),[Cht,Jd]=s0e(i0e),Eht=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!1}=t,a=sk(e),l=_.useRef(null),[c,u]=_.useState(!1),[f=!1,h]=Nl({prop:r,defaultProp:i,onChange:s});return _.createElement(Ere,a,_.createElement(Cht,{scope:e,contentId:ff(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:_.useCallback(()=>h(d=>!d),[h]),hasCustomAnchor:c,onCustomAnchorAdd:_.useCallback(()=>u(!0),[]),onCustomAnchorRemove:_.useCallback(()=>u(!1),[]),modal:o},n))},Tht="PopoverTrigger",Pht=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Jd(Tht,n),s=sk(n),o=In(e,i.triggerRef),a=_.createElement(gn.button,Ee({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":l0e(i.open)},r,{ref:o,onClick:gt(t.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?a:_.createElement(Tre,Ee({asChild:!0},s),a)}),o0e="PopoverPortal",[Aht,Rht]=s0e(o0e,{forceMount:void 0}),$ht=t=>{const{__scopePopover:e,forceMount:n,children:r,container:i}=t,s=Jd(o0e,e);return _.createElement(Aht,{scope:e,forceMount:n},_.createElement(zd,{present:n||s.open},_.createElement(Are,{asChild:!0,container:i},r)))},zO="PopoverContent",Mht=_.forwardRef((t,e)=>{const n=Rht(zO,t.__scopePopover),{forceMount:r=n.forceMount,...i}=t,s=Jd(zO,t.__scopePopover);return _.createElement(zd,{present:r||s.open},s.modal?_.createElement(Iht,Ee({},i,{ref:e})):_.createElement(Dht,Ee({},i,{ref:e})))}),Iht=_.forwardRef((t,e)=>{const n=Jd(zO,t.__scopePopover),r=_.useRef(null),i=In(e,r),s=_.useRef(!1);return _.useEffect(()=>{const o=r.current;if(o)return G5(o)},[]),_.createElement(dM,{as:lm,allowPinchZoom:!0},_.createElement(a0e,Ee({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gt(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),s.current||(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:gt(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:gt(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),Dht=_.forwardRef((t,e)=>{const n=Jd(zO,t.__scopePopover),r=_.useRef(!1);return _.createElement(a0e,Ee({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=t.onCloseAutoFocus)===null||s===void 0||s.call(t,i),!i.defaultPrevented){var o;r.current||(o=n.triggerRef.current)===null||o===void 0||o.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var s,o;(s=t.onInteractOutside)===null||s===void 0||s.call(t,i),i.defaultPrevented||(r.current=!0);const a=i.target;((o=n.triggerRef.current)===null||o===void 0?void 0:o.contains(a))&&i.preventDefault()}}))}),a0e=_.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...f}=t,h=Jd(zO,n),d=sk(n);return hre(),_.createElement(dre,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s},_.createElement(ure,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1)},_.createElement(Pre,Ee({"data-state":l0e(h.open),role:"dialog",id:h.contentId},d,f,{ref:e,style:{...f.style,["--radix-popover-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))))}),Lht="PopoverClose",Nht=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Jd(Lht,n);return _.createElement(gn.button,Ee({type:"button"},r,{ref:e,onClick:gt(t.onClick,()=>i.onOpenChange(!1))}))}),Qht=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=sk(n);return _.createElement(GMe,Ee({},i,r,{ref:e}))});function l0e(t){return t?"open":"closed"}const jht=Eht,Bht=Pht,zht=$ht,Fht=Mht,Wht=Nht,Vht=Qht;function $1({trigger:t,contentClasses:e,children:n,open:r,close:i=!1,closeClasses:s,onOpenChange:o,arrowClasses:a}){return x.jsxs(jht,{open:r,onOpenChange:o,children:[x.jsx(Bht,{asChild:!0,children:t}),x.jsx(zht,{children:x.jsxs(Fht,{className:e,children:[i&&x.jsx(Wht,{className:s,children:i}),x.jsx(Vht,{className:a||"[fill:rgb(229,_231,_235)] dark:[fill:rgb(51,_65,_85)]"}),n]})})]})}function c0e({sectionId:t,isRoot:e,popover:n=!1}){const r=C5(t),i=c=>{$Ne(e,t,c)},s=c=>{qct(e,t,c)},o=c=>{c&&!isNaN(c)?l(parseInt(c)):l("")},[a,l]=_.useState(1);return x.jsxs("div",{className:`section-key-value section-row-main -mx-2 flex items-center gap-1 rounded-lg bg-setta-100 pl-2 pr-1 dark:bg-setta-950 ${n?"border border-solid border-white py-1 shadow-lg dark:border-setta-800":""}`,children:[e?x.jsxs(x.Fragment,{children:[x.jsx(hHe,{className:"text-setta-300 dark:text-setta-600"}),x.jsx("p",{className:"text-[10px] font-bold text-setta-500",children:"Children: "})]}):x.jsx("p",{className:"text-[10px] text-setta-500",children:"Siblings"}),x.jsx("input",{className:"nodrag max-w-[3ch] cursor-auto rounded-md bg-white px-2 text-xs focus-visible:ring-2 dark:bg-setta-800 dark:text-setta-300",value:a,onChange:c=>o(c.target.value),disabled:r}),x.jsx("button",{className:"nodrag gg-math-minus rounded-full focus-visible:ring-2 dark:text-setta-300",onClick:()=>s(a),role:"button",disabled:r}),x.jsx("button",{className:"nodrag gg-math-plus rounded-full focus-visible:ring-2 dark:text-setta-300",onClick:()=>i(a),role:"button",disabled:r})]})}function Uht({onClick:t,...e}){return x.jsx(Fa,{...e,icon:x.jsx("i",{className:"gg-close"}),color:"text-setta-600 hover:text-white",bg:"bg-transparent hover:bg-red-500",size:"min-w-4 h-4",padding:"p-0",onClick:t})}function qht({sectionId:t,twClasses:e,...n}){const r=te(s=>s.x[t].isMinimized);function i(){te.setState(s=>{s.x[t].isMinimized=!r})}return x.jsx(Fa,{...n,icon:r?x.jsx("i",{className:"gg-maximize !scale-[.4]"}):x.jsx("i",{className:"gg-math-minus"}),color:"text-setta-600 hover:text-white",bg:"bg-transparent hover:bg-blue-500 justify-content-center mr-1",size:"w-4 h-4",padding:"p-0",twClasses:e,onClick:i})}function Xht({sectionId:t}){function e(){const{runInMemory:n}=Pi(t);n?RM([t]):$M([t])}return x.jsx(Fa,{icon:x.jsx(lre,{}),color:"text-setta-600 hover:text-green-500 active:!text-blue-700",bg:"bg-transparent",size:"w-4 h-4",padding:"p-0 mr-1",onClick:e,...Rr({title:"Run this code block"})})}function Hht({sectionId:t}){const e=te(r=>r.x[t].runInMemory);function n(){te.setState(r=>{r.x[t].runInMemory=!e})}return x.jsx(Fa,{icon:x.jsx(tHe,{}),color:`${e?"text-blue-500 hover:!text-cyan-200":"text-setta-600 hover:!text-blue-500"} active:!text-blue-500`,bg:`${e?"hover:bg-blue-500":"bg-transparent"}`,size:"w-4 h-4",padding:"p-0 mr-1",onClick:n,...Rr({title:"Toggle In-Memory Code"})})}function Zht({sectionId:t,isActiveSection:e,sectionTypeName:n,isInOtherProjectConfigs:r,isRoot:i}){const s=()=>{te.setState(a=>{_m([t],a)}),hn(!0)},o=NXe(t)&&!i;return x.jsxs("header",{className:"section-title mx-2 flex flex-row items-center",children:[x.jsx(Hde,{sectionId:t,sectionTypeName:n,isInOtherProjectConfigs:r}),n!==Y.INFO&&x.jsx(x.Fragment,{children:x.jsx(Yht,{sectionId:t,isActiveSection:e,isInOtherProjectConfigs:r,sectionTypeName:n})}),x.jsxs("div",{className:"z-10 ml-auto flex items-center",children:[o&&x.jsx($1,{arrowClasses:"fill-white dark:fill-setta-800",contentClasses:"z-20",trigger:x.jsx(Fa,{twClasses:"[&_*]:hover:text-setta-500 [&_*]:dark:hover:text-setta-400",bg:"bg-transparent",children:x.jsx(fHe,{className:"text-setta-300 dark:text-setta-700"})}),children:x.jsx(c0e,{sectionId:t,isRoot:i,popover:!0})}),n===Y.CODE&&x.jsxs(x.Fragment,{children:[x.jsx(Xht,{sectionId:t})," ",x.jsx(Hht,{sectionId:t})," "]}),x.jsx(Xde,{sectionId:t}),!i&&x.jsx(qht,{sectionId:t}),x.jsx(Uht,{onClick:s})]})]})}function Yht({sectionId:t,isActiveSection:e,isInOtherProjectConfigs:n,sectionTypeName:r}){return x.jsx(Zde,{sectionId:t,titleProps:Kht({isActiveSection:e,isInOtherProjectConfigs:n,sectionTypeName:r})})}const Ght=ke.memo(Zht);function Kht({isActiveSection:t,isInOtherProjectConfigs:e,sectionTypeName:n}){const r="cursor-text nodrag px-1 py-0 leading-5 -ml-1 bg-setta-100 focus-visible:ring-0 focus-visible:outline-none rounded-md box-border border border-solid border-transparent focus-visible:border-blue-500 dark:bg-setta-800 w-3/5 dark:text-white font-bold text-[.7rem] tracking-tight",i=n===Y.GLOBAL_VARIABLES,s=Jht({isActiveSection:t,isInOtherProjectConfigs:e,isGlobalVariables:i,sectionTypeName:n});return i?{fixed:s}:{editing:r,notEditing:s,fixed:"select-none italic focus-visible:ring-0 focus-visible:outline-none box-border border border-solid border-transparent focus-visible:border-blue-500 tracking-tighter text-xs text-setta-400 max-w-full truncate pr-0.5"}}function Jht({isActiveSection:t,isInOtherProjectConfigs:e,isGlobalVariables:n,sectionTypeName:r}){let i="",s="font-bold";return t?e?i="text-purple-800 dark:text-purple-200":n?i="text-green-800 dark:text-green-200":r===Y.TERMINAL?i="text-blue-400":i="text-blue-600 dark:text-blue-400":r===Y.TERMINAL?i="text-setta-300":i="text-setta-700 dark:text-setta-300",n&&(s="uppercase font-bold"),`px-1 py-0 -ml-1 w-3/5 focus-visible:ring-0 focus-visible:outline-none box-border rounded-md border border-solid border-transparent focus-visible:border-blue-500 leading-5 font-bold tracking-tight cursor-pointer max-w-full text-[.7rem] truncate ${i} ${s}`}/*!
|
357
357
|
* @kurkle/color v0.3.4
|
358
358
|
* https://github.com/kurkle/color#readme
|
359
359
|
* (c) 2024 Jukka Kurkela
|