diff --git a/.replit b/.replit deleted file mode 100644 index b18c069..0000000 --- a/.replit +++ /dev/null @@ -1,34 +0,0 @@ -modules = ["nodejs-20"] -[agent] -expertMode = true - -[nix] -packages = ["unzipNLS"] - -[workflows] -runButton = "Project" - -[[workflows.workflow]] -name = "Project" -mode = "parallel" -author = "agent" - -[[workflows.workflow.tasks]] -task = "workflow.run" -args = "Start application" - -[[workflows.workflow]] -name = "Start application" -author = "agent" - -[[workflows.workflow.tasks]] -task = "shell.exec" -args = "PORT=5000 BASE_PATH=/ pnpm run dev" -waitForPort = 5000 - -[workflows.workflow.metadata] -outputType = "webview" - -[[ports]] -localPort = 5000 -externalPort = 80 diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..91ec92c --- /dev/null +++ b/TODO.md @@ -0,0 +1,4 @@ +# TODO: pakage + +## Plan Steps: +- [ ] FS (memfs / IndexedDB) me node_modules persist karo ya ek baar load hone ke baad re-run avoid karo diff --git a/artifacts/html-editor/public/opengraph.jpg b/artifacts/html-editor/public/opengraph.jpg index de091c2..c936fc1 100644 Binary files a/artifacts/html-editor/public/opengraph.jpg and b/artifacts/html-editor/public/opengraph.jpg differ diff --git a/dist/404.html b/dist/404.html new file mode 100644 index 0000000..6128476 --- /dev/null +++ b/dist/404.html @@ -0,0 +1,110 @@ + + + + + + + 404 — Page Not Found | HTML Editor + + + + + + + + + +
+
404
+

Page Not Found

+

The page you're looking for doesn't exist or has been moved.
Head back to HTML Editor and start building.

+ Go to HTML Editor +

You will be redirected automatically in 5 seconds.

+
+ + + + diff --git a/dist/assets/css.worker-DBVD8oXr.js b/dist/assets/css.worker-CgwaIV8M.js similarity index 76% rename from dist/assets/css.worker-DBVD8oXr.js rename to dist/assets/css.worker-CgwaIV8M.js index 62e6fed..ade213b 100644 --- a/dist/assets/css.worker-DBVD8oXr.js +++ b/dist/assets/css.worker-CgwaIV8M.js @@ -1,61 +1,61 @@ -(function(){"use strict";var lt,Ce,ne;class ih{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?It.isErrorNoTelemetry(e)?new It(e.message+` +var If=Object.defineProperty;var Df=(xt,Xe,Ye)=>Xe in xt?If(xt,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):xt[Xe]=Ye;var yt=(xt,Xe,Ye)=>Df(xt,typeof Xe!="symbol"?Xe+"":Xe,Ye);(function(){"use strict";var ht,Ce,ne;class xt{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Mt.isErrorNoTelemetry(e)?new Mt(e.message+` `+e.stack):new Error(e.message+` -`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const sh=new ih;function $n(t){ah(t)||sh.onUnexpectedError(t)}function Tr(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:It.isErrorNoTelemetry(t),cause:r?Tr(r):void 0,code:t.code}}return t}const Or="Canceled";function ah(t){return t instanceof zs?!0:t instanceof Error&&t.name===Or&&t.message===Or}class zs extends Error{constructor(){super(Or),this.name=this.message}}class It extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof It)return e;const n=new It;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class be extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,be.prototype)}}function oh(t,e="Unreachable"){throw new Error(e)}function lh(t,e="unexpected state"){if(!t)throw typeof e=="string"?new be(`Assertion Failed: ${e}`):e}function Un(t){if(!t()){debugger;t(),$n(new be("Assertion Failed"))}}function Ps(t,e){let n=0;for(;n=0;R--)yield I[R]}t.reverse=o;function l(I){return!I||I[Symbol.iterator]().next().done===!0}t.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}t.first=c;function d(I,R){let z=0;for(const $ of I)if(R($,z++))return!0;return!1}t.some=d;function u(I,R){let z=0;for(const $ of I)if(!R($,z++))return!1;return!0}t.every=u;function m(I,R){for(const z of I)if(R(z))return z}t.find=m;function*f(I,R){for(const z of I)R(z)&&(yield z)}t.filter=f;function*g(I,R){let z=0;for(const $ of I)yield R($,z++)}t.map=g;function*b(I,R){let z=0;for(const $ of I)yield*R($,z++)}t.flatMap=b;function*k(...I){for(const R of I)hh(R)?yield*R:yield R}t.concat=k;function F(I,R,z){let $=z;for(const L of I)$=R($,L);return $}t.reduce=F;function N(I){let R=0;for(const z of I)R++;return R}t.length=N;function*_(I,R,z=I.length){for(R<-I.length&&(R=0),R<0&&(R+=I.length),z<0?z+=I.length:z>I.length&&(z=I.length);R1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function dh(...t){return qn(()=>Ts(t))}class uh{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function qn(t){return new uh(t)}const Dr=class Dr{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Ts(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===wt.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Dr.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Dr.DISABLE_DISPOSED_WARNING=!1;let cn=Dr;const Ds=class Ds{constructor(){this._store=new cn,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Ds.None=Object.freeze({dispose(){}});let wt=Ds,le=(lt=class{constructor(e){this.element=e,this.next=lt.Undefined,this.prev=lt.Undefined}},lt.Undefined=new lt(void 0),lt);class ph{constructor(){this._first=le.Undefined,this._last=le.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===le.Undefined}clear(){let e=this._first;for(;e!==le.Undefined;){const n=e.next;e.prev=le.Undefined,e.next=le.Undefined,e=n}this._first=le.Undefined,this._last=le.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){const r=new le(e);if(this._first===le.Undefined)this._first=r,this._last=r;else if(n){const s=this._last;this._last=r,r.prev=s,s.next=r}else{const s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==le.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==le.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==le.Undefined&&e.next!==le.Undefined){const n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===le.Undefined&&e.next===le.Undefined?(this._first=le.Undefined,this._last=le.Undefined):e.next===le.Undefined?(this._last=this._last.prev,this._last.next=le.Undefined):e.prev===le.Undefined&&(this._first=this._first.next,this._first.prev=le.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==le.Undefined;)yield e.element,e=e.next}}const mh=globalThis.performance.now.bind(globalThis.performance);class jn{static create(e){return new jn(e)}constructor(e){this._now=e===!1?Date.now:mh,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var Wr;(function(t){t.None=()=>wt.None;function e(y,E){return m(y,()=>{},0,void 0,!0,void 0,E)}t.defer=e;function n(y){return(E,D=null,A)=>{let M=!1,P;return P=y(H=>{if(!M)return P?P.dispose():M=!0,E.call(D,H)},null,A),M&&P.dispose(),P}}t.once=n;function r(y,E){return t.once(t.filter(y,E))}t.onceIf=r;function i(y,E,D){return d((A,M=null,P)=>y(H=>A.call(M,E(H)),null,P),D)}t.map=i;function s(y,E,D){return d((A,M=null,P)=>y(H=>{E(H),A.call(M,H)},null,P),D)}t.forEach=s;function a(y,E,D){return d((A,M=null,P)=>y(H=>E(H)&&A.call(M,H),null,P),D)}t.filter=a;function o(y){return y}t.signal=o;function l(...y){return(E,D=null,A)=>{const M=dh(...y.map(P=>P(H=>E.call(D,H))));return u(M,A)}}t.any=l;function c(y,E,D,A){let M=D;return i(y,P=>(M=E(M,P),M),A)}t.reduce=c;function d(y,E){let D;const A={onWillAddFirstListener(){D=y(M.fire,M)},onDidRemoveLastListener(){D?.dispose()}},M=new Ue(A);return E?.add(M),M.event}function u(y,E){return E instanceof Array?E.push(y):E&&E.add(y),y}function m(y,E,D=100,A=!1,M=!1,P,H){let ee,G,xe,on=0,bt;const As={leakWarningThreshold:P,onWillAddFirstListener(){ee=y(Ff=>{on++,G=E(G,Ff),A&&!xe&&(ln.fire(G),G=void 0),bt=()=>{const Rf=G;G=void 0,xe=void 0,(!A||on>1)&&ln.fire(Rf),on=0},typeof D=="number"?(xe&&clearTimeout(xe),xe=setTimeout(bt,D)):xe===void 0&&(xe=null,queueMicrotask(bt))})},onWillRemoveListener(){M&&on>0&&bt?.()},onDidRemoveLastListener(){bt=void 0,ee.dispose()}},ln=new Ue(As);return H?.add(ln),ln.event}t.debounce=m;function f(y,E=0,D){return t.debounce(y,(A,M)=>A?(A.push(M),A):[M],E,void 0,!0,void 0,D)}t.accumulate=f;function g(y,E=(A,M)=>A===M,D){let A=!0,M;return a(y,P=>{const H=A||!E(P,M);return A=!1,M=P,H},D)}t.latch=g;function b(y,E,D){return[t.filter(y,E,D),t.filter(y,A=>!E(A),D)]}t.split=b;function k(y,E=!1,D=[],A){let M=D.slice(),P=y(G=>{M?M.push(G):ee.fire(G)});A&&A.add(P);const H=()=>{M?.forEach(G=>ee.fire(G)),M=null},ee=new Ue({onWillAddFirstListener(){P||(P=y(G=>ee.fire(G)),A&&A.add(P))},onDidAddFirstListener(){M&&(E?setTimeout(H):H())},onDidRemoveLastListener(){P&&P.dispose(),P=null}});return A&&A.add(ee),ee.event}t.buffer=k;function F(y,E){return(A,M,P)=>{const H=E(new _);return y(function(ee){const G=H.evaluate(ee);G!==N&&A.call(M,G)},void 0,P)}}t.chain=F;const N=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(E){return this.steps.push(E),this}forEach(E){return this.steps.push(D=>(E(D),D)),this}filter(E){return this.steps.push(D=>E(D)?D:N),this}reduce(E,D){let A=D;return this.steps.push(M=>(A=E(A,M),A)),this}latch(E=(D,A)=>D===A){let D=!0,A;return this.steps.push(M=>{const P=D||!E(M,A);return D=!1,A=M,P?M:N}),this}evaluate(E){for(const D of this.steps)if(E=D(E),E===N)break;return E}}function T(y,E,D=A=>A){const A=(...ee)=>H.fire(D(...ee)),M=()=>y.on(E,A),P=()=>y.removeListener(E,A),H=new Ue({onWillAddFirstListener:M,onDidRemoveLastListener:P});return H.event}t.fromNodeEventEmitter=T;function O(y,E,D=A=>A){const A=(...ee)=>H.fire(D(...ee)),M=()=>y.addEventListener(E,A),P=()=>y.removeEventListener(E,A),H=new Ue({onWillAddFirstListener:M,onDidRemoveLastListener:P});return H.event}t.fromDOMEventEmitter=O;function V(y,E){let D;const A=new Promise((M,P)=>{const H=n(y)(M,null,E);D=()=>H.dispose()});return A.cancel=D,A}t.toPromise=V;function I(y,E){return y(D=>E.fire(D))}t.forward=I;function R(y,E,D){return E(D),y(A=>E(A))}t.runAndSubscribe=R;class z{constructor(E,D){this._observable=E,this._counter=0,this._hasChanged=!1;const A={onWillAddFirstListener:()=>{E.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{E.removeObserver(this)}};this.emitter=new Ue(A),D&&D.add(this.emitter)}beginUpdate(E){this._counter++}handlePossibleChange(E){}handleChange(E,D){this._hasChanged=!0}endUpdate(E){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function $(y,E){return new z(y,E).emitter.event}t.fromObservable=$;function L(y){return(E,D,A)=>{let M=0,P=!1;const H={beginUpdate(){M++},endUpdate(){M--,M===0&&(y.reportChanges(),P&&(P=!1,E.call(D)))},handlePossibleChange(){},handleChange(){P=!0}};y.addObserver(H),y.reportChanges();const ee={dispose(){y.removeObserver(H)}};return A instanceof cn?A.add(ee):Array.isArray(A)&&A.push(ee),ee}}t.fromObservableLight=L})(Wr||(Wr={}));const nn=class nn{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${nn._idPool++}`,nn.all.add(this)}start(e){this._stopWatch=new jn,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};nn.all=new Set,nn._idPool=0;let Vr=nn,fh=-1;const Lr=class Lr{constructor(e,n,r=(Lr._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,n=0;for(const[r,i]of this._stacks)(!e||n{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const Xe=new xt;function Ye(t){oh(t)||Xe.onUnexpectedError(t)}function Vr(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:Mt.isErrorNoTelemetry(t),cause:r?Vr(r):void 0,code:t.code}}return t}const $r="Canceled";function oh(t){return t instanceof Os?!0:t instanceof Error&&t.name===$r&&t.message===$r}class Os extends Error{constructor(){super($r),this.name=this.message}}class Mt extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Mt)return e;const n=new Mt;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class be extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,be.prototype)}}function lh(t,e="Unreachable"){throw new Error(e)}function ch(t,e="unexpected state"){if(!t)throw typeof e=="string"?new be(`Assertion Failed: ${e}`):e}function jn(t){if(!t()){debugger;t(),Ye(new be("Assertion Failed"))}}function Ws(t,e){let n=0;for(;n=0;R--)yield I[R]}t.reverse=o;function l(I){return!I||I[Symbol.iterator]().next().done===!0}t.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}t.first=c;function d(I,R){let z=0;for(const $ of I)if(R($,z++))return!0;return!1}t.some=d;function u(I,R){let z=0;for(const $ of I)if(!R($,z++))return!1;return!0}t.every=u;function m(I,R){for(const z of I)if(R(z))return z}t.find=m;function*f(I,R){for(const z of I)R(z)&&(yield z)}t.filter=f;function*g(I,R){let z=0;for(const $ of I)yield R($,z++)}t.map=g;function*b(I,R){let z=0;for(const $ of I)yield*R($,z++)}t.flatMap=b;function*_(...I){for(const R of I)dh(R)?yield*R:yield R}t.concat=_;function F(I,R,z){let $=z;for(const L of I)$=R($,L);return $}t.reduce=F;function N(I){let R=0;for(const z of I)R++;return R}t.length=N;function*E(I,R,z=I.length){for(R<-I.length&&(R=0),R<0&&(R+=I.length),z<0?z+=I.length:z>I.length&&(z=I.length);R1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function uh(...t){return Gn(()=>Vs(t))}class ph{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function Gn(t){return new ph(t)}const Mr=class Mr{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Vs(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===St.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Mr.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Mr.DISABLE_DISPOSED_WARNING=!1;let pn=Mr;const Ms=class Ms{constructor(){this._store=new pn,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Ms.None=Object.freeze({dispose(){}});let St=Ms,le=(ht=class{constructor(e){this.element=e,this.next=ht.Undefined,this.prev=ht.Undefined}},ht.Undefined=new ht(void 0),ht);class mh{constructor(){this._first=le.Undefined,this._last=le.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===le.Undefined}clear(){let e=this._first;for(;e!==le.Undefined;){const n=e.next;e.prev=le.Undefined,e.next=le.Undefined,e=n}this._first=le.Undefined,this._last=le.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){const r=new le(e);if(this._first===le.Undefined)this._first=r,this._last=r;else if(n){const s=this._last;this._last=r,r.prev=s,s.next=r}else{const s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==le.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==le.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==le.Undefined&&e.next!==le.Undefined){const n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===le.Undefined&&e.next===le.Undefined?(this._first=le.Undefined,this._last=le.Undefined):e.next===le.Undefined?(this._last=this._last.prev,this._last.next=le.Undefined):e.prev===le.Undefined&&(this._first=this._first.next,this._first.prev=le.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==le.Undefined;)yield e.element,e=e.next}}const fh=globalThis.performance.now.bind(globalThis.performance);class Jn{static create(e){return new Jn(e)}constructor(e){this._now=e===!1?Date.now:fh,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var Ur;(function(t){t.None=()=>St.None;function e(y,k){return m(y,()=>{},0,void 0,!0,void 0,k)}t.defer=e;function n(y){return(k,D=null,A)=>{let M=!1,P;return P=y(H=>{if(!M)return P?P.dispose():M=!0,k.call(D,H)},null,A),M&&P.dispose(),P}}t.once=n;function r(y,k){return t.once(t.filter(y,k))}t.onceIf=r;function i(y,k,D){return d((A,M=null,P)=>y(H=>A.call(M,k(H)),null,P),D)}t.map=i;function s(y,k,D){return d((A,M=null,P)=>y(H=>{k(H),A.call(M,H)},null,P),D)}t.forEach=s;function a(y,k,D){return d((A,M=null,P)=>y(H=>k(H)&&A.call(M,H),null,P),D)}t.filter=a;function o(y){return y}t.signal=o;function l(...y){return(k,D=null,A)=>{const M=uh(...y.map(P=>P(H=>k.call(D,H))));return u(M,A)}}t.any=l;function c(y,k,D,A){let M=D;return i(y,P=>(M=k(M,P),M),A)}t.reduce=c;function d(y,k){let D;const A={onWillAddFirstListener(){D=y(M.fire,M)},onDidRemoveLastListener(){D?.dispose()}},M=new Ue(A);return k?.add(M),M.event}function u(y,k){return k instanceof Array?k.push(y):k&&k.add(y),y}function m(y,k,D=100,A=!1,M=!1,P,H){let ee,G,xe,dn=0,vt;const Ps={leakWarningThreshold:P,onWillAddFirstListener(){ee=y(Rf=>{dn++,G=k(G,Rf),A&&!xe&&(un.fire(G),G=void 0),vt=()=>{const Nf=G;G=void 0,xe=void 0,(!A||dn>1)&&un.fire(Nf),dn=0},typeof D=="number"?(xe&&clearTimeout(xe),xe=setTimeout(vt,D)):xe===void 0&&(xe=null,queueMicrotask(vt))})},onWillRemoveListener(){M&&dn>0&&vt?.()},onDidRemoveLastListener(){vt=void 0,ee.dispose()}},un=new Ue(Ps);return H?.add(un),un.event}t.debounce=m;function f(y,k=0,D){return t.debounce(y,(A,M)=>A?(A.push(M),A):[M],k,void 0,!0,void 0,D)}t.accumulate=f;function g(y,k=(A,M)=>A===M,D){let A=!0,M;return a(y,P=>{const H=A||!k(P,M);return A=!1,M=P,H},D)}t.latch=g;function b(y,k,D){return[t.filter(y,k,D),t.filter(y,A=>!k(A),D)]}t.split=b;function _(y,k=!1,D=[],A){let M=D.slice(),P=y(G=>{M?M.push(G):ee.fire(G)});A&&A.add(P);const H=()=>{M?.forEach(G=>ee.fire(G)),M=null},ee=new Ue({onWillAddFirstListener(){P||(P=y(G=>ee.fire(G)),A&&A.add(P))},onDidAddFirstListener(){M&&(k?setTimeout(H):H())},onDidRemoveLastListener(){P&&P.dispose(),P=null}});return A&&A.add(ee),ee.event}t.buffer=_;function F(y,k){return(A,M,P)=>{const H=k(new E);return y(function(ee){const G=H.evaluate(ee);G!==N&&A.call(M,G)},void 0,P)}}t.chain=F;const N=Symbol("HaltChainable");class E{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(D=>(k(D),D)),this}filter(k){return this.steps.push(D=>k(D)?D:N),this}reduce(k,D){let A=D;return this.steps.push(M=>(A=k(A,M),A)),this}latch(k=(D,A)=>D===A){let D=!0,A;return this.steps.push(M=>{const P=D||!k(M,A);return D=!1,A=M,P?M:N}),this}evaluate(k){for(const D of this.steps)if(k=D(k),k===N)break;return k}}function T(y,k,D=A=>A){const A=(...ee)=>H.fire(D(...ee)),M=()=>y.on(k,A),P=()=>y.removeListener(k,A),H=new Ue({onWillAddFirstListener:M,onDidRemoveLastListener:P});return H.event}t.fromNodeEventEmitter=T;function O(y,k,D=A=>A){const A=(...ee)=>H.fire(D(...ee)),M=()=>y.addEventListener(k,A),P=()=>y.removeEventListener(k,A),H=new Ue({onWillAddFirstListener:M,onDidRemoveLastListener:P});return H.event}t.fromDOMEventEmitter=O;function V(y,k){let D;const A=new Promise((M,P)=>{const H=n(y)(M,null,k);D=()=>H.dispose()});return A.cancel=D,A}t.toPromise=V;function I(y,k){return y(D=>k.fire(D))}t.forward=I;function R(y,k,D){return k(D),y(A=>k(A))}t.runAndSubscribe=R;class z{constructor(k,D){this._observable=k,this._counter=0,this._hasChanged=!1;const A={onWillAddFirstListener:()=>{k.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{k.removeObserver(this)}};this.emitter=new Ue(A),D&&D.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,D){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function $(y,k){return new z(y,k).emitter.event}t.fromObservable=$;function L(y){return(k,D,A)=>{let M=0,P=!1;const H={beginUpdate(){M++},endUpdate(){M--,M===0&&(y.reportChanges(),P&&(P=!1,k.call(D)))},handlePossibleChange(){},handleChange(){P=!0}};y.addObserver(H),y.reportChanges();const ee={dispose(){y.removeObserver(H)}};return A instanceof pn?A.add(ee):Array.isArray(A)&&A.push(ee),ee}}t.fromObservableLight=L})(Ur||(Ur={}));const on=class on{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${on._idPool++}`,on.all.add(this)}start(e){this._stopWatch=new Jn,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};on.all=new Set,on._idPool=0;let Br=on,gh=-1;const zr=class zr{constructor(e,n,r=(zr._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,n=0;for(const[r,i]of this._stacks)(!e||n{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new bh(`${o}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||$n)(c),wt.None}if(this._disposed)return wt.None;n&&(e=e.bind(n));const i=new Br(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Ur.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof Br?(this._deliveryQueue??=new vh,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=qn(()=>{s?.(),this._removeListener(i)});return r instanceof cn?r.add(a):Array.isArray(r)&&r.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*wh<=n.length){let s=0;for(let a=0;a0}}class vh{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function yh(){return globalThis._VSCODE_NLS_MESSAGES}function Os(){return globalThis._VSCODE_NLS_LANGUAGE}const xh=Os()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Ws(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=e[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),xh&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function B(t,e,...n){return Ws(typeof t=="number"?Sh(t,e):e,n)}function Sh(t,e){const n=yh()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}const Dt="en";let qr=!1,jr=!1,Hr=!1,Hn,Gr=Dt,Vs=Dt,Ch,Xe;const vt=globalThis;let ke;typeof vt.vscode<"u"&&typeof vt.vscode.process<"u"?ke=vt.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(ke=process);const kh=typeof ke?.versions?.electron=="string"&&ke?.type==="renderer";if(typeof ke=="object"){qr=ke.platform==="win32",jr=ke.platform==="darwin",Hr=ke.platform==="linux",Hr&&ke.env.SNAP&&ke.env.SNAP_REVISION,ke.env.CI||ke.env.BUILD_ARTIFACTSTAGINGDIRECTORY||ke.env.GITHUB_WORKSPACE,Hn=Dt,Gr=Dt;const t=ke.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t);Hn=e.userLocale,Vs=e.osLocale,Gr=e.resolvedLanguage||Dt,Ch=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!kh?(Xe=navigator.userAgent,qr=Xe.indexOf("Windows")>=0,jr=Xe.indexOf("Macintosh")>=0,(Xe.indexOf("Macintosh")>=0||Xe.indexOf("iPad")>=0||Xe.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Hr=Xe.indexOf("Linux")>=0,Xe?.indexOf("Mobi")>=0,Gr=Os()||Dt,Hn=navigator.language.toLowerCase(),Vs=Hn):console.error("Unable to resolve platform.");const hn=qr,_h=jr,Be=Xe,Eh=typeof vt.postMessage=="function"&&!vt.importScripts;(()=>{if(Eh){const t=[];vt.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=t.length;r{const r=++e;t.push({id:r,callback:n}),vt.postMessage({vscodeScheduleAsyncWork:r},"*")}}return t=>setTimeout(t)})();const Fh=!!(Be&&Be.indexOf("Chrome")>=0);Be&&Be.indexOf("Firefox")>=0,!Fh&&Be&&Be.indexOf("Safari")>=0,Be&&Be.indexOf("Edg/")>=0,Be&&Be.indexOf("Android")>=0;function Rh(t){return t}class Nh{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Rh):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}var yt;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(yt||(yt={}));class Jr{constructor(e){this.executor=e,this._state=yt.Uninitialized}get value(){if(this._state===yt.Uninitialized){this._state=yt.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=yt.Completed}}else if(this._state===yt.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Ih(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Dh(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function Lh(t){return t.split(/\r\n|\r|\n/)}function Ah(t){for(let e=0,n=t.length;e=0;n--){const r=t.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function $s(t){return t>=65&&t<=90}function zh(t,e){const n=Math.min(t.length,e.length);let r;for(r=0;rJSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}')),Je.cache=new Nh({getCacheKey:JSON.stringify},e=>{function n(d){const u=new Map;for(let m=0;m!d.startsWith("_")&&Object.hasOwn(s,d));a.length===0&&(a=["_default"]);let o;for(const d of a){const u=n(s[d]);o=i(o,u)}const l=n(s._common),c=r(l,o);return new Je(c)}),Je._locales=new Jr(()=>Object.keys(Je.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")));let dn=Je;const rn=class rn{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static getData(){return this._data||(this._data=new Set([...Object.values(rn.getRawData())].flat())),this._data}static isInvisibleCharacter(e){return rn.getData().has(e)}static get codePoints(){return rn.getData()}};rn._data=void 0;let un=rn;const Yr="default",Uh="$initialize";class Bh{constructor(e,n,r,i,s){this.vsWorker=e,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}}class Us{constructor(e,n,r,i){this.vsWorker=e,this.seq=n,this.res=r,this.err=i,this.type=1}}class qh{constructor(e,n,r,i,s){this.vsWorker=e,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}}class jh{constructor(e,n,r){this.vsWorker=e,this.req=n,this.event=r,this.type=3}}class Hh{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}}class Gh{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,n,r){const i=String(++this._lastSentReq);return new Promise((s,a)=>{this._pendingReplies[i]={resolve:s,reject:a},this._send(new Bh(this._workerId,i,e,n,r))})}listen(e,n,r){let i=null;const s=new Ue({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new qh(this._workerId,i,e,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new Hh(this._workerId,i)),i=null}});return s.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,n){const r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(qs(s)?i[s]=a=>this.listen(e,s,a):Bs(s)?i[s]=this.listen(e,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...a)=>(await n?.(),this.sendMessage(e,s,a)))),i[s])};return new Proxy(Object.create(null),r)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let r=e.err;if(e.err.$isError){const i=new Error;i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack,r=i}n.reject(r);return}n.resolve(e.res)}_handleRequestMessage(e){const n=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(i=>{this._send(new Us(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=Tr(i.detail)),this._send(new Us(this._workerId,n,void 0,Tr(i)))})}_handleSubscribeEventMessage(e){const n=e.req,r=this._handler.handleEvent(e.channel,e.eventName,e.arg)(i=>{this._send(new jh(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const n=[];if(e.type===0)for(let r=0;r{e(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)}),this.requestHandler=n(this)}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n,r){if(e===Yr&&n===Uh)return this.initialize(r[0]);const i=e===Yr?this.requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));const s=i[n];if(typeof s!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${e}`));try{return Promise.resolve(s.apply(i,r))}catch(a){return Promise.reject(a)}}_handleEvent(e,n,r){const i=e===Yr?this.requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(qs(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);const a=s.call(i,r);if(typeof a!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return a}if(Bs(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(e){if(!this._remoteChannels.has(e)){const n=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,n)}return this._remoteChannels.get(e)}async initialize(e){this._protocol.setWorkerId(e)}}let js=!1;function Xh(t){if(js)throw new Error("WebWorker already initialized!");js=!0;const e=new Jh(n=>globalThis.postMessage(n),n=>t(n));return globalThis.onmessage=n=>{e.onmessage(n.data)},e}class ct{constructor(e,n,r,i){this.originalStart=e,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}new Jr(()=>new Uint8Array(256));function Hs(t,e){return(e<<5)-e+t|0}function Yh(t,e){e=Hs(149417,e);for(let n=0,r=t.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new ct(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class ht{constructor(e,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=e,this._modifiedSequence=n;const[i,s,a]=ht._getElements(e),[o,l,c]=ht._getElements(n);this._hasStrings=a&&c,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const n=e.getElements();if(ht._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=e&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(e>n||r>i){let u;return r<=i?(Lt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),u=[new ct(e,0,r,i-r+1)]):e<=n?(Lt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[new ct(e,n-e+1,r,0)]):(Lt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),Lt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const a=[0],o=[0],l=this.ComputeRecursionPoint(e,n,r,i,a,o,s),c=a[0],d=o[0];if(l!==null)return l;if(!s[0]){const u=this.ComputeDiffRecursive(e,c,r,d,s);let m=[];return s[0]?m=[new ct(c+1,n-(c+1)+1,d+1,i-(d+1)+1)]:m=this.ComputeDiffRecursive(c+1,n,d+1,i,s),this.ConcatenateChanges(u,m)}return[new ct(e,n-e+1,r,i-r+1)]}WALKTRACE(e,n,r,i,s,a,o,l,c,d,u,m,f,g,b,k,F,N){let _=null,T=null,O=new Js,V=n,I=r,R=f[0]-k[0]-i,z=-1073741824,$=this.m_forwardHistory.length-1;do{const L=R+e;L===V||L=0&&(c=this.m_forwardHistory[$],e=c[0],V=1,I=c.length-1)}while(--$>=-1);if(_=O.getReverseChanges(),N[0]){let L=f[0]+1,y=k[0]+1;if(_!==null&&_.length>0){const E=_[_.length-1];L=Math.max(L,E.getOriginalEnd()),y=Math.max(y,E.getModifiedEnd())}T=[new ct(L,m-L+1,y,b-y+1)]}else{O=new Js,V=a,I=o,R=f[0]-k[0]-l,z=1073741824,$=F?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const L=R+s;L===V||L=d[L+1]?(u=d[L+1]-1,g=u-R-l,u>z&&O.MarkNextChange(),z=u+1,O.AddOriginalElement(u+1,g+1),R=L+1-s):(u=d[L-1],g=u-R-l,u>z&&O.MarkNextChange(),z=u,O.AddModifiedElement(u+1,g+1),R=L-1-s),$>=0&&(d=this.m_reverseHistory[$],s=d[0],V=1,I=d.length-1)}while(--$>=-1);T=O.getChanges()}return this.ConcatenateChanges(_,T)}ComputeRecursionPoint(e,n,r,i,s,a,o){let l=0,c=0,d=0,u=0,m=0,f=0;e--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=n-e+(i-r),b=g+1,k=new Int32Array(b),F=new Int32Array(b),N=i-r,_=n-e,T=e-r,O=n-i,I=(_-N)%2===0;k[N]=e,F[_]=n,o[0]=!1;for(let R=1;R<=g/2+1;R++){let z=0,$=0;d=this.ClipDiagonalBound(N-R,R,N,b),u=this.ClipDiagonalBound(N+R,R,N,b);for(let y=d;y<=u;y+=2){y===d||yz+$&&(z=l,$=c),!I&&Math.abs(y-_)<=R-1&&l>=F[y])return s[0]=l,a[0]=c,E<=F[y]&&R<=1448?this.WALKTRACE(N,d,u,T,_,m,f,O,k,F,l,n,s,c,i,a,I,o):null}const L=(z-e+($-r)-R)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(z,L))return o[0]=!0,s[0]=z,a[0]=$,L>0&&R<=1448?this.WALKTRACE(N,d,u,T,_,m,f,O,k,F,l,n,s,c,i,a,I,o):(e++,r++,[new ct(e,n-e+1,r,i-r+1)]);m=this.ClipDiagonalBound(_-R,R,_,b),f=this.ClipDiagonalBound(_+R,R,_,b);for(let y=m;y<=f;y+=2){y===m||y=F[y+1]?l=F[y+1]-1:l=F[y-1],c=l-(y-_)-O;const E=l;for(;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(F[y]=l,I&&Math.abs(y-N)<=R&&l<=k[y])return s[0]=l,a[0]=c,E>=k[y]&&R<=1448?this.WALKTRACE(N,d,u,T,_,m,f,O,k,F,l,n,s,c,i,a,I,o):null}if(R<=1447){let y=new Int32Array(u-d+2);y[0]=N-d+1,At.Copy2(k,d,y,1,u-d+1),this.m_forwardHistory.push(y),y=new Int32Array(f-m+2),y[0]=_-m+1,At.Copy2(F,m,y,1,f-m+1),this.m_reverseHistory.push(y)}}return this.WALKTRACE(N,d,u,T,_,m,f,O,k,F,l,n,s,c,i,a,I,o)}PrettifyChanges(e){for(let n=0;n0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=e[n];let i=0,s=0;if(n>0){const u=e[n-1];i=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let l=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let u=1;;u++){const m=r.originalStart-u,f=r.modifiedStart-u;if(mc&&(c=b,l=u)}r.originalStart-=l,r.modifiedStart-=l;const d=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],d)){e[n-1]=d[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=e.length;n0&&f>l&&(l=f,c=u,d=m)}return l>0?[c,d]:null}_contiguousSequenceScore(e,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(e,n,r,i){const s=this._OriginalRegionIsBoundary(e,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(e,n){const r=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],r)){const i=new Array(e.length+n.length-1);return At.Copy(e,0,i,0,e.length-1),i[e.length-1]=r[0],At.Copy(n,1,i,e.length,n.length-1),i}else{const i=new Array(e.length+n.length);return At.Copy(e,0,i,0,e.length),At.Copy(n,0,i,e.length,n.length),i}}ChangesOverlap(e,n,r){if(Lt.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),Lt.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){const i=e.originalStart;let s=e.originalLength;const a=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-e.modifiedStart),r[0]=new ct(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(e,n,r,i){if(e>=0&&er||e===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return ue.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return ue.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return ue.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return ue.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return ue.plusRange(this,e)}static plusRange(e,n){let r,i,s,a;return n.startLineNumbere.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===e.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,e.endColumn)):(s=e.endLineNumber,a=e.endColumn),new ue(r,i,s,a)}intersectRanges(e){return ue.intersectRanges(this,e)}static intersectRanges(e,n){let r=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,a=e.endColumn;const o=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,d=n.endColumn;return rc?(s=c,a=d):s===c&&(a=Math.min(a,d)),r>s||r===s&&i>a?null:new ue(r,i,s,a)}equalsRange(e){return ue.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return ue.getEndPosition(this)}static getEndPosition(e){return new re(e.endLineNumber,e.endColumn)}getStartPosition(){return ue.getStartPosition(this)}static getStartPosition(e){return new re(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new ue(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new ue(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return ue.collapseToStart(this)}static collapseToStart(e){return new ue(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return ue.collapseToEnd(this)}static collapseToEnd(e){return new ue(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new ue(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,n=e){return new ue(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new ue(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};function Xs(t){return t<0?0:t>255?255:t|0}function Mt(t){return t<0?0:t>4294967295?4294967295:t|0}class Qr{constructor(e){const n=Xs(e);this._defaultValue=n,this._asciiMap=Qr._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){const n=new Uint8Array(256);return n.fill(e),n}set(e,n){const r=Xs(n);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Kh{constructor(e,n,r){const i=new Uint8Array(e*n);for(let s=0,a=e*n;sn&&(n=l),o>r&&(r=o),c>r&&(r=c)}n++,r++;const i=new Kh(r,n,0);for(let s=0,a=e.length;s=this._maxCharCode?0:this._states.get(e,n)}}let Kr=null;function ed(){return Kr===null&&(Kr=new Zh([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Kr}let pn=null;function td(){if(pn===null){pn=new Qr(0);const t=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|`;for(let n=0;ni);if(i>0){const o=n.charCodeAt(i-1),l=n.charCodeAt(a);(o===40&&l===41||o===91&&l===93||o===123&&l===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(e,n=ed()){const r=td(),i=[];for(let s=1,a=e.getLineCount();s<=a;s++){const o=e.getLineContent(s),l=o.length;let c=0,d=0,u=0,m=1,f=!1,g=!1,b=!1,k=!1;for(;c=0?(i+=r?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}};Ar.INSTANCE=new Ar;let Zr=Ar;const Ys=Object.freeze(function(t,e){const n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}});var Jn;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof Xn?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Wr.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ys})})(Jn||(Jn={}));class Xn{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Ys:(this._emitter||(this._emitter=new Ue),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class rd{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Xn),this._token}cancel(){this._token?this._token instanceof Xn&&this._token.cancel():this._token=Jn.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Xn&&this._token.dispose():this._token=Jn.None}}class ei{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const Yn=new ei,ti=new ei,ni=new ei,id=new Array(230),sd=Object.create(null),ad=Object.create(null);(function(){const e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(const i of e){const[s,a,o,l,c,d,u,m,f]=i;if(r[a]||(r[a]=!0,sd[o]=a,ad[o.toLowerCase()]=a),!n[l]){if(n[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${o}`);Yn.define(l,c),ti.define(l,m||c),ni.define(l,f||m||c)}d&&(id[d]=l)}})();var Qs;(function(t){function e(o){return Yn.keyCodeToStr(o)}t.toString=e;function n(o){return Yn.strToKeyCode(o)}t.fromString=n;function r(o){return ti.keyCodeToStr(o)}t.toUserSettingsUS=r;function i(o){return ni.keyCodeToStr(o)}t.toUserSettingsGeneral=i;function s(o){return ti.strToKeyCode(o)||ni.strToKeyCode(o)}t.fromUserSettings=s;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Yn.keyCodeToStr(o)}t.toElectronAccelerator=a})(Qs||(Qs={}));function od(t,e){const n=(e&65535)<<16>>>0;return(t|n)>>>0}var Ks={};let zt;const ri=globalThis.vscode;if(typeof ri<"u"&&typeof ri.process<"u"){const t=ri.process;zt={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?zt={get platform(){return process.platform},get arch(){return process.arch},get env(){return Ks},cwd(){return Ks.VSCODE_CWD||process.cwd()}}:zt={get platform(){return hn?"win32":_h?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const Qn=zt.cwd,ld=zt.env,cd=zt.platform,hd=65,dd=97,ud=90,pd=122,xt=46,fe=47,_e=92,Ye=58,md=63;class Zs extends Error{constructor(e,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";const s=e.indexOf(".")!==-1?"property":"argument";let a=`The "${e}" ${s} ${i} of type ${n}`;a+=`. Received type ${typeof r}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function fd(t,e){if(t===null||typeof t!="object")throw new Zs(e,"Object",t)}function he(t,e){if(typeof t!="string")throw new Zs(e,"string",t)}const dt=cd==="win32";function X(t){return t===fe||t===_e}function ii(t){return t===fe}function Qe(t){return t>=hd&&t<=ud||t>=dd&&t<=pd}function Kn(t,e,n,r){let i="",s=0,a=-1,o=0,l=0;for(let c=0;c<=t.length;++c){if(c2){const d=i.lastIndexOf(n);d===-1?(i="",s=0):(i=i.slice(0,d),s=i.length-1-i.lastIndexOf(n)),a=c,o=0;continue}else if(i.length!==0){i="",s=0,a=c,o=0;continue}}e&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${t.slice(a+1,c)}`:i=t.slice(a+1,c),s=c-a-1;a=c,o=0}else l===xt&&o!==-1?++o:o=-1}return i}function gd(t){return t?`${t[0]==="."?"":"."}${t}`:""}function ea(t,e){fd(e,"pathObject");const n=e.dir||e.root,r=e.base||`${e.name||""}${gd(e.ext)}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}const Se={resolve(...t){let e="",n="",r=!1;for(let i=t.length-1;i>=-1;i--){let s;if(i>=0){if(s=t[i],he(s,`paths[${i}]`),s.length===0)continue}else e.length===0?s=Qn():(s=ld[`=${e}`]||Qn(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===_e)&&(s=`${e}\\`));const a=s.length;let o=0,l="",c=!1;const d=s.charCodeAt(0);if(a===1)X(d)&&(o=1,c=!0);else if(X(d))if(c=!0,X(s.charCodeAt(1))){let u=2,m=u;for(;u2&&X(s.charCodeAt(2))&&(c=!0,o=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(r){if(e.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=c,c&&e.length>0)break}return n=Kn(n,!r,"\\",X),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){he(t,"path");const e=t.length;if(e===0)return".";let n=0,r,i=!1;const s=t.charCodeAt(0);if(e===1)return ii(s)?"\\":t;if(X(s))if(i=!0,X(t.charCodeAt(1))){let o=2,l=o;for(;o2&&X(t.charCodeAt(2))&&(i=!0,n=3));let a=n0&&X(t.charCodeAt(e-1))&&(a+="\\"),!i&&r===void 0&&t.includes(":")){if(a.length>=2&&Qe(a.charCodeAt(0))&&a.charCodeAt(1)===Ye)return`.\\${a}`;let o=t.indexOf(":");do if(o===e-1||X(t.charCodeAt(o+1)))return`.\\${a}`;while((o=t.indexOf(":",o+1))!==-1)}return r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(t){he(t,"path");const e=t.length;if(e===0)return!1;const n=t.charCodeAt(0);return X(n)||e>2&&Qe(n)&&t.charCodeAt(1)===Ye&&X(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let s=0;s0&&(e===void 0?e=n=a:e+=`\\${a}`)}if(e===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&X(n.charCodeAt(0))){++i;const s=n.length;s>1&&X(n.charCodeAt(1))&&(++i,s>2&&(X(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(e=`\\${e.slice(i)}`)}return Se.normalize(e)},relative(t,e){if(he(t,"from"),he(e,"to"),t===e)return"";const n=Se.resolve(t),r=Se.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";if(n.length!==t.length||r.length!==e.length){const g=n.split("\\"),b=r.split("\\");g[g.length-1]===""&&g.pop(),b[b.length-1]===""&&b.pop();const k=g.length,F=b.length,N=kN?b.slice(_).join("\\"):k>N?"..\\".repeat(k-1-_)+"..":"":"..\\".repeat(k-_)+b.slice(_).join("\\")}let i=0;for(;ii&&t.charCodeAt(s-1)===_e;)s--;const a=s-i;let o=0;for(;oo&&e.charCodeAt(l-1)===_e;)l--;const c=l-o,d=ad){if(e.charCodeAt(o+m)===_e)return r.slice(o+m+1);if(m===2)return r.slice(o+m)}a>d&&(t.charCodeAt(i+m)===_e?u=m:m===2&&(u=3)),u===-1&&(u=0)}let f="";for(m=i+u+1;m<=s;++m)(m===s||t.charCodeAt(m)===_e)&&(f+=f.length===0?"..":"\\..");return o+=u,f.length>0?`${f}${r.slice(o,l)}`:(r.charCodeAt(o)===_e&&++o,r.slice(o,l))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;const e=Se.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===_e){if(e.charCodeAt(1)===_e){const n=e.charCodeAt(2);if(n!==md&&n!==xt)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(Qe(e.charCodeAt(0))&&e.charCodeAt(1)===Ye&&e.charCodeAt(2)===_e)return`\\\\?\\${e}`;return e},dirname(t){he(t,"path");const e=t.length;if(e===0)return".";let n=-1,r=0;const i=t.charCodeAt(0);if(e===1)return X(i)?t:".";if(X(i)){if(n=r=1,X(t.charCodeAt(1))){let o=2,l=o;for(;o2&&X(t.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=e-1;o>=r;--o)if(X(t.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return t.slice(0,s)},basename(t,e){e!==void 0&&he(e,"suffix"),he(t,"path");let n=0,r=-1,i=!0,s;if(t.length>=2&&Qe(t.charCodeAt(0))&&t.charCodeAt(1)===Ye&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=n;--s){const l=t.charCodeAt(s);if(X(l)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=n;--s)if(X(t.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){he(t,"path");let e=0,n=-1,r=0,i=-1,s=!0,a=0;t.length>=2&&t.charCodeAt(1)===Ye&&Qe(t.charCodeAt(0))&&(e=r=2);for(let o=t.length-1;o>=e;--o){const l=t.charCodeAt(o);if(X(l)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),l===xt?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:ea.bind(null,"\\"),parse(t){he(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.length;let r=0,i=t.charCodeAt(0);if(n===1)return X(i)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(X(i)){if(r=1,X(t.charCodeAt(1))){let u=2,m=u;for(;u0&&(e.root=t.slice(0,r));let s=-1,a=r,o=-1,l=!0,c=t.length-1,d=0;for(;c>=r;--c){if(i=t.charCodeAt(c),X(i)){if(!l){a=c+1;break}continue}o===-1&&(l=!1,o=c+1),i===xt?s===-1?s=c:d!==1&&(d=1):s!==-1&&(d=-1)}return o!==-1&&(s===-1||d===0||d===1&&s===o-1&&s===a+1?e.base=e.name=t.slice(a,o):(e.name=t.slice(a,s),e.base=t.slice(a,o),e.ext=t.slice(s,o))),a>0&&a!==r?e.dir=t.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},bd=(()=>{if(dt){const t=/\\/g;return()=>{const e=Qn().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>Qn()})(),Ee={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=0&&!n;r--){const i=t[r];he(i,`paths[${r}]`),i.length!==0&&(e=`${i}/${e}`,n=i.charCodeAt(0)===fe)}if(!n){const r=bd();e=`${r}/${e}`,n=r.charCodeAt(0)===fe}return e=Kn(e,!n,"/",ii),n?`/${e}`:e.length>0?e:"."},normalize(t){if(he(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===fe,n=t.charCodeAt(t.length-1)===fe;return t=Kn(t,!e,"/",ii),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return he(t,"path"),t.length>0&&t.charCodeAt(0)===fe},join(...t){if(t.length===0)return".";const e=[];for(let n=0;n0&&e.push(r)}return e.length===0?".":Ee.normalize(e.join("/"))},relative(t,e){if(he(t,"from"),he(e,"to"),t===e||(t=Ee.resolve(t),e=Ee.resolve(e),t===e))return"";const n=1,r=t.length,i=r-n,s=1,a=e.length-s,o=io){if(e.charCodeAt(s+c)===fe)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else i>o&&(t.charCodeAt(n+c)===fe?l=c:c===0&&(l=0));let d="";for(c=n+l+1;c<=r;++c)(c===r||t.charCodeAt(c)===fe)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(s+l)}`},toNamespacedPath(t){return t},dirname(t){if(he(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===fe;let n=-1,r=!0;for(let i=t.length-1;i>=1;--i)if(t.charCodeAt(i)===fe){if(!r){n=i;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&he(e,"suffix"),he(t,"path");let n=0,r=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=0;--s){const l=t.charCodeAt(s);if(l===fe){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===fe){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){he(t,"path");let e=-1,n=0,r=-1,i=!0,s=0;for(let a=t.length-1;a>=0;--a){const o=t[a];if(o==="/"){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o==="."?e===-1?e=a:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||r===-1||s===0||s===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:ea.bind(null,"/"),parse(t){he(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.charCodeAt(0)===fe;let r;n?(e.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,l=t.length-1,c=0;for(;l>=r;--l){const d=t.charCodeAt(l);if(d===fe){if(!o){s=l+1;break}continue}a===-1&&(o=!1,a=l+1),d===xt?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}if(a!==-1){const d=s===0&&n?1:s;i===-1||c===0||c===1&&i===a-1&&i===s+1?e.base=e.name=t.slice(d,a):(e.name=t.slice(d,i),e.base=t.slice(d,a),e.ext=t.slice(i,a))}return s>0?e.dir=t.slice(0,s-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Ee.win32=Se.win32=Se,Ee.posix=Se.posix=Ee,dt?Se.normalize:Ee.normalize,dt?Se.resolve:Ee.resolve,dt?Se.relative:Ee.relative,dt?Se.dirname:Ee.dirname,dt?Se.basename:Ee.basename,dt?Se.extname:Ee.extname,dt?Se.sep:Ee.sep;const wd=/^\w[\w\d+.-]*$/,vd=/^\//,yd=/^\/\//;function xd(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!wd.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!vd.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(yd.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Sd(t,e){return!t&&!e?"file":t}function Cd(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==We&&(e=We+e):e=We;break}return e}const se="",We="/",kd=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let si=class Pr{static isUri(e){return e instanceof Pr?!0:!e||typeof e!="object"?!1:typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function"}constructor(e,n,r,i,s,a=!1){typeof e=="object"?(this.scheme=e.scheme||se,this.authority=e.authority||se,this.path=e.path||se,this.query=e.query||se,this.fragment=e.fragment||se):(this.scheme=Sd(e,a),this.authority=n||se,this.path=Cd(this.scheme,r||se),this.query=i||se,this.fragment=s||se,xd(this,a))}get fsPath(){return ai(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=e;return n===void 0?n=this.scheme:n===null&&(n=se),r===void 0?r=this.authority:r===null&&(r=se),i===void 0?i=this.path:i===null&&(i=se),s===void 0?s=this.query:s===null&&(s=se),a===void 0?a=this.fragment:a===null&&(a=se),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new Pt(n,r,i,s,a)}static parse(e,n=!1){const r=kd.exec(e);return r?new Pt(r[2]||se,Zn(r[4]||se),Zn(r[5]||se),Zn(r[7]||se),Zn(r[9]||se),n):new Pt(se,se,se,se,se)}static file(e){let n=se;if(hn&&(e=e.replace(/\\/g,We)),e[0]===We&&e[1]===We){const r=e.indexOf(We,2);r===-1?(n=e.substring(2),e=We):(n=e.substring(2,r),e=e.substring(r)||We)}return new Pt("file",n,e,se,se)}static from(e,n){return new Pt(e.scheme,e.authority,e.path,e.query,e.fragment,n)}static joinPath(e,...n){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return hn&&e.scheme==="file"?r=Pr.file(Se.join(ai(e,!0),...n)).path:r=Ee.join(e.path,...n),e.with({path:r})}toString(e=!1){return oi(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof Pr)return e;{const n=new Pt(e);return n._formatted=e.external??null,n._fsPath=e._sep===ta?e.fsPath??null:null,n}}else return e}};const ta=hn?1:void 0;class Pt extends si{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=ai(this,!1)),this._fsPath}toString(e=!1){return e?oi(this,!0):(this._formatted||(this._formatted=oi(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=ta),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const na={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function ra(t,e,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||e&&a===47||n&&a===91||n&&a===93||n&&a===58)i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r!==void 0&&(r+=t.charAt(s));else{r===void 0&&(r=t.substr(0,s));const o=na[a];o!==void 0?(i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r+=o):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(t.substring(i))),r!==void 0?r:t}function _d(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,hn&&(n=n.replace(/\//g,"\\")),n}function oi(t,e){const n=e?_d:ra;let r="",{scheme:i,authority:s,path:a,query:o,fragment:l}=t;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=We,r+=We),s){let c=s.indexOf("@");if(c!==-1){const d=s.substr(0,c);s=s.substr(c+1),c=d.lastIndexOf(":"),c===-1?r+=n(d,!1,!1):(r+=n(d.substr(0,c),!1,!1),r+=":",r+=n(d.substr(c+1),!1,!0)),r+="@"}s=s.toLowerCase(),c=s.lastIndexOf(":"),c===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,c),!1,!0),r+=s.substr(c))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const c=a.charCodeAt(1);c>=65&&c<=90&&(a=`/${String.fromCharCode(c+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const c=a.charCodeAt(0);c>=65&&c<=90&&(a=`${String.fromCharCode(c+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=e?l:ra(l,!1,!1)),r}function ia(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+ia(t.substr(3)):t}}const sa=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Zn(t){return t.match(sa)?t.replace(sa,e=>ia(e)):t}class Re extends J{constructor(e,n,r,i){super(e,n,r,i),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Re.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new Re(this.startLineNumber,this.startColumn,e,n):new Re(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new re(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new re(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new Re(e,n,this.endLineNumber,this.endColumn):new Re(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new Re(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new Re(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Re(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Re(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let r=0,i=e.length;r{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){this._factories.get(e)?.dispose();const r=new Nd(this,e,n);return this._factories.set(e,r),qn(()=>{const i=this._factories.get(e);!i||i!==r||(this._factories.delete(e),i.dispose())})}async getOrCreate(e){const n=this.get(e);if(n)return n;const r=this._factories.get(e);return!r||r.isResolved?null:(await r.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const r=this._factories.get(e);return!!(!r||r.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class Nd extends wt{get isResolved(){return this._isResolved}constructor(e,n,r){super(),this._registry=e,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}class Id{constructor(e,n,r){this.offset=e,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var oa;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(oa||(oa={}));var la;(function(t){const e=new Map;e.set(0,U.symbolMethod),e.set(1,U.symbolFunction),e.set(2,U.symbolConstructor),e.set(3,U.symbolField),e.set(4,U.symbolVariable),e.set(5,U.symbolClass),e.set(6,U.symbolStruct),e.set(7,U.symbolInterface),e.set(8,U.symbolModule),e.set(9,U.symbolProperty),e.set(10,U.symbolEvent),e.set(11,U.symbolOperator),e.set(12,U.symbolUnit),e.set(13,U.symbolValue),e.set(15,U.symbolEnum),e.set(14,U.symbolConstant),e.set(15,U.symbolEnum),e.set(16,U.symbolEnumMember),e.set(17,U.symbolKeyword),e.set(28,U.symbolSnippet),e.set(18,U.symbolText),e.set(19,U.symbolColor),e.set(20,U.symbolFile),e.set(21,U.symbolReference),e.set(22,U.symbolCustomColor),e.set(23,U.symbolFolder),e.set(24,U.symbolTypeParameter),e.set(25,U.account),e.set(26,U.issues),e.set(27,U.tools);function n(a){let o=e.get(a);return o||(console.info("No codicon found for CompletionItemKind "+a),o=U.symbolProperty),o}t.toIcon=n;function r(a){switch(a){case 0:return B(728,"Method");case 1:return B(729,"Function");case 2:return B(730,"Constructor");case 3:return B(731,"Field");case 4:return B(732,"Variable");case 5:return B(733,"Class");case 6:return B(734,"Struct");case 7:return B(735,"Interface");case 8:return B(736,"Module");case 9:return B(737,"Property");case 10:return B(738,"Event");case 11:return B(739,"Operator");case 12:return B(740,"Unit");case 13:return B(741,"Value");case 14:return B(742,"Constant");case 15:return B(743,"Enum");case 16:return B(744,"Enum Member");case 17:return B(745,"Keyword");case 18:return B(746,"Text");case 19:return B(747,"Color");case 20:return B(748,"File");case 21:return B(749,"Reference");case 22:return B(750,"Custom Color");case 23:return B(751,"Folder");case 24:return B(752,"Type Parameter");case 25:return B(753,"User");case 26:return B(754,"Issue");case 27:return B(755,"Tool");case 28:return B(756,"Snippet");default:return""}}t.toLabel=r;const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",28),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),i.set("tool",27);function s(a,o){let l=i.get(a);return typeof l>"u"&&!o&&(l=9),l}t.fromString=s})(la||(la={}));var ca;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(ca||(ca={}));var ha;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(ha||(ha={}));var da;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(da||(da={}));var ua;(function(t){t[t.Automatic=0]="Automatic",t[t.PasteAs=1]="PasteAs"})(ua||(ua={}));var pa;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(pa||(pa={}));var ma;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(ma||(ma={})),B(757,"array"),B(758,"boolean"),B(759,"class"),B(760,"constant"),B(761,"constructor"),B(762,"enumeration"),B(763,"enumeration member"),B(764,"event"),B(765,"field"),B(766,"file"),B(767,"function"),B(768,"interface"),B(769,"key"),B(770,"method"),B(771,"module"),B(772,"namespace"),B(773,"null"),B(774,"number"),B(775,"object"),B(776,"operator"),B(777,"package"),B(778,"property"),B(779,"string"),B(780,"struct"),B(781,"type parameter"),B(782,"variable");var fa;(function(t){const e=new Map;e.set(0,U.symbolFile),e.set(1,U.symbolModule),e.set(2,U.symbolNamespace),e.set(3,U.symbolPackage),e.set(4,U.symbolClass),e.set(5,U.symbolMethod),e.set(6,U.symbolProperty),e.set(7,U.symbolField),e.set(8,U.symbolConstructor),e.set(9,U.symbolEnum),e.set(10,U.symbolInterface),e.set(11,U.symbolFunction),e.set(12,U.symbolVariable),e.set(13,U.symbolConstant),e.set(14,U.symbolString),e.set(15,U.symbolNumber),e.set(16,U.symbolBoolean),e.set(17,U.symbolArray),e.set(18,U.symbolObject),e.set(19,U.symbolKey),e.set(20,U.symbolNull),e.set(21,U.symbolEnumMember),e.set(22,U.symbolStruct),e.set(23,U.symbolEvent),e.set(24,U.symbolOperator),e.set(25,U.symbolTypeParameter);function n(s){let a=e.get(s);return a||(console.info("No codicon found for SymbolKind "+s),a=U.symbolProperty),a}t.toIcon=n;const r=new Map;r.set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24);function i(s){let a=r.get(s);return a===void 0&&(console.info("No completion kind found for SymbolKind "+s),a=20),a}t.toCompletionKind=i})(fa||(fa={}));let Df=(Ce=class{static fromValue(e){switch(e){case"comment":return Ce.Comment;case"imports":return Ce.Imports;case"region":return Ce.Region}return new Ce(e)}constructor(e){this.value=e}},Ce.Comment=new Ce("comment"),Ce.Imports=new Ce("imports"),Ce.Region=new Ce("region"),Ce);var ga;(function(t){t[t.AIGenerated=1]="AIGenerated"})(ga||(ga={}));var ba;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(ba||(ba={}));var wa;(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})(wa||(wa={}));var va;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(va||(va={})),new Rd;var ya;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(ya||(ya={}));var xa;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(xa||(xa={}));var Sa;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(Sa||(Sa={}));var Ca;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Tool=27]="Tool",t[t.Snippet=28]="Snippet"})(Ca||(Ca={}));var ka;(function(t){t[t.Deprecated=1]="Deprecated"})(ka||(ka={}));var _a;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(_a||(_a={}));var Ea;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(Ea||(Ea={}));var Fa;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(Fa||(Fa={}));var Ra;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Ra||(Ra={}));var Na;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Na||(Na={}));var Ia;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(Ia||(Ia={}));var Da;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.allowOverflow=4]="allowOverflow",t[t.allowVariableLineHeights=5]="allowVariableLineHeights",t[t.allowVariableFonts=6]="allowVariableFonts",t[t.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",t[t.ariaLabel=8]="ariaLabel",t[t.ariaRequired=9]="ariaRequired",t[t.autoClosingBrackets=10]="autoClosingBrackets",t[t.autoClosingComments=11]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=13]="autoClosingDelete",t[t.autoClosingOvertype=14]="autoClosingOvertype",t[t.autoClosingQuotes=15]="autoClosingQuotes",t[t.autoIndent=16]="autoIndent",t[t.autoIndentOnPaste=17]="autoIndentOnPaste",t[t.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",t[t.automaticLayout=19]="automaticLayout",t[t.autoSurround=20]="autoSurround",t[t.bracketPairColorization=21]="bracketPairColorization",t[t.guides=22]="guides",t[t.codeLens=23]="codeLens",t[t.codeLensFontFamily=24]="codeLensFontFamily",t[t.codeLensFontSize=25]="codeLensFontSize",t[t.colorDecorators=26]="colorDecorators",t[t.colorDecoratorsLimit=27]="colorDecoratorsLimit",t[t.columnSelection=28]="columnSelection",t[t.comments=29]="comments",t[t.contextmenu=30]="contextmenu",t[t.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",t[t.cursorBlinking=32]="cursorBlinking",t[t.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",t[t.cursorStyle=34]="cursorStyle",t[t.cursorSurroundingLines=35]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",t[t.cursorWidth=37]="cursorWidth",t[t.cursorHeight=38]="cursorHeight",t[t.disableLayerHinting=39]="disableLayerHinting",t[t.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",t[t.domReadOnly=41]="domReadOnly",t[t.dragAndDrop=42]="dragAndDrop",t[t.dropIntoEditor=43]="dropIntoEditor",t[t.editContext=44]="editContext",t[t.emptySelectionClipboard=45]="emptySelectionClipboard",t[t.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",t[t.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",t[t.extraEditorClassName=48]="extraEditorClassName",t[t.fastScrollSensitivity=49]="fastScrollSensitivity",t[t.find=50]="find",t[t.fixedOverflowWidgets=51]="fixedOverflowWidgets",t[t.folding=52]="folding",t[t.foldingStrategy=53]="foldingStrategy",t[t.foldingHighlight=54]="foldingHighlight",t[t.foldingImportsByDefault=55]="foldingImportsByDefault",t[t.foldingMaximumRegions=56]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=58]="fontFamily",t[t.fontInfo=59]="fontInfo",t[t.fontLigatures=60]="fontLigatures",t[t.fontSize=61]="fontSize",t[t.fontWeight=62]="fontWeight",t[t.fontVariations=63]="fontVariations",t[t.formatOnPaste=64]="formatOnPaste",t[t.formatOnType=65]="formatOnType",t[t.glyphMargin=66]="glyphMargin",t[t.gotoLocation=67]="gotoLocation",t[t.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",t[t.hover=69]="hover",t[t.inDiffEditor=70]="inDiffEditor",t[t.inlineSuggest=71]="inlineSuggest",t[t.letterSpacing=72]="letterSpacing",t[t.lightbulb=73]="lightbulb",t[t.lineDecorationsWidth=74]="lineDecorationsWidth",t[t.lineHeight=75]="lineHeight",t[t.lineNumbers=76]="lineNumbers",t[t.lineNumbersMinChars=77]="lineNumbersMinChars",t[t.linkedEditing=78]="linkedEditing",t[t.links=79]="links",t[t.matchBrackets=80]="matchBrackets",t[t.minimap=81]="minimap",t[t.mouseStyle=82]="mouseStyle",t[t.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=84]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",t[t.multiCursorModifier=86]="multiCursorModifier",t[t.mouseMiddleClickAction=87]="mouseMiddleClickAction",t[t.multiCursorPaste=88]="multiCursorPaste",t[t.multiCursorLimit=89]="multiCursorLimit",t[t.occurrencesHighlight=90]="occurrencesHighlight",t[t.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",t[t.overtypeCursorStyle=92]="overtypeCursorStyle",t[t.overtypeOnPaste=93]="overtypeOnPaste",t[t.overviewRulerBorder=94]="overviewRulerBorder",t[t.overviewRulerLanes=95]="overviewRulerLanes",t[t.padding=96]="padding",t[t.pasteAs=97]="pasteAs",t[t.parameterHints=98]="parameterHints",t[t.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",t[t.placeholder=100]="placeholder",t[t.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",t[t.quickSuggestions=102]="quickSuggestions",t[t.quickSuggestionsDelay=103]="quickSuggestionsDelay",t[t.readOnly=104]="readOnly",t[t.readOnlyMessage=105]="readOnlyMessage",t[t.renameOnType=106]="renameOnType",t[t.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",t[t.renderControlCharacters=108]="renderControlCharacters",t[t.renderFinalNewline=109]="renderFinalNewline",t[t.renderLineHighlight=110]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=112]="renderValidationDecorations",t[t.renderWhitespace=113]="renderWhitespace",t[t.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",t[t.roundedSelection=115]="roundedSelection",t[t.rulers=116]="rulers",t[t.scrollbar=117]="scrollbar",t[t.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=119]="scrollBeyondLastLine",t[t.scrollPredominantAxis=120]="scrollPredominantAxis",t[t.selectionClipboard=121]="selectionClipboard",t[t.selectionHighlight=122]="selectionHighlight",t[t.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",t[t.selectionHighlightMultiline=124]="selectionHighlightMultiline",t[t.selectOnLineNumbers=125]="selectOnLineNumbers",t[t.showFoldingControls=126]="showFoldingControls",t[t.showUnused=127]="showUnused",t[t.snippetSuggestions=128]="snippetSuggestions",t[t.smartSelect=129]="smartSelect",t[t.smoothScrolling=130]="smoothScrolling",t[t.stickyScroll=131]="stickyScroll",t[t.stickyTabStops=132]="stickyTabStops",t[t.stopRenderingLineAfter=133]="stopRenderingLineAfter",t[t.suggest=134]="suggest",t[t.suggestFontSize=135]="suggestFontSize",t[t.suggestLineHeight=136]="suggestLineHeight",t[t.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",t[t.suggestSelection=138]="suggestSelection",t[t.tabCompletion=139]="tabCompletion",t[t.tabIndex=140]="tabIndex",t[t.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",t[t.unicodeHighlighting=142]="unicodeHighlighting",t[t.unusualLineTerminators=143]="unusualLineTerminators",t[t.useShadowDOM=144]="useShadowDOM",t[t.useTabStops=145]="useTabStops",t[t.wordBreak=146]="wordBreak",t[t.wordSegmenterLocales=147]="wordSegmenterLocales",t[t.wordSeparators=148]="wordSeparators",t[t.wordWrap=149]="wordWrap",t[t.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=152]="wordWrapColumn",t[t.wordWrapOverride1=153]="wordWrapOverride1",t[t.wordWrapOverride2=154]="wordWrapOverride2",t[t.wrappingIndent=155]="wrappingIndent",t[t.wrappingStrategy=156]="wrappingStrategy",t[t.showDeprecated=157]="showDeprecated",t[t.inertialScroll=158]="inertialScroll",t[t.inlayHints=159]="inlayHints",t[t.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",t[t.effectiveCursorStyle=161]="effectiveCursorStyle",t[t.editorClassName=162]="editorClassName",t[t.pixelRatio=163]="pixelRatio",t[t.tabFocusMode=164]="tabFocusMode",t[t.layoutInfo=165]="layoutInfo",t[t.wrappingInfo=166]="wrappingInfo",t[t.defaultColorDecorators=167]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",t[t.effectiveEditContext=170]="effectiveEditContext",t[t.scrollOnMiddleClick=171]="scrollOnMiddleClick",t[t.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts"})(Da||(Da={}));var La;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(La||(La={}));var Aa;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(Aa||(Aa={}));var Ma;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(Ma||(Ma={}));var za;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(za||(za={}));var Pa;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(Pa||(Pa={}));var Ta;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(Ta||(Ta={}));var Oa;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(Oa||(Oa={}));var Wa;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(Wa||(Wa={}));var Va;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(Va||(Va={}));var $a;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})($a||($a={}));var li;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(li||(li={}));var ci;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(ci||(ci={}));var hi;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(hi||(hi={}));var Ua;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(Ua||(Ua={}));var Ba;(function(t){t[t.Normal=1]="Normal",t[t.Underlined=2]="Underlined"})(Ba||(Ba={}));var qa;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(qa||(qa={}));var ja;(function(t){t[t.AIGenerated=1]="AIGenerated"})(ja||(ja={}));var Ha;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(Ha||(Ha={}));var Ga;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(Ga||(Ga={}));var Ja;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(Ja||(Ja={}));var Xa;(function(t){t[t.Word=0]="Word",t[t.Line=1]="Line",t[t.Suggest=2]="Suggest"})(Xa||(Xa={}));var Ya;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(Ya||(Ya={}));var Qa;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(Qa||(Qa={}));var Ka;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(Ka||(Ka={}));var Za;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(Za||(Za={}));var eo;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(eo||(eo={}));var di;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(di||(di={}));var to;(function(t){t.Off="off",t.OnCode="onCode",t.On="on"})(to||(to={}));var no;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(no||(no={}));var ro;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(ro||(ro={}));var io;(function(t){t[t.Deprecated=1]="Deprecated"})(io||(io={}));var so;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(so||(so={}));var ao;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(ao||(ao={}));var oo;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(oo||(oo={}));var lo;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(lo||(lo={}));var co;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(co||(co={}));const sn=class sn{static chord(e,n){return od(e,n)}};sn.CtrlCmd=2048,sn.Shift=1024,sn.Alt=512,sn.WinCtrl=256;let ui=sn;function Dd(){return{editor:void 0,languages:void 0,CancellationTokenSource:rd,Emitter:Ue,KeyCode:li,KeyMod:ui,Position:re,Range:J,Selection:Re,SelectionDirection:di,MarkerSeverity:ci,MarkerTag:hi,Uri:si,Token:Id}}var ho;class Ld{constructor(){this[ho]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=0){const r=this._map.get(e);if(r)return n!==0&&this.touch(r,n),r.value}set(e,n,r=0){let i=this._map.get(e);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){const r=this._state;let i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){const e=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){const e=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(ho=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(e===this._head)return;const r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===2){if(e===this._tail)return;const r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(const[n,r]of e)this.set(n,r)}}class Ad extends Ld{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,n=2){return super.get(e,n)}peek(e){return super.get(e,0)}set(e,n){return super.set(e,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class Md extends Ad{constructor(e,n=1){super(e,n)}trim(e){this.trimOld(e)}set(e,n){return super.set(e,n),this.checkTrim(),this}}class zd{constructor(){this.map=new Map}add(e,n){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(n)}delete(e,n){const r=this.map.get(e);r&&(r.delete(n),r.size===0&&this.map.delete(e))}forEach(e,n){const r=this.map.get(e);r&&r.forEach(n)}}new Md(10);var uo;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(uo||(uo={}));var po;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(po||(po={}));var mo;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(mo||(mo={}));var fo;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(fo||(fo={}));function Pd(t){if(!t||t.length===0)return!1;for(let e=0,n=t.length;e=n)break;const i=t.charCodeAt(e);if(i===110||i===114||i===87)return!0}}return!1}function Td(t,e,n,r,i){if(r===0)return!0;const s=e.charCodeAt(r-1);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r);if(t.get(a)!==0)return!0}return!1}function Od(t,e,n,r,i){if(r+i===n)return!0;const s=e.charCodeAt(r+i);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r+i-1);if(t.get(a)!==0)return!0}return!1}function Wd(t,e,n,r,i){return Td(t,e,n,r,i)&&Od(t,e,n,r,i)}class Vd{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const n=e.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(e),!r))return null;const i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Wh(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||Wd(this._wordSeparators,e,n,i,s))return r}while(r);return null}}const $d="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Ud(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const n of $d)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}const go=Ud();function bo(t){let e=go;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}const wo=new ph;wo.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function pi(t,e,n,r,i){if(e=bo(e),i||(i=Bn.first(wo)),n.length>i.maxLen){let c=t-i.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,t+i.maxLen/2),pi(t,e,n,r,i)}const s=Date.now(),a=t-1-r;let o=-1,l=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){const d=a-i.windowSize*c;e.lastIndex=Math.max(0,d);const u=Bd(e,n,a,o);if(!u&&l||(l=u,d<=0))break;o=d}if(l){const c={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function Bd(t,e,n,r){let i;for(;i=t.exec(e);){const s=i.index||0;if(s<=n&&t.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}class qd{static computeUnicodeHighlights(e,n,r){const i=r?r.startLineNumber:1,s=r?r.endLineNumber:e.getLineCount(),a=new vo(n),o=a.getCandidateCodePoints();let l;o==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${jd(Array.from(o))}`,"g");const c=new Vd(null,l),d=[];let u=!1,m,f=0,g=0,b=0;e:for(let k=i,F=s;k<=F;k++){const N=e.getLineContent(k),_=N.length;c.reset(0);do if(m=c.next(N),m){let T=m.index,O=m.index+m[0].length;if(T>0){const z=N.charCodeAt(T-1);Xr(z)&&T--}if(O+1<_){const z=N.charCodeAt(O-1);Xr(z)&&O++}const V=N.substring(T,O);let I=pi(T+1,go,N,0);I&&I.endColumn<=T+1&&(I=null);const R=a.shouldHighlightNonBasicASCII(V,I?I.word:null);if(R!==0){if(R===3?f++:R===2?g++:R===1?b++:oh(),d.length>=1e3){u=!0;break e}d.push(new J(k,T+1,k,O+1))}}while(m)}return{ranges:d,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(e,n){const r=new vo(n);switch(r.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=e.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(s),o=dn.getLocales().filter(l=>!dn.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function jd(t,e){return`[${Ih(t.map(r=>String.fromCodePoint(r)).join(""))}]`}class vo{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=dn.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const n of un.codePoints)yo(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(const n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){const r=e.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(const a of n){const o=a.codePointAt(0),l=$h(a);i=i||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!un.isInvisibleCharacter(o)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!yo(e)&&un.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function yo(t){return t===" "||t===` -`||t===" "}class er{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class Hd{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function Gd(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(mi||(mi={}));function mn(t,e){return(n,r)=>e(t(n),t(r))}const fn=(t,e)=>t-e;function Kd(t){return(e,n)=>-t(e,n)}const an=class an{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new an(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new an(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(i=>((r||mi.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}};an.empty=new an(e=>{});let xo=an;class Y{static fromTo(e,n){return new Y(e,n)}static addRange(e,n){let r=0;for(;rn))return new Y(e,n)}static ofLength(e){return new Y(0,e)}static ofStartAndLength(e,n){return new Y(e,e+n)}static emptyAt(e){return new Y(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new be(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new Y(this.start+e,this.endExclusive+e)}deltaStart(e){return new Y(this.start+e,this.endExclusive)}deltaEnd(e){return new Y(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new be(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new be(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;nn)throw new be(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&ee.startLineNumber,fn);let Z=De;class qe{constructor(e=[]){this._normalizedRanges=e}get ranges(){return this._normalizedRanges}addRange(e){if(e.length===0)return;const n=fi(this._normalizedRanges,i=>i.endLineNumberExclusive>=e.startLineNumber),r=Ot(this._normalizedRanges,i=>i.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,e);else if(n===r-1){const i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(e)}else{const i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(e);this._normalizedRanges.splice(n,r-n,i)}}contains(e){const n=Tt(this._normalizedRanges,r=>r.startLineNumber<=e);return!!n&&n.endLineNumberExclusive>e}intersects(e){const n=Tt(this._normalizedRanges,r=>r.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const n=[];let r=0,i=0,s=null;for(;r=a.startLineNumber?s=new Z(s.startLineNumber,Math.max(s.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(s),s=a)}return s!==null&&n.push(s),new qe(n)}subtractFrom(e){const n=fi(this._normalizedRanges,a=>a.endLineNumberExclusive>=e.startLineNumber),r=Ot(this._normalizedRanges,a=>a.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)return new qe([e]);const i=[];let s=e.startLineNumber;for(let a=n;as&&i.push(new Z(s,o.startLineNumber)),s=o.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){const n=[];let r=0,i=0;for(;rn.delta(e)))}}const $e=class $e{static betweenPositions(e,n){return e.lineNumber===n.lineNumber?new $e(0,n.column-e.column):new $e(n.lineNumber-e.lineNumber,n.column-1)}static fromPosition(e){return new $e(e.lineNumber-1,e.column-1)}static ofRange(e){return $e.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let n=0,r=0;for(const i of e)i===` -`?(n++,r=0):r++;return new $e(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new $e(this.lineCount,this.columnCount+e.columnCount):new $e(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new J(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new J(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new J(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Z.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new re(e.lineNumber,e.column+this.columnCount):new re(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};$e.zero=new $e(0,0);let gn=$e;class eu{getOffsetRange(e){return new Y(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return J.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Wt.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Wt.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new Wt.deps.TextEdit(n)}}const Ls=class Ls{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Ls._deps=void 0;let Wt=Ls;class tu extends eu{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n0&&e.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new re(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const i=this.getLineLength(n);return new re(n,i+1)}if(e.column<1)return new re(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new re(e.lineNumber,r+1):e}getPosition(e){const n=Ot(this.lineStartOffsetByLineIdx,s=>s<=e),r=n+1,i=e-this.lineStartOffsetByLineIdx[n]+1;return new re(r,i)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Wt.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class nu{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new re(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new J(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new tu(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new J(e,1,e,Number.MAX_SAFE_INTEGER))}}class ru extends nu{constructor(e,n){lh(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;r{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new wh(`${o}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Ye)(c),St.None}if(this._disposed)return St.None;n&&(e=e.bind(n));const i=new Hr(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=jr.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof Hr?(this._deliveryQueue??(this._deliveryQueue=new yh),this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=Gn(()=>{s?.(),this._removeListener(i)});return r instanceof pn?r.add(a):Array.isArray(r)&&r.push(a),a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*vh<=n.length){let s=0;for(let a=0;a0}}class yh{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function xh(){return globalThis._VSCODE_NLS_MESSAGES}function $s(){return globalThis._VSCODE_NLS_LANGUAGE}const Sh=$s()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Us(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=e[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),Sh&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function B(t,e,...n){return Us(typeof t=="number"?Ch(t,e):e,n)}function Ch(t,e){const n=xh()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}const zt="en";let Gr=!1,Jr=!1,Xr=!1,Xn,Yr=zt,Bs=zt,kh,Qe;const Ct=globalThis;let ke;typeof Ct.vscode<"u"&&typeof Ct.vscode.process<"u"?ke=Ct.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(ke=process);const _h=typeof ke?.versions?.electron=="string"&&ke?.type==="renderer";if(typeof ke=="object"){Gr=ke.platform==="win32",Jr=ke.platform==="darwin",Xr=ke.platform==="linux",Xr&&ke.env.SNAP&&ke.env.SNAP_REVISION,ke.env.CI||ke.env.BUILD_ARTIFACTSTAGINGDIRECTORY||ke.env.GITHUB_WORKSPACE,Xn=zt,Yr=zt;const t=ke.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t);Xn=e.userLocale,Bs=e.osLocale,Yr=e.resolvedLanguage||zt,kh=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!_h?(Qe=navigator.userAgent,Gr=Qe.indexOf("Windows")>=0,Jr=Qe.indexOf("Macintosh")>=0,(Qe.indexOf("Macintosh")>=0||Qe.indexOf("iPad")>=0||Qe.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Xr=Qe.indexOf("Linux")>=0,Qe?.indexOf("Mobi")>=0,Yr=$s()||zt,Xn=navigator.language.toLowerCase(),Bs=Xn):console.error("Unable to resolve platform.");const mn=Gr,Eh=Jr,Be=Qe,Fh=typeof Ct.postMessage=="function"&&!Ct.importScripts;(()=>{if(Fh){const t=[];Ct.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=t.length;r{const r=++e;t.push({id:r,callback:n}),Ct.postMessage({vscodeScheduleAsyncWork:r},"*")}}return t=>setTimeout(t)})();const Rh=!!(Be&&Be.indexOf("Chrome")>=0);Be&&Be.indexOf("Firefox")>=0,!Rh&&Be&&Be.indexOf("Safari")>=0,Be&&Be.indexOf("Edg/")>=0,Be&&Be.indexOf("Android")>=0;function Nh(t){return t}class Ih{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Nh):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}var kt;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(kt||(kt={}));class Qr{constructor(e){this.executor=e,this._state=kt.Uninitialized}get value(){if(this._state===kt.Uninitialized){this._state=kt.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=kt.Completed}}else if(this._state===kt.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Dh(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Lh(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function Ah(t){return t.split(/\r\n|\r|\n/)}function Mh(t){for(let e=0,n=t.length;e=0;n--){const r=t.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function qs(t){return t>=65&&t<=90}function Ph(t,e){const n=Math.min(t.length,e.length);let r;for(r=0;rJSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}')),Je.cache=new Ih({getCacheKey:JSON.stringify},e=>{function n(d){const u=new Map;for(let m=0;m!d.startsWith("_")&&Object.hasOwn(s,d));a.length===0&&(a=["_default"]);let o;for(const d of a){const u=n(s[d]);o=i(o,u)}const l=n(s._common),c=r(l,o);return new Je(c)}),Je._locales=new Qr(()=>Object.keys(Je.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")));let fn=Je;const ln=class ln{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static getData(){return this._data||(this._data=new Set([...Object.values(ln.getRawData())].flat())),this._data}static isInvisibleCharacter(e){return ln.getData().has(e)}static get codePoints(){return ln.getData()}};ln._data=void 0;let gn=ln;const Zr="default",Bh="$initialize";class qh{constructor(e,n,r,i,s){this.vsWorker=e,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}}class js{constructor(e,n,r,i){this.vsWorker=e,this.seq=n,this.res=r,this.err=i,this.type=1}}class jh{constructor(e,n,r,i,s){this.vsWorker=e,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}}class Hh{constructor(e,n,r){this.vsWorker=e,this.req=n,this.event=r,this.type=3}}class Gh{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}}class Jh{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,n,r){const i=String(++this._lastSentReq);return new Promise((s,a)=>{this._pendingReplies[i]={resolve:s,reject:a},this._send(new qh(this._workerId,i,e,n,r))})}listen(e,n,r){let i=null;const s=new Ue({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new jh(this._workerId,i,e,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new Gh(this._workerId,i)),i=null}});return s.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,n){const r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(Gs(s)?i[s]=a=>this.listen(e,s,a):Hs(s)?i[s]=this.listen(e,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...a)=>(await n?.(),this.sendMessage(e,s,a)))),i[s])};return new Proxy(Object.create(null),r)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let r=e.err;if(e.err.$isError){const i=new Error;i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack,r=i}n.reject(r);return}n.resolve(e.res)}_handleRequestMessage(e){const n=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(i=>{this._send(new js(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=Vr(i.detail)),this._send(new js(this._workerId,n,void 0,Vr(i)))})}_handleSubscribeEventMessage(e){const n=e.req,r=this._handler.handleEvent(e.channel,e.eventName,e.arg)(i=>{this._send(new Hh(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const n=[];if(e.type===0)for(let r=0;r{e(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)}),this.requestHandler=n(this)}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n,r){if(e===Zr&&n===Bh)return this.initialize(r[0]);const i=e===Zr?this.requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));const s=i[n];if(typeof s!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${e}`));try{return Promise.resolve(s.apply(i,r))}catch(a){return Promise.reject(a)}}_handleEvent(e,n,r){const i=e===Zr?this.requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(Gs(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);const a=s.call(i,r);if(typeof a!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return a}if(Hs(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(e){if(!this._remoteChannels.has(e)){const n=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,n)}return this._remoteChannels.get(e)}async initialize(e){this._protocol.setWorkerId(e)}}let Js=!1;function Yh(t){if(Js)throw new Error("WebWorker already initialized!");Js=!0;const e=new Xh(n=>globalThis.postMessage(n),n=>t(n));return globalThis.onmessage=n=>{e.onmessage(n.data)},e}class dt{constructor(e,n,r,i){this.originalStart=e,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}new Qr(()=>new Uint8Array(256));function Xs(t,e){return(e<<5)-e+t|0}function Qh(t,e){e=Xs(149417,e);for(let n=0,r=t.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new dt(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class ut{constructor(e,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=e,this._modifiedSequence=n;const[i,s,a]=ut._getElements(e),[o,l,c]=ut._getElements(n);this._hasStrings=a&&c,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const n=e.getElements();if(ut._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=e&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(e>n||r>i){let u;return r<=i?(Pt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),u=[new dt(e,0,r,i-r+1)]):e<=n?(Pt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[new dt(e,n-e+1,r,0)]):(Pt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),Pt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const a=[0],o=[0],l=this.ComputeRecursionPoint(e,n,r,i,a,o,s),c=a[0],d=o[0];if(l!==null)return l;if(!s[0]){const u=this.ComputeDiffRecursive(e,c,r,d,s);let m=[];return s[0]?m=[new dt(c+1,n-(c+1)+1,d+1,i-(d+1)+1)]:m=this.ComputeDiffRecursive(c+1,n,d+1,i,s),this.ConcatenateChanges(u,m)}return[new dt(e,n-e+1,r,i-r+1)]}WALKTRACE(e,n,r,i,s,a,o,l,c,d,u,m,f,g,b,_,F,N){let E=null,T=null,O=new Qs,V=n,I=r,R=f[0]-_[0]-i,z=-1073741824,$=this.m_forwardHistory.length-1;do{const L=R+e;L===V||L=0&&(c=this.m_forwardHistory[$],e=c[0],V=1,I=c.length-1)}while(--$>=-1);if(E=O.getReverseChanges(),N[0]){let L=f[0]+1,y=_[0]+1;if(E!==null&&E.length>0){const k=E[E.length-1];L=Math.max(L,k.getOriginalEnd()),y=Math.max(y,k.getModifiedEnd())}T=[new dt(L,m-L+1,y,b-y+1)]}else{O=new Qs,V=a,I=o,R=f[0]-_[0]-l,z=1073741824,$=F?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const L=R+s;L===V||L=d[L+1]?(u=d[L+1]-1,g=u-R-l,u>z&&O.MarkNextChange(),z=u+1,O.AddOriginalElement(u+1,g+1),R=L+1-s):(u=d[L-1],g=u-R-l,u>z&&O.MarkNextChange(),z=u,O.AddModifiedElement(u+1,g+1),R=L-1-s),$>=0&&(d=this.m_reverseHistory[$],s=d[0],V=1,I=d.length-1)}while(--$>=-1);T=O.getChanges()}return this.ConcatenateChanges(E,T)}ComputeRecursionPoint(e,n,r,i,s,a,o){let l=0,c=0,d=0,u=0,m=0,f=0;e--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=n-e+(i-r),b=g+1,_=new Int32Array(b),F=new Int32Array(b),N=i-r,E=n-e,T=e-r,O=n-i,I=(E-N)%2===0;_[N]=e,F[E]=n,o[0]=!1;for(let R=1;R<=g/2+1;R++){let z=0,$=0;d=this.ClipDiagonalBound(N-R,R,N,b),u=this.ClipDiagonalBound(N+R,R,N,b);for(let y=d;y<=u;y+=2){y===d||yz+$&&(z=l,$=c),!I&&Math.abs(y-E)<=R-1&&l>=F[y])return s[0]=l,a[0]=c,k<=F[y]&&R<=1448?this.WALKTRACE(N,d,u,T,E,m,f,O,_,F,l,n,s,c,i,a,I,o):null}const L=(z-e+($-r)-R)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(z,L))return o[0]=!0,s[0]=z,a[0]=$,L>0&&R<=1448?this.WALKTRACE(N,d,u,T,E,m,f,O,_,F,l,n,s,c,i,a,I,o):(e++,r++,[new dt(e,n-e+1,r,i-r+1)]);m=this.ClipDiagonalBound(E-R,R,E,b),f=this.ClipDiagonalBound(E+R,R,E,b);for(let y=m;y<=f;y+=2){y===m||y=F[y+1]?l=F[y+1]-1:l=F[y-1],c=l-(y-E)-O;const k=l;for(;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(F[y]=l,I&&Math.abs(y-N)<=R&&l<=_[y])return s[0]=l,a[0]=c,k>=_[y]&&R<=1448?this.WALKTRACE(N,d,u,T,E,m,f,O,_,F,l,n,s,c,i,a,I,o):null}if(R<=1447){let y=new Int32Array(u-d+2);y[0]=N-d+1,Tt.Copy2(_,d,y,1,u-d+1),this.m_forwardHistory.push(y),y=new Int32Array(f-m+2),y[0]=E-m+1,Tt.Copy2(F,m,y,1,f-m+1),this.m_reverseHistory.push(y)}}return this.WALKTRACE(N,d,u,T,E,m,f,O,_,F,l,n,s,c,i,a,I,o)}PrettifyChanges(e){for(let n=0;n0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=e[n];let i=0,s=0;if(n>0){const u=e[n-1];i=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let l=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let u=1;;u++){const m=r.originalStart-u,f=r.modifiedStart-u;if(mc&&(c=b,l=u)}r.originalStart-=l,r.modifiedStart-=l;const d=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],d)){e[n-1]=d[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=e.length;n0&&f>l&&(l=f,c=u,d=m)}return l>0?[c,d]:null}_contiguousSequenceScore(e,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(e,n,r,i){const s=this._OriginalRegionIsBoundary(e,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(e,n){const r=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],r)){const i=new Array(e.length+n.length-1);return Tt.Copy(e,0,i,0,e.length-1),i[e.length-1]=r[0],Tt.Copy(n,1,i,e.length,n.length-1),i}else{const i=new Array(e.length+n.length);return Tt.Copy(e,0,i,0,e.length),Tt.Copy(n,0,i,e.length,n.length),i}}ChangesOverlap(e,n,r){if(Pt.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),Pt.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){const i=e.originalStart;let s=e.originalLength;const a=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-e.modifiedStart),r[0]=new dt(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(e,n,r,i){if(e>=0&&er||e===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return ue.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return ue.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return ue.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return ue.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return ue.plusRange(this,e)}static plusRange(e,n){let r,i,s,a;return n.startLineNumbere.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===e.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,e.endColumn)):(s=e.endLineNumber,a=e.endColumn),new ue(r,i,s,a)}intersectRanges(e){return ue.intersectRanges(this,e)}static intersectRanges(e,n){let r=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,a=e.endColumn;const o=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,d=n.endColumn;return rc?(s=c,a=d):s===c&&(a=Math.min(a,d)),r>s||r===s&&i>a?null:new ue(r,i,s,a)}equalsRange(e){return ue.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return ue.getEndPosition(this)}static getEndPosition(e){return new re(e.endLineNumber,e.endColumn)}getStartPosition(){return ue.getStartPosition(this)}static getStartPosition(e){return new re(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new ue(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new ue(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return ue.collapseToStart(this)}static collapseToStart(e){return new ue(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return ue.collapseToEnd(this)}static collapseToEnd(e){return new ue(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new ue(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,n=e){return new ue(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new ue(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};function Ks(t){return t<0?0:t>255?255:t|0}function Ot(t){return t<0?0:t>4294967295?4294967295:t|0}class ei{constructor(e){const n=Ks(e);this._defaultValue=n,this._asciiMap=ei._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){const n=new Uint8Array(256);return n.fill(e),n}set(e,n){const r=Ks(n);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Zh{constructor(e,n,r){const i=new Uint8Array(e*n);for(let s=0,a=e*n;sn&&(n=l),o>r&&(r=o),c>r&&(r=c)}n++,r++;const i=new Zh(r,n,0);for(let s=0,a=e.length;s=this._maxCharCode?0:this._states.get(e,n)}}let ti=null;function td(){return ti===null&&(ti=new ed([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),ti}let bn=null;function nd(){if(bn===null){bn=new ei(0);const t=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|`;for(let n=0;ni);if(i>0){const o=n.charCodeAt(i-1),l=n.charCodeAt(a);(o===40&&l===41||o===91&&l===93||o===123&&l===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(e,n=td()){const r=nd(),i=[];for(let s=1,a=e.getLineCount();s<=a;s++){const o=e.getLineContent(s),l=o.length;let c=0,d=0,u=0,m=1,f=!1,g=!1,b=!1,_=!1;for(;c=0?(i+=r?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}};Pr.INSTANCE=new Pr;let ni=Pr;const Zs=Object.freeze(function(t,e){const n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}});var Qn;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof Kn?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ur.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Zs})})(Qn||(Qn={}));class Kn{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Zs:(this._emitter||(this._emitter=new Ue),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class id{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Kn),this._token}cancel(){this._token?this._token instanceof Kn&&this._token.cancel():this._token=Qn.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Kn&&this._token.dispose():this._token=Qn.None}}class ri{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const Zn=new ri,ii=new ri,si=new ri,sd=new Array(230),ad=Object.create(null),od=Object.create(null);(function(){const e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(const i of e){const[s,a,o,l,c,d,u,m,f]=i;if(r[a]||(r[a]=!0,ad[o]=a,od[o.toLowerCase()]=a),!n[l]){if(n[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${o}`);Zn.define(l,c),ii.define(l,m||c),si.define(l,f||m||c)}d&&(sd[d]=l)}})();var ea;(function(t){function e(o){return Zn.keyCodeToStr(o)}t.toString=e;function n(o){return Zn.strToKeyCode(o)}t.fromString=n;function r(o){return ii.keyCodeToStr(o)}t.toUserSettingsUS=r;function i(o){return si.keyCodeToStr(o)}t.toUserSettingsGeneral=i;function s(o){return ii.strToKeyCode(o)||si.strToKeyCode(o)}t.fromUserSettings=s;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Zn.keyCodeToStr(o)}t.toElectronAccelerator=a})(ea||(ea={}));function ld(t,e){const n=(e&65535)<<16>>>0;return(t|n)>>>0}var ta={};let Wt;const ai=globalThis.vscode;if(typeof ai<"u"&&typeof ai.process<"u"){const t=ai.process;Wt={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Wt={get platform(){return process.platform},get arch(){return process.arch},get env(){return ta},cwd(){return ta.VSCODE_CWD||process.cwd()}}:Wt={get platform(){return mn?"win32":Eh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const er=Wt.cwd,cd=Wt.env,hd=Wt.platform,dd=65,ud=97,pd=90,md=122,_t=46,fe=47,_e=92,Ke=58,fd=63;class na extends Error{constructor(e,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";const s=e.indexOf(".")!==-1?"property":"argument";let a=`The "${e}" ${s} ${i} of type ${n}`;a+=`. Received type ${typeof r}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function gd(t,e){if(t===null||typeof t!="object")throw new na(e,"Object",t)}function he(t,e){if(typeof t!="string")throw new na(e,"string",t)}const pt=hd==="win32";function X(t){return t===fe||t===_e}function oi(t){return t===fe}function Ze(t){return t>=dd&&t<=pd||t>=ud&&t<=md}function tr(t,e,n,r){let i="",s=0,a=-1,o=0,l=0;for(let c=0;c<=t.length;++c){if(c2){const d=i.lastIndexOf(n);d===-1?(i="",s=0):(i=i.slice(0,d),s=i.length-1-i.lastIndexOf(n)),a=c,o=0;continue}else if(i.length!==0){i="",s=0,a=c,o=0;continue}}e&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${t.slice(a+1,c)}`:i=t.slice(a+1,c),s=c-a-1;a=c,o=0}else l===_t&&o!==-1?++o:o=-1}return i}function bd(t){return t?`${t[0]==="."?"":"."}${t}`:""}function ra(t,e){gd(e,"pathObject");const n=e.dir||e.root,r=e.base||`${e.name||""}${bd(e.ext)}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}const Se={resolve(...t){let e="",n="",r=!1;for(let i=t.length-1;i>=-1;i--){let s;if(i>=0){if(s=t[i],he(s,`paths[${i}]`),s.length===0)continue}else e.length===0?s=er():(s=cd[`=${e}`]||er(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===_e)&&(s=`${e}\\`));const a=s.length;let o=0,l="",c=!1;const d=s.charCodeAt(0);if(a===1)X(d)&&(o=1,c=!0);else if(X(d))if(c=!0,X(s.charCodeAt(1))){let u=2,m=u;for(;u2&&X(s.charCodeAt(2))&&(c=!0,o=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(r){if(e.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=c,c&&e.length>0)break}return n=tr(n,!r,"\\",X),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){he(t,"path");const e=t.length;if(e===0)return".";let n=0,r,i=!1;const s=t.charCodeAt(0);if(e===1)return oi(s)?"\\":t;if(X(s))if(i=!0,X(t.charCodeAt(1))){let o=2,l=o;for(;o2&&X(t.charCodeAt(2))&&(i=!0,n=3));let a=n0&&X(t.charCodeAt(e-1))&&(a+="\\"),!i&&r===void 0&&t.includes(":")){if(a.length>=2&&Ze(a.charCodeAt(0))&&a.charCodeAt(1)===Ke)return`.\\${a}`;let o=t.indexOf(":");do if(o===e-1||X(t.charCodeAt(o+1)))return`.\\${a}`;while((o=t.indexOf(":",o+1))!==-1)}return r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(t){he(t,"path");const e=t.length;if(e===0)return!1;const n=t.charCodeAt(0);return X(n)||e>2&&Ze(n)&&t.charCodeAt(1)===Ke&&X(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let s=0;s0&&(e===void 0?e=n=a:e+=`\\${a}`)}if(e===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&X(n.charCodeAt(0))){++i;const s=n.length;s>1&&X(n.charCodeAt(1))&&(++i,s>2&&(X(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(e=`\\${e.slice(i)}`)}return Se.normalize(e)},relative(t,e){if(he(t,"from"),he(e,"to"),t===e)return"";const n=Se.resolve(t),r=Se.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";if(n.length!==t.length||r.length!==e.length){const g=n.split("\\"),b=r.split("\\");g[g.length-1]===""&&g.pop(),b[b.length-1]===""&&b.pop();const _=g.length,F=b.length,N=_N?b.slice(E).join("\\"):_>N?"..\\".repeat(_-1-E)+"..":"":"..\\".repeat(_-E)+b.slice(E).join("\\")}let i=0;for(;ii&&t.charCodeAt(s-1)===_e;)s--;const a=s-i;let o=0;for(;oo&&e.charCodeAt(l-1)===_e;)l--;const c=l-o,d=ad){if(e.charCodeAt(o+m)===_e)return r.slice(o+m+1);if(m===2)return r.slice(o+m)}a>d&&(t.charCodeAt(i+m)===_e?u=m:m===2&&(u=3)),u===-1&&(u=0)}let f="";for(m=i+u+1;m<=s;++m)(m===s||t.charCodeAt(m)===_e)&&(f+=f.length===0?"..":"\\..");return o+=u,f.length>0?`${f}${r.slice(o,l)}`:(r.charCodeAt(o)===_e&&++o,r.slice(o,l))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;const e=Se.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===_e){if(e.charCodeAt(1)===_e){const n=e.charCodeAt(2);if(n!==fd&&n!==_t)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(Ze(e.charCodeAt(0))&&e.charCodeAt(1)===Ke&&e.charCodeAt(2)===_e)return`\\\\?\\${e}`;return e},dirname(t){he(t,"path");const e=t.length;if(e===0)return".";let n=-1,r=0;const i=t.charCodeAt(0);if(e===1)return X(i)?t:".";if(X(i)){if(n=r=1,X(t.charCodeAt(1))){let o=2,l=o;for(;o2&&X(t.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=e-1;o>=r;--o)if(X(t.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return t.slice(0,s)},basename(t,e){e!==void 0&&he(e,"suffix"),he(t,"path");let n=0,r=-1,i=!0,s;if(t.length>=2&&Ze(t.charCodeAt(0))&&t.charCodeAt(1)===Ke&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=n;--s){const l=t.charCodeAt(s);if(X(l)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=n;--s)if(X(t.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){he(t,"path");let e=0,n=-1,r=0,i=-1,s=!0,a=0;t.length>=2&&t.charCodeAt(1)===Ke&&Ze(t.charCodeAt(0))&&(e=r=2);for(let o=t.length-1;o>=e;--o){const l=t.charCodeAt(o);if(X(l)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),l===_t?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:ra.bind(null,"\\"),parse(t){he(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.length;let r=0,i=t.charCodeAt(0);if(n===1)return X(i)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(X(i)){if(r=1,X(t.charCodeAt(1))){let u=2,m=u;for(;u0&&(e.root=t.slice(0,r));let s=-1,a=r,o=-1,l=!0,c=t.length-1,d=0;for(;c>=r;--c){if(i=t.charCodeAt(c),X(i)){if(!l){a=c+1;break}continue}o===-1&&(l=!1,o=c+1),i===_t?s===-1?s=c:d!==1&&(d=1):s!==-1&&(d=-1)}return o!==-1&&(s===-1||d===0||d===1&&s===o-1&&s===a+1?e.base=e.name=t.slice(a,o):(e.name=t.slice(a,s),e.base=t.slice(a,o),e.ext=t.slice(s,o))),a>0&&a!==r?e.dir=t.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},wd=(()=>{if(pt){const t=/\\/g;return()=>{const e=er().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>er()})(),Ee={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=0&&!n;r--){const i=t[r];he(i,`paths[${r}]`),i.length!==0&&(e=`${i}/${e}`,n=i.charCodeAt(0)===fe)}if(!n){const r=wd();e=`${r}/${e}`,n=r.charCodeAt(0)===fe}return e=tr(e,!n,"/",oi),n?`/${e}`:e.length>0?e:"."},normalize(t){if(he(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===fe,n=t.charCodeAt(t.length-1)===fe;return t=tr(t,!e,"/",oi),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return he(t,"path"),t.length>0&&t.charCodeAt(0)===fe},join(...t){if(t.length===0)return".";const e=[];for(let n=0;n0&&e.push(r)}return e.length===0?".":Ee.normalize(e.join("/"))},relative(t,e){if(he(t,"from"),he(e,"to"),t===e||(t=Ee.resolve(t),e=Ee.resolve(e),t===e))return"";const n=1,r=t.length,i=r-n,s=1,a=e.length-s,o=io){if(e.charCodeAt(s+c)===fe)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else i>o&&(t.charCodeAt(n+c)===fe?l=c:c===0&&(l=0));let d="";for(c=n+l+1;c<=r;++c)(c===r||t.charCodeAt(c)===fe)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(s+l)}`},toNamespacedPath(t){return t},dirname(t){if(he(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===fe;let n=-1,r=!0;for(let i=t.length-1;i>=1;--i)if(t.charCodeAt(i)===fe){if(!r){n=i;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&he(e,"suffix"),he(t,"path");let n=0,r=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=0;--s){const l=t.charCodeAt(s);if(l===fe){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===fe){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){he(t,"path");let e=-1,n=0,r=-1,i=!0,s=0;for(let a=t.length-1;a>=0;--a){const o=t[a];if(o==="/"){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o==="."?e===-1?e=a:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||r===-1||s===0||s===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:ra.bind(null,"/"),parse(t){he(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.charCodeAt(0)===fe;let r;n?(e.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,l=t.length-1,c=0;for(;l>=r;--l){const d=t.charCodeAt(l);if(d===fe){if(!o){s=l+1;break}continue}a===-1&&(o=!1,a=l+1),d===_t?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}if(a!==-1){const d=s===0&&n?1:s;i===-1||c===0||c===1&&i===a-1&&i===s+1?e.base=e.name=t.slice(d,a):(e.name=t.slice(d,i),e.base=t.slice(d,a),e.ext=t.slice(i,a))}return s>0?e.dir=t.slice(0,s-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Ee.win32=Se.win32=Se,Ee.posix=Se.posix=Ee,pt?Se.normalize:Ee.normalize,pt?Se.resolve:Ee.resolve,pt?Se.relative:Ee.relative,pt?Se.dirname:Ee.dirname,pt?Se.basename:Ee.basename,pt?Se.extname:Ee.extname,pt?Se.sep:Ee.sep;const vd=/^\w[\w\d+.-]*$/,yd=/^\//,xd=/^\/\//;function Sd(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!vd.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!yd.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(xd.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Cd(t,e){return!t&&!e?"file":t}function kd(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==We&&(e=We+e):e=We;break}return e}const se="",We="/",_d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let li=class Wr{static isUri(e){return e instanceof Wr?!0:!e||typeof e!="object"?!1:typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function"}constructor(e,n,r,i,s,a=!1){typeof e=="object"?(this.scheme=e.scheme||se,this.authority=e.authority||se,this.path=e.path||se,this.query=e.query||se,this.fragment=e.fragment||se):(this.scheme=Cd(e,a),this.authority=n||se,this.path=kd(this.scheme,r||se),this.query=i||se,this.fragment=s||se,Sd(this,a))}get fsPath(){return ci(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=e;return n===void 0?n=this.scheme:n===null&&(n=se),r===void 0?r=this.authority:r===null&&(r=se),i===void 0?i=this.path:i===null&&(i=se),s===void 0?s=this.query:s===null&&(s=se),a===void 0?a=this.fragment:a===null&&(a=se),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new Vt(n,r,i,s,a)}static parse(e,n=!1){const r=_d.exec(e);return r?new Vt(r[2]||se,nr(r[4]||se),nr(r[5]||se),nr(r[7]||se),nr(r[9]||se),n):new Vt(se,se,se,se,se)}static file(e){let n=se;if(mn&&(e=e.replace(/\\/g,We)),e[0]===We&&e[1]===We){const r=e.indexOf(We,2);r===-1?(n=e.substring(2),e=We):(n=e.substring(2,r),e=e.substring(r)||We)}return new Vt("file",n,e,se,se)}static from(e,n){return new Vt(e.scheme,e.authority,e.path,e.query,e.fragment,n)}static joinPath(e,...n){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return mn&&e.scheme==="file"?r=Wr.file(Se.join(ci(e,!0),...n)).path:r=Ee.join(e.path,...n),e.with({path:r})}toString(e=!1){return hi(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof Wr)return e;{const n=new Vt(e);return n._formatted=e.external??null,n._fsPath=e._sep===ia?e.fsPath??null:null,n}}else return e}};const ia=mn?1:void 0;class Vt extends li{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=ci(this,!1)),this._fsPath}toString(e=!1){return e?hi(this,!0):(this._formatted||(this._formatted=hi(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=ia),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const sa={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function aa(t,e,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||e&&a===47||n&&a===91||n&&a===93||n&&a===58)i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r!==void 0&&(r+=t.charAt(s));else{r===void 0&&(r=t.substr(0,s));const o=sa[a];o!==void 0?(i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r+=o):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(t.substring(i))),r!==void 0?r:t}function Ed(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,mn&&(n=n.replace(/\//g,"\\")),n}function hi(t,e){const n=e?Ed:aa;let r="",{scheme:i,authority:s,path:a,query:o,fragment:l}=t;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=We,r+=We),s){let c=s.indexOf("@");if(c!==-1){const d=s.substr(0,c);s=s.substr(c+1),c=d.lastIndexOf(":"),c===-1?r+=n(d,!1,!1):(r+=n(d.substr(0,c),!1,!1),r+=":",r+=n(d.substr(c+1),!1,!0)),r+="@"}s=s.toLowerCase(),c=s.lastIndexOf(":"),c===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,c),!1,!0),r+=s.substr(c))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const c=a.charCodeAt(1);c>=65&&c<=90&&(a=`/${String.fromCharCode(c+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const c=a.charCodeAt(0);c>=65&&c<=90&&(a=`${String.fromCharCode(c+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=e?l:aa(l,!1,!1)),r}function oa(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+oa(t.substr(3)):t}}const la=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function nr(t){return t.match(la)?t.replace(la,e=>oa(e)):t}class Re extends J{constructor(e,n,r,i){super(e,n,r,i),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Re.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new Re(this.startLineNumber,this.startColumn,e,n):new Re(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new re(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new re(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new Re(e,n,this.endLineNumber,this.endColumn):new Re(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new Re(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new Re(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Re(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Re(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let r=0,i=e.length;r{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){this._factories.get(e)?.dispose();const r=new Id(this,e,n);return this._factories.set(e,r),Gn(()=>{const i=this._factories.get(e);!i||i!==r||(this._factories.delete(e),i.dispose())})}async getOrCreate(e){const n=this.get(e);if(n)return n;const r=this._factories.get(e);return!r||r.isResolved?null:(await r.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const r=this._factories.get(e);return!!(!r||r.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class Id extends St{get isResolved(){return this._isResolved}constructor(e,n,r){super(),this._registry=e,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}class Dd{constructor(e,n,r){this.offset=e,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var ha;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(ha||(ha={}));var da;(function(t){const e=new Map;e.set(0,U.symbolMethod),e.set(1,U.symbolFunction),e.set(2,U.symbolConstructor),e.set(3,U.symbolField),e.set(4,U.symbolVariable),e.set(5,U.symbolClass),e.set(6,U.symbolStruct),e.set(7,U.symbolInterface),e.set(8,U.symbolModule),e.set(9,U.symbolProperty),e.set(10,U.symbolEvent),e.set(11,U.symbolOperator),e.set(12,U.symbolUnit),e.set(13,U.symbolValue),e.set(15,U.symbolEnum),e.set(14,U.symbolConstant),e.set(15,U.symbolEnum),e.set(16,U.symbolEnumMember),e.set(17,U.symbolKeyword),e.set(28,U.symbolSnippet),e.set(18,U.symbolText),e.set(19,U.symbolColor),e.set(20,U.symbolFile),e.set(21,U.symbolReference),e.set(22,U.symbolCustomColor),e.set(23,U.symbolFolder),e.set(24,U.symbolTypeParameter),e.set(25,U.account),e.set(26,U.issues),e.set(27,U.tools);function n(a){let o=e.get(a);return o||(console.info("No codicon found for CompletionItemKind "+a),o=U.symbolProperty),o}t.toIcon=n;function r(a){switch(a){case 0:return B(728,"Method");case 1:return B(729,"Function");case 2:return B(730,"Constructor");case 3:return B(731,"Field");case 4:return B(732,"Variable");case 5:return B(733,"Class");case 6:return B(734,"Struct");case 7:return B(735,"Interface");case 8:return B(736,"Module");case 9:return B(737,"Property");case 10:return B(738,"Event");case 11:return B(739,"Operator");case 12:return B(740,"Unit");case 13:return B(741,"Value");case 14:return B(742,"Constant");case 15:return B(743,"Enum");case 16:return B(744,"Enum Member");case 17:return B(745,"Keyword");case 18:return B(746,"Text");case 19:return B(747,"Color");case 20:return B(748,"File");case 21:return B(749,"Reference");case 22:return B(750,"Custom Color");case 23:return B(751,"Folder");case 24:return B(752,"Type Parameter");case 25:return B(753,"User");case 26:return B(754,"Issue");case 27:return B(755,"Tool");case 28:return B(756,"Snippet");default:return""}}t.toLabel=r;const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",28),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),i.set("tool",27);function s(a,o){let l=i.get(a);return typeof l>"u"&&!o&&(l=9),l}t.fromString=s})(da||(da={}));var ua;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(ua||(ua={}));var pa;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(pa||(pa={}));var ma;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(ma||(ma={}));var fa;(function(t){t[t.Automatic=0]="Automatic",t[t.PasteAs=1]="PasteAs"})(fa||(fa={}));var ga;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(ga||(ga={}));var ba;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(ba||(ba={})),B(757,"array"),B(758,"boolean"),B(759,"class"),B(760,"constant"),B(761,"constructor"),B(762,"enumeration"),B(763,"enumeration member"),B(764,"event"),B(765,"field"),B(766,"file"),B(767,"function"),B(768,"interface"),B(769,"key"),B(770,"method"),B(771,"module"),B(772,"namespace"),B(773,"null"),B(774,"number"),B(775,"object"),B(776,"operator"),B(777,"package"),B(778,"property"),B(779,"string"),B(780,"struct"),B(781,"type parameter"),B(782,"variable");var wa;(function(t){const e=new Map;e.set(0,U.symbolFile),e.set(1,U.symbolModule),e.set(2,U.symbolNamespace),e.set(3,U.symbolPackage),e.set(4,U.symbolClass),e.set(5,U.symbolMethod),e.set(6,U.symbolProperty),e.set(7,U.symbolField),e.set(8,U.symbolConstructor),e.set(9,U.symbolEnum),e.set(10,U.symbolInterface),e.set(11,U.symbolFunction),e.set(12,U.symbolVariable),e.set(13,U.symbolConstant),e.set(14,U.symbolString),e.set(15,U.symbolNumber),e.set(16,U.symbolBoolean),e.set(17,U.symbolArray),e.set(18,U.symbolObject),e.set(19,U.symbolKey),e.set(20,U.symbolNull),e.set(21,U.symbolEnumMember),e.set(22,U.symbolStruct),e.set(23,U.symbolEvent),e.set(24,U.symbolOperator),e.set(25,U.symbolTypeParameter);function n(s){let a=e.get(s);return a||(console.info("No codicon found for SymbolKind "+s),a=U.symbolProperty),a}t.toIcon=n;const r=new Map;r.set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24);function i(s){let a=r.get(s);return a===void 0&&(console.info("No completion kind found for SymbolKind "+s),a=20),a}t.toCompletionKind=i})(wa||(wa={}));let Mf=(Ce=class{static fromValue(e){switch(e){case"comment":return Ce.Comment;case"imports":return Ce.Imports;case"region":return Ce.Region}return new Ce(e)}constructor(e){this.value=e}},Ce.Comment=new Ce("comment"),Ce.Imports=new Ce("imports"),Ce.Region=new Ce("region"),Ce);var va;(function(t){t[t.AIGenerated=1]="AIGenerated"})(va||(va={}));var ya;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(ya||(ya={}));var xa;(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})(xa||(xa={}));var Sa;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(Sa||(Sa={})),new Nd;var Ca;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(Ca||(Ca={}));var ka;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(ka||(ka={}));var _a;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(_a||(_a={}));var Ea;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Tool=27]="Tool",t[t.Snippet=28]="Snippet"})(Ea||(Ea={}));var Fa;(function(t){t[t.Deprecated=1]="Deprecated"})(Fa||(Fa={}));var Ra;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Ra||(Ra={}));var Na;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(Na||(Na={}));var Ia;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(Ia||(Ia={}));var Da;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Da||(Da={}));var La;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(La||(La={}));var Aa;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(Aa||(Aa={}));var Ma;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.allowOverflow=4]="allowOverflow",t[t.allowVariableLineHeights=5]="allowVariableLineHeights",t[t.allowVariableFonts=6]="allowVariableFonts",t[t.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",t[t.ariaLabel=8]="ariaLabel",t[t.ariaRequired=9]="ariaRequired",t[t.autoClosingBrackets=10]="autoClosingBrackets",t[t.autoClosingComments=11]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=13]="autoClosingDelete",t[t.autoClosingOvertype=14]="autoClosingOvertype",t[t.autoClosingQuotes=15]="autoClosingQuotes",t[t.autoIndent=16]="autoIndent",t[t.autoIndentOnPaste=17]="autoIndentOnPaste",t[t.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",t[t.automaticLayout=19]="automaticLayout",t[t.autoSurround=20]="autoSurround",t[t.bracketPairColorization=21]="bracketPairColorization",t[t.guides=22]="guides",t[t.codeLens=23]="codeLens",t[t.codeLensFontFamily=24]="codeLensFontFamily",t[t.codeLensFontSize=25]="codeLensFontSize",t[t.colorDecorators=26]="colorDecorators",t[t.colorDecoratorsLimit=27]="colorDecoratorsLimit",t[t.columnSelection=28]="columnSelection",t[t.comments=29]="comments",t[t.contextmenu=30]="contextmenu",t[t.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",t[t.cursorBlinking=32]="cursorBlinking",t[t.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",t[t.cursorStyle=34]="cursorStyle",t[t.cursorSurroundingLines=35]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",t[t.cursorWidth=37]="cursorWidth",t[t.cursorHeight=38]="cursorHeight",t[t.disableLayerHinting=39]="disableLayerHinting",t[t.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",t[t.domReadOnly=41]="domReadOnly",t[t.dragAndDrop=42]="dragAndDrop",t[t.dropIntoEditor=43]="dropIntoEditor",t[t.editContext=44]="editContext",t[t.emptySelectionClipboard=45]="emptySelectionClipboard",t[t.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",t[t.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",t[t.extraEditorClassName=48]="extraEditorClassName",t[t.fastScrollSensitivity=49]="fastScrollSensitivity",t[t.find=50]="find",t[t.fixedOverflowWidgets=51]="fixedOverflowWidgets",t[t.folding=52]="folding",t[t.foldingStrategy=53]="foldingStrategy",t[t.foldingHighlight=54]="foldingHighlight",t[t.foldingImportsByDefault=55]="foldingImportsByDefault",t[t.foldingMaximumRegions=56]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=58]="fontFamily",t[t.fontInfo=59]="fontInfo",t[t.fontLigatures=60]="fontLigatures",t[t.fontSize=61]="fontSize",t[t.fontWeight=62]="fontWeight",t[t.fontVariations=63]="fontVariations",t[t.formatOnPaste=64]="formatOnPaste",t[t.formatOnType=65]="formatOnType",t[t.glyphMargin=66]="glyphMargin",t[t.gotoLocation=67]="gotoLocation",t[t.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",t[t.hover=69]="hover",t[t.inDiffEditor=70]="inDiffEditor",t[t.inlineSuggest=71]="inlineSuggest",t[t.letterSpacing=72]="letterSpacing",t[t.lightbulb=73]="lightbulb",t[t.lineDecorationsWidth=74]="lineDecorationsWidth",t[t.lineHeight=75]="lineHeight",t[t.lineNumbers=76]="lineNumbers",t[t.lineNumbersMinChars=77]="lineNumbersMinChars",t[t.linkedEditing=78]="linkedEditing",t[t.links=79]="links",t[t.matchBrackets=80]="matchBrackets",t[t.minimap=81]="minimap",t[t.mouseStyle=82]="mouseStyle",t[t.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=84]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",t[t.multiCursorModifier=86]="multiCursorModifier",t[t.mouseMiddleClickAction=87]="mouseMiddleClickAction",t[t.multiCursorPaste=88]="multiCursorPaste",t[t.multiCursorLimit=89]="multiCursorLimit",t[t.occurrencesHighlight=90]="occurrencesHighlight",t[t.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",t[t.overtypeCursorStyle=92]="overtypeCursorStyle",t[t.overtypeOnPaste=93]="overtypeOnPaste",t[t.overviewRulerBorder=94]="overviewRulerBorder",t[t.overviewRulerLanes=95]="overviewRulerLanes",t[t.padding=96]="padding",t[t.pasteAs=97]="pasteAs",t[t.parameterHints=98]="parameterHints",t[t.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",t[t.placeholder=100]="placeholder",t[t.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",t[t.quickSuggestions=102]="quickSuggestions",t[t.quickSuggestionsDelay=103]="quickSuggestionsDelay",t[t.readOnly=104]="readOnly",t[t.readOnlyMessage=105]="readOnlyMessage",t[t.renameOnType=106]="renameOnType",t[t.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",t[t.renderControlCharacters=108]="renderControlCharacters",t[t.renderFinalNewline=109]="renderFinalNewline",t[t.renderLineHighlight=110]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=112]="renderValidationDecorations",t[t.renderWhitespace=113]="renderWhitespace",t[t.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",t[t.roundedSelection=115]="roundedSelection",t[t.rulers=116]="rulers",t[t.scrollbar=117]="scrollbar",t[t.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=119]="scrollBeyondLastLine",t[t.scrollPredominantAxis=120]="scrollPredominantAxis",t[t.selectionClipboard=121]="selectionClipboard",t[t.selectionHighlight=122]="selectionHighlight",t[t.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",t[t.selectionHighlightMultiline=124]="selectionHighlightMultiline",t[t.selectOnLineNumbers=125]="selectOnLineNumbers",t[t.showFoldingControls=126]="showFoldingControls",t[t.showUnused=127]="showUnused",t[t.snippetSuggestions=128]="snippetSuggestions",t[t.smartSelect=129]="smartSelect",t[t.smoothScrolling=130]="smoothScrolling",t[t.stickyScroll=131]="stickyScroll",t[t.stickyTabStops=132]="stickyTabStops",t[t.stopRenderingLineAfter=133]="stopRenderingLineAfter",t[t.suggest=134]="suggest",t[t.suggestFontSize=135]="suggestFontSize",t[t.suggestLineHeight=136]="suggestLineHeight",t[t.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",t[t.suggestSelection=138]="suggestSelection",t[t.tabCompletion=139]="tabCompletion",t[t.tabIndex=140]="tabIndex",t[t.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",t[t.unicodeHighlighting=142]="unicodeHighlighting",t[t.unusualLineTerminators=143]="unusualLineTerminators",t[t.useShadowDOM=144]="useShadowDOM",t[t.useTabStops=145]="useTabStops",t[t.wordBreak=146]="wordBreak",t[t.wordSegmenterLocales=147]="wordSegmenterLocales",t[t.wordSeparators=148]="wordSeparators",t[t.wordWrap=149]="wordWrap",t[t.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=152]="wordWrapColumn",t[t.wordWrapOverride1=153]="wordWrapOverride1",t[t.wordWrapOverride2=154]="wordWrapOverride2",t[t.wrappingIndent=155]="wrappingIndent",t[t.wrappingStrategy=156]="wrappingStrategy",t[t.showDeprecated=157]="showDeprecated",t[t.inertialScroll=158]="inertialScroll",t[t.inlayHints=159]="inlayHints",t[t.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",t[t.effectiveCursorStyle=161]="effectiveCursorStyle",t[t.editorClassName=162]="editorClassName",t[t.pixelRatio=163]="pixelRatio",t[t.tabFocusMode=164]="tabFocusMode",t[t.layoutInfo=165]="layoutInfo",t[t.wrappingInfo=166]="wrappingInfo",t[t.defaultColorDecorators=167]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",t[t.effectiveEditContext=170]="effectiveEditContext",t[t.scrollOnMiddleClick=171]="scrollOnMiddleClick",t[t.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts"})(Ma||(Ma={}));var za;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(za||(za={}));var Pa;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(Pa||(Pa={}));var Ta;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(Ta||(Ta={}));var Oa;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(Oa||(Oa={}));var Wa;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(Wa||(Wa={}));var Va;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(Va||(Va={}));var $a;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})($a||($a={}));var Ua;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(Ua||(Ua={}));var Ba;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(Ba||(Ba={}));var qa;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(qa||(qa={}));var di;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(di||(di={}));var ui;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(ui||(ui={}));var pi;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(pi||(pi={}));var ja;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(ja||(ja={}));var Ha;(function(t){t[t.Normal=1]="Normal",t[t.Underlined=2]="Underlined"})(Ha||(Ha={}));var Ga;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Ga||(Ga={}));var Ja;(function(t){t[t.AIGenerated=1]="AIGenerated"})(Ja||(Ja={}));var Xa;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(Xa||(Xa={}));var Ya;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(Ya||(Ya={}));var Qa;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(Qa||(Qa={}));var Ka;(function(t){t[t.Word=0]="Word",t[t.Line=1]="Line",t[t.Suggest=2]="Suggest"})(Ka||(Ka={}));var Za;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(Za||(Za={}));var eo;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(eo||(eo={}));var to;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(to||(to={}));var no;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(no||(no={}));var ro;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(ro||(ro={}));var mi;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(mi||(mi={}));var io;(function(t){t.Off="off",t.OnCode="onCode",t.On="on"})(io||(io={}));var so;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(so||(so={}));var ao;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(ao||(ao={}));var oo;(function(t){t[t.Deprecated=1]="Deprecated"})(oo||(oo={}));var lo;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(lo||(lo={}));var co;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(co||(co={}));var ho;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(ho||(ho={}));var uo;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(uo||(uo={}));var po;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(po||(po={}));const cn=class cn{static chord(e,n){return ld(e,n)}};cn.CtrlCmd=2048,cn.Shift=1024,cn.Alt=512,cn.WinCtrl=256;let fi=cn;function Ld(){return{editor:void 0,languages:void 0,CancellationTokenSource:id,Emitter:Ue,KeyCode:di,KeyMod:fi,Position:re,Range:J,Selection:Re,SelectionDirection:mi,MarkerSeverity:ui,MarkerTag:pi,Uri:li,Token:Dd}}var mo;class Ad{constructor(){this[mo]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=0){const r=this._map.get(e);if(r)return n!==0&&this.touch(r,n),r.value}set(e,n,r=0){let i=this._map.get(e);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){const r=this._state;let i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){const e=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){const e=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(mo=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(e===this._head)return;const r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===2){if(e===this._tail)return;const r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(const[n,r]of e)this.set(n,r)}}class Md extends Ad{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,n=2){return super.get(e,n)}peek(e){return super.get(e,0)}set(e,n){return super.set(e,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class zd extends Md{constructor(e,n=1){super(e,n)}trim(e){this.trimOld(e)}set(e,n){return super.set(e,n),this.checkTrim(),this}}class Pd{constructor(){this.map=new Map}add(e,n){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(n)}delete(e,n){const r=this.map.get(e);r&&(r.delete(n),r.size===0&&this.map.delete(e))}forEach(e,n){const r=this.map.get(e);r&&r.forEach(n)}}new zd(10);var fo;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(fo||(fo={}));var go;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(go||(go={}));var bo;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(bo||(bo={}));var wo;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(wo||(wo={}));function Td(t){if(!t||t.length===0)return!1;for(let e=0,n=t.length;e=n)break;const i=t.charCodeAt(e);if(i===110||i===114||i===87)return!0}}return!1}function Od(t,e,n,r,i){if(r===0)return!0;const s=e.charCodeAt(r-1);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r);if(t.get(a)!==0)return!0}return!1}function Wd(t,e,n,r,i){if(r+i===n)return!0;const s=e.charCodeAt(r+i);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r+i-1);if(t.get(a)!==0)return!0}return!1}function Vd(t,e,n,r,i){return Od(t,e,n,r,i)&&Wd(t,e,n,r,i)}class $d{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const n=e.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(e),!r))return null;const i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Vh(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||Vd(this._wordSeparators,e,n,i,s))return r}while(r);return null}}const Ud="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Bd(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const n of Ud)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}const vo=Bd();function yo(t){let e=vo;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}const xo=new mh;xo.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function gi(t,e,n,r,i){if(e=yo(e),i||(i=Hn.first(xo)),n.length>i.maxLen){let c=t-i.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,t+i.maxLen/2),gi(t,e,n,r,i)}const s=Date.now(),a=t-1-r;let o=-1,l=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){const d=a-i.windowSize*c;e.lastIndex=Math.max(0,d);const u=qd(e,n,a,o);if(!u&&l||(l=u,d<=0))break;o=d}if(l){const c={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function qd(t,e,n,r){let i;for(;i=t.exec(e);){const s=i.index||0;if(s<=n&&t.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}class jd{static computeUnicodeHighlights(e,n,r){const i=r?r.startLineNumber:1,s=r?r.endLineNumber:e.getLineCount(),a=new So(n),o=a.getCandidateCodePoints();let l;o==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${Hd(Array.from(o))}`,"g");const c=new $d(null,l),d=[];let u=!1,m,f=0,g=0,b=0;e:for(let _=i,F=s;_<=F;_++){const N=e.getLineContent(_),E=N.length;c.reset(0);do if(m=c.next(N),m){let T=m.index,O=m.index+m[0].length;if(T>0){const z=N.charCodeAt(T-1);Kr(z)&&T--}if(O+1=1e3){u=!0;break e}d.push(new J(_,T+1,_,O+1))}}while(m)}return{ranges:d,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(e,n){const r=new So(n);switch(r.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=e.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(s),o=fn.getLocales().filter(l=>!fn.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function Hd(t,e){return`[${Dh(t.map(r=>String.fromCodePoint(r)).join(""))}]`}class So{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=fn.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const n of gn.codePoints)Co(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(const n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){const r=e.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(const a of n){const o=a.codePointAt(0),l=Uh(a);i=i||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!gn.isInvisibleCharacter(o)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!Co(e)&&gn.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function Co(t){return t===" "||t===` +`||t===" "}class rr{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class Gd{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function Jd(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(bi||(bi={}));function wn(t,e){return(n,r)=>e(t(n),t(r))}const vn=(t,e)=>t-e;function Zd(t){return(e,n)=>-t(e,n)}const hn=class hn{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new hn(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new hn(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(i=>((r||bi.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}};hn.empty=new hn(e=>{});let ko=hn;class Y{static fromTo(e,n){return new Y(e,n)}static addRange(e,n){let r=0;for(;rn))return new Y(e,n)}static ofLength(e){return new Y(0,e)}static ofStartAndLength(e,n){return new Y(e,e+n)}static emptyAt(e){return new Y(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new be(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new Y(this.start+e,this.endExclusive+e)}deltaStart(e){return new Y(this.start+e,this.endExclusive)}deltaEnd(e){return new Y(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new be(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new be(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;nn)throw new be(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&ee.startLineNumber,vn);let Z=De;class qe{constructor(e=[]){this._normalizedRanges=e}get ranges(){return this._normalizedRanges}addRange(e){if(e.length===0)return;const n=wi(this._normalizedRanges,i=>i.endLineNumberExclusive>=e.startLineNumber),r=Ut(this._normalizedRanges,i=>i.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,e);else if(n===r-1){const i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(e)}else{const i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(e);this._normalizedRanges.splice(n,r-n,i)}}contains(e){const n=$t(this._normalizedRanges,r=>r.startLineNumber<=e);return!!n&&n.endLineNumberExclusive>e}intersects(e){const n=$t(this._normalizedRanges,r=>r.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const n=[];let r=0,i=0,s=null;for(;r=a.startLineNumber?s=new Z(s.startLineNumber,Math.max(s.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(s),s=a)}return s!==null&&n.push(s),new qe(n)}subtractFrom(e){const n=wi(this._normalizedRanges,a=>a.endLineNumberExclusive>=e.startLineNumber),r=Ut(this._normalizedRanges,a=>a.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)return new qe([e]);const i=[];let s=e.startLineNumber;for(let a=n;as&&i.push(new Z(s,o.startLineNumber)),s=o.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){const n=[];let r=0,i=0;for(;rn.delta(e)))}}const $e=class $e{static betweenPositions(e,n){return e.lineNumber===n.lineNumber?new $e(0,n.column-e.column):new $e(n.lineNumber-e.lineNumber,n.column-1)}static fromPosition(e){return new $e(e.lineNumber-1,e.column-1)}static ofRange(e){return $e.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let n=0,r=0;for(const i of e)i===` +`?(n++,r=0):r++;return new $e(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new $e(this.lineCount,this.columnCount+e.columnCount):new $e(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new J(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new J(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new J(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Z.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new re(e.lineNumber,e.column+this.columnCount):new re(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};$e.zero=new $e(0,0);let yn=$e;class tu{getOffsetRange(e){return new Y(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return J.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Bt.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Bt.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new Bt.deps.TextEdit(n)}}const zs=class zs{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};zs._deps=void 0;let Bt=zs;class nu extends tu{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n0&&e.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new re(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const i=this.getLineLength(n);return new re(n,i+1)}if(e.column<1)return new re(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new re(e.lineNumber,r+1):e}getPosition(e){const n=Ut(this.lineStartOffsetByLineIdx,s=>s<=e),r=n+1,i=e-this.lineStartOffsetByLineIdx[n]+1;return new re(r,i)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Bt.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class ru{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new re(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new J(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new nu(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new J(e,1,e,Number.MAX_SAFE_INTEGER))}}class iu extends ru{constructor(e,n){ch(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;re[n-1],e.length)}}class ut{static joinReplacements(e,n){if(e.length===0)throw new be;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),i=e[e.length-1].range.getEndPosition();let s="";for(let a=0;ae[n-1],e.length)}}class mt{static joinReplacements(e,n){if(e.length===0)throw new be;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),i=e[e.length-1].range.getEndPosition();let s="";for(let a=0;a ${n.lineNumber},${n.column}): "${this.text}"`}}class Le{static inverse(e,n,r){const i=[];let s=1,a=1;for(const l of e){const c=new Le(new Z(s,l.original.startLineNumber),new Z(a,l.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=l.original.endLineNumberExclusive,a=l.modified.endLineNumberExclusive}const o=new Le(new Z(s,n+1),new Z(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(e,n,r){const i=[];for(const s of e){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new Le(a,o))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Le(this.modified,this.original)}join(e){return new Le(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new Ae(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new be("not a valid diff");return new Ae(new J(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new J(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ae(new J(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new J(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(So(this.original.endLineNumberExclusive,e)&&So(this.modified.endLineNumberExclusive,n))return new Ae(new J(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new J(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ae(J.fromPositions(new re(this.original.startLineNumber,1),Vt(new re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),J.fromPositions(new re(this.modified.startLineNumber,1),Vt(new re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ae(J.fromPositions(Vt(new re(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Vt(new re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),J.fromPositions(Vt(new re(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Vt(new re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new be}}function Vt(t,e){if(t.lineNumber<1)return new re(1,1);if(t.lineNumber>e.length)return new re(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new re(t.lineNumber,n.length+1):t}function So(t,e){return t>=1&&t<=e.length}class Ke extends Le{static fromRangeMappings(e){const n=Z.join(e.map(i=>Z.fromRangeInclusive(i.originalRange))),r=Z.join(e.map(i=>Z.fromRangeInclusive(i.modifiedRange)));return new Ke(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new Ke(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Ke(this.original,this.modified,[this.toRangeMapping()])}}class Ae{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((i,s)=>new Ae(i.range,n[s]))}static assertSorted(e){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new Ae(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new ut(this.originalRange,n)}}function Co(t,e,n,r=!1){const i=[];for(const s of Jd(t.map(a=>iu(a,e,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=s[0],o=s[s.length-1];i.push(new Ke(a.original.join(o.original),a.modified.join(o.modified),s.map(l=>l.innerChanges[0])))}return Un(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==e.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:Ps(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n.getLineLength(t.modifiedRange.startLineNumber)&&t.originalRange.startColumn-1>=e.getLineLength(t.originalRange.startLineNumber)&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+i&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+i&&(r=1);const s=new Z(t.originalRange.startLineNumber+r,t.originalRange.endLineNumber+1+i),a=new Z(t.modifiedRange.startLineNumber+r,t.modifiedRange.endLineNumber+1+i);return new Ke(s,a,[t])}const su=3;class au{computeDiff(e,n,r){const s=new cu(e,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let o=null;for(const l of s.changes){let c;l.originalEndLineNumber===0?c=new Z(l.originalStartLineNumber+1,l.originalStartLineNumber+1):c=new Z(l.originalStartLineNumber,l.originalEndLineNumber+1);let d;l.modifiedEndLineNumber===0?d=new Z(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):d=new Z(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let u=new Ke(c,d,l.charChanges?.map(m=>new Ae(new J(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new J(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));o&&(o.modified.endLineNumberExclusive===u.modified.startLineNumber||o.original.endLineNumberExclusive===u.original.startLineNumber)&&(u=new Ke(o.original.join(u.original),o.modified.join(u.modified),o.innerChanges&&u.innerChanges?o.innerChanges.concat(u.innerChanges):void 0),a.pop()),a.push(u),o=u}return Un(()=>Ps(a,(l,c)=>c.original.startLineNumber-l.original.endLineNumberExclusive===c.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class $t{constructor(e,n,r,i,s,a,o,l){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=l}static createFromDiffChange(e,n,r){const i=n.getStartLineNumber(e.originalStart),s=n.getStartColumn(e.originalStart),a=n.getEndLineNumber(e.originalStart+e.originalLength-1),o=n.getEndColumn(e.originalStart+e.originalLength-1),l=r.getStartLineNumber(e.modifiedStart),c=r.getStartColumn(e.modifiedStart),d=r.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=r.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new $t(i,s,a,o,l,c,d,u)}}function lu(t){if(t.length<=1)return t;const e=[t[0]];let n=e[0];for(let r=1,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const f=r.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(f.getElements().length>0&&g.getElements().length>0){let b=ko(f,g,s,!0).changes;o&&(b=lu(b)),m=[];for(let k=0,F=b.length;k1&&b>1;){const k=m.charCodeAt(g-2),F=f.charCodeAt(b-2);if(k!==F)break;g--,b--}(g>1||b>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,a+1,1,b)}{let g=bi(m,1),b=bi(f,1);const k=m.length+1,F=f.length+1;for(;g!0;const e=Date.now();return()=>Date.now()-e{r.push(ce.fromOffsetPairs(i?i.getEndExclusives():et.zero,s?s.getStarts():new et(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(e,n){return new ce(new Y(e.offset1,n.offset1),new Y(e.offset2,n.offset2))}static assertSorted(e){let n;for(const r of e){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new be("Sequence diffs must be sorted");n=r}}constructor(e,n){this.seq1Range=e,this.seq2Range=n}swap(){return new ce(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new ce(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new ce(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new ce(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new ce(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const n=this.seq1Range.intersect(e.seq1Range),r=this.seq2Range.intersect(e.seq2Range);if(!(!n||!r))return new ce(n,r)}getStarts(){return new et(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new et(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}const Ft=class Ft{constructor(e,n){this.offset1=e,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new Ft(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};Ft.zero=new Ft(0,0),Ft.max=new Ft(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);let et=Ft;const zr=class zr{isValid(){return!0}};zr.instance=new zr;let wn=zr;class hu{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new be("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&b>0&&a.get(g-1,b-1)===3&&(N+=o.get(g-1,b-1)),N+=i?i(g,b):1):N=-1;const _=Math.max(k,F,N);if(_===N){const T=g>0&&b>0?o.get(g-1,b-1):0;o.set(g,b,T+1),a.set(g,b,3)}else _===k?(o.set(g,b,0),a.set(g,b,1)):_===F&&(o.set(g,b,0),a.set(g,b,2));s.set(g,b,_)}const l=[];let c=e.length,d=n.length;function u(g,b){(g+1!==c||b+1!==d)&&l.push(new ce(new Y(g+1,c),new Y(b+1,d))),c=g,d=b}let m=e.length-1,f=n.length-1;for(;m>=0&&f>=0;)a.get(m,f)===3?(u(m,f),m--,f--):a.get(m,f)===1?m--:f--;return u(-1,-1),l.reverse(),new Ze(l,!1)}}class Fo{compute(e,n,r=wn.instance){if(e.length===0||n.length===0)return Ze.trivial(e,n);const i=e,s=n;function a(b,k){for(;bi.length||T>s.length)continue;const O=a(_,T);l.set(d,O);const V=_===F?c.get(d+1):c.get(d-1);if(c.set(d,O!==_?new Ro(V,_,T,O-_):V),l.get(d)===i.length&&l.get(d)-d===s.length)break e}}let u=c.get(d);const m=[];let f=i.length,g=s.length;for(;;){const b=u?u.x+u.length:0,k=u?u.y+u.length:0;if((b!==f||k!==g)&&m.push(new ce(new Y(b,f),new Y(k,g))),!u)break;f=u.x,g=u.y,u=u.prev}return m.reverse(),new Ze(m,!1)}}class Ro{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}}class uu{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class pu{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class ir{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=e[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const c=s.trimStart();o=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const l=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,s.length):s.length;for(let c=0;cString.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Do(e>0?this.elements[e-1]:-1),r=Do(es<=e),i=e-this.firstElementOffsetByLineIdx[r];return new re(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?J.fromPositions(r,r):J.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!Ut(this.elements[e]))return;let n=e;for(;n>0&&Ut(this.elements[n-1]);)n--;let r=e;for(;r=this.elements.length||!Ut(this.elements[e]))return;let n=e;for(;n>0&&Ut(this.elements[n-1])&&!No(this.elements[n]);)n--;let r=e;for(;ri<=e.start)??0,r=Zd(this.firstElementOffsetByLineIdx,i=>e.endExclusive<=i)??this.elements.length;return new Y(n,r)}}function Ut(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}function No(t){return t>=65&&t<=90}const mu={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Io(t){return mu[t]}function Do(t){return t===10?8:t===13?7:vi(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}function fu(t,e,n,r,i,s){let{moves:a,excludedChanges:o}=bu(t,e,n,s);if(!s.isValid())return[];const l=t.filter(d=>!o.has(d)),c=wu(l,r,i,e,n,s);return Qd(a,c),a=vu(a),a=a.filter(d=>{const u=d.original.toOffsetRange().slice(e).map(f=>f.trim());return u.join(` -`).length>=15&&gu(u,f=>f.length>=2)>=2}),a=yu(t,a),a}function gu(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function bu(t,e,n,r){const i=[],s=t.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new rr(l.original,e,l)),a=new Set(t.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new rr(l.modified,n,l))),o=new Set;for(const l of s){let c=-1,d;for(const u of a){const m=l.computeSimilarity(u);m>c&&(c=m,d=u)}if(c>.9&&d&&(a.delete(d),i.push(new Le(l.range,d.range)),o.add(l.source),o.add(d.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function wu(t,e,n,r,i,s){const a=[],o=new zd;for(const m of t)for(let f=m.original.startLineNumber;fm.modified.startLineNumber,fn));for(const m of t){let f=[];for(let g=m.modified.startLineNumber;g{for(const T of f)if(T.originalLineRange.endLineNumberExclusive+1===N.endLineNumberExclusive&&T.modifiedLineRange.endLineNumberExclusive+1===k.endLineNumberExclusive){T.originalLineRange=new Z(T.originalLineRange.startLineNumber,N.endLineNumberExclusive),T.modifiedLineRange=new Z(T.modifiedLineRange.startLineNumber,k.endLineNumberExclusive),F.push(T);return}const _={modifiedLineRange:k,originalLineRange:N};l.push(_),F.push(_)}),f=F}if(!s.isValid())return[]}l.sort(Kd(mn(m=>m.modifiedLineRange.length,fn)));const c=new qe,d=new qe;for(const m of l){const f=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,g=c.subtractFrom(m.modifiedLineRange),b=d.subtractFrom(m.originalLineRange).getWithDelta(f),k=g.getIntersection(b);for(const F of k.ranges){if(F.length<3)continue;const N=F,_=F.delta(-f);a.push(new Le(_,N)),c.addRange(N),d.addRange(_)}}a.sort(mn(m=>m.original.startLineNumber,fn));const u=new tr(t);for(let m=0;mV.original.startLineNumber<=f.original.startLineNumber),b=Tt(t,V=>V.modified.startLineNumber<=f.modified.startLineNumber),k=Math.max(f.original.startLineNumber-g.original.startLineNumber,f.modified.startLineNumber-b.modified.startLineNumber),F=u.findLastMonotonous(V=>V.original.startLineNumberV.modified.startLineNumberr.length||I>i.length||c.contains(I)||d.contains(V)||!Lo(r[V-1],i[I-1],s))break}T>0&&(d.addRange(new Z(f.original.startLineNumber-T,f.original.startLineNumber)),c.addRange(new Z(f.modified.startLineNumber-T,f.modified.startLineNumber)));let O;for(O=0;O<_;O++){const V=f.original.endLineNumberExclusive+O,I=f.modified.endLineNumberExclusive+O;if(V>r.length||I>i.length||c.contains(I)||d.contains(V)||!Lo(r[V-1],i[I-1],s))break}O>0&&(d.addRange(new Z(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+O)),c.addRange(new Z(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+O))),(T>0||O>0)&&(a[m]=new Le(new Z(f.original.startLineNumber-T,f.original.endLineNumberExclusive+O),new Z(f.modified.startLineNumber-T,f.modified.endLineNumberExclusive+O)))}return a}function Lo(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const i=new Fo().compute(new ir([t],new J(1,1,1,t.length),!1),new ir([e],new J(1,1,1,e.length),!1),n);let s=0;const a=ce.invert(i.diffs,t.length);for(const d of a)d.seq1Range.forEach(u=>{vi(t.charCodeAt(u))||s++});function o(d){let u=0;for(let m=0;me.length?t:e);return s/l>.6&&l>10}function vu(t){if(t.length===0)return t;t.sort(mn(n=>n.original.startLineNumber,fn));const e=[t[0]];for(let n=1;n=0&&a>=0&&s+a<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function yu(t,e){const n=new tr(t);return e=e.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumbero.modified.startLineNumber0&&(o=o.delta(c))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function xu(t,e,n){if(!t.getBoundaryScore||!e.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],a=r+1=r.start&&t.seq2Range.start-a>=i.start&&n.isStronglyEqual(t.seq2Range.start-a,t.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;t.seq1Range.start+oc&&(c=g,l=d)}return t.delta(l)}function Su(t,e,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new ce(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function Po(t,e,n,r,i=!1){const s=ce.invert(n,t.length),a=[];let o=new et(0,0);function l(d,u){if(d.offset10;){const N=s[0];if(!(N.seq1Range.intersects(g.seq1Range)||N.seq2Range.intersects(g.seq2Range)))break;const T=r(t,N.seq1Range.start),O=r(e,N.seq2Range.start),V=new ce(T,O),I=V.intersect(N);if(k+=I.seq1Range.length,F+=I.seq2Range.length,g=g.join(V),g.seq1Range.endExclusive>=N.seq1Range.endExclusive)s.shift();else break}(i&&k+F0;){const d=s.shift();d.seq1Range.isEmpty||(l(d.getStarts(),d),l(d.getEndExclusives().delta(-1),d))}return Cu(n,a)}function Cu(t,e){const n=[];for(;t.length>0||e.length>0;){const r=t[0],i=e[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function ku(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const a=[r[0]];for(let o=1;o5||f.seq1Range.length+f.seq2Range.length>5)};const l=r[o],c=a[a.length-1];d(c,l)?(s=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(i++<10&&s);return r}function _u(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const o=[r[0]];for(let l=1;l5||b.length>500)return!1;const F=t.getText(b).trim();if(F.length>20||F.split(/\r\n|\r|\n/).length>1)return!1;const N=t.countLinesIn(f.seq1Range),_=f.seq1Range.length,T=e.countLinesIn(f.seq2Range),O=f.seq2Range.length,V=t.countLinesIn(g.seq1Range),I=g.seq1Range.length,R=e.countLinesIn(g.seq2Range),z=g.seq2Range.length,$=130;function L(y){return Math.min(y,$)}return Math.pow(Math.pow(L(N*40+_),1.5)+Math.pow(L(T*40+O),1.5),1.5)+Math.pow(Math.pow(L(V*40+I),1.5)+Math.pow(L(R*40+z),1.5),1.5)>($**1.5)**1.5*1.3};const c=r[l],d=o[o.length-1];u(d,c)?(s=!0,o[o.length-1]=o[o.length-1].join(c)):o.push(c)}r=o}while(i++<10&&s);const a=[];return Yd(r,(o,l,c)=>{let d=l;function u(F){return F.length>0&&F.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}const m=t.extendToFullLines(l.seq1Range),f=t.getText(new Y(m.start,l.seq1Range.start));u(f)&&(d=d.deltaStart(-f.length));const g=t.getText(new Y(l.seq1Range.endExclusive,m.endExclusive));u(g)&&(d=d.deltaEnd(g.length));const b=ce.fromOffsetPairs(o?o.getEndExclusives():et.zero,c?c.getStarts():et.max),k=d.intersect(b);a.length>0&&k.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(k):a.push(k)}),a}class To{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const n=e===0?0:Oo(this.lines[e-1]),r=e===this.lines.length?0:Oo(this.lines[e]);return 1e3-(n+r)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` -`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function Oo(t){let e=0;for(;eI===R))return new er([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new er([new Ke(new Z(1,e.length+1),new Z(1,n.length+1),[new Ae(new J(1,1,e.length,e[e.length-1].length+1),new J(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?wn.instance:new hu(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(I){let R=a.get(I);return R===void 0&&(R=a.size,a.set(I,R)),R}const l=e.map(I=>o(I.trim())),c=n.map(I=>o(I.trim())),d=new To(l,e),u=new To(c,n),m=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,i,(I,R)=>e[I]===n[R]?n[R].length===0?.1:1+Math.log(1+n[R].length):.99):this.myersDiffingAlgorithm.compute(d,u,i);let f=m.diffs,g=m.hitTimeout;f=Ao(d,u,f),f=ku(d,u,f);const b=[],k=I=>{if(s)for(let R=0;RI.seq1Range.start-F===I.seq2Range.start-N);const R=I.seq1Range.start-F;k(R),F=I.seq1Range.endExclusive,N=I.seq2Range.endExclusive;const z=this.refineDiff(e,n,I,i,s,r);z.hitTimeout&&(g=!0);for(const $ of z.mappings)b.push($)}k(e.length-F);const _=new nr(e),T=new nr(n),O=Co(b,_,T);let V=[];return r.computeMoves&&(V=this.computeMoves(O,e,n,l,c,i,s,r)),Un(()=>{function I(z,$){if(z.lineNumber<1||z.lineNumber>$.length)return!1;const L=$[z.lineNumber-1];return!(z.column<1||z.column>L.length+1)}function R(z,$){return!(z.startLineNumber<1||z.startLineNumber>$.length+1||z.endLineNumberExclusive<1||z.endLineNumberExclusive>$.length+1)}for(const z of O){if(!z.innerChanges)return!1;for(const $ of z.innerChanges)if(!(I($.modifiedRange.getStartPosition(),n)&&I($.modifiedRange.getEndPosition(),n)&&I($.originalRange.getStartPosition(),e)&&I($.originalRange.getEndPosition(),e)))return!1;if(!R(z.modified,n)||!R(z.original,e))return!1}return!0}),new er(O,V,g)}computeMoves(e,n,r,i,s,a,o,l){return fu(e,n,r,i,s,a).map(u=>{const m=this.refineDiff(n,r,new ce(u.original.toOffsetRange(),u.modified.toOffsetRange()),a,o,l),f=Co(m.mappings,new nr(n),new nr(r),!0);return new Hd(u,f)})}refineDiff(e,n,r,i,s,a){const l=Fu(r).toRangeMapping2(e,n),c=new ir(e,l.originalRange,s),d=new ir(n,l.modifiedRange,s),u=c.length+d.length<500?this.dynamicProgrammingDiffing.compute(c,d,i):this.myersDiffingAlgorithm.compute(c,d,i);let m=u.diffs;return m=Ao(c,d,m),m=Po(c,d,m,(g,b)=>g.findWordContaining(b)),a.extendToSubwords&&(m=Po(c,d,m,(g,b)=>g.findSubWordContaining(b),!0)),m=Su(c,d,m),m=_u(c,d,m),{mappings:m.map(g=>new Ae(c.translateRange(g.seq1Range),d.translateRange(g.seq2Range))),hitTimeout:u.hitTimeout}}}function Fu(t){return new Le(new Z(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new Z(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}const Wo={getLegacy:()=>new au,getDefault:()=>new Eu};function pt(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class x{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=pt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class Me{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=pt(Math.max(Math.min(1,n),0),3),this.l=pt(Math.max(Math.min(1,r),0),3),this.a=pt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let l=0,c=0;const d=(o+a)/2,u=a-o;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),a){case n:l=(r-i)/u+(r1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:i,a:s}=e;let a,o,l;if(r===0)a=o=l=i;else{const c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;a=Me._hue2rgb(d,c,n+1/3),o=Me._hue2rgb(d,c,n),l=Me._hue2rgb(d,c,n-1/3)}return new x(Math.round(a*255),Math.round(o*255),Math.round(l*255),s)}}class Bt{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=pt(Math.max(Math.min(1,n),0),3),this.v=pt(Math.max(Math.min(1,r),0),3),this.a=pt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,l=s===0?0:o/s;let c;return o===0?c=0:s===n?c=((r-i)/o%6+6)%6:s===r?c=(i-n)/o+2:c=(n-r)/o+4,new Bt(Math.round(c*60),l,s,e.a)}static toRGBA(e){const{h:n,s:r,v:i,a:s}=e,a=i*r,o=a*(1-Math.abs(n/60%2-1)),l=i-a;let[c,d,u]=[0,0,0];return n<60?(c=a,d=o):n<120?(c=o,d=a):n<180?(d=a,u=o):n<240?(d=o,u=a):n<300?(c=o,u=a):n<=360&&(c=a,u=o),c=Math.round((c+l)*255),d=Math.round((d+l)*255),u=Math.round((u+l)*255),new x(c,d,u,s)}}let sr=(ne=class{static fromHex(e){return ne.Format.CSS.parseHex(e)||ne.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:Me.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Bt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof x)this.rgba=e;else if(e instanceof Me)this._hsla=e,this.rgba=Me.toRGBA(e);else if(e instanceof Bt)this._hsva=e,this.rgba=Bt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&x.equals(this.rgba,e.rgba)&&Me.equals(this.hsla,e.hsla)&&Bt.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=ne._relativeLuminanceForComponent(this.rgba.r),n=ne._relativeLuminanceForComponent(this.rgba.g),r=ne._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*n+.0722*r;return pt(i,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>>0),this._toNumber32Bit}static getLighterColor(e,n,r){if(e.isLighterThan(n))return e;r=r||.5;const i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(s-i)/s,e.lighten(r)}static getDarkerColor(e,n,r){if(e.isDarkerThan(n))return e;r=r||.5;const i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(i-s)/i,e.darken(r)}},ne.white=new ne(new x(255,255,255,1)),ne.black=new ne(new x(0,0,0,1)),ne.red=new ne(new x(255,0,0,1)),ne.blue=new ne(new x(0,0,255,1)),ne.green=new ne(new x(0,255,0,1)),ne.cyan=new ne(new x(0,255,255,1)),ne.lightgrey=new ne(new x(211,211,211,1)),ne.transparent=new ne(new x(0,0,0,0)),ne);(function(t){(function(e){(function(n){function r(b){return b.rgba.a===1?`rgb(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b})`:t.Format.CSS.formatRGBA(b)}n.formatRGB=r;function i(b){return`rgba(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b}, ${+b.rgba.a.toFixed(2)})`}n.formatRGBA=i;function s(b){return b.hsla.a===1?`hsl(${b.hsla.h}, ${Math.round(b.hsla.s*100)}%, ${Math.round(b.hsla.l*100)}%)`:t.Format.CSS.formatHSLA(b)}n.formatHSL=s;function a(b){return`hsla(${b.hsla.h}, ${Math.round(b.hsla.s*100)}%, ${Math.round(b.hsla.l*100)}%, ${b.hsla.a.toFixed(2)})`}n.formatHSLA=a;function o(b){const k=b.toString(16);return k.length!==2?"0"+k:k}function l(b){return`#${o(b.rgba.r)}${o(b.rgba.g)}${o(b.rgba.b)}`}n.formatHex=l;function c(b,k=!1){return k&&b.rgba.a===1?t.Format.CSS.formatHex(b):`#${o(b.rgba.r)}${o(b.rgba.g)}${o(b.rgba.b)}${o(Math.round(b.rgba.a*255))}`}n.formatHexA=c;function d(b){return b.isOpaque()?t.Format.CSS.formatHex(b):t.Format.CSS.formatRGBA(b)}n.format=d;function u(b){if(b==="transparent")return t.transparent;if(b.startsWith("#"))return f(b);if(b.startsWith("rgba(")){const k=b.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/);if(!k)throw new Error("Invalid color format "+b);const F=parseInt(k.groups?.r??"0"),N=parseInt(k.groups?.g??"0"),_=parseInt(k.groups?.b??"0"),T=parseFloat(k.groups?.a??"0");return new t(new x(F,N,_,T))}if(b.startsWith("rgb(")){const k=b.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/);if(!k)throw new Error("Invalid color format "+b);const F=parseInt(k.groups?.r??"0"),N=parseInt(k.groups?.g??"0"),_=parseInt(k.groups?.b??"0");return new t(new x(F,N,_))}return m(b)}n.parse=u;function m(b){switch(b){case"aliceblue":return new t(new x(240,248,255,1));case"antiquewhite":return new t(new x(250,235,215,1));case"aqua":return new t(new x(0,255,255,1));case"aquamarine":return new t(new x(127,255,212,1));case"azure":return new t(new x(240,255,255,1));case"beige":return new t(new x(245,245,220,1));case"bisque":return new t(new x(255,228,196,1));case"black":return new t(new x(0,0,0,1));case"blanchedalmond":return new t(new x(255,235,205,1));case"blue":return new t(new x(0,0,255,1));case"blueviolet":return new t(new x(138,43,226,1));case"brown":return new t(new x(165,42,42,1));case"burlywood":return new t(new x(222,184,135,1));case"cadetblue":return new t(new x(95,158,160,1));case"chartreuse":return new t(new x(127,255,0,1));case"chocolate":return new t(new x(210,105,30,1));case"coral":return new t(new x(255,127,80,1));case"cornflowerblue":return new t(new x(100,149,237,1));case"cornsilk":return new t(new x(255,248,220,1));case"crimson":return new t(new x(220,20,60,1));case"cyan":return new t(new x(0,255,255,1));case"darkblue":return new t(new x(0,0,139,1));case"darkcyan":return new t(new x(0,139,139,1));case"darkgoldenrod":return new t(new x(184,134,11,1));case"darkgray":return new t(new x(169,169,169,1));case"darkgreen":return new t(new x(0,100,0,1));case"darkgrey":return new t(new x(169,169,169,1));case"darkkhaki":return new t(new x(189,183,107,1));case"darkmagenta":return new t(new x(139,0,139,1));case"darkolivegreen":return new t(new x(85,107,47,1));case"darkorange":return new t(new x(255,140,0,1));case"darkorchid":return new t(new x(153,50,204,1));case"darkred":return new t(new x(139,0,0,1));case"darksalmon":return new t(new x(233,150,122,1));case"darkseagreen":return new t(new x(143,188,143,1));case"darkslateblue":return new t(new x(72,61,139,1));case"darkslategray":return new t(new x(47,79,79,1));case"darkslategrey":return new t(new x(47,79,79,1));case"darkturquoise":return new t(new x(0,206,209,1));case"darkviolet":return new t(new x(148,0,211,1));case"deeppink":return new t(new x(255,20,147,1));case"deepskyblue":return new t(new x(0,191,255,1));case"dimgray":return new t(new x(105,105,105,1));case"dimgrey":return new t(new x(105,105,105,1));case"dodgerblue":return new t(new x(30,144,255,1));case"firebrick":return new t(new x(178,34,34,1));case"floralwhite":return new t(new x(255,250,240,1));case"forestgreen":return new t(new x(34,139,34,1));case"fuchsia":return new t(new x(255,0,255,1));case"gainsboro":return new t(new x(220,220,220,1));case"ghostwhite":return new t(new x(248,248,255,1));case"gold":return new t(new x(255,215,0,1));case"goldenrod":return new t(new x(218,165,32,1));case"gray":return new t(new x(128,128,128,1));case"green":return new t(new x(0,128,0,1));case"greenyellow":return new t(new x(173,255,47,1));case"grey":return new t(new x(128,128,128,1));case"honeydew":return new t(new x(240,255,240,1));case"hotpink":return new t(new x(255,105,180,1));case"indianred":return new t(new x(205,92,92,1));case"indigo":return new t(new x(75,0,130,1));case"ivory":return new t(new x(255,255,240,1));case"khaki":return new t(new x(240,230,140,1));case"lavender":return new t(new x(230,230,250,1));case"lavenderblush":return new t(new x(255,240,245,1));case"lawngreen":return new t(new x(124,252,0,1));case"lemonchiffon":return new t(new x(255,250,205,1));case"lightblue":return new t(new x(173,216,230,1));case"lightcoral":return new t(new x(240,128,128,1));case"lightcyan":return new t(new x(224,255,255,1));case"lightgoldenrodyellow":return new t(new x(250,250,210,1));case"lightgray":return new t(new x(211,211,211,1));case"lightgreen":return new t(new x(144,238,144,1));case"lightgrey":return new t(new x(211,211,211,1));case"lightpink":return new t(new x(255,182,193,1));case"lightsalmon":return new t(new x(255,160,122,1));case"lightseagreen":return new t(new x(32,178,170,1));case"lightskyblue":return new t(new x(135,206,250,1));case"lightslategray":return new t(new x(119,136,153,1));case"lightslategrey":return new t(new x(119,136,153,1));case"lightsteelblue":return new t(new x(176,196,222,1));case"lightyellow":return new t(new x(255,255,224,1));case"lime":return new t(new x(0,255,0,1));case"limegreen":return new t(new x(50,205,50,1));case"linen":return new t(new x(250,240,230,1));case"magenta":return new t(new x(255,0,255,1));case"maroon":return new t(new x(128,0,0,1));case"mediumaquamarine":return new t(new x(102,205,170,1));case"mediumblue":return new t(new x(0,0,205,1));case"mediumorchid":return new t(new x(186,85,211,1));case"mediumpurple":return new t(new x(147,112,219,1));case"mediumseagreen":return new t(new x(60,179,113,1));case"mediumslateblue":return new t(new x(123,104,238,1));case"mediumspringgreen":return new t(new x(0,250,154,1));case"mediumturquoise":return new t(new x(72,209,204,1));case"mediumvioletred":return new t(new x(199,21,133,1));case"midnightblue":return new t(new x(25,25,112,1));case"mintcream":return new t(new x(245,255,250,1));case"mistyrose":return new t(new x(255,228,225,1));case"moccasin":return new t(new x(255,228,181,1));case"navajowhite":return new t(new x(255,222,173,1));case"navy":return new t(new x(0,0,128,1));case"oldlace":return new t(new x(253,245,230,1));case"olive":return new t(new x(128,128,0,1));case"olivedrab":return new t(new x(107,142,35,1));case"orange":return new t(new x(255,165,0,1));case"orangered":return new t(new x(255,69,0,1));case"orchid":return new t(new x(218,112,214,1));case"palegoldenrod":return new t(new x(238,232,170,1));case"palegreen":return new t(new x(152,251,152,1));case"paleturquoise":return new t(new x(175,238,238,1));case"palevioletred":return new t(new x(219,112,147,1));case"papayawhip":return new t(new x(255,239,213,1));case"peachpuff":return new t(new x(255,218,185,1));case"peru":return new t(new x(205,133,63,1));case"pink":return new t(new x(255,192,203,1));case"plum":return new t(new x(221,160,221,1));case"powderblue":return new t(new x(176,224,230,1));case"purple":return new t(new x(128,0,128,1));case"rebeccapurple":return new t(new x(102,51,153,1));case"red":return new t(new x(255,0,0,1));case"rosybrown":return new t(new x(188,143,143,1));case"royalblue":return new t(new x(65,105,225,1));case"saddlebrown":return new t(new x(139,69,19,1));case"salmon":return new t(new x(250,128,114,1));case"sandybrown":return new t(new x(244,164,96,1));case"seagreen":return new t(new x(46,139,87,1));case"seashell":return new t(new x(255,245,238,1));case"sienna":return new t(new x(160,82,45,1));case"silver":return new t(new x(192,192,192,1));case"skyblue":return new t(new x(135,206,235,1));case"slateblue":return new t(new x(106,90,205,1));case"slategray":return new t(new x(112,128,144,1));case"slategrey":return new t(new x(112,128,144,1));case"snow":return new t(new x(255,250,250,1));case"springgreen":return new t(new x(0,255,127,1));case"steelblue":return new t(new x(70,130,180,1));case"tan":return new t(new x(210,180,140,1));case"teal":return new t(new x(0,128,128,1));case"thistle":return new t(new x(216,191,216,1));case"tomato":return new t(new x(255,99,71,1));case"turquoise":return new t(new x(64,224,208,1));case"violet":return new t(new x(238,130,238,1));case"wheat":return new t(new x(245,222,179,1));case"white":return new t(new x(255,255,255,1));case"whitesmoke":return new t(new x(245,245,245,1));case"yellow":return new t(new x(255,255,0,1));case"yellowgreen":return new t(new x(154,205,50,1));default:return null}}function f(b){const k=b.length;if(k===0||b.charCodeAt(0)!==35)return null;if(k===7){const F=16*g(b.charCodeAt(1))+g(b.charCodeAt(2)),N=16*g(b.charCodeAt(3))+g(b.charCodeAt(4)),_=16*g(b.charCodeAt(5))+g(b.charCodeAt(6));return new t(new x(F,N,_,1))}if(k===9){const F=16*g(b.charCodeAt(1))+g(b.charCodeAt(2)),N=16*g(b.charCodeAt(3))+g(b.charCodeAt(4)),_=16*g(b.charCodeAt(5))+g(b.charCodeAt(6)),T=16*g(b.charCodeAt(7))+g(b.charCodeAt(8));return new t(new x(F,N,_,T/255))}if(k===4){const F=g(b.charCodeAt(1)),N=g(b.charCodeAt(2)),_=g(b.charCodeAt(3));return new t(new x(16*F+F,16*N+N,16*_+_))}if(k===5){const F=g(b.charCodeAt(1)),N=g(b.charCodeAt(2)),_=g(b.charCodeAt(3)),T=g(b.charCodeAt(4));return new t(new x(16*F+F,16*N+N,16*_+_,(16*T+T)/255))}return null}n.parseHex=f;function g(b){switch(b){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(t.Format||(t.Format={}))})(sr||(sr={}));function Vo(t){const e=[];for(const n of t){const r=Number(n);(r||r===0&&n.replace(/\s/g,"")!=="")&&e.push(r)}return e}function yi(t,e,n,r){return{red:t/255,blue:n/255,green:e/255,alpha:r}}function vn(t,e){const n=e.index,r=e[0].length;if(n===void 0)return;const i=t.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function Ru(t,e){if(!t)return;const n=sr.Format.CSS.parseHex(e);if(n)return{range:t,color:yi(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function $o(t,e,n){if(!t||e.length!==1)return;const i=e[0].values(),s=Vo(i);return{range:t,color:yi(s[0],s[1],s[2],n?s[3]:1)}}function Uo(t,e,n){if(!t||e.length!==1)return;const i=e[0].values(),s=Vo(i),a=new sr(new Me(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:t,color:yi(a.rgba.r,a.rgba.g,a.rgba.b,a.rgba.a)}}function yn(t,e){return typeof t=="string"?[...t.matchAll(e)]:t.findMatches(e)}function Nu(t){const e=[],n=new RegExp(`\\b(rgb|rgba|hsl|hsla)(\\([0-9\\s,.\\%]*\\))|^(#)([A-Fa-f0-9]{3})\\b|^(#)([A-Fa-f0-9]{4})\\b|^(#)([A-Fa-f0-9]{6})\\b|^(#)([A-Fa-f0-9]{8})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{3})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{4})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{6})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{8})\\b`,"gm"),r=yn(t,n);if(r.length>0)for(const i of r){const s=i.filter(c=>c!==void 0),a=s[1],o=s[2];if(!o)continue;let l;if(a==="rgb"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=$o(vn(t,i),yn(o,c),!1)}else if(a==="rgba"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=$o(vn(t,i),yn(o,c),!0)}else if(a==="hsl"){const c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=Uo(vn(t,i),yn(o,c),!1)}else if(a==="hsla"){const c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;l=Uo(vn(t,i),yn(o,c),!0)}else a==="#"&&(l=Ru(vn(t,i),a+o));l&&e.push(l)}return e}function Iu(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:Nu(t)}const Du=/^-+|-+$/g,Bo=100,Lu=5;function Au(t,e){let n=[];if(e.findRegionSectionHeaders&&e.foldingRules?.markers){const r=Mu(t,e);n=n.concat(r)}if(e.findMarkSectionHeaders){const r=zu(t,e);n=n.concat(r)}return n}function Mu(t,e){const n=[],r=t.getLineCount();for(let i=1;i<=r;i++){const s=t.getLineContent(i),a=s.match(e.foldingRules.markers.start);if(a){const o={startLineNumber:i,startColumn:a[0].length+1,endLineNumber:i,endColumn:s.length+1};if(o.endColumn>o.startColumn){const l={range:o,...Pu(s.substring(a[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&n.push(l)}}}return n}function zu(t,e){const n=[],r=t.getLineCount();if(!e.markSectionHeaderRegex||e.markSectionHeaderRegex.trim()==="")return n;const i=Pd(e.markSectionHeaderRegex),s=new RegExp(e.markSectionHeaderRegex,`gdm${i?"s":""}`);if(Dh(s))return n;for(let a=1;a<=r;a+=Bo-Lu){const o=Math.min(a+Bo-1,r),l=[];for(let u=a;u<=o;u++)l.push(t.getLineContent(u));const c=l.join(` +`),i=Th(n,r),s=yn.ofText(n.substring(0,n.length-i)).addToPosition(this.range.getStartPosition()),a=r.substring(0,r.length-i),o=J.fromPositions(this.range.getStartPosition(),s);return new mt(o,a)}toString(){const e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}class Le{static inverse(e,n,r){const i=[];let s=1,a=1;for(const l of e){const c=new Le(new Z(s,l.original.startLineNumber),new Z(a,l.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=l.original.endLineNumberExclusive,a=l.modified.endLineNumberExclusive}const o=new Le(new Z(s,n+1),new Z(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(e,n,r){const i=[];for(const s of e){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new Le(a,o))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Le(this.modified,this.original)}join(e){return new Le(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new Ae(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new be("not a valid diff");return new Ae(new J(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new J(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ae(new J(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new J(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(_o(this.original.endLineNumberExclusive,e)&&_o(this.modified.endLineNumberExclusive,n))return new Ae(new J(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new J(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ae(J.fromPositions(new re(this.original.startLineNumber,1),qt(new re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),J.fromPositions(new re(this.modified.startLineNumber,1),qt(new re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ae(J.fromPositions(qt(new re(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),qt(new re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),J.fromPositions(qt(new re(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),qt(new re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new be}}function qt(t,e){if(t.lineNumber<1)return new re(1,1);if(t.lineNumber>e.length)return new re(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new re(t.lineNumber,n.length+1):t}function _o(t,e){return t>=1&&t<=e.length}class et extends Le{static fromRangeMappings(e){const n=Z.join(e.map(i=>Z.fromRangeInclusive(i.originalRange))),r=Z.join(e.map(i=>Z.fromRangeInclusive(i.modifiedRange)));return new et(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new et(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new et(this.original,this.modified,[this.toRangeMapping()])}}class Ae{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((i,s)=>new Ae(i.range,n[s]))}static assertSorted(e){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new Ae(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new mt(this.originalRange,n)}}function Eo(t,e,n,r=!1){const i=[];for(const s of Xd(t.map(a=>su(a,e,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=s[0],o=s[s.length-1];i.push(new et(a.original.join(o.original),a.modified.join(o.modified),s.map(l=>l.innerChanges[0])))}return jn(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==e.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:Ws(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n.getLineLength(t.modifiedRange.startLineNumber)&&t.originalRange.startColumn-1>=e.getLineLength(t.originalRange.startLineNumber)&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+i&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+i&&(r=1);const s=new Z(t.originalRange.startLineNumber+r,t.originalRange.endLineNumber+1+i),a=new Z(t.modifiedRange.startLineNumber+r,t.modifiedRange.endLineNumber+1+i);return new et(s,a,[t])}const au=3;class ou{computeDiff(e,n,r){const s=new hu(e,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let o=null;for(const l of s.changes){let c;l.originalEndLineNumber===0?c=new Z(l.originalStartLineNumber+1,l.originalStartLineNumber+1):c=new Z(l.originalStartLineNumber,l.originalEndLineNumber+1);let d;l.modifiedEndLineNumber===0?d=new Z(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):d=new Z(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let u=new et(c,d,l.charChanges?.map(m=>new Ae(new J(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new J(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));o&&(o.modified.endLineNumberExclusive===u.modified.startLineNumber||o.original.endLineNumberExclusive===u.original.startLineNumber)&&(u=new et(o.original.join(u.original),o.modified.join(u.modified),o.innerChanges&&u.innerChanges?o.innerChanges.concat(u.innerChanges):void 0),a.pop()),a.push(u),o=u}return jn(()=>Ws(a,(l,c)=>c.original.startLineNumber-l.original.endLineNumberExclusive===c.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class jt{constructor(e,n,r,i,s,a,o,l){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=l}static createFromDiffChange(e,n,r){const i=n.getStartLineNumber(e.originalStart),s=n.getStartColumn(e.originalStart),a=n.getEndLineNumber(e.originalStart+e.originalLength-1),o=n.getEndColumn(e.originalStart+e.originalLength-1),l=r.getStartLineNumber(e.modifiedStart),c=r.getStartColumn(e.modifiedStart),d=r.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=r.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new jt(i,s,a,o,l,c,d,u)}}function cu(t){if(t.length<=1)return t;const e=[t[0]];let n=e[0];for(let r=1,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const f=r.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(f.getElements().length>0&&g.getElements().length>0){let b=Fo(f,g,s,!0).changes;o&&(b=cu(b)),m=[];for(let _=0,F=b.length;_1&&b>1;){const _=m.charCodeAt(g-2),F=f.charCodeAt(b-2);if(_!==F)break;g--,b--}(g>1||b>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,a+1,1,b)}{let g=yi(m,1),b=yi(f,1);const _=m.length+1,F=f.length+1;for(;g<_&&b!0;const e=Date.now();return()=>Date.now()-e{r.push(ce.fromOffsetPairs(i?i.getEndExclusives():nt.zero,s?s.getStarts():new nt(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(e,n){return new ce(new Y(e.offset1,n.offset1),new Y(e.offset2,n.offset2))}static assertSorted(e){let n;for(const r of e){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new be("Sequence diffs must be sorted");n=r}}constructor(e,n){this.seq1Range=e,this.seq2Range=n}swap(){return new ce(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new ce(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new ce(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new ce(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new ce(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const n=this.seq1Range.intersect(e.seq1Range),r=this.seq2Range.intersect(e.seq2Range);if(!(!n||!r))return new ce(n,r)}getStarts(){return new nt(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new nt(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}const Dt=class Dt{constructor(e,n){this.offset1=e,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new Dt(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};Dt.zero=new Dt(0,0),Dt.max=new Dt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);let nt=Dt;const Or=class Or{isValid(){return!0}};Or.instance=new Or;let Sn=Or;class du{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new be("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&b>0&&a.get(g-1,b-1)===3&&(N+=o.get(g-1,b-1)),N+=i?i(g,b):1):N=-1;const E=Math.max(_,F,N);if(E===N){const T=g>0&&b>0?o.get(g-1,b-1):0;o.set(g,b,T+1),a.set(g,b,3)}else E===_?(o.set(g,b,0),a.set(g,b,1)):E===F&&(o.set(g,b,0),a.set(g,b,2));s.set(g,b,E)}const l=[];let c=e.length,d=n.length;function u(g,b){(g+1!==c||b+1!==d)&&l.push(new ce(new Y(g+1,c),new Y(b+1,d))),c=g,d=b}let m=e.length-1,f=n.length-1;for(;m>=0&&f>=0;)a.get(m,f)===3?(u(m,f),m--,f--):a.get(m,f)===1?m--:f--;return u(-1,-1),l.reverse(),new tt(l,!1)}}class Io{compute(e,n,r=Sn.instance){if(e.length===0||n.length===0)return tt.trivial(e,n);const i=e,s=n;function a(b,_){for(;bi.length||T>s.length)continue;const O=a(E,T);l.set(d,O);const V=E===F?c.get(d+1):c.get(d-1);if(c.set(d,O!==E?new Do(V,E,T,O-E):V),l.get(d)===i.length&&l.get(d)-d===s.length)break e}}let u=c.get(d);const m=[];let f=i.length,g=s.length;for(;;){const b=u?u.x+u.length:0,_=u?u.y+u.length:0;if((b!==f||_!==g)&&m.push(new ce(new Y(b,f),new Y(_,g))),!u)break;f=u.x,g=u.y,u=u.prev}return m.reverse(),new tt(m,!1)}}class Do{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}}class pu{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class mu{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class or{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=e[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const c=s.trimStart();o=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const l=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,s.length):s.length;for(let c=0;cString.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Mo(e>0?this.elements[e-1]:-1),r=Mo(es<=e),i=e-this.firstElementOffsetByLineIdx[r];return new re(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?J.fromPositions(r,r):J.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!Ht(this.elements[e]))return;let n=e;for(;n>0&&Ht(this.elements[n-1]);)n--;let r=e;for(;r=this.elements.length||!Ht(this.elements[e]))return;let n=e;for(;n>0&&Ht(this.elements[n-1])&&!Lo(this.elements[n]);)n--;let r=e;for(;ri<=e.start)??0,r=eu(this.firstElementOffsetByLineIdx,i=>e.endExclusive<=i)??this.elements.length;return new Y(n,r)}}function Ht(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}function Lo(t){return t>=65&&t<=90}const fu={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Ao(t){return fu[t]}function Mo(t){return t===10?8:t===13?7:Si(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}function gu(t,e,n,r,i,s){let{moves:a,excludedChanges:o}=wu(t,e,n,s);if(!s.isValid())return[];const l=t.filter(d=>!o.has(d)),c=vu(l,r,i,e,n,s);return Kd(a,c),a=yu(a),a=a.filter(d=>{const u=d.original.toOffsetRange().slice(e).map(f=>f.trim());return u.join(` +`).length>=15&&bu(u,f=>f.length>=2)>=2}),a=xu(t,a),a}function bu(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function wu(t,e,n,r){const i=[],s=t.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new ar(l.original,e,l)),a=new Set(t.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new ar(l.modified,n,l))),o=new Set;for(const l of s){let c=-1,d;for(const u of a){const m=l.computeSimilarity(u);m>c&&(c=m,d=u)}if(c>.9&&d&&(a.delete(d),i.push(new Le(l.range,d.range)),o.add(l.source),o.add(d.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function vu(t,e,n,r,i,s){const a=[],o=new Pd;for(const m of t)for(let f=m.original.startLineNumber;fm.modified.startLineNumber,vn));for(const m of t){let f=[];for(let g=m.modified.startLineNumber;g{for(const T of f)if(T.originalLineRange.endLineNumberExclusive+1===N.endLineNumberExclusive&&T.modifiedLineRange.endLineNumberExclusive+1===_.endLineNumberExclusive){T.originalLineRange=new Z(T.originalLineRange.startLineNumber,N.endLineNumberExclusive),T.modifiedLineRange=new Z(T.modifiedLineRange.startLineNumber,_.endLineNumberExclusive),F.push(T);return}const E={modifiedLineRange:_,originalLineRange:N};l.push(E),F.push(E)}),f=F}if(!s.isValid())return[]}l.sort(Zd(wn(m=>m.modifiedLineRange.length,vn)));const c=new qe,d=new qe;for(const m of l){const f=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,g=c.subtractFrom(m.modifiedLineRange),b=d.subtractFrom(m.originalLineRange).getWithDelta(f),_=g.getIntersection(b);for(const F of _.ranges){if(F.length<3)continue;const N=F,E=F.delta(-f);a.push(new Le(E,N)),c.addRange(N),d.addRange(E)}}a.sort(wn(m=>m.original.startLineNumber,vn));const u=new ir(t);for(let m=0;mV.original.startLineNumber<=f.original.startLineNumber),b=$t(t,V=>V.modified.startLineNumber<=f.modified.startLineNumber),_=Math.max(f.original.startLineNumber-g.original.startLineNumber,f.modified.startLineNumber-b.modified.startLineNumber),F=u.findLastMonotonous(V=>V.original.startLineNumberV.modified.startLineNumberr.length||I>i.length||c.contains(I)||d.contains(V)||!zo(r[V-1],i[I-1],s))break}T>0&&(d.addRange(new Z(f.original.startLineNumber-T,f.original.startLineNumber)),c.addRange(new Z(f.modified.startLineNumber-T,f.modified.startLineNumber)));let O;for(O=0;Or.length||I>i.length||c.contains(I)||d.contains(V)||!zo(r[V-1],i[I-1],s))break}O>0&&(d.addRange(new Z(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+O)),c.addRange(new Z(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+O))),(T>0||O>0)&&(a[m]=new Le(new Z(f.original.startLineNumber-T,f.original.endLineNumberExclusive+O),new Z(f.modified.startLineNumber-T,f.modified.endLineNumberExclusive+O)))}return a}function zo(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const i=new Io().compute(new or([t],new J(1,1,1,t.length),!1),new or([e],new J(1,1,1,e.length),!1),n);let s=0;const a=ce.invert(i.diffs,t.length);for(const d of a)d.seq1Range.forEach(u=>{Si(t.charCodeAt(u))||s++});function o(d){let u=0;for(let m=0;me.length?t:e);return s/l>.6&&l>10}function yu(t){if(t.length===0)return t;t.sort(wn(n=>n.original.startLineNumber,vn));const e=[t[0]];for(let n=1;n=0&&a>=0&&s+a<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function xu(t,e){const n=new ir(t);return e=e.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumbero.modified.startLineNumber0&&(o=o.delta(c))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function Su(t,e,n){if(!t.getBoundaryScore||!e.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],a=r+1=r.start&&t.seq2Range.start-a>=i.start&&n.isStronglyEqual(t.seq2Range.start-a,t.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;t.seq1Range.start+oc&&(c=g,l=d)}return t.delta(l)}function Cu(t,e,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new ce(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function Wo(t,e,n,r,i=!1){const s=ce.invert(n,t.length),a=[];let o=new nt(0,0);function l(d,u){if(d.offset10;){const N=s[0];if(!(N.seq1Range.intersects(g.seq1Range)||N.seq2Range.intersects(g.seq2Range)))break;const T=r(t,N.seq1Range.start),O=r(e,N.seq2Range.start),V=new ce(T,O),I=V.intersect(N);if(_+=I.seq1Range.length,F+=I.seq2Range.length,g=g.join(V),g.seq1Range.endExclusive>=N.seq1Range.endExclusive)s.shift();else break}(i&&_+F0;){const d=s.shift();d.seq1Range.isEmpty||(l(d.getStarts(),d),l(d.getEndExclusives().delta(-1),d))}return ku(n,a)}function ku(t,e){const n=[];for(;t.length>0||e.length>0;){const r=t[0],i=e[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function _u(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const a=[r[0]];for(let o=1;o5||f.seq1Range.length+f.seq2Range.length>5)};const l=r[o],c=a[a.length-1];d(c,l)?(s=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(i++<10&&s);return r}function Eu(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const o=[r[0]];for(let l=1;l5||b.length>500)return!1;const F=t.getText(b).trim();if(F.length>20||F.split(/\r\n|\r|\n/).length>1)return!1;const N=t.countLinesIn(f.seq1Range),E=f.seq1Range.length,T=e.countLinesIn(f.seq2Range),O=f.seq2Range.length,V=t.countLinesIn(g.seq1Range),I=g.seq1Range.length,R=e.countLinesIn(g.seq2Range),z=g.seq2Range.length,$=130;function L(y){return Math.min(y,$)}return Math.pow(Math.pow(L(N*40+E),1.5)+Math.pow(L(T*40+O),1.5),1.5)+Math.pow(Math.pow(L(V*40+I),1.5)+Math.pow(L(R*40+z),1.5),1.5)>($**1.5)**1.5*1.3};const c=r[l],d=o[o.length-1];u(d,c)?(s=!0,o[o.length-1]=o[o.length-1].join(c)):o.push(c)}r=o}while(i++<10&&s);const a=[];return Qd(r,(o,l,c)=>{let d=l;function u(F){return F.length>0&&F.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}const m=t.extendToFullLines(l.seq1Range),f=t.getText(new Y(m.start,l.seq1Range.start));u(f)&&(d=d.deltaStart(-f.length));const g=t.getText(new Y(l.seq1Range.endExclusive,m.endExclusive));u(g)&&(d=d.deltaEnd(g.length));const b=ce.fromOffsetPairs(o?o.getEndExclusives():nt.zero,c?c.getStarts():nt.max),_=d.intersect(b);a.length>0&&_.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(_):a.push(_)}),a}class Vo{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const n=e===0?0:$o(this.lines[e-1]),r=e===this.lines.length?0:$o(this.lines[e]);return 1e3-(n+r)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function $o(t){let e=0;for(;eI===R))return new rr([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new rr([new et(new Z(1,e.length+1),new Z(1,n.length+1),[new Ae(new J(1,1,e.length,e[e.length-1].length+1),new J(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?Sn.instance:new du(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(I){let R=a.get(I);return R===void 0&&(R=a.size,a.set(I,R)),R}const l=e.map(I=>o(I.trim())),c=n.map(I=>o(I.trim())),d=new Vo(l,e),u=new Vo(c,n),m=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,i,(I,R)=>e[I]===n[R]?n[R].length===0?.1:1+Math.log(1+n[R].length):.99):this.myersDiffingAlgorithm.compute(d,u,i);let f=m.diffs,g=m.hitTimeout;f=Po(d,u,f),f=_u(d,u,f);const b=[],_=I=>{if(s)for(let R=0;RI.seq1Range.start-F===I.seq2Range.start-N);const R=I.seq1Range.start-F;_(R),F=I.seq1Range.endExclusive,N=I.seq2Range.endExclusive;const z=this.refineDiff(e,n,I,i,s,r);z.hitTimeout&&(g=!0);for(const $ of z.mappings)b.push($)}_(e.length-F);const E=new sr(e),T=new sr(n),O=Eo(b,E,T);let V=[];return r.computeMoves&&(V=this.computeMoves(O,e,n,l,c,i,s,r)),jn(()=>{function I(z,$){if(z.lineNumber<1||z.lineNumber>$.length)return!1;const L=$[z.lineNumber-1];return!(z.column<1||z.column>L.length+1)}function R(z,$){return!(z.startLineNumber<1||z.startLineNumber>$.length+1||z.endLineNumberExclusive<1||z.endLineNumberExclusive>$.length+1)}for(const z of O){if(!z.innerChanges)return!1;for(const $ of z.innerChanges)if(!(I($.modifiedRange.getStartPosition(),n)&&I($.modifiedRange.getEndPosition(),n)&&I($.originalRange.getStartPosition(),e)&&I($.originalRange.getEndPosition(),e)))return!1;if(!R(z.modified,n)||!R(z.original,e))return!1}return!0}),new rr(O,V,g)}computeMoves(e,n,r,i,s,a,o,l){return gu(e,n,r,i,s,a).map(u=>{const m=this.refineDiff(n,r,new ce(u.original.toOffsetRange(),u.modified.toOffsetRange()),a,o,l),f=Eo(m.mappings,new sr(n),new sr(r),!0);return new Gd(u,f)})}refineDiff(e,n,r,i,s,a){const l=Ru(r).toRangeMapping2(e,n),c=new or(e,l.originalRange,s),d=new or(n,l.modifiedRange,s),u=c.length+d.length<500?this.dynamicProgrammingDiffing.compute(c,d,i):this.myersDiffingAlgorithm.compute(c,d,i);let m=u.diffs;return m=Po(c,d,m),m=Wo(c,d,m,(g,b)=>g.findWordContaining(b)),a.extendToSubwords&&(m=Wo(c,d,m,(g,b)=>g.findSubWordContaining(b),!0)),m=Cu(c,d,m),m=Eu(c,d,m),{mappings:m.map(g=>new Ae(c.translateRange(g.seq1Range),d.translateRange(g.seq2Range))),hitTimeout:u.hitTimeout}}}function Ru(t){return new Le(new Z(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new Z(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}const Uo={getLegacy:()=>new ou,getDefault:()=>new Fu};function ft(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class x{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=ft(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class Me{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=ft(Math.max(Math.min(1,n),0),3),this.l=ft(Math.max(Math.min(1,r),0),3),this.a=ft(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let l=0,c=0;const d=(o+a)/2,u=a-o;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),a){case n:l=(r-i)/u+(r1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:i,a:s}=e;let a,o,l;if(r===0)a=o=l=i;else{const c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;a=Me._hue2rgb(d,c,n+1/3),o=Me._hue2rgb(d,c,n),l=Me._hue2rgb(d,c,n-1/3)}return new x(Math.round(a*255),Math.round(o*255),Math.round(l*255),s)}}class Gt{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=ft(Math.max(Math.min(1,n),0),3),this.v=ft(Math.max(Math.min(1,r),0),3),this.a=ft(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,l=s===0?0:o/s;let c;return o===0?c=0:s===n?c=((r-i)/o%6+6)%6:s===r?c=(i-n)/o+2:c=(n-r)/o+4,new Gt(Math.round(c*60),l,s,e.a)}static toRGBA(e){const{h:n,s:r,v:i,a:s}=e,a=i*r,o=a*(1-Math.abs(n/60%2-1)),l=i-a;let[c,d,u]=[0,0,0];return n<60?(c=a,d=o):n<120?(c=o,d=a):n<180?(d=a,u=o):n<240?(d=o,u=a):n<300?(c=o,u=a):n<=360&&(c=a,u=o),c=Math.round((c+l)*255),d=Math.round((d+l)*255),u=Math.round((u+l)*255),new x(c,d,u,s)}}let lr=(ne=class{static fromHex(e){return ne.Format.CSS.parseHex(e)||ne.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:Me.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Gt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof x)this.rgba=e;else if(e instanceof Me)this._hsla=e,this.rgba=Me.toRGBA(e);else if(e instanceof Gt)this._hsva=e,this.rgba=Gt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&x.equals(this.rgba,e.rgba)&&Me.equals(this.hsla,e.hsla)&&Gt.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=ne._relativeLuminanceForComponent(this.rgba.r),n=ne._relativeLuminanceForComponent(this.rgba.g),r=ne._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*n+.0722*r;return ft(i,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>>0),this._toNumber32Bit}static getLighterColor(e,n,r){if(e.isLighterThan(n))return e;r=r||.5;const i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(s-i)/s,e.lighten(r)}static getDarkerColor(e,n,r){if(e.isDarkerThan(n))return e;r=r||.5;const i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(i-s)/i,e.darken(r)}},ne.white=new ne(new x(255,255,255,1)),ne.black=new ne(new x(0,0,0,1)),ne.red=new ne(new x(255,0,0,1)),ne.blue=new ne(new x(0,0,255,1)),ne.green=new ne(new x(0,255,0,1)),ne.cyan=new ne(new x(0,255,255,1)),ne.lightgrey=new ne(new x(211,211,211,1)),ne.transparent=new ne(new x(0,0,0,0)),ne);(function(t){(function(e){(function(n){function r(b){return b.rgba.a===1?`rgb(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b})`:t.Format.CSS.formatRGBA(b)}n.formatRGB=r;function i(b){return`rgba(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b}, ${+b.rgba.a.toFixed(2)})`}n.formatRGBA=i;function s(b){return b.hsla.a===1?`hsl(${b.hsla.h}, ${Math.round(b.hsla.s*100)}%, ${Math.round(b.hsla.l*100)}%)`:t.Format.CSS.formatHSLA(b)}n.formatHSL=s;function a(b){return`hsla(${b.hsla.h}, ${Math.round(b.hsla.s*100)}%, ${Math.round(b.hsla.l*100)}%, ${b.hsla.a.toFixed(2)})`}n.formatHSLA=a;function o(b){const _=b.toString(16);return _.length!==2?"0"+_:_}function l(b){return`#${o(b.rgba.r)}${o(b.rgba.g)}${o(b.rgba.b)}`}n.formatHex=l;function c(b,_=!1){return _&&b.rgba.a===1?t.Format.CSS.formatHex(b):`#${o(b.rgba.r)}${o(b.rgba.g)}${o(b.rgba.b)}${o(Math.round(b.rgba.a*255))}`}n.formatHexA=c;function d(b){return b.isOpaque()?t.Format.CSS.formatHex(b):t.Format.CSS.formatRGBA(b)}n.format=d;function u(b){if(b==="transparent")return t.transparent;if(b.startsWith("#"))return f(b);if(b.startsWith("rgba(")){const _=b.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/);if(!_)throw new Error("Invalid color format "+b);const F=parseInt(_.groups?.r??"0"),N=parseInt(_.groups?.g??"0"),E=parseInt(_.groups?.b??"0"),T=parseFloat(_.groups?.a??"0");return new t(new x(F,N,E,T))}if(b.startsWith("rgb(")){const _=b.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/);if(!_)throw new Error("Invalid color format "+b);const F=parseInt(_.groups?.r??"0"),N=parseInt(_.groups?.g??"0"),E=parseInt(_.groups?.b??"0");return new t(new x(F,N,E))}return m(b)}n.parse=u;function m(b){switch(b){case"aliceblue":return new t(new x(240,248,255,1));case"antiquewhite":return new t(new x(250,235,215,1));case"aqua":return new t(new x(0,255,255,1));case"aquamarine":return new t(new x(127,255,212,1));case"azure":return new t(new x(240,255,255,1));case"beige":return new t(new x(245,245,220,1));case"bisque":return new t(new x(255,228,196,1));case"black":return new t(new x(0,0,0,1));case"blanchedalmond":return new t(new x(255,235,205,1));case"blue":return new t(new x(0,0,255,1));case"blueviolet":return new t(new x(138,43,226,1));case"brown":return new t(new x(165,42,42,1));case"burlywood":return new t(new x(222,184,135,1));case"cadetblue":return new t(new x(95,158,160,1));case"chartreuse":return new t(new x(127,255,0,1));case"chocolate":return new t(new x(210,105,30,1));case"coral":return new t(new x(255,127,80,1));case"cornflowerblue":return new t(new x(100,149,237,1));case"cornsilk":return new t(new x(255,248,220,1));case"crimson":return new t(new x(220,20,60,1));case"cyan":return new t(new x(0,255,255,1));case"darkblue":return new t(new x(0,0,139,1));case"darkcyan":return new t(new x(0,139,139,1));case"darkgoldenrod":return new t(new x(184,134,11,1));case"darkgray":return new t(new x(169,169,169,1));case"darkgreen":return new t(new x(0,100,0,1));case"darkgrey":return new t(new x(169,169,169,1));case"darkkhaki":return new t(new x(189,183,107,1));case"darkmagenta":return new t(new x(139,0,139,1));case"darkolivegreen":return new t(new x(85,107,47,1));case"darkorange":return new t(new x(255,140,0,1));case"darkorchid":return new t(new x(153,50,204,1));case"darkred":return new t(new x(139,0,0,1));case"darksalmon":return new t(new x(233,150,122,1));case"darkseagreen":return new t(new x(143,188,143,1));case"darkslateblue":return new t(new x(72,61,139,1));case"darkslategray":return new t(new x(47,79,79,1));case"darkslategrey":return new t(new x(47,79,79,1));case"darkturquoise":return new t(new x(0,206,209,1));case"darkviolet":return new t(new x(148,0,211,1));case"deeppink":return new t(new x(255,20,147,1));case"deepskyblue":return new t(new x(0,191,255,1));case"dimgray":return new t(new x(105,105,105,1));case"dimgrey":return new t(new x(105,105,105,1));case"dodgerblue":return new t(new x(30,144,255,1));case"firebrick":return new t(new x(178,34,34,1));case"floralwhite":return new t(new x(255,250,240,1));case"forestgreen":return new t(new x(34,139,34,1));case"fuchsia":return new t(new x(255,0,255,1));case"gainsboro":return new t(new x(220,220,220,1));case"ghostwhite":return new t(new x(248,248,255,1));case"gold":return new t(new x(255,215,0,1));case"goldenrod":return new t(new x(218,165,32,1));case"gray":return new t(new x(128,128,128,1));case"green":return new t(new x(0,128,0,1));case"greenyellow":return new t(new x(173,255,47,1));case"grey":return new t(new x(128,128,128,1));case"honeydew":return new t(new x(240,255,240,1));case"hotpink":return new t(new x(255,105,180,1));case"indianred":return new t(new x(205,92,92,1));case"indigo":return new t(new x(75,0,130,1));case"ivory":return new t(new x(255,255,240,1));case"khaki":return new t(new x(240,230,140,1));case"lavender":return new t(new x(230,230,250,1));case"lavenderblush":return new t(new x(255,240,245,1));case"lawngreen":return new t(new x(124,252,0,1));case"lemonchiffon":return new t(new x(255,250,205,1));case"lightblue":return new t(new x(173,216,230,1));case"lightcoral":return new t(new x(240,128,128,1));case"lightcyan":return new t(new x(224,255,255,1));case"lightgoldenrodyellow":return new t(new x(250,250,210,1));case"lightgray":return new t(new x(211,211,211,1));case"lightgreen":return new t(new x(144,238,144,1));case"lightgrey":return new t(new x(211,211,211,1));case"lightpink":return new t(new x(255,182,193,1));case"lightsalmon":return new t(new x(255,160,122,1));case"lightseagreen":return new t(new x(32,178,170,1));case"lightskyblue":return new t(new x(135,206,250,1));case"lightslategray":return new t(new x(119,136,153,1));case"lightslategrey":return new t(new x(119,136,153,1));case"lightsteelblue":return new t(new x(176,196,222,1));case"lightyellow":return new t(new x(255,255,224,1));case"lime":return new t(new x(0,255,0,1));case"limegreen":return new t(new x(50,205,50,1));case"linen":return new t(new x(250,240,230,1));case"magenta":return new t(new x(255,0,255,1));case"maroon":return new t(new x(128,0,0,1));case"mediumaquamarine":return new t(new x(102,205,170,1));case"mediumblue":return new t(new x(0,0,205,1));case"mediumorchid":return new t(new x(186,85,211,1));case"mediumpurple":return new t(new x(147,112,219,1));case"mediumseagreen":return new t(new x(60,179,113,1));case"mediumslateblue":return new t(new x(123,104,238,1));case"mediumspringgreen":return new t(new x(0,250,154,1));case"mediumturquoise":return new t(new x(72,209,204,1));case"mediumvioletred":return new t(new x(199,21,133,1));case"midnightblue":return new t(new x(25,25,112,1));case"mintcream":return new t(new x(245,255,250,1));case"mistyrose":return new t(new x(255,228,225,1));case"moccasin":return new t(new x(255,228,181,1));case"navajowhite":return new t(new x(255,222,173,1));case"navy":return new t(new x(0,0,128,1));case"oldlace":return new t(new x(253,245,230,1));case"olive":return new t(new x(128,128,0,1));case"olivedrab":return new t(new x(107,142,35,1));case"orange":return new t(new x(255,165,0,1));case"orangered":return new t(new x(255,69,0,1));case"orchid":return new t(new x(218,112,214,1));case"palegoldenrod":return new t(new x(238,232,170,1));case"palegreen":return new t(new x(152,251,152,1));case"paleturquoise":return new t(new x(175,238,238,1));case"palevioletred":return new t(new x(219,112,147,1));case"papayawhip":return new t(new x(255,239,213,1));case"peachpuff":return new t(new x(255,218,185,1));case"peru":return new t(new x(205,133,63,1));case"pink":return new t(new x(255,192,203,1));case"plum":return new t(new x(221,160,221,1));case"powderblue":return new t(new x(176,224,230,1));case"purple":return new t(new x(128,0,128,1));case"rebeccapurple":return new t(new x(102,51,153,1));case"red":return new t(new x(255,0,0,1));case"rosybrown":return new t(new x(188,143,143,1));case"royalblue":return new t(new x(65,105,225,1));case"saddlebrown":return new t(new x(139,69,19,1));case"salmon":return new t(new x(250,128,114,1));case"sandybrown":return new t(new x(244,164,96,1));case"seagreen":return new t(new x(46,139,87,1));case"seashell":return new t(new x(255,245,238,1));case"sienna":return new t(new x(160,82,45,1));case"silver":return new t(new x(192,192,192,1));case"skyblue":return new t(new x(135,206,235,1));case"slateblue":return new t(new x(106,90,205,1));case"slategray":return new t(new x(112,128,144,1));case"slategrey":return new t(new x(112,128,144,1));case"snow":return new t(new x(255,250,250,1));case"springgreen":return new t(new x(0,255,127,1));case"steelblue":return new t(new x(70,130,180,1));case"tan":return new t(new x(210,180,140,1));case"teal":return new t(new x(0,128,128,1));case"thistle":return new t(new x(216,191,216,1));case"tomato":return new t(new x(255,99,71,1));case"turquoise":return new t(new x(64,224,208,1));case"violet":return new t(new x(238,130,238,1));case"wheat":return new t(new x(245,222,179,1));case"white":return new t(new x(255,255,255,1));case"whitesmoke":return new t(new x(245,245,245,1));case"yellow":return new t(new x(255,255,0,1));case"yellowgreen":return new t(new x(154,205,50,1));default:return null}}function f(b){const _=b.length;if(_===0||b.charCodeAt(0)!==35)return null;if(_===7){const F=16*g(b.charCodeAt(1))+g(b.charCodeAt(2)),N=16*g(b.charCodeAt(3))+g(b.charCodeAt(4)),E=16*g(b.charCodeAt(5))+g(b.charCodeAt(6));return new t(new x(F,N,E,1))}if(_===9){const F=16*g(b.charCodeAt(1))+g(b.charCodeAt(2)),N=16*g(b.charCodeAt(3))+g(b.charCodeAt(4)),E=16*g(b.charCodeAt(5))+g(b.charCodeAt(6)),T=16*g(b.charCodeAt(7))+g(b.charCodeAt(8));return new t(new x(F,N,E,T/255))}if(_===4){const F=g(b.charCodeAt(1)),N=g(b.charCodeAt(2)),E=g(b.charCodeAt(3));return new t(new x(16*F+F,16*N+N,16*E+E))}if(_===5){const F=g(b.charCodeAt(1)),N=g(b.charCodeAt(2)),E=g(b.charCodeAt(3)),T=g(b.charCodeAt(4));return new t(new x(16*F+F,16*N+N,16*E+E,(16*T+T)/255))}return null}n.parseHex=f;function g(b){switch(b){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(t.Format||(t.Format={}))})(lr||(lr={}));function Bo(t){const e=[];for(const n of t){const r=Number(n);(r||r===0&&n.replace(/\s/g,"")!=="")&&e.push(r)}return e}function Ci(t,e,n,r){return{red:t/255,blue:n/255,green:e/255,alpha:r}}function Cn(t,e){const n=e.index,r=e[0].length;if(n===void 0)return;const i=t.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function Nu(t,e){if(!t)return;const n=lr.Format.CSS.parseHex(e);if(n)return{range:t,color:Ci(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function qo(t,e,n){if(!t||e.length!==1)return;const i=e[0].values(),s=Bo(i);return{range:t,color:Ci(s[0],s[1],s[2],n?s[3]:1)}}function jo(t,e,n){if(!t||e.length!==1)return;const i=e[0].values(),s=Bo(i),a=new lr(new Me(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:t,color:Ci(a.rgba.r,a.rgba.g,a.rgba.b,a.rgba.a)}}function kn(t,e){return typeof t=="string"?[...t.matchAll(e)]:t.findMatches(e)}function Iu(t){const e=[],r=kn(t,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|^(#)([A-Fa-f0-9]{3})\b|^(#)([A-Fa-f0-9]{4})\b|^(#)([A-Fa-f0-9]{6})\b|^(#)([A-Fa-f0-9]{8})\b|(?<=['"\s])(#)([A-Fa-f0-9]{3})\b|(?<=['"\s])(#)([A-Fa-f0-9]{4})\b|(?<=['"\s])(#)([A-Fa-f0-9]{6})\b|(?<=['"\s])(#)([A-Fa-f0-9]{8})\b/gm);if(r.length>0)for(const i of r){const s=i.filter(c=>c!==void 0),a=s[1],o=s[2];if(!o)continue;let l;if(a==="rgb"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=qo(Cn(t,i),kn(o,c),!1)}else if(a==="rgba"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=qo(Cn(t,i),kn(o,c),!0)}else if(a==="hsl"){const c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=jo(Cn(t,i),kn(o,c),!1)}else if(a==="hsla"){const c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;l=jo(Cn(t,i),kn(o,c),!0)}else a==="#"&&(l=Nu(Cn(t,i),a+o));l&&e.push(l)}return e}function Du(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:Iu(t)}const Lu=/^-+|-+$/g,Ho=100,Au=5;function Mu(t,e){let n=[];if(e.findRegionSectionHeaders&&e.foldingRules?.markers){const r=zu(t,e);n=n.concat(r)}if(e.findMarkSectionHeaders){const r=Pu(t,e);n=n.concat(r)}return n}function zu(t,e){const n=[],r=t.getLineCount();for(let i=1;i<=r;i++){const s=t.getLineContent(i),a=s.match(e.foldingRules.markers.start);if(a){const o={startLineNumber:i,startColumn:a[0].length+1,endLineNumber:i,endColumn:s.length+1};if(o.endColumn>o.startColumn){const l={range:o,...Tu(s.substring(a[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&n.push(l)}}}return n}function Pu(t,e){const n=[],r=t.getLineCount();if(!e.markSectionHeaderRegex||e.markSectionHeaderRegex.trim()==="")return n;const i=Td(e.markSectionHeaderRegex),s=new RegExp(e.markSectionHeaderRegex,`gdm${i?"s":""}`);if(Lh(s))return n;for(let a=1;a<=r;a+=Ho-Au){const o=Math.min(a+Ho-1,r),l=[];for(let u=a;u<=o;u++)l.push(t.getLineContent(u));const c=l.join(` `);s.lastIndex=0;let d;for(;(d=s.exec(c))!==null;){const u=c.substring(0,d.index),m=(u.match(/\n/g)||[]).length,f=a+m,g=d[0].split(` -`),b=g.length,k=f+b-1,F=u.lastIndexOf(` -`)+1,N=d.index-F+1,_=g[g.length-1],T=b===1?N+d[0].length:_.length+1,O={startLineNumber:f,startColumn:N,endLineNumber:k,endColumn:T},V=(d.groups??{}).label??"",I=((d.groups??{}).separator??"")!=="",R={range:O,text:V,hasSeparatorLine:I,shouldBeInComments:!0};(R.text||R.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new zs)}}var qo;(function(t){async function e(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}t.settled=e;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}t.withAsyncBody=n})(qo||(qo={}));class Ou{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new be("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new Tu;return this._unsatisfiedConsumers.push(e),e.p}}}const Fe=class Fe{constructor(e,n){this._onReturn=n,this._producerConsumer=new Ou,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(const s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(e){return new Fe(n=>{n.emitMany(e)})}static fromPromise(e){return new Fe(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new Fe(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new Fe(async n=>{await Promise.all(e.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static map(e,n){return new Fe(async r=>{for await(const i of e)r.emitOne(n(i))})}map(e){return Fe.map(this,e)}static coalesce(e){return Fe.filter(e,n=>!!n)}coalesce(){return Fe.coalesce(this)}static filter(e,n){return new Fe(async r=>{for await(const i of e)n(i)&&r.emitOne(i)})}filter(e){return Fe.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};Fe.EMPTY=Fe.fromArray([]);let jo=Fe;class Wu{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=Mt(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Mt(e),n=Mt(n),this.values[e]===n?!1:(this.values[e]=n,e-1=r.length)return!1;const s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Mt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let r=n;r<=e;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,a=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],a=s-this.values[i],e=s)n=i+1;else break;return new Vu(i,e-a)}}class Vu{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}}class $u{constructor(e,n,r,i){this._uri=e,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const n=e.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new re(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;ie.push(this._models[n])),e}$acceptNewModel(e){this._models[e.url]=new Bu(si.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class Bu extends $u{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{const s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:e}}const Rt=class Rt{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new Uu}dispose(){}async $ping(){return"pong"}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,n){this._workerTextModelSyncServer.$acceptModelChanged(e,n)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,n,r){const i=this._getModel(e);return i?qd.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,n){const r=this._getModel(e);return r?Au(r,n):[]}async $computeDiff(e,n,r,i){const s=this._getModel(e),a=this._getModel(n);return!s||!a?null:Rt.computeDiff(s,a,r,i)}static computeDiff(e,n,r,i){const s=i==="advanced"?Wo.getDefault():Wo.getLegacy(),a=e.getLinesContent(),o=n.getLinesContent(),l=s.computeDiff(a,o,r),c=l.changes.length>0?!1:this._modelsAreIdentical(e,n);function d(u){return u.map(m=>[m.original.startLineNumber,m.original.endLineNumberExclusive,m.modified.startLineNumber,m.modified.endLineNumberExclusive,m.innerChanges?.map(f=>[f.originalRange.startLineNumber,f.originalRange.startColumn,f.originalRange.endLineNumber,f.originalRange.endColumn,f.modifiedRange.startLineNumber,f.modifiedRange.startColumn,f.modifiedRange.endLineNumber,f.modifiedRange.endColumn])])}return{identical:c,quitEarly:l.hitTimeout,changes:d(l.changes),moves:l.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,d(u.changes)])}}static _modelsAreIdentical(e,n){const r=e.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=e.getLineContent(s),o=n.getLineContent(s);if(a!==o)return!1}return!0}async $computeMoreMinimalEdits(e,n,r){const i=this._getModel(e);if(!i)return n;const s=[];let a;n=n.slice(0).sort((l,c)=>{if(l.range&&c.range)return J.compareRangesUsingStarts(l.range,c.range);const d=l.range?0:1,u=c.range?0:1;return d-u});let o=0;for(let l=1;lRt._diffLimit){s.push({range:l,text:c});continue}const m=Qh(u,c,r),f=i.offsetAt(J.lift(l).getStartPosition());for(const g of m){const b=i.positionAt(f+g.originalStart),k=i.positionAt(f+g.originalStart+g.originalLength),F={text:c.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:b.lineNumber,startColumn:b.column,endLineNumber:k.lineNumber,endColumn:k.column}};i.getValueInRange(F.range)!==F.text&&s.push(F)}}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(e){const n=this._getModel(e);return n?nd(n):null}async $computeDefaultDocumentColors(e){const n=this._getModel(e);return n?Iu(n):null}async $textualSuggest(e,n,r,i){const s=new jn,a=new RegExp(r,i),o=new Set;e:for(const l of e){const c=this._getModel(l);if(c){for(const d of c.words(a))if(!(d===n||!isNaN(Number(d)))&&(o.add(d),o.size>Rt._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}}async $computeWordRanges(e,n,r,i){const s=this._getModel(e);if(!s)return Object.create(null);const a=new RegExp(r,i),o=Object.create(null);for(let l=n.startLineNumber;l{const i=Si.getChannel(r),a={host:new Proxy({},{get(o,l,c){if(l!=="then"){if(typeof l!="string")throw new Error("Not supported");return(...d)=>i.$fhr(l,d)}}}),getMirrorModels:()=>n.requestHandler.getModels()};return e=t(a),new xi(e)});return e}function ju(t){self.onmessage=e=>{qu(n=>t(n,e.data))}}var p;(function(t){t[t.Ident=0]="Ident",t[t.AtKeyword=1]="AtKeyword",t[t.String=2]="String",t[t.BadString=3]="BadString",t[t.UnquotedString=4]="UnquotedString",t[t.Hash=5]="Hash",t[t.Num=6]="Num",t[t.Percentage=7]="Percentage",t[t.Dimension=8]="Dimension",t[t.UnicodeRange=9]="UnicodeRange",t[t.CDO=10]="CDO",t[t.CDC=11]="CDC",t[t.Colon=12]="Colon",t[t.SemiColon=13]="SemiColon",t[t.CurlyL=14]="CurlyL",t[t.CurlyR=15]="CurlyR",t[t.ParenthesisL=16]="ParenthesisL",t[t.ParenthesisR=17]="ParenthesisR",t[t.BracketL=18]="BracketL",t[t.BracketR=19]="BracketR",t[t.Whitespace=20]="Whitespace",t[t.Includes=21]="Includes",t[t.Dashmatch=22]="Dashmatch",t[t.SubstringOperator=23]="SubstringOperator",t[t.PrefixOperator=24]="PrefixOperator",t[t.SuffixOperator=25]="SuffixOperator",t[t.Delim=26]="Delim",t[t.EMS=27]="EMS",t[t.EXS=28]="EXS",t[t.Length=29]="Length",t[t.Angle=30]="Angle",t[t.Time=31]="Time",t[t.Freq=32]="Freq",t[t.Exclamation=33]="Exclamation",t[t.Resolution=34]="Resolution",t[t.Comma=35]="Comma",t[t.Charset=36]="Charset",t[t.EscapedJavaScript=37]="EscapedJavaScript",t[t.BadEscapedJavaScript=38]="BadEscapedJavaScript",t[t.Comment=39]="Comment",t[t.SingleLineComment=40]="SingleLineComment",t[t.EOF=41]="EOF",t[t.ContainerQueryLength=42]="ContainerQueryLength",t[t.CustomToken=43]="CustomToken"})(p||(p={}));class Ho{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,n=this.position){return this.source.substring(e,n)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let n=0;for(;nn&&r===el?(e=!0,!1):(n=r===Ci,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,n;return this.stream.peekChar()===rl&&(e=1),n=this.stream.peekChar(e),n>=xn&&n<=Sn?(this.stream.advance(e+1),this.stream.advanceWhileChar(r=>r>=xn&&r<=Sn||e===0&&r===rl),!0):!1}_newline(e){const n=this.stream.peekChar();switch(n){case jt:case kn:case qt:return this.stream.advance(1),e.push(String.fromCharCode(n)),n===jt&&this.stream.advanceIfChar(qt)&&e.push(` -`),!0}return!1}_escape(e,n){let r=this.stream.peekChar();if(r===ki){this.stream.advance(1),r=this.stream.peekChar();let i=0;for(;i<6&&(r>=xn&&r<=Sn||r>=ar&&r<=Go||r>=or&&r<=Xo);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{const s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===_i||r===Ei?this.stream.advance(1):this._newline([]),!0}if(r!==jt&&r!==kn&&r!==qt)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1}_stringChar(e,n){const r=this.stream.peekChar();return r!==0&&r!==e&&r!==ki&&r!==jt&&r!==kn&&r!==qt?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1}_string(e){if(this.stream.peekChar()===nl||this.stream.peekChar()===tl){const n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),p.String):p.BadString}return null}_unquotedChar(e){const n=this.stream.peekChar();return n!==0&&n!==ki&&n!==nl&&n!==tl&&n!==Ko&&n!==Zo&&n!==_i&&n!==Ei&&n!==qt&&n!==kn&&n!==jt?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unquotedString(e){let n=!1;for(;this._unquotedChar(e)||this._escape(e);)n=!0;return n}_whitespace(){return this.stream.advanceWhileChar(n=>n===_i||n===Ei||n===qt||n===kn||n===jt)>0}_name(e){let n=!1;for(;this._identChar(e)||this._escape(e);)n=!0;return n}ident(e){const n=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1}_identFirstChar(e){const n=this.stream.peekChar();return n===Qo||n>=ar&&n<=Jo||n>=or&&n<=Yo||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_minus(e){const n=this.stream.peekChar();return n===St?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_identChar(e){const n=this.stream.peekChar();return n===Qo||n===St||n>=ar&&n<=Jo||n>=or&&n<=Yo||n>=xn&&n<=Sn||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(cp)){const e=r=>r>=xn&&r<=Sn||r>=ar&&r<=Go||r>=or&&r<=Xo,n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(r=>r===lp);if(n>=1&&n<=6)if(this.stream.advanceIfChar(St)){const r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1}}function pe(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function hp(t,e,n=4){let r=Math.abs(t.length-e.length);if(r>n)return 0;let i=[],s=[],a,o;for(a=0;a0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}var v;(function(t){t[t.Undefined=0]="Undefined",t[t.Identifier=1]="Identifier",t[t.Stylesheet=2]="Stylesheet",t[t.Ruleset=3]="Ruleset",t[t.Selector=4]="Selector",t[t.SimpleSelector=5]="SimpleSelector",t[t.SelectorInterpolation=6]="SelectorInterpolation",t[t.SelectorCombinator=7]="SelectorCombinator",t[t.SelectorCombinatorParent=8]="SelectorCombinatorParent",t[t.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",t[t.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",t[t.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",t[t.Page=12]="Page",t[t.PageBoxMarginBox=13]="PageBoxMarginBox",t[t.ClassSelector=14]="ClassSelector",t[t.IdentifierSelector=15]="IdentifierSelector",t[t.ElementNameSelector=16]="ElementNameSelector",t[t.PseudoSelector=17]="PseudoSelector",t[t.AttributeSelector=18]="AttributeSelector",t[t.Declaration=19]="Declaration",t[t.Declarations=20]="Declarations",t[t.Property=21]="Property",t[t.Expression=22]="Expression",t[t.BinaryExpression=23]="BinaryExpression",t[t.Term=24]="Term",t[t.Operator=25]="Operator",t[t.Value=26]="Value",t[t.StringLiteral=27]="StringLiteral",t[t.URILiteral=28]="URILiteral",t[t.EscapedValue=29]="EscapedValue",t[t.Function=30]="Function",t[t.NumericValue=31]="NumericValue",t[t.HexColorValue=32]="HexColorValue",t[t.RatioValue=33]="RatioValue",t[t.MixinDeclaration=34]="MixinDeclaration",t[t.MixinReference=35]="MixinReference",t[t.VariableName=36]="VariableName",t[t.VariableDeclaration=37]="VariableDeclaration",t[t.Prio=38]="Prio",t[t.Interpolation=39]="Interpolation",t[t.NestedProperties=40]="NestedProperties",t[t.ExtendsReference=41]="ExtendsReference",t[t.SelectorPlaceholder=42]="SelectorPlaceholder",t[t.Debug=43]="Debug",t[t.If=44]="If",t[t.Else=45]="Else",t[t.For=46]="For",t[t.Each=47]="Each",t[t.While=48]="While",t[t.MixinContentReference=49]="MixinContentReference",t[t.MixinContentDeclaration=50]="MixinContentDeclaration",t[t.Media=51]="Media",t[t.Keyframe=52]="Keyframe",t[t.FontFace=53]="FontFace",t[t.Import=54]="Import",t[t.Namespace=55]="Namespace",t[t.Invocation=56]="Invocation",t[t.FunctionDeclaration=57]="FunctionDeclaration",t[t.ReturnStatement=58]="ReturnStatement",t[t.MediaQuery=59]="MediaQuery",t[t.MediaCondition=60]="MediaCondition",t[t.MediaFeature=61]="MediaFeature",t[t.FunctionParameter=62]="FunctionParameter",t[t.FunctionArgument=63]="FunctionArgument",t[t.KeyframeSelector=64]="KeyframeSelector",t[t.ViewPort=65]="ViewPort",t[t.Document=66]="Document",t[t.AtApplyRule=67]="AtApplyRule",t[t.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",t[t.CustomPropertySet=69]="CustomPropertySet",t[t.ListEntry=70]="ListEntry",t[t.Supports=71]="Supports",t[t.SupportsCondition=72]="SupportsCondition",t[t.NamespacePrefix=73]="NamespacePrefix",t[t.GridLine=74]="GridLine",t[t.Plugin=75]="Plugin",t[t.UnknownAtRule=76]="UnknownAtRule",t[t.Use=77]="Use",t[t.ModuleConfiguration=78]="ModuleConfiguration",t[t.Forward=79]="Forward",t[t.ForwardVisibility=80]="ForwardVisibility",t[t.Module=81]="Module",t[t.UnicodeRange=82]="UnicodeRange",t[t.Layer=83]="Layer",t[t.LayerNameList=84]="LayerNameList",t[t.LayerName=85]="LayerName",t[t.PropertyAtRule=86]="PropertyAtRule",t[t.Container=87]="Container"})(v||(v={}));var Q;(function(t){t[t.Mixin=0]="Mixin",t[t.Rule=1]="Rule",t[t.Variable=2]="Variable",t[t.Function=3]="Function",t[t.Keyframe=4]="Keyframe",t[t.Unknown=5]="Unknown",t[t.Module=6]="Module",t[t.Forward=7]="Forward",t[t.ForwardVisibility=8]="ForwardVisibility",t[t.Property=9]="Property"})(Q||(Q={}));function Fi(t,e){let n=null;return!t||et.end?null:(t.accept(r=>r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(n?r.length<=n.length&&(n=r):n=r,!0):!1),n)}function Ri(t,e){let n=Fi(t,e);const r=[];for(;n;)r.unshift(n),n=n.parent;return r}function up(t){const e=t.findParent(v.Declaration),n=e&&e.getValue();return n&&n.encloses(t)?e:null}class W{get end(){return this.offset+this.length}constructor(e=-1,n=-1,r){this.parent=null,this.offset=e,this.length=n,r&&(this.nodeType=r)}set type(e){this.nodeType=e}get type(){return this.nodeType||v.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const n of this.children)n.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,n=-1){if(e.parent&&e.parent.children){const i=e.parent.children.indexOf(e);i>=0&&e.parent.children.splice(i,1)}e.parent=this;let r=this.children;return r||(r=this.children=[]),n!==-1?r.splice(n,0,e):r.push(e),e}attachTo(e,n=-1){return e&&e.adoptChild(this,n),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(n=>n.getRule()===e)}isErroneous(e=!1){return this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(n=>n.isErroneous(!0))}setNode(e,n,r=-1){return n?(n.attachTo(this,r),this[e]=n,!0):!1}addChild(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1}updateOffsetAndLength(e){(e.offsetthis.end||this.length===-1)&&(this.length=n-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e=0;r--)if(n=this.children[r],n.offset<=e)return n}return null}findChildAtOffset(e,n){const r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?n&&r.findChildAtOffset(e,!0)||r:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof ve;)e=e.parent;return e}findParent(e){let n=this;for(;n&&n.type!==e;)n=n.parent;return n}findAParent(...e){let n=this;for(;n&&!e.some(r=>n.type===r);)n=n.parent;return n}setData(e,n){this.options||(this.options={}),this.options[e]=n}getData(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]}}class ve extends W{constructor(e,n=-1){super(-1,-1),this.attachTo(e,n),this.offset=-1,this.length=-1}}class pp extends W{constructor(e,n){super(e,n)}get type(){return v.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}}class ze extends W{constructor(e,n){super(e,n),this.isCustomProperty=!1}get type(){return v.Identifier}containsInterpolation(){return this.hasChildren()}}class mp extends W{constructor(e,n){super(e,n)}get type(){return v.Stylesheet}}class Ni extends W{constructor(e,n){super(e,n)}get type(){return v.Declarations}}class oe extends W{constructor(e,n){super(e,n)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class Ct extends oe{constructor(e,n){super(e,n)}get type(){return v.Ruleset}getSelectors(){return this.selectors||(this.selectors=new ve(this)),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(v.Declarations)!==null}}class En extends W{constructor(e,n){super(e,n)}get type(){return v.Selector}}class Ht extends W{constructor(e,n){super(e,n)}get type(){return v.SimpleSelector}}class Ii extends W{constructor(e,n){super(e,n)}}class fp extends oe{constructor(e,n){super(e,n)}get type(){return v.CustomPropertySet}}class Pe extends Ii{constructor(e,n){super(e,n),this.property=null}get type(){return v.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const e=this.property?this.property.getName():"unknown";if(this.parent instanceof Ni&&this.parent.getParent()instanceof cl){const n=this.parent.getParent().getParent();if(n instanceof Pe)return n.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&e.charAt(0)==="-"){const n=e.indexOf("-",1);if(n!==-1)return e.substring(n+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}}class gp extends Pe{constructor(e,n){super(e,n)}get type(){return v.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}}class Di extends W{constructor(e,n){super(e,n)}get type(){return v.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return dp(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class bp extends W{constructor(e,n){super(e,n)}get type(){return v.Invocation}getArguments(){return this.arguments||(this.arguments=new ve(this)),this.arguments}}class Fn extends bp{constructor(e,n){super(e,n)}get type(){return v.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class lr extends W{constructor(e,n){super(e,n)}get type(){return v.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}}class Gt extends W{constructor(e,n){super(e,n)}get type(){return v.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class wp extends oe{constructor(e,n){super(e,n)}get type(){return v.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}}class vp extends oe{constructor(e,n){super(e,n)}get type(){return v.For}setVariable(e){return this.setNode("variable",e,0)}}class yp extends oe{constructor(e,n){super(e,n)}get type(){return v.Each}getVariables(){return this.variables||(this.variables=new ve(this)),this.variables}}class xp extends oe{constructor(e,n){super(e,n)}get type(){return v.While}}class Sp extends oe{constructor(e,n){super(e,n)}get type(){return v.Else}}class cr extends oe{constructor(e,n){super(e,n)}get type(){return v.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new ve(this)),this.parameters}}class Cp extends oe{constructor(e,n){super(e,n)}get type(){return v.ViewPort}}class ll extends oe{constructor(e,n){super(e,n)}get type(){return v.FontFace}}class cl extends oe{constructor(e,n){super(e,n)}get type(){return v.NestedProperties}}class hl extends oe{constructor(e,n){super(e,n)}get type(){return v.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class dl extends oe{constructor(e,n){super(e,n)}get type(){return v.KeyframeSelector}}class Li extends W{constructor(e,n){super(e,n)}get type(){return v.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}}class kp extends W{get type(){return v.Use}getParameters(){return this.parameters||(this.parameters=new ve(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class _p extends W{get type(){return v.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class Ep extends W{get type(){return v.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new ve(this)),this.members}getParameters(){return this.parameters||(this.parameters=new ve(this)),this.parameters}}class Fp extends W{get type(){return v.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class Rp extends W{constructor(e,n){super(e,n)}get type(){return v.Namespace}}class Ai extends oe{constructor(e,n){super(e,n)}get type(){return v.Media}}class Mi extends oe{constructor(e,n){super(e,n)}get type(){return v.Supports}}class Np extends oe{constructor(e,n){super(e,n)}get type(){return v.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}}class Ip extends oe{constructor(e,n){super(e,n)}get type(){return v.PropertyAtRule}setName(e){return e?(e.attachTo(this),this.name=e,!0):!1}getName(){return this.name}}class Dp extends oe{constructor(e,n){super(e,n)}get type(){return v.Document}}class Lp extends oe{constructor(e,n){super(e,n)}get type(){return v.Container}}class ul extends W{constructor(e,n){super(e,n)}}class pl extends W{constructor(e,n){super(e,n)}get type(){return v.MediaQuery}}class Ap extends W{constructor(e,n){super(e,n)}get type(){return v.MediaCondition}}class Mp extends W{constructor(e,n){super(e,n)}get type(){return v.MediaFeature}}class Rn extends W{constructor(e,n){super(e,n)}get type(){return v.SupportsCondition}}class zp extends oe{constructor(e,n){super(e,n)}get type(){return v.Page}}class Pp extends oe{constructor(e,n){super(e,n)}get type(){return v.PageBoxMarginBox}}class ml extends W{constructor(e,n){super(e,n)}get type(){return v.Expression}}class zi extends W{constructor(e,n){super(e,n)}get type(){return v.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}}class Tp extends W{constructor(e,n){super(e,n)}get type(){return v.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}}class Op extends W{constructor(e,n){super(e,n)}get type(){return v.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}}class Pi extends W{constructor(e,n){super(e,n)}get type(){return v.HexColorValue}}class Wp extends W{constructor(e,n){super(e,n)}get type(){return v.RatioValue}}const Vp=46,$p=48,Up=57;class Ti extends W{constructor(e,n){super(e,n)}get type(){return v.NumericValue}getValue(){const e=this.getText();let n=0,r;for(let i=0,s=e.length;i0&&(n+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),i=e.args??{};return Xp(r,i)}var Jp=/{([^}]+)}/g;function Xp(t,e){return Object.keys(e).length===0?t:t.replace(Jp,(n,r)=>e[r]??n)}class te{constructor(e,n){this.id=e,this.message=n}}const S={NumberExpected:new te("css-numberexpected",w("number expected")),ConditionExpected:new te("css-conditionexpected",w("condition expected")),RuleOrSelectorExpected:new te("css-ruleorselectorexpected",w("at-rule or selector expected")),DotExpected:new te("css-dotexpected",w("dot expected")),ColonExpected:new te("css-colonexpected",w("colon expected")),SemiColonExpected:new te("css-semicolonexpected",w("semi-colon expected")),TermExpected:new te("css-termexpected",w("term expected")),ExpressionExpected:new te("css-expressionexpected",w("expression expected")),OperatorExpected:new te("css-operatorexpected",w("operator expected")),IdentifierExpected:new te("css-identifierexpected",w("identifier expected")),PercentageExpected:new te("css-percentageexpected",w("percentage expected")),URIOrStringExpected:new te("css-uriorstringexpected",w("uri or string expected")),URIExpected:new te("css-uriexpected",w("URI expected")),VariableNameExpected:new te("css-varnameexpected",w("variable name expected")),VariableValueExpected:new te("css-varvalueexpected",w("variable value expected")),PropertyValueExpected:new te("css-propertyvalueexpected",w("property value expected")),LeftCurlyExpected:new te("css-lcurlyexpected",w("{ expected")),RightCurlyExpected:new te("css-rcurlyexpected",w("} expected")),LeftSquareBracketExpected:new te("css-rbracketexpected",w("[ expected")),RightSquareBracketExpected:new te("css-lbracketexpected",w("] expected")),LeftParenthesisExpected:new te("css-lparentexpected",w("( expected")),RightParenthesisExpected:new te("css-rparentexpected",w(") expected")),CommaExpected:new te("css-commaexpected",w("comma expected")),PageDirectiveOrDeclarationExpected:new te("css-pagedirordeclexpected",w("page directive or declaraton expected")),UnknownAtRule:new te("css-unknownatrule",w("at-rule unknown")),UnknownKeyword:new te("css-unknownkeyword",w("unknown keyword")),SelectorExpected:new te("css-selectorexpected",w("selector expected")),StringLiteralExpected:new te("css-stringliteralexpected",w("string literal expected")),WhitespaceExpected:new te("css-whitespaceexpected",w("whitespace expected")),MediaQueryExpected:new te("css-mediaqueryexpected",w("media query expected")),IdentifierOrWildcardExpected:new te("css-idorwildcardexpected",w("identifier or wildcard expected")),WildcardExpected:new te("css-wildcardexpected",w("wildcard expected")),IdentifierOrVariableExpected:new te("css-idorvarexpected",w("identifier or variable expected"))};var wl;(function(t){function e(n){return typeof n=="string"}t.is=e})(wl||(wl={}));var $i;(function(t){function e(n){return typeof n=="string"}t.is=e})($i||($i={}));var vl;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(vl||(vl={}));var ur;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(ur||(ur={}));var ye;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=ur.MAX_VALUE),i===Number.MAX_VALUE&&(i=ur.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}t.is=n})(ye||(ye={}));var K;(function(t){function e(r,i,s,a){if(C.uinteger(r)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(a))return{start:ye.create(r,i),end:ye.create(s,a)};if(ye.is(r)&&ye.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&ye.is(i.start)&&ye.is(i.end)}t.is=n})(K||(K={}));var Dn;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&K.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}t.is=n})(Dn||(Dn={}));var yl;(function(t){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&K.is(i.targetRange)&&C.string(i.targetUri)&&K.is(i.targetSelectionRange)&&(K.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}t.is=n})(yl||(yl={}));var Ui;(function(t){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}t.is=n})(Ui||(Ui={}));var xl;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&K.is(i.range)&&Ui.is(i.color)}t.is=n})(xl||(xl={}));var Sl;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.undefined(i.textEdit)||j.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,j.is))}t.is=n})(Sl||(Sl={}));var Cl;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Cl||(Cl={}));var kl;(function(t){function e(r,i,s,a,o,l){const c={startLine:r,endLine:i};return C.defined(s)&&(c.startCharacter=s),C.defined(a)&&(c.endCharacter=a),C.defined(o)&&(c.kind=o),C.defined(l)&&(c.collapsedText=l),c}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}t.is=n})(kl||(kl={}));var Bi;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&Dn.is(i.location)&&C.string(i.message)}t.is=n})(Bi||(Bi={}));var pr;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(pr||(pr={}));var _l;(function(t){t.Unnecessary=1,t.Deprecated=2})(_l||(_l={}));var El;(function(t){function e(n){const r=n;return C.objectLiteral(r)&&C.string(r.href)}t.is=e})(El||(El={}));var mr;(function(t){function e(r,i,s,a,o,l){let c={range:r,message:i};return C.defined(s)&&(c.severity=s),C.defined(a)&&(c.code=a),C.defined(o)&&(c.source=o),C.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(r){var i;let s=r;return C.defined(s)&&K.is(s.range)&&C.string(s.message)&&(C.number(s.severity)||C.undefined(s.severity))&&(C.integer(s.code)||C.string(s.code)||C.undefined(s.code))&&(C.undefined(s.codeDescription)||C.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(C.string(s.source)||C.undefined(s.source))&&(C.undefined(s.relatedInformation)||C.typedArray(s.relatedInformation,Bi.is))}t.is=n})(mr||(mr={}));var kt;(function(t){function e(r,i,...s){let a={title:r,command:i};return C.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.title)&&C.string(i.command)}t.is=n})(kt||(kt={}));var j;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){const a=s;return C.objectLiteral(a)&&C.string(a.newText)&&K.is(a.range)}t.is=i})(j||(j={}));var qi;(function(t){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}t.is=n})(qi||(qi={}));var Jt;(function(t){function e(n){const r=n;return C.string(r)}t.is=e})(Jt||(Jt={}));var Fl;(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){const a=s;return j.is(a)&&(qi.is(a.annotationId)||Jt.is(a.annotationId))}t.is=i})(Fl||(Fl={}));var fr;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&Yi.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(fr||(fr={}));var ji;(function(t){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Jt.is(i.annotationId))}t.is=n})(ji||(ji={}));var Hi;(function(t){function e(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Jt.is(i.annotationId))}t.is=n})(Hi||(Hi={}));var Gi;(function(t){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Jt.is(i.annotationId))}t.is=n})(Gi||(Gi={}));var Ji;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>C.string(i.kind)?ji.is(i)||Hi.is(i)||Gi.is(i):fr.is(i)))}t.is=e})(Ji||(Ji={}));var Rl;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)}t.is=n})(Rl||(Rl={}));var Xi;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}t.is=n})(Xi||(Xi={}));var Yi;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}t.is=n})(Yi||(Yi={}));var Nl;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}t.is=n})(Nl||(Nl={}));var He;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(He||(He={}));var Ln;(function(t){function e(n){const r=n;return C.objectLiteral(n)&&He.is(r.kind)&&C.string(r.value)}t.is=e})(Ln||(Ln={}));var q;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(q||(q={}));var Ie;(function(t){t.PlainText=1,t.Snippet=2})(Ie||(Ie={}));var _t;(function(t){t.Deprecated=1})(_t||(_t={}));var Il;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){const i=r;return i&&C.string(i.newText)&&K.is(i.insert)&&K.is(i.replace)}t.is=n})(Il||(Il={}));var Dl;(function(t){t.asIs=1,t.adjustIndentation=2})(Dl||(Dl={}));var Ll;(function(t){function e(n){const r=n;return r&&(C.string(r.detail)||r.detail===void 0)&&(C.string(r.description)||r.description===void 0)}t.is=e})(Ll||(Ll={}));var Al;(function(t){function e(n){return{label:n}}t.create=e})(Al||(Al={}));var Ml;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(Ml||(Ml={}));var gr;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}t.is=n})(gr||(gr={}));var zl;(function(t){function e(n){let r=n;return!!r&&C.objectLiteral(r)&&(Ln.is(r.contents)||gr.is(r.contents)||C.typedArray(r.contents,gr.is))&&(n.range===void 0||K.is(n.range))}t.is=e})(zl||(zl={}));var Pl;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(Pl||(Pl={}));var Tl;(function(t){function e(n,r,...i){let s={label:n};return C.defined(r)&&(s.documentation=r),C.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(Tl||(Tl={}));var Xt;(function(t){t.Text=1,t.Read=2,t.Write=3})(Xt||(Xt={}));var Ol;(function(t){function e(n,r){let i={range:n};return C.number(r)&&(i.kind=r),i}t.create=e})(Ol||(Ol={}));var tt;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(tt||(tt={}));var Wl;(function(t){t.Deprecated=1})(Wl||(Wl={}));var Vl;(function(t){function e(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}t.create=e})(Vl||(Vl={}));var $l;(function(t){function e(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}t.create=e})($l||($l={}));var Ul;(function(t){function e(r,i,s,a,o,l){let c={name:r,detail:i,kind:s,range:a,selectionRange:o};return l!==void 0&&(c.children=l),c}t.create=e;function n(r){let i=r;return i&&C.string(i.name)&&C.number(i.kind)&&K.is(i.range)&&K.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(Ul||(Ul={}));var Qi;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Qi||(Qi={}));var br;(function(t){t.Invoked=1,t.Automatic=2})(br||(br={}));var Bl;(function(t){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}t.create=e;function n(r){let i=r;return C.defined(i)&&C.typedArray(i.diagnostics,mr.is)&&(i.only===void 0||C.typedArray(i.only,C.string))&&(i.triggerKind===void 0||i.triggerKind===br.Invoked||i.triggerKind===br.Automatic)}t.is=n})(Bl||(Bl={}));var Ki;(function(t){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):kt.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}t.create=e;function n(r){let i=r;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,mr.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||kt.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||Ji.is(i.edit))}t.is=n})(Ki||(Ki={}));var ql;(function(t){function e(r,i){let s={range:r};return C.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return C.defined(i)&&K.is(i.range)&&(C.undefined(i.command)||kt.is(i.command))}t.is=n})(ql||(ql={}));var jl;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}t.is=n})(jl||(jl={}));var Hl;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return C.defined(i)&&K.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}t.is=n})(Hl||(Hl={}));var wr;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&K.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(wr||(wr={}));var Gl;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(Gl||(Gl={}));var Jl;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(Jl||(Jl={}));var Xl;(function(t){function e(n){const r=n;return C.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(Xl||(Xl={}));var Yl;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&K.is(i.range)&&C.string(i.text)}t.is=n})(Yl||(Yl={}));var Ql;(function(t){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}t.create=e;function n(r){const i=r;return i!=null&&K.is(i.range)&&C.boolean(i.caseSensitiveLookup)&&(C.string(i.variableName)||i.variableName===void 0)}t.is=n})(Ql||(Ql={}));var Kl;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&K.is(i.range)&&(C.string(i.expression)||i.expression===void 0)}t.is=n})(Kl||(Kl={}));var Zl;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return C.defined(i)&&K.is(r.stoppedLocation)}t.is=n})(Zl||(Zl={}));var Zi;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(Zi||(Zi={}));var es;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&(i.tooltip===void 0||C.string(i.tooltip)||Ln.is(i.tooltip))&&(i.location===void 0||Dn.is(i.location))&&(i.command===void 0||kt.is(i.command))}t.is=n})(es||(es={}));var ec;(function(t){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&ye.is(i.position)&&(C.string(i.label)||C.typedArray(i.label,es.is))&&(i.kind===void 0||Zi.is(i.kind))&&i.textEdits===void 0||C.typedArray(i.textEdits,j.is)&&(i.tooltip===void 0||C.string(i.tooltip)||Ln.is(i.tooltip))&&(i.paddingLeft===void 0||C.boolean(i.paddingLeft))&&(i.paddingRight===void 0||C.boolean(i.paddingRight))}t.is=n})(ec||(ec={}));var tc;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(tc||(tc={}));var nc;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(nc||(nc={}));var rc;(function(t){function e(n){return{items:n}}t.create=e})(rc||(rc={}));var ic;(function(t){t.Invoked=0,t.Automatic=1})(ic||(ic={}));var sc;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(sc||(sc={}));var ac;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(ac||(ac={}));var oc;(function(t){function e(n){const r=n;return C.objectLiteral(r)&&$i.is(r.uri)&&C.string(r.name)}t.is=e})(oc||(oc={}));var lc;(function(t){function e(s,a,o,l){return new Yp(s,a,o,l)}t.create=e;function n(s){let a=s;return!!(C.defined(a)&&C.string(a.uri)&&(C.undefined(a.languageId)||C.string(a.languageId))&&C.uinteger(a.lineCount)&&C.func(a.getText)&&C.func(a.positionAt)&&C.func(a.offsetAt))}t.is=n;function r(s,a){let o=s.getText(),l=i(a,(d,u)=>{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),c=o.length;for(let d=l.length-1;d>=0;d--){let u=l[d],m=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)o=o.substring(0,m)+u.newText+o.substring(f,o.length);else throw new Error("Overlapping edit");c=m}return o}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,l=s.slice(0,o),c=s.slice(o);i(l,a),i(c,a);let d=0,u=0,m=0;for(;d{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new Os)}}var Go;(function(t){async function e(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}t.settled=e;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}t.withAsyncBody=n})(Go||(Go={}));class Wu{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new be("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new Ou;return this._unsatisfiedConsumers.push(e),e.p}}}const Fe=class Fe{constructor(e,n){this._onReturn=n,this._producerConsumer=new Wu,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(const s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(e){return new Fe(n=>{n.emitMany(e)})}static fromPromise(e){return new Fe(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new Fe(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new Fe(async n=>{await Promise.all(e.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static map(e,n){return new Fe(async r=>{for await(const i of e)r.emitOne(n(i))})}map(e){return Fe.map(this,e)}static coalesce(e){return Fe.filter(e,n=>!!n)}coalesce(){return Fe.coalesce(this)}static filter(e,n){return new Fe(async r=>{for await(const i of e)n(i)&&r.emitOne(i)})}filter(e){return Fe.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};Fe.EMPTY=Fe.fromArray([]);let Jo=Fe;class Vu{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=Ot(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Ot(e),n=Ot(n),this.values[e]===n?!1:(this.values[e]=n,e-1=r.length)return!1;const s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Ot(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let r=n;r<=e;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,a=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],a=s-this.values[i],e=s)n=i+1;else break;return new $u(i,e-a)}}class $u{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}}class Uu{constructor(e,n,r,i){this._uri=e,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const n=e.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new re(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;ie.push(this._models[n])),e}$acceptNewModel(e){this._models[e.url]=new qu(li.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class qu extends Uu{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{const s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:e}}const Lt=class Lt{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new Bu}dispose(){}async $ping(){return"pong"}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,n){this._workerTextModelSyncServer.$acceptModelChanged(e,n)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,n,r){const i=this._getModel(e);return i?jd.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,n){const r=this._getModel(e);return r?Mu(r,n):[]}async $computeDiff(e,n,r,i){const s=this._getModel(e),a=this._getModel(n);return!s||!a?null:Lt.computeDiff(s,a,r,i)}static computeDiff(e,n,r,i){const s=i==="advanced"?Uo.getDefault():Uo.getLegacy(),a=e.getLinesContent(),o=n.getLinesContent(),l=s.computeDiff(a,o,r),c=l.changes.length>0?!1:this._modelsAreIdentical(e,n);function d(u){return u.map(m=>[m.original.startLineNumber,m.original.endLineNumberExclusive,m.modified.startLineNumber,m.modified.endLineNumberExclusive,m.innerChanges?.map(f=>[f.originalRange.startLineNumber,f.originalRange.startColumn,f.originalRange.endLineNumber,f.originalRange.endColumn,f.modifiedRange.startLineNumber,f.modifiedRange.startColumn,f.modifiedRange.endLineNumber,f.modifiedRange.endColumn])])}return{identical:c,quitEarly:l.hitTimeout,changes:d(l.changes),moves:l.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,d(u.changes)])}}static _modelsAreIdentical(e,n){const r=e.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=e.getLineContent(s),o=n.getLineContent(s);if(a!==o)return!1}return!0}async $computeMoreMinimalEdits(e,n,r){const i=this._getModel(e);if(!i)return n;const s=[];let a;n=n.slice(0).sort((l,c)=>{if(l.range&&c.range)return J.compareRangesUsingStarts(l.range,c.range);const d=l.range?0:1,u=c.range?0:1;return d-u});let o=0;for(let l=1;lLt._diffLimit){s.push({range:l,text:c});continue}const m=Kh(u,c,r),f=i.offsetAt(J.lift(l).getStartPosition());for(const g of m){const b=i.positionAt(f+g.originalStart),_=i.positionAt(f+g.originalStart+g.originalLength),F={text:c.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:b.lineNumber,startColumn:b.column,endLineNumber:_.lineNumber,endColumn:_.column}};i.getValueInRange(F.range)!==F.text&&s.push(F)}}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(e){const n=this._getModel(e);return n?rd(n):null}async $computeDefaultDocumentColors(e){const n=this._getModel(e);return n?Du(n):null}async $textualSuggest(e,n,r,i){const s=new Jn,a=new RegExp(r,i),o=new Set;e:for(const l of e){const c=this._getModel(l);if(c){for(const d of c.words(a))if(!(d===n||!isNaN(Number(d)))&&(o.add(d),o.size>Lt._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}}async $computeWordRanges(e,n,r,i){const s=this._getModel(e);if(!s)return Object.create(null);const a=new RegExp(r,i),o=Object.create(null);for(let l=n.startLineNumber;l{const i=_i.getChannel(r),a={host:new Proxy({},{get(o,l,c){if(l!=="then"){if(typeof l!="string")throw new Error("Not supported");return(...d)=>i.$fhr(l,d)}}}),getMirrorModels:()=>n.requestHandler.getModels()};return e=t(a),new ki(e)});return e}function Hu(t){self.onmessage=e=>{ju(n=>t(n,e.data))}}var p;(function(t){t[t.Ident=0]="Ident",t[t.AtKeyword=1]="AtKeyword",t[t.String=2]="String",t[t.BadString=3]="BadString",t[t.UnquotedString=4]="UnquotedString",t[t.Hash=5]="Hash",t[t.Num=6]="Num",t[t.Percentage=7]="Percentage",t[t.Dimension=8]="Dimension",t[t.UnicodeRange=9]="UnicodeRange",t[t.CDO=10]="CDO",t[t.CDC=11]="CDC",t[t.Colon=12]="Colon",t[t.SemiColon=13]="SemiColon",t[t.CurlyL=14]="CurlyL",t[t.CurlyR=15]="CurlyR",t[t.ParenthesisL=16]="ParenthesisL",t[t.ParenthesisR=17]="ParenthesisR",t[t.BracketL=18]="BracketL",t[t.BracketR=19]="BracketR",t[t.Whitespace=20]="Whitespace",t[t.Includes=21]="Includes",t[t.Dashmatch=22]="Dashmatch",t[t.SubstringOperator=23]="SubstringOperator",t[t.PrefixOperator=24]="PrefixOperator",t[t.SuffixOperator=25]="SuffixOperator",t[t.Delim=26]="Delim",t[t.EMS=27]="EMS",t[t.EXS=28]="EXS",t[t.Length=29]="Length",t[t.Angle=30]="Angle",t[t.Time=31]="Time",t[t.Freq=32]="Freq",t[t.Exclamation=33]="Exclamation",t[t.Resolution=34]="Resolution",t[t.Comma=35]="Comma",t[t.Charset=36]="Charset",t[t.EscapedJavaScript=37]="EscapedJavaScript",t[t.BadEscapedJavaScript=38]="BadEscapedJavaScript",t[t.Comment=39]="Comment",t[t.SingleLineComment=40]="SingleLineComment",t[t.EOF=41]="EOF",t[t.ContainerQueryLength=42]="ContainerQueryLength",t[t.CustomToken=43]="CustomToken"})(p||(p={}));class Xo{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,n=this.position){return this.source.substring(e,n)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let n=0;for(;nn&&r===rl?(e=!0,!1):(n=r===Ei,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,n;return this.stream.peekChar()===al&&(e=1),n=this.stream.peekChar(e),n>=_n&&n<=En?(this.stream.advance(e+1),this.stream.advanceWhileChar(r=>r>=_n&&r<=En||e===0&&r===al),!0):!1}_newline(e){const n=this.stream.peekChar();switch(n){case Xt:case Rn:case Jt:return this.stream.advance(1),e.push(String.fromCharCode(n)),n===Xt&&this.stream.advanceIfChar(Jt)&&e.push(` +`),!0}return!1}_escape(e,n){let r=this.stream.peekChar();if(r===Fi){this.stream.advance(1),r=this.stream.peekChar();let i=0;for(;i<6&&(r>=_n&&r<=En||r>=cr&&r<=Yo||r>=hr&&r<=Ko);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{const s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===Ri||r===Ni?this.stream.advance(1):this._newline([]),!0}if(r!==Xt&&r!==Rn&&r!==Jt)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1}_stringChar(e,n){const r=this.stream.peekChar();return r!==0&&r!==e&&r!==Fi&&r!==Xt&&r!==Rn&&r!==Jt?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1}_string(e){if(this.stream.peekChar()===sl||this.stream.peekChar()===il){const n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),p.String):p.BadString}return null}_unquotedChar(e){const n=this.stream.peekChar();return n!==0&&n!==Fi&&n!==sl&&n!==il&&n!==tl&&n!==nl&&n!==Ri&&n!==Ni&&n!==Jt&&n!==Rn&&n!==Xt?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unquotedString(e){let n=!1;for(;this._unquotedChar(e)||this._escape(e);)n=!0;return n}_whitespace(){return this.stream.advanceWhileChar(n=>n===Ri||n===Ni||n===Jt||n===Rn||n===Xt)>0}_name(e){let n=!1;for(;this._identChar(e)||this._escape(e);)n=!0;return n}ident(e){const n=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1}_identFirstChar(e){const n=this.stream.peekChar();return n===el||n>=cr&&n<=Qo||n>=hr&&n<=Zo||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_minus(e){const n=this.stream.peekChar();return n===Et?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_identChar(e){const n=this.stream.peekChar();return n===el||n===Et||n>=cr&&n<=Qo||n>=hr&&n<=Zo||n>=_n&&n<=En||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(hp)){const e=r=>r>=_n&&r<=En||r>=cr&&r<=Yo||r>=hr&&r<=Ko,n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(r=>r===cp);if(n>=1&&n<=6)if(this.stream.advanceIfChar(Et)){const r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1}}function pe(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function dp(t,e,n=4){let r=Math.abs(t.length-e.length);if(r>n)return 0;let i=[],s=[],a,o;for(a=0;a0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}var v;(function(t){t[t.Undefined=0]="Undefined",t[t.Identifier=1]="Identifier",t[t.Stylesheet=2]="Stylesheet",t[t.Ruleset=3]="Ruleset",t[t.Selector=4]="Selector",t[t.SimpleSelector=5]="SimpleSelector",t[t.SelectorInterpolation=6]="SelectorInterpolation",t[t.SelectorCombinator=7]="SelectorCombinator",t[t.SelectorCombinatorParent=8]="SelectorCombinatorParent",t[t.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",t[t.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",t[t.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",t[t.Page=12]="Page",t[t.PageBoxMarginBox=13]="PageBoxMarginBox",t[t.ClassSelector=14]="ClassSelector",t[t.IdentifierSelector=15]="IdentifierSelector",t[t.ElementNameSelector=16]="ElementNameSelector",t[t.PseudoSelector=17]="PseudoSelector",t[t.AttributeSelector=18]="AttributeSelector",t[t.Declaration=19]="Declaration",t[t.Declarations=20]="Declarations",t[t.Property=21]="Property",t[t.Expression=22]="Expression",t[t.BinaryExpression=23]="BinaryExpression",t[t.Term=24]="Term",t[t.Operator=25]="Operator",t[t.Value=26]="Value",t[t.StringLiteral=27]="StringLiteral",t[t.URILiteral=28]="URILiteral",t[t.EscapedValue=29]="EscapedValue",t[t.Function=30]="Function",t[t.NumericValue=31]="NumericValue",t[t.HexColorValue=32]="HexColorValue",t[t.RatioValue=33]="RatioValue",t[t.MixinDeclaration=34]="MixinDeclaration",t[t.MixinReference=35]="MixinReference",t[t.VariableName=36]="VariableName",t[t.VariableDeclaration=37]="VariableDeclaration",t[t.Prio=38]="Prio",t[t.Interpolation=39]="Interpolation",t[t.NestedProperties=40]="NestedProperties",t[t.ExtendsReference=41]="ExtendsReference",t[t.SelectorPlaceholder=42]="SelectorPlaceholder",t[t.Debug=43]="Debug",t[t.If=44]="If",t[t.Else=45]="Else",t[t.For=46]="For",t[t.Each=47]="Each",t[t.While=48]="While",t[t.MixinContentReference=49]="MixinContentReference",t[t.MixinContentDeclaration=50]="MixinContentDeclaration",t[t.Media=51]="Media",t[t.Keyframe=52]="Keyframe",t[t.FontFace=53]="FontFace",t[t.Import=54]="Import",t[t.Namespace=55]="Namespace",t[t.Invocation=56]="Invocation",t[t.FunctionDeclaration=57]="FunctionDeclaration",t[t.ReturnStatement=58]="ReturnStatement",t[t.MediaQuery=59]="MediaQuery",t[t.MediaCondition=60]="MediaCondition",t[t.MediaFeature=61]="MediaFeature",t[t.FunctionParameter=62]="FunctionParameter",t[t.FunctionArgument=63]="FunctionArgument",t[t.KeyframeSelector=64]="KeyframeSelector",t[t.ViewPort=65]="ViewPort",t[t.Document=66]="Document",t[t.AtApplyRule=67]="AtApplyRule",t[t.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",t[t.CustomPropertySet=69]="CustomPropertySet",t[t.ListEntry=70]="ListEntry",t[t.Supports=71]="Supports",t[t.SupportsCondition=72]="SupportsCondition",t[t.NamespacePrefix=73]="NamespacePrefix",t[t.GridLine=74]="GridLine",t[t.Plugin=75]="Plugin",t[t.UnknownAtRule=76]="UnknownAtRule",t[t.Use=77]="Use",t[t.ModuleConfiguration=78]="ModuleConfiguration",t[t.Forward=79]="Forward",t[t.ForwardVisibility=80]="ForwardVisibility",t[t.Module=81]="Module",t[t.UnicodeRange=82]="UnicodeRange",t[t.Layer=83]="Layer",t[t.LayerNameList=84]="LayerNameList",t[t.LayerName=85]="LayerName",t[t.PropertyAtRule=86]="PropertyAtRule",t[t.Container=87]="Container"})(v||(v={}));var Q;(function(t){t[t.Mixin=0]="Mixin",t[t.Rule=1]="Rule",t[t.Variable=2]="Variable",t[t.Function=3]="Function",t[t.Keyframe=4]="Keyframe",t[t.Unknown=5]="Unknown",t[t.Module=6]="Module",t[t.Forward=7]="Forward",t[t.ForwardVisibility=8]="ForwardVisibility",t[t.Property=9]="Property"})(Q||(Q={}));function Ii(t,e){let n=null;return!t||et.end?null:(t.accept(r=>r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(n?r.length<=n.length&&(n=r):n=r,!0):!1),n)}function Di(t,e){let n=Ii(t,e);const r=[];for(;n;)r.unshift(n),n=n.parent;return r}function pp(t){const e=t.findParent(v.Declaration),n=e&&e.getValue();return n&&n.encloses(t)?e:null}class W{get end(){return this.offset+this.length}constructor(e=-1,n=-1,r){this.parent=null,this.offset=e,this.length=n,r&&(this.nodeType=r)}set type(e){this.nodeType=e}get type(){return this.nodeType||v.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const n of this.children)n.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,n=-1){if(e.parent&&e.parent.children){const i=e.parent.children.indexOf(e);i>=0&&e.parent.children.splice(i,1)}e.parent=this;let r=this.children;return r||(r=this.children=[]),n!==-1?r.splice(n,0,e):r.push(e),e}attachTo(e,n=-1){return e&&e.adoptChild(this,n),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(n=>n.getRule()===e)}isErroneous(e=!1){return this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(n=>n.isErroneous(!0))}setNode(e,n,r=-1){return n?(n.attachTo(this,r),this[e]=n,!0):!1}addChild(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1}updateOffsetAndLength(e){(e.offsetthis.end||this.length===-1)&&(this.length=n-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e=0;r--)if(n=this.children[r],n.offset<=e)return n}return null}findChildAtOffset(e,n){const r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?n&&r.findChildAtOffset(e,!0)||r:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof ve;)e=e.parent;return e}findParent(e){let n=this;for(;n&&n.type!==e;)n=n.parent;return n}findAParent(...e){let n=this;for(;n&&!e.some(r=>n.type===r);)n=n.parent;return n}setData(e,n){this.options||(this.options={}),this.options[e]=n}getData(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]}}class ve extends W{constructor(e,n=-1){super(-1,-1),this.attachTo(e,n),this.offset=-1,this.length=-1}}class mp extends W{constructor(e,n){super(e,n)}get type(){return v.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}}class ze extends W{constructor(e,n){super(e,n),this.isCustomProperty=!1}get type(){return v.Identifier}containsInterpolation(){return this.hasChildren()}}class fp extends W{constructor(e,n){super(e,n)}get type(){return v.Stylesheet}}class Li extends W{constructor(e,n){super(e,n)}get type(){return v.Declarations}}class oe extends W{constructor(e,n){super(e,n)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class Ft extends oe{constructor(e,n){super(e,n)}get type(){return v.Ruleset}getSelectors(){return this.selectors||(this.selectors=new ve(this)),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(v.Declarations)!==null}}class In extends W{constructor(e,n){super(e,n)}get type(){return v.Selector}}class Yt extends W{constructor(e,n){super(e,n)}get type(){return v.SimpleSelector}}class Ai extends W{constructor(e,n){super(e,n)}}class gp extends oe{constructor(e,n){super(e,n)}get type(){return v.CustomPropertySet}}class Pe extends Ai{constructor(e,n){super(e,n),this.property=null}get type(){return v.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const e=this.property?this.property.getName():"unknown";if(this.parent instanceof Li&&this.parent.getParent()instanceof ul){const n=this.parent.getParent().getParent();if(n instanceof Pe)return n.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&e.charAt(0)==="-"){const n=e.indexOf("-",1);if(n!==-1)return e.substring(n+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}}class bp extends Pe{constructor(e,n){super(e,n)}get type(){return v.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}}class Mi extends W{constructor(e,n){super(e,n)}get type(){return v.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return up(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class wp extends W{constructor(e,n){super(e,n)}get type(){return v.Invocation}getArguments(){return this.arguments||(this.arguments=new ve(this)),this.arguments}}class Dn extends wp{constructor(e,n){super(e,n)}get type(){return v.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class dr extends W{constructor(e,n){super(e,n)}get type(){return v.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}}class Qt extends W{constructor(e,n){super(e,n)}get type(){return v.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class vp extends oe{constructor(e,n){super(e,n)}get type(){return v.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}}class yp extends oe{constructor(e,n){super(e,n)}get type(){return v.For}setVariable(e){return this.setNode("variable",e,0)}}class xp extends oe{constructor(e,n){super(e,n)}get type(){return v.Each}getVariables(){return this.variables||(this.variables=new ve(this)),this.variables}}class Sp extends oe{constructor(e,n){super(e,n)}get type(){return v.While}}class Cp extends oe{constructor(e,n){super(e,n)}get type(){return v.Else}}class ur extends oe{constructor(e,n){super(e,n)}get type(){return v.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new ve(this)),this.parameters}}class kp extends oe{constructor(e,n){super(e,n)}get type(){return v.ViewPort}}class dl extends oe{constructor(e,n){super(e,n)}get type(){return v.FontFace}}class ul extends oe{constructor(e,n){super(e,n)}get type(){return v.NestedProperties}}class pl extends oe{constructor(e,n){super(e,n)}get type(){return v.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class ml extends oe{constructor(e,n){super(e,n)}get type(){return v.KeyframeSelector}}class zi extends W{constructor(e,n){super(e,n)}get type(){return v.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}}class _p extends W{get type(){return v.Use}getParameters(){return this.parameters||(this.parameters=new ve(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class Ep extends W{get type(){return v.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class Fp extends W{get type(){return v.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new ve(this)),this.members}getParameters(){return this.parameters||(this.parameters=new ve(this)),this.parameters}}class Rp extends W{get type(){return v.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class Np extends W{constructor(e,n){super(e,n)}get type(){return v.Namespace}}class Pi extends oe{constructor(e,n){super(e,n)}get type(){return v.Media}}class Ti extends oe{constructor(e,n){super(e,n)}get type(){return v.Supports}}class Ip extends oe{constructor(e,n){super(e,n)}get type(){return v.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}}class Dp extends oe{constructor(e,n){super(e,n)}get type(){return v.PropertyAtRule}setName(e){return e?(e.attachTo(this),this.name=e,!0):!1}getName(){return this.name}}class Lp extends oe{constructor(e,n){super(e,n)}get type(){return v.Document}}class Ap extends oe{constructor(e,n){super(e,n)}get type(){return v.Container}}class fl extends W{constructor(e,n){super(e,n)}}class gl extends W{constructor(e,n){super(e,n)}get type(){return v.MediaQuery}}class Mp extends W{constructor(e,n){super(e,n)}get type(){return v.MediaCondition}}class zp extends W{constructor(e,n){super(e,n)}get type(){return v.MediaFeature}}class Ln extends W{constructor(e,n){super(e,n)}get type(){return v.SupportsCondition}}class Pp extends oe{constructor(e,n){super(e,n)}get type(){return v.Page}}class Tp extends oe{constructor(e,n){super(e,n)}get type(){return v.PageBoxMarginBox}}class bl extends W{constructor(e,n){super(e,n)}get type(){return v.Expression}}class Oi extends W{constructor(e,n){super(e,n)}get type(){return v.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}}class Op extends W{constructor(e,n){super(e,n)}get type(){return v.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}}class Wp extends W{constructor(e,n){super(e,n)}get type(){return v.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}}class Wi extends W{constructor(e,n){super(e,n)}get type(){return v.HexColorValue}}class Vp extends W{constructor(e,n){super(e,n)}get type(){return v.RatioValue}}const $p=46,Up=48,Bp=57;class Vi extends W{constructor(e,n){super(e,n)}get type(){return v.NumericValue}getValue(){const e=this.getText();let n=0,r;for(let i=0,s=e.length;i0&&(n+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),i=e.args??{};return Yp(r,i)}var Xp=/{([^}]+)}/g;function Yp(t,e){return Object.keys(e).length===0?t:t.replace(Xp,(n,r)=>e[r]??n)}class te{constructor(e,n){this.id=e,this.message=n}}const S={NumberExpected:new te("css-numberexpected",w("number expected")),ConditionExpected:new te("css-conditionexpected",w("condition expected")),RuleOrSelectorExpected:new te("css-ruleorselectorexpected",w("at-rule or selector expected")),DotExpected:new te("css-dotexpected",w("dot expected")),ColonExpected:new te("css-colonexpected",w("colon expected")),SemiColonExpected:new te("css-semicolonexpected",w("semi-colon expected")),TermExpected:new te("css-termexpected",w("term expected")),ExpressionExpected:new te("css-expressionexpected",w("expression expected")),OperatorExpected:new te("css-operatorexpected",w("operator expected")),IdentifierExpected:new te("css-identifierexpected",w("identifier expected")),PercentageExpected:new te("css-percentageexpected",w("percentage expected")),URIOrStringExpected:new te("css-uriorstringexpected",w("uri or string expected")),URIExpected:new te("css-uriexpected",w("URI expected")),VariableNameExpected:new te("css-varnameexpected",w("variable name expected")),VariableValueExpected:new te("css-varvalueexpected",w("variable value expected")),PropertyValueExpected:new te("css-propertyvalueexpected",w("property value expected")),LeftCurlyExpected:new te("css-lcurlyexpected",w("{ expected")),RightCurlyExpected:new te("css-rcurlyexpected",w("} expected")),LeftSquareBracketExpected:new te("css-rbracketexpected",w("[ expected")),RightSquareBracketExpected:new te("css-lbracketexpected",w("] expected")),LeftParenthesisExpected:new te("css-lparentexpected",w("( expected")),RightParenthesisExpected:new te("css-rparentexpected",w(") expected")),CommaExpected:new te("css-commaexpected",w("comma expected")),PageDirectiveOrDeclarationExpected:new te("css-pagedirordeclexpected",w("page directive or declaraton expected")),UnknownAtRule:new te("css-unknownatrule",w("at-rule unknown")),UnknownKeyword:new te("css-unknownkeyword",w("unknown keyword")),SelectorExpected:new te("css-selectorexpected",w("selector expected")),StringLiteralExpected:new te("css-stringliteralexpected",w("string literal expected")),WhitespaceExpected:new te("css-whitespaceexpected",w("whitespace expected")),MediaQueryExpected:new te("css-mediaqueryexpected",w("media query expected")),IdentifierOrWildcardExpected:new te("css-idorwildcardexpected",w("identifier or wildcard expected")),WildcardExpected:new te("css-wildcardexpected",w("wildcard expected")),IdentifierOrVariableExpected:new te("css-idorvarexpected",w("identifier or variable expected"))};var xl;(function(t){function e(n){return typeof n=="string"}t.is=e})(xl||(xl={}));var qi;(function(t){function e(n){return typeof n=="string"}t.is=e})(qi||(qi={}));var Sl;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(Sl||(Sl={}));var fr;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(fr||(fr={}));var ye;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=fr.MAX_VALUE),i===Number.MAX_VALUE&&(i=fr.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}t.is=n})(ye||(ye={}));var K;(function(t){function e(r,i,s,a){if(C.uinteger(r)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(a))return{start:ye.create(r,i),end:ye.create(s,a)};if(ye.is(r)&&ye.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&ye.is(i.start)&&ye.is(i.end)}t.is=n})(K||(K={}));var zn;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&K.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}t.is=n})(zn||(zn={}));var Cl;(function(t){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&K.is(i.targetRange)&&C.string(i.targetUri)&&K.is(i.targetSelectionRange)&&(K.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}t.is=n})(Cl||(Cl={}));var ji;(function(t){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}t.is=n})(ji||(ji={}));var kl;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&K.is(i.range)&&ji.is(i.color)}t.is=n})(kl||(kl={}));var _l;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.undefined(i.textEdit)||j.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,j.is))}t.is=n})(_l||(_l={}));var El;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(El||(El={}));var Fl;(function(t){function e(r,i,s,a,o,l){const c={startLine:r,endLine:i};return C.defined(s)&&(c.startCharacter=s),C.defined(a)&&(c.endCharacter=a),C.defined(o)&&(c.kind=o),C.defined(l)&&(c.collapsedText=l),c}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}t.is=n})(Fl||(Fl={}));var Hi;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&zn.is(i.location)&&C.string(i.message)}t.is=n})(Hi||(Hi={}));var gr;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(gr||(gr={}));var Rl;(function(t){t.Unnecessary=1,t.Deprecated=2})(Rl||(Rl={}));var Nl;(function(t){function e(n){const r=n;return C.objectLiteral(r)&&C.string(r.href)}t.is=e})(Nl||(Nl={}));var br;(function(t){function e(r,i,s,a,o,l){let c={range:r,message:i};return C.defined(s)&&(c.severity=s),C.defined(a)&&(c.code=a),C.defined(o)&&(c.source=o),C.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(r){var i;let s=r;return C.defined(s)&&K.is(s.range)&&C.string(s.message)&&(C.number(s.severity)||C.undefined(s.severity))&&(C.integer(s.code)||C.string(s.code)||C.undefined(s.code))&&(C.undefined(s.codeDescription)||C.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(C.string(s.source)||C.undefined(s.source))&&(C.undefined(s.relatedInformation)||C.typedArray(s.relatedInformation,Hi.is))}t.is=n})(br||(br={}));var Rt;(function(t){function e(r,i,...s){let a={title:r,command:i};return C.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.title)&&C.string(i.command)}t.is=n})(Rt||(Rt={}));var j;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){const a=s;return C.objectLiteral(a)&&C.string(a.newText)&&K.is(a.range)}t.is=i})(j||(j={}));var Gi;(function(t){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}t.is=n})(Gi||(Gi={}));var Kt;(function(t){function e(n){const r=n;return C.string(r)}t.is=e})(Kt||(Kt={}));var Il;(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){const a=s;return j.is(a)&&(Gi.is(a.annotationId)||Kt.is(a.annotationId))}t.is=i})(Il||(Il={}));var wr;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&Zi.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(wr||(wr={}));var Ji;(function(t){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Kt.is(i.annotationId))}t.is=n})(Ji||(Ji={}));var Xi;(function(t){function e(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Kt.is(i.annotationId))}t.is=n})(Xi||(Xi={}));var Yi;(function(t){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Kt.is(i.annotationId))}t.is=n})(Yi||(Yi={}));var Qi;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>C.string(i.kind)?Ji.is(i)||Xi.is(i)||Yi.is(i):wr.is(i)))}t.is=e})(Qi||(Qi={}));var Dl;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)}t.is=n})(Dl||(Dl={}));var Ki;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}t.is=n})(Ki||(Ki={}));var Zi;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}t.is=n})(Zi||(Zi={}));var Ll;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}t.is=n})(Ll||(Ll={}));var He;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(He||(He={}));var Pn;(function(t){function e(n){const r=n;return C.objectLiteral(n)&&He.is(r.kind)&&C.string(r.value)}t.is=e})(Pn||(Pn={}));var q;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(q||(q={}));var Ie;(function(t){t.PlainText=1,t.Snippet=2})(Ie||(Ie={}));var Nt;(function(t){t.Deprecated=1})(Nt||(Nt={}));var Al;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){const i=r;return i&&C.string(i.newText)&&K.is(i.insert)&&K.is(i.replace)}t.is=n})(Al||(Al={}));var Ml;(function(t){t.asIs=1,t.adjustIndentation=2})(Ml||(Ml={}));var zl;(function(t){function e(n){const r=n;return r&&(C.string(r.detail)||r.detail===void 0)&&(C.string(r.description)||r.description===void 0)}t.is=e})(zl||(zl={}));var Pl;(function(t){function e(n){return{label:n}}t.create=e})(Pl||(Pl={}));var Tl;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(Tl||(Tl={}));var vr;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}t.is=n})(vr||(vr={}));var Ol;(function(t){function e(n){let r=n;return!!r&&C.objectLiteral(r)&&(Pn.is(r.contents)||vr.is(r.contents)||C.typedArray(r.contents,vr.is))&&(n.range===void 0||K.is(n.range))}t.is=e})(Ol||(Ol={}));var Wl;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(Wl||(Wl={}));var Vl;(function(t){function e(n,r,...i){let s={label:n};return C.defined(r)&&(s.documentation=r),C.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(Vl||(Vl={}));var Zt;(function(t){t.Text=1,t.Read=2,t.Write=3})(Zt||(Zt={}));var $l;(function(t){function e(n,r){let i={range:n};return C.number(r)&&(i.kind=r),i}t.create=e})($l||($l={}));var rt;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(rt||(rt={}));var Ul;(function(t){t.Deprecated=1})(Ul||(Ul={}));var Bl;(function(t){function e(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}t.create=e})(Bl||(Bl={}));var ql;(function(t){function e(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(ql||(ql={}));var jl;(function(t){function e(r,i,s,a,o,l){let c={name:r,detail:i,kind:s,range:a,selectionRange:o};return l!==void 0&&(c.children=l),c}t.create=e;function n(r){let i=r;return i&&C.string(i.name)&&C.number(i.kind)&&K.is(i.range)&&K.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(jl||(jl={}));var es;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(es||(es={}));var yr;(function(t){t.Invoked=1,t.Automatic=2})(yr||(yr={}));var Hl;(function(t){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}t.create=e;function n(r){let i=r;return C.defined(i)&&C.typedArray(i.diagnostics,br.is)&&(i.only===void 0||C.typedArray(i.only,C.string))&&(i.triggerKind===void 0||i.triggerKind===yr.Invoked||i.triggerKind===yr.Automatic)}t.is=n})(Hl||(Hl={}));var ts;(function(t){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Rt.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}t.create=e;function n(r){let i=r;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,br.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Rt.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||Qi.is(i.edit))}t.is=n})(ts||(ts={}));var Gl;(function(t){function e(r,i){let s={range:r};return C.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return C.defined(i)&&K.is(i.range)&&(C.undefined(i.command)||Rt.is(i.command))}t.is=n})(Gl||(Gl={}));var Jl;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}t.is=n})(Jl||(Jl={}));var Xl;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return C.defined(i)&&K.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}t.is=n})(Xl||(Xl={}));var xr;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&K.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(xr||(xr={}));var Yl;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(Yl||(Yl={}));var Ql;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(Ql||(Ql={}));var Kl;(function(t){function e(n){const r=n;return C.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(Kl||(Kl={}));var Zl;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&K.is(i.range)&&C.string(i.text)}t.is=n})(Zl||(Zl={}));var ec;(function(t){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}t.create=e;function n(r){const i=r;return i!=null&&K.is(i.range)&&C.boolean(i.caseSensitiveLookup)&&(C.string(i.variableName)||i.variableName===void 0)}t.is=n})(ec||(ec={}));var tc;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&K.is(i.range)&&(C.string(i.expression)||i.expression===void 0)}t.is=n})(tc||(tc={}));var nc;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return C.defined(i)&&K.is(r.stoppedLocation)}t.is=n})(nc||(nc={}));var ns;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(ns||(ns={}));var rs;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&(i.tooltip===void 0||C.string(i.tooltip)||Pn.is(i.tooltip))&&(i.location===void 0||zn.is(i.location))&&(i.command===void 0||Rt.is(i.command))}t.is=n})(rs||(rs={}));var rc;(function(t){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&ye.is(i.position)&&(C.string(i.label)||C.typedArray(i.label,rs.is))&&(i.kind===void 0||ns.is(i.kind))&&i.textEdits===void 0||C.typedArray(i.textEdits,j.is)&&(i.tooltip===void 0||C.string(i.tooltip)||Pn.is(i.tooltip))&&(i.paddingLeft===void 0||C.boolean(i.paddingLeft))&&(i.paddingRight===void 0||C.boolean(i.paddingRight))}t.is=n})(rc||(rc={}));var ic;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(ic||(ic={}));var sc;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(sc||(sc={}));var ac;(function(t){function e(n){return{items:n}}t.create=e})(ac||(ac={}));var oc;(function(t){t.Invoked=0,t.Automatic=1})(oc||(oc={}));var lc;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(lc||(lc={}));var cc;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(cc||(cc={}));var hc;(function(t){function e(n){const r=n;return C.objectLiteral(r)&&qi.is(r.uri)&&C.string(r.name)}t.is=e})(hc||(hc={}));var dc;(function(t){function e(s,a,o,l){return new Qp(s,a,o,l)}t.create=e;function n(s){let a=s;return!!(C.defined(a)&&C.string(a.uri)&&(C.undefined(a.languageId)||C.string(a.languageId))&&C.uinteger(a.lineCount)&&C.func(a.getText)&&C.func(a.positionAt)&&C.func(a.offsetAt))}t.is=n;function r(s,a){let o=s.getText(),l=i(a,(d,u)=>{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),c=o.length;for(let d=l.length-1;d>=0;d--){let u=l[d],m=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)o=o.substring(0,m)+u.newText+o.substring(f,o.length);else throw new Error("Overlapping edit");c=m}return o}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,l=s.slice(0,o),c=s.slice(o);i(l,a),i(c,a);let d=0,u=0,m=0;for(;d0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ye.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return ye.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(f){return f===!0||f===!1}t.boolean=i;function s(f){return e.call(f)==="[object String]"}t.string=s;function a(f){return e.call(f)==="[object Number]"}t.number=a;function o(f,g,b){return e.call(f)==="[object Number]"&&g<=f&&f<=b}t.numberRange=o;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}t.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}t.uinteger=c;function d(f){return e.call(f)==="[object Function]"}t.func=d;function u(f){return f!==null&&typeof f=="object"}t.objectLiteral=u;function m(f,g){return Array.isArray(f)&&f.every(g)}t.typedArray=m})(C||(C={}));class An{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(An.isIncremental(r)){const i=hc(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let c=this._lineOffsets;const d=cc(r.text,!1,s);if(l-o===d.length)for(let m=0,f=d.length;me?i=a:r=a+1}let s=r-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),l=0;const c=[];for(const d of o){let u=i.offsetAt(d.range.start);if(ul&&c.push(a.substring(l,u)),d.newText.length&&c.push(d.newText),l=i.offsetAt(d.range.end)}return c.push(a.substr(l)),c.join("")}t.applyEdits=r})(ts||(ts={}));function ns(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);ns(r,e),ns(i,e);let s=0,a=0,o=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function Qp(t){const e=hc(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var dc;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[He.Markdown,He.PlainText]}},hover:{contentFormat:[He.Markdown,He.PlainText]}}}})(dc||(dc={}));var Mn;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(Mn||(Mn={}));const Kp=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,Zp=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:w("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:w("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:w("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:w("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:w("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:w("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:w("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:w("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:w("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:w("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a polar color space.")}],em=/^(rgb|rgba|hsl|hsla|hwb)$/i,vr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},tm=new RegExp(`^(${Object.keys(vr).join("|")})$`,"i"),rs={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},nm=new RegExp(`^(${Object.keys(rs).join("|")})$`,"i");function mt(t,e){const r=t.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(e=100);const i=parseFloat(r[1])/e;if(i>=0&&i<=1)return i}throw new Error}function uc(t){const e=t.getText(),n=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof n[2]>"u")return parseFloat(e)%360}throw new Error}function rm(t){const e=t.getName();return e?em.test(e):!1}function pc(t){return Kp.test(t)||tm.test(t)||nm.test(t)}const mc=48,im=57,sm=65,yr=97,am=102;function de(t){return t=yr&&t<=am?t-yr+10:0)}function fc(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:de(t.charCodeAt(1))*17/255,green:de(t.charCodeAt(2))*17/255,blue:de(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:de(t.charCodeAt(1))*17/255,green:de(t.charCodeAt(2))*17/255,blue:de(t.charCodeAt(3))*17/255,alpha:de(t.charCodeAt(4))*17/255};case 7:return{red:(de(t.charCodeAt(1))*16+de(t.charCodeAt(2)))/255,green:(de(t.charCodeAt(3))*16+de(t.charCodeAt(4)))/255,blue:(de(t.charCodeAt(5))*16+de(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(de(t.charCodeAt(1))*16+de(t.charCodeAt(2)))/255,green:(de(t.charCodeAt(3))*16+de(t.charCodeAt(4)))/255,blue:(de(t.charCodeAt(5))*16+de(t.charCodeAt(6)))/255,alpha:(de(t.charCodeAt(7))*16+de(t.charCodeAt(8)))/255}}return null}function gc(t,e,n,r=1){if(t=t/60,e===0)return{red:n,green:n,blue:n,alpha:r};{const i=(o,l,c)=>{for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-o)*c+o:c<3?l:c<4?(l-o)*(4-c)+o:o},s=n<=.5?n*(e+1):n+e-n*e,a=n*2-s;return{red:i(a,s,t+2),green:i(a,s,t),blue:i(a,s,t-2),alpha:r}}}function bc(t){const e=t.red,n=t.green,r=t.blue,i=t.alpha,s=Math.max(e,n,r),a=Math.min(e,n,r);let o=0,l=0;const c=(a+s)/2,d=s-a;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case e:o=(n-r)/d+(n=1){const l=e/(e+n);return{red:l,green:l,blue:l,alpha:r}}const i=gc(t,1,.5,r);let s=i.red;s*=1-e-n,s+=e;let a=i.green;a*=1-e-n,a+=e;let o=i.blue;return o*=1-e-n,o+=e,{red:s,green:a,blue:o,alpha:r}}function lm(t){const e=bc(t),n=Math.min(t.red,t.green,t.blue),r=1-Math.max(t.red,t.green,t.blue);return{h:e.h,w:n,b:r,a:e.a}}function cm(t){if(t.type===v.HexColorValue){const e=t.getText();return fc(e)}else if(t.type===v.Function){const e=t,n=e.getName();let r=e.getArguments().getChildren();if(r.length===1){const i=r[0].getChildren();if(i.length===1&&i[0].type===v.Expression&&(r=i[0].getChildren(),r.length===3)){const s=r[2];if(s instanceof zi){const a=s.getLeft(),o=s.getRight(),l=s.getOperator();a&&o&&l&&l.matches("/")&&(r=[r[0],r[1],a,o])}}}if(!n||r.length<3||r.length>4)return null;try{const i=r.length===4?mt(r[3],1):1;if(n==="rgb"||n==="rgba")return{red:mt(r[0],255),green:mt(r[1],255),blue:mt(r[2],255),alpha:i};if(n==="hsl"||n==="hsla"){const s=uc(r[0]),a=mt(r[1],100),o=mt(r[2],100);return gc(s,a,o,i)}else if(n==="hwb"){const s=uc(r[0]),a=mt(r[1],100),o=mt(r[2],100);return om(s,a,o,i)}}catch{return null}}else if(t.type===v.Identifier){if(t.parent&&t.parent.type!==v.Term)return null;const e=t.parent;if(e&&e.parent&&e.parent.type===v.BinaryExpression){const i=e.parent;if(i.parent&&i.parent.type===v.ListEntry&&i.parent.key===i)return null}const n=t.getText().toLowerCase();if(n==="none")return null;const r=vr[n];if(r)return fc(r)}return null}const wc={bottom:"Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},vc={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},yc={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},hm=["medium","thick","thin"],xc={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},Sc={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},Cc={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},kc={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},_c={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},Ec={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},Fc={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},Rc={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},dm=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],um=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],pm=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function xr(t){return Object.keys(t).map(e=>t[e])}function Te(t){return typeof t<"u"}class Sr{constructor(e=new _n){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:p.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return p.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return p.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return p.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return e.indexOf(this.token.type)!==-1}peekRegExp(e,n){return e!==this.token.type?!1:n.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){const e=this.scanner.tryScanUnicode();return e?(this.prevToken=e,this.token=this.scanner.scan(),!0):!1}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){const n=this.mark(),r=e();return r||(this.restoreAtMark(n),null)}acceptOneKeyword(e){if(p.AtKeyword===this.token.type){for(const n of e)if(n.length===this.token.text.length&&n===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1}accept(e){return e===this.token.type?(this.consumeToken(),!0):!1}acceptIdent(e){return this.peekIdent(e)?(this.consumeToken(),!0):!1}acceptKeyword(e){return this.peekKeyword(e)?(this.consumeToken(),!0):!1}acceptDelim(e){return this.peekDelim(e)?(this.consumeToken(),!0):!1}acceptRegexp(e){return e.test(this.token.text)?(this.consumeToken(),!0):!1}_parseRegexp(e){let n=this.createNode(v.Identifier);do;while(this.acceptRegexp(e));return this.finish(n)}acceptUnquotedString(){const e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);const n=this.scanner.scanUnquotedString();return n?(this.token=n,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,n){for(;;){if(e&&e.indexOf(this.token.type)!==-1)return this.consumeToken(),!0;if(n&&n.indexOf(this.token.type)!==-1)return!0;if(this.token.type===p.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new W(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,n,r,i){if(!(e instanceof ve)&&(n&&this.markError(e,n,r,i),this.prevToken)){const s=this.prevToken.offset+this.prevToken.len;e.length=s>e.offset?s-e.offset:0}return e}markError(e,n,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new bl(e,n,Ne.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)}parseStylesheet(e){const n=e.version,r=e.getText(),i=(s,a)=>{if(e.version!==n)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(s,a)};return this.internalParse(r,this._parseStylesheet,i)}internalParse(e,n,r){this.scanner.setSource(e),this.token=this.scanner.scan();const i=n.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=(s,a)=>e.substr(s,a)),i}_parseStylesheet(){const e=this.create(mp);for(;e.addChild(this._parseStylesheetStart()););let n=!1;do{let r=!1;do{r=!1;const i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,n=!1,!this.peek(p.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(p.SemiColon)&&this.markError(e,S.SemiColonExpected));this.accept(p.SemiColon)||this.accept(p.CDO)||this.accept(p.CDC);)r=!0,n=!1}while(r);if(this.peek(p.EOF))break;n||(this.peek(p.AtKeyword)?this.markError(e,S.UnknownAtRule):this.markError(e,S.RuleOrSelectorExpected),n=!0),this.consumeToken()}while(!this.peek(p.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){const n=this.mark();if(this._parseSelector(e)){for(;this.accept(p.Comma)&&this._parseSelector(e););if(this.accept(p.CurlyL))return this.restoreAtMark(n),this._parseRuleset(e)}return this.restoreAtMark(n),null}_parseRuleset(e=!1){const n=this.create(Ct),r=n.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(n,S.SelectorExpected);return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(p.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case v.Keyframe:case v.ViewPort:case v.Media:case v.Ruleset:case v.Namespace:case v.If:case v.For:case v.Each:case v.While:case v.MixinDeclaration:case v.FunctionDeclaration:case v.MixinContentDeclaration:return!1;case v.ExtendsReference:case v.MixinContentReference:case v.ReturnStatement:case v.MediaQuery:case v.Debug:case v.Import:case v.AtApplyRule:case v.CustomPropertyDeclaration:return!0;case v.VariableDeclaration:return e.needsSemicolon;case v.MixinReference:return!e.getContent();case v.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){const n=this.create(Ni);if(!this.accept(p.CurlyL))return null;let r=e();for(;n.addChild(r)&&!this.peek(p.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(p.SemiColon))return this.finish(n,S.SemiColonExpected,[p.SemiColon,p.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===p.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(p.SemiColon););r=e()}return this.accept(p.CurlyR)?this.finish(n):this.finish(n,S.RightCurlyExpected,[p.CurlyR,p.SemiColon])}_parseBody(e,n){return e.setDeclarations(this._parseDeclarations(n))?this.finish(e):this.finish(e,S.LeftCurlyExpected,[p.CurlyR,p.SemiColon])}_parseSelector(e){const n=this.create(En);let r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());)r=!0,n.addChild(this._parseCombinator());return r?this.finish(n):null}_parseDeclaration(e){const n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;const r=this.create(Pe);return r.setProperty(this._parseProperty())?this.accept(p.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,S.PropertyValueExpected)):this.finish(r,S.ColonExpected,[p.Colon],e||[p.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(p.Ident,/^--/))return null;const n=this.create(gp);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(n,S.ColonExpected,[p.Colon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);const r=this.mark();if(this.peek(p.CurlyL)){const s=this.create(fp),a=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(s.setDeclarations(a)&&!a.isErroneous(!0)&&(s.addChild(this._parsePrio()),this.peek(p.SemiColon)))return this.finish(s),n.setPropertySet(s),n.semicolonPosition=this.token.offset,this.finish(n);this.restoreAtMark(r)}const i=this._parseExpr();return i&&!i.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],p.SemiColon,p.EOF))?(n.setValue(i),this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):(this.restoreAtMark(r),n.addChild(this._parseCustomPropertyValue(e)),n.addChild(this._parsePrio()),Te(n.colonPosition)&&this.token.offset===n.colonPosition+1?this.finish(n,S.PropertyValueExpected):this.finish(n))}_parseCustomPropertyValue(e=[p.CurlyR]){const n=this.create(W),r=()=>s===0&&a===0&&o===0,i=()=>e.indexOf(this.token.type)!==-1;let s=0,a=0,o=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(r())break e;break;case p.Exclamation:if(r())break e;break;case p.CurlyL:s++;break;case p.CurlyR:if(s--,s<0){if(i()&&a===0&&o===0)break e;return this.finish(n,S.LeftCurlyExpected)}break;case p.ParenthesisL:a++;break;case p.ParenthesisR:if(a--,a<0){if(i()&&o===0&&s===0)break e;return this.finish(n,S.LeftParenthesisExpected)}break;case p.BracketL:o++;break;case p.BracketR:if(o--,o<0)return this.finish(n,S.LeftSquareBracketExpected);break;case p.BadString:break e;case p.EOF:let l=S.RightCurlyExpected;return o>0?l=S.RightSquareBracketExpected:a>0&&(l=S.RightParenthesisExpected),this.finish(n,l)}this.consumeToken()}return this.finish(n)}_tryToParseDeclaration(e){const n=this.mark();return this._parseProperty()&&this.accept(p.Colon)?(this.restoreAtMark(n),this._parseDeclaration(e)):(this.restoreAtMark(n),null)}_parseProperty(){const e=this.create(Di),n=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(n),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(p.Charset))return null;const e=this.create(W);return this.consumeToken(),this.accept(p.String)?this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected):this.finish(e,S.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(Li);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,S.URIOrStringExpected):this._completeParseImport(e)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(p.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,S.IdentifierExpected,[p.SemiColon]);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(p.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(p.ParenthesisR))?this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;const e=this.create(Rp);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,S.URIExpected,[p.SemiColon]):this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected)}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;const e=this.create(ll);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;const e=this.create(Cp);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(p.AtKeyword,this.keyframeRegex))return null;const e=this.create(hl),n=this.create(W);return this.consumeToken(),e.setKeyword(this.finish(n)),n.matches("@-ms-keyframes")&&this.markError(n,S.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,S.IdentifierExpected,[p.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([Q.Keyframe])}_parseKeyframeSelector(){const e=this.create(dl);let n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return null;for(;this.accept(p.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return this.finish(e,S.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){const e=this.create(dl),n=this.mark();let r=!1;if(e.addChild(this._parseIdent())&&(r=!0),this.accept(p.Percentage)&&(r=!0),!r)return null;for(;this.accept(p.Comma);)if(r=!1,e.addChild(this._parseIdent())&&(r=!0),this.accept(p.Percentage)&&(r=!0),!r)return this.restoreAtMark(n),null;return this.peek(p.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(n),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;const e=this.create(Ip);return this.consumeToken(),!this.peekRegExp(p.Ident,/^--/)||!e.setName(this._parseIdent([Q.Property]))?this.finish(e,S.IdentifierExpected):this._parseBody(e,this._parseDeclaration.bind(this))}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;const n=this.create(Np);this.consumeToken();const r=this._parseLayerNameList();return r&&n.setNames(r),(!r||r.getChildren().length===1)&&this.peek(p.CurlyL)?this._parseBody(n,this._parseLayerDeclaration.bind(this,e)):this.accept(p.SemiColon)?this.finish(n):this.finish(n,S.SemiColonExpected)}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){const e=this.createNode(v.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,S.IdentifierExpected);return this.finish(e)}_parseLayerName(){const e=this.createNode(v.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,S.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;const n=this.create(Mi);return this.consumeToken(),n.addChild(this._parseSupportsCondition()),this._parseBody(n,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){const e=this.create(Rn);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(p.Ident,/^(and|or)$/i)){const n=this.token.text.toLowerCase();for(;this.acceptIdent(n);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){const e=this.create(Rn);if(this.accept(p.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([p.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,S.ConditionExpected):this.accept(p.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[]);if(this.peek(p.Ident)){const n=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=1;for(;this.token.type!==p.EOF&&r!==0;)this.token.type===p.ParenthesisL?r++:this.token.type===p.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(n)}return this.finish(e,S.LeftParenthesisExpected,[],[p.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;const n=this.create(Ai);return this.consumeToken(),n.addChild(this._parseMediaQueryList())?this._parseBody(n,this._parseMediaDeclaration.bind(this,e)):this.finish(n,S.MediaQueryExpected)}_parseMediaQueryList(){const e=this.create(ul);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){const e=this.create(pl),n=this.mark();if(this.acceptIdent("not"),this.peek(p.ParenthesisL))this.restoreAtMark(n),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){const e=this.mark(),n=this.create(Wp);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(n):this.finish(n,S.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){const e=this.create(Ap);this.acceptIdent("not");let n=!0;for(;n;){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);if(this.peek(p.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL]);n=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){const e=[p.ParenthesisR],n=this.create(Mp);if(n.addChild(this._parseMediaFeatureName())){if(this.accept(p.Colon)){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e)}}else if(n.addChild(this._parseMediaFeatureValue())){if(!this._parseMediaFeatureRangeOperator())return this.finish(n,S.OperatorExpected,[],e);if(!n.addChild(this._parseMediaFeatureName()))return this.finish(n,S.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e)}else return this.finish(n,S.IdentifierExpected,[],e);return this.finish(n)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){const e=this.create(W);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;const e=this.create(zp);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(p.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,S.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(p.AtKeyword))return null;const e=this.create(Pp);return this.acceptOneKeyword(pm)||this.markError(e,S.UnknownAtRule,[],[p.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(p.Ident)&&!this.peek(p.Colon))return null;const e=this.create(W);return e.addChild(this._parseIdent()),this.accept(p.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;const e=this.create(Dp);return this.consumeToken(),this.resync([],[p.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;const n=this.create(Lp);return this.consumeToken(),n.addChild(this._parseIdent()),n.addChild(this._parseContainerQuery()),this._parseBody(n,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){const e=this.create(W);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){const e=this.create(W);if(this.accept(p.ParenthesisL)){if(this.peekIdent("not")||this.peek(p.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL])}else if(this.acceptIdent("style")){if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseStyleQuery(){const e=this.create(W);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(p.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([p.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){const e=this.create(W);if(this.accept(p.ParenthesisL)){if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseUnknownAtRule(){if(!this.peek(p.AtKeyword))return null;const e=this.create(fl);e.addChild(this._parseUnknownAtRuleName());const n=()=>i===0&&s===0&&a===0;let r=0,i=0,s=0,a=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(n())break e;break;case p.EOF:return i>0?this.finish(e,S.RightCurlyExpected):a>0?this.finish(e,S.RightSquareBracketExpected):s>0?this.finish(e,S.RightParenthesisExpected):this.finish(e);case p.CurlyL:r++,i++;break;case p.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),a>0)return this.finish(e,S.RightSquareBracketExpected);if(s>0)return this.finish(e,S.RightParenthesisExpected);break e}if(i<0){if(s===0&&a===0)break e;return this.finish(e,S.LeftCurlyExpected)}break;case p.ParenthesisL:s++;break;case p.ParenthesisR:if(s--,s<0)return this.finish(e,S.LeftParenthesisExpected);break;case p.BracketL:a++;break;case p.BracketR:if(a--,a<0)return this.finish(e,S.LeftSquareBracketExpected);break}this.consumeToken()}return e}_parseUnknownAtRuleName(){const e=this.create(W);return this.accept(p.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(p.Dashmatch)||this.peek(p.Includes)||this.peek(p.SubstringOperator)||this.peek(p.PrefixOperator)||this.peek(p.SuffixOperator)||this.peekDelim("=")){const e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}else return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;const e=this.create(W);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){const e=this.create(W);this.consumeToken();const n=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return e.type=v.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){const e=this.create(W);return this.consumeToken(),e.type=v.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){const e=this.create(W);return this.consumeToken(),e.type=v.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){const e=this.create(W);this.consumeToken();const n=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return null}_parseSimpleSelector(){const e=this.create(Ht);let n=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&n++;(n===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)n++;return n>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(v.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(p.Hash)&&!this.peekDelim("#"))return null;const e=this.createNode(v.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,S.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;const e=this.createNode(v.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)}_parseElementName(){const e=this.mark(),n=this.createNode(v.ElementNameSelector);return n.addChild(this._parseNamespacePrefix()),!n.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(n)}_parseNamespacePrefix(){const e=this.mark(),n=this.createNode(v.NamespacePrefix);return!n.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(n):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(p.BracketL))return null;const e=this.create(Op);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)):this.finish(e,S.IdentifierExpected)}_parsePseudo(){const e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(p.ParenthesisL)){const n=()=>{const i=this.create(W);if(!i.addChild(this._parseSelector(!0)))return null;for(;this.accept(p.Comma)&&i.addChild(this._parseSelector(!0)););return this.peek(p.ParenthesisR)?this.finish(i):null};if(!e.addChild(this.try(n))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(n)))return this.finish(e,S.SelectorExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(p.Colon))return null;const e=this.mark(),n=this.createNode(v.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(p.Colon),this.hasWhitespace()||!n.addChild(this._parseIdent())?this.finish(n,S.IdentifierExpected):this.finish(n))}_tryParsePrio(){const e=this.mark(),n=this._parsePrio();return n||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(p.Exclamation))return null;const e=this.createNode(v.Prio);return this.accept(p.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){const n=this.create(ml);if(!n.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(p.Comma)){if(e)return this.finish(n);this.consumeToken()}if(!n.addChild(this._parseBinaryExpr()))break}return this.finish(n)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;const e=this.create(pp);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(p.BracketL))return null;const e=this.createNode(v.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)}_parseBinaryExpr(e,n){let r=this.create(zi);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(n||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,S.TermExpected);r=this.finish(r);const i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)}_parseTerm(){let e=this.create(Tp);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;const e=this.create(W);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)}_parseNumeric(){if(this.peek(p.Num)||this.peek(p.Percentage)||this.peek(p.Resolution)||this.peek(p.Length)||this.peek(p.EMS)||this.peek(p.EXS)||this.peek(p.Angle)||this.peek(p.Time)||this.peek(p.Dimension)||this.peek(p.ContainerQueryLength)||this.peek(p.Freq)){const e=this.create(Ti);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(p.String)&&!this.peek(p.BadString))return null;const e=this.createNode(v.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(p.Ident,/^url(-prefix)?$/i))return null;const e=this.mark(),n=this.createNode(v.URILiteral);return this.accept(p.Ident),this.hasWhitespace()||!this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),n.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected))}_parseURLArgument(){const e=this.create(W);return!this.accept(p.String)&&!this.accept(p.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)}_parseIdent(e){if(!this.peek(p.Ident))return null;const n=this.create(ze);return e&&(n.referenceTypes=e),n.isCustomProperty=this.peekRegExp(p.Ident,/^--/),this.consumeToken(),this.finish(n)}_parseFunction(){const e=this.mark(),n=this.create(Fn);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)n.getArguments().addChild(this._parseFunctionArgument())||this.markError(n,S.ExpressionExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(p.Ident))return null;const e=this.create(ze);if(e.referenceTypes=[Q.Function],this.acceptIdent("progid")){if(this.accept(p.Colon))for(;this.accept(p.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){const e=this.create(Gt);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(p.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){const e=this.create(Pi);return this.consumeToken(),this.finish(e)}else return null}}function mm(t,e){let n=0,r=t.length;if(r===0)return 0;for(;ne+n||this.offset===e&&this.length===n?this.findInScope(e,n):null}findInScope(e,n=0){const r=e+n,i=mm(this.children,a=>a.offset>r);if(i===0)return this;const s=this.children[i-1];return s.offset<=e&&s.offset+s.length>=e+n?s.findInScope(e,n):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,n){for(let r=0;r0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ye.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return ye.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(f){return f===!0||f===!1}t.boolean=i;function s(f){return e.call(f)==="[object String]"}t.string=s;function a(f){return e.call(f)==="[object Number]"}t.number=a;function o(f,g,b){return e.call(f)==="[object Number]"&&g<=f&&f<=b}t.numberRange=o;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}t.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}t.uinteger=c;function d(f){return e.call(f)==="[object Function]"}t.func=d;function u(f){return f!==null&&typeof f=="object"}t.objectLiteral=u;function m(f,g){return Array.isArray(f)&&f.every(g)}t.typedArray=m})(C||(C={}));class Tn{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(Tn.isIncremental(r)){const i=pc(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let c=this._lineOffsets;const d=uc(r.text,!1,s);if(l-o===d.length)for(let m=0,f=d.length;me?i=a:r=a+1}let s=r-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),l=0;const c=[];for(const d of o){let u=i.offsetAt(d.range.start);if(ul&&c.push(a.substring(l,u)),d.newText.length&&c.push(d.newText),l=i.offsetAt(d.range.end)}return c.push(a.substr(l)),c.join("")}t.applyEdits=r})(is||(is={}));function ss(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);ss(r,e),ss(i,e);let s=0,a=0,o=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function Kp(t){const e=pc(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var mc;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[He.Markdown,He.PlainText]}},hover:{contentFormat:[He.Markdown,He.PlainText]}}}})(mc||(mc={}));var On;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(On||(On={}));const Zp=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,em=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:w("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:w("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:w("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:w("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:w("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:w("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:w("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:w("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:w("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:w("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a polar color space.")}],tm=/^(rgb|rgba|hsl|hsla|hwb)$/i,Sr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},nm=new RegExp(`^(${Object.keys(Sr).join("|")})$`,"i"),as={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},rm=new RegExp(`^(${Object.keys(as).join("|")})$`,"i");function gt(t,e){const r=t.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(e=100);const i=parseFloat(r[1])/e;if(i>=0&&i<=1)return i}throw new Error}function fc(t){const e=t.getText(),n=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof n[2]>"u")return parseFloat(e)%360}throw new Error}function im(t){const e=t.getName();return e?tm.test(e):!1}function gc(t){return Zp.test(t)||nm.test(t)||rm.test(t)}const bc=48,sm=57,am=65,Cr=97,om=102;function de(t){return t=Cr&&t<=om?t-Cr+10:0)}function wc(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:de(t.charCodeAt(1))*17/255,green:de(t.charCodeAt(2))*17/255,blue:de(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:de(t.charCodeAt(1))*17/255,green:de(t.charCodeAt(2))*17/255,blue:de(t.charCodeAt(3))*17/255,alpha:de(t.charCodeAt(4))*17/255};case 7:return{red:(de(t.charCodeAt(1))*16+de(t.charCodeAt(2)))/255,green:(de(t.charCodeAt(3))*16+de(t.charCodeAt(4)))/255,blue:(de(t.charCodeAt(5))*16+de(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(de(t.charCodeAt(1))*16+de(t.charCodeAt(2)))/255,green:(de(t.charCodeAt(3))*16+de(t.charCodeAt(4)))/255,blue:(de(t.charCodeAt(5))*16+de(t.charCodeAt(6)))/255,alpha:(de(t.charCodeAt(7))*16+de(t.charCodeAt(8)))/255}}return null}function vc(t,e,n,r=1){if(t=t/60,e===0)return{red:n,green:n,blue:n,alpha:r};{const i=(o,l,c)=>{for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-o)*c+o:c<3?l:c<4?(l-o)*(4-c)+o:o},s=n<=.5?n*(e+1):n+e-n*e,a=n*2-s;return{red:i(a,s,t+2),green:i(a,s,t),blue:i(a,s,t-2),alpha:r}}}function yc(t){const e=t.red,n=t.green,r=t.blue,i=t.alpha,s=Math.max(e,n,r),a=Math.min(e,n,r);let o=0,l=0;const c=(a+s)/2,d=s-a;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case e:o=(n-r)/d+(n=1){const l=e/(e+n);return{red:l,green:l,blue:l,alpha:r}}const i=vc(t,1,.5,r);let s=i.red;s*=1-e-n,s+=e;let a=i.green;a*=1-e-n,a+=e;let o=i.blue;return o*=1-e-n,o+=e,{red:s,green:a,blue:o,alpha:r}}function cm(t){const e=yc(t),n=Math.min(t.red,t.green,t.blue),r=1-Math.max(t.red,t.green,t.blue);return{h:e.h,w:n,b:r,a:e.a}}function hm(t){if(t.type===v.HexColorValue){const e=t.getText();return wc(e)}else if(t.type===v.Function){const e=t,n=e.getName();let r=e.getArguments().getChildren();if(r.length===1){const i=r[0].getChildren();if(i.length===1&&i[0].type===v.Expression&&(r=i[0].getChildren(),r.length===3)){const s=r[2];if(s instanceof Oi){const a=s.getLeft(),o=s.getRight(),l=s.getOperator();a&&o&&l&&l.matches("/")&&(r=[r[0],r[1],a,o])}}}if(!n||r.length<3||r.length>4)return null;try{const i=r.length===4?gt(r[3],1):1;if(n==="rgb"||n==="rgba")return{red:gt(r[0],255),green:gt(r[1],255),blue:gt(r[2],255),alpha:i};if(n==="hsl"||n==="hsla"){const s=fc(r[0]),a=gt(r[1],100),o=gt(r[2],100);return vc(s,a,o,i)}else if(n==="hwb"){const s=fc(r[0]),a=gt(r[1],100),o=gt(r[2],100);return lm(s,a,o,i)}}catch{return null}}else if(t.type===v.Identifier){if(t.parent&&t.parent.type!==v.Term)return null;const e=t.parent;if(e&&e.parent&&e.parent.type===v.BinaryExpression){const i=e.parent;if(i.parent&&i.parent.type===v.ListEntry&&i.parent.key===i)return null}const n=t.getText().toLowerCase();if(n==="none")return null;const r=Sr[n];if(r)return wc(r)}return null}const xc={bottom:"Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},Sc={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},Cc={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},dm=["medium","thick","thin"],kc={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},_c={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},Ec={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},Fc={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},Rc={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},Nc={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},Ic={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},Dc={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},um=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],pm=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],mm=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function kr(t){return Object.keys(t).map(e=>t[e])}function Te(t){return typeof t<"u"}class _r{constructor(e=new Nn){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:p.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return p.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return p.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return p.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return e.indexOf(this.token.type)!==-1}peekRegExp(e,n){return e!==this.token.type?!1:n.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){const e=this.scanner.tryScanUnicode();return e?(this.prevToken=e,this.token=this.scanner.scan(),!0):!1}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){const n=this.mark(),r=e();return r||(this.restoreAtMark(n),null)}acceptOneKeyword(e){if(p.AtKeyword===this.token.type){for(const n of e)if(n.length===this.token.text.length&&n===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1}accept(e){return e===this.token.type?(this.consumeToken(),!0):!1}acceptIdent(e){return this.peekIdent(e)?(this.consumeToken(),!0):!1}acceptKeyword(e){return this.peekKeyword(e)?(this.consumeToken(),!0):!1}acceptDelim(e){return this.peekDelim(e)?(this.consumeToken(),!0):!1}acceptRegexp(e){return e.test(this.token.text)?(this.consumeToken(),!0):!1}_parseRegexp(e){let n=this.createNode(v.Identifier);do;while(this.acceptRegexp(e));return this.finish(n)}acceptUnquotedString(){const e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);const n=this.scanner.scanUnquotedString();return n?(this.token=n,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,n){for(;;){if(e&&e.indexOf(this.token.type)!==-1)return this.consumeToken(),!0;if(n&&n.indexOf(this.token.type)!==-1)return!0;if(this.token.type===p.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new W(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,n,r,i){if(!(e instanceof ve)&&(n&&this.markError(e,n,r,i),this.prevToken)){const s=this.prevToken.offset+this.prevToken.len;e.length=s>e.offset?s-e.offset:0}return e}markError(e,n,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new yl(e,n,Ne.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)}parseStylesheet(e){const n=e.version,r=e.getText(),i=(s,a)=>{if(e.version!==n)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(s,a)};return this.internalParse(r,this._parseStylesheet,i)}internalParse(e,n,r){this.scanner.setSource(e),this.token=this.scanner.scan();const i=n.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=(s,a)=>e.substr(s,a)),i}_parseStylesheet(){const e=this.create(fp);for(;e.addChild(this._parseStylesheetStart()););let n=!1;do{let r=!1;do{r=!1;const i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,n=!1,!this.peek(p.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(p.SemiColon)&&this.markError(e,S.SemiColonExpected));this.accept(p.SemiColon)||this.accept(p.CDO)||this.accept(p.CDC);)r=!0,n=!1}while(r);if(this.peek(p.EOF))break;n||(this.peek(p.AtKeyword)?this.markError(e,S.UnknownAtRule):this.markError(e,S.RuleOrSelectorExpected),n=!0),this.consumeToken()}while(!this.peek(p.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){const n=this.mark();if(this._parseSelector(e)){for(;this.accept(p.Comma)&&this._parseSelector(e););if(this.accept(p.CurlyL))return this.restoreAtMark(n),this._parseRuleset(e)}return this.restoreAtMark(n),null}_parseRuleset(e=!1){const n=this.create(Ft),r=n.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(n,S.SelectorExpected);return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(p.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case v.Keyframe:case v.ViewPort:case v.Media:case v.Ruleset:case v.Namespace:case v.If:case v.For:case v.Each:case v.While:case v.MixinDeclaration:case v.FunctionDeclaration:case v.MixinContentDeclaration:return!1;case v.ExtendsReference:case v.MixinContentReference:case v.ReturnStatement:case v.MediaQuery:case v.Debug:case v.Import:case v.AtApplyRule:case v.CustomPropertyDeclaration:return!0;case v.VariableDeclaration:return e.needsSemicolon;case v.MixinReference:return!e.getContent();case v.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){const n=this.create(Li);if(!this.accept(p.CurlyL))return null;let r=e();for(;n.addChild(r)&&!this.peek(p.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(p.SemiColon))return this.finish(n,S.SemiColonExpected,[p.SemiColon,p.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===p.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(p.SemiColon););r=e()}return this.accept(p.CurlyR)?this.finish(n):this.finish(n,S.RightCurlyExpected,[p.CurlyR,p.SemiColon])}_parseBody(e,n){return e.setDeclarations(this._parseDeclarations(n))?this.finish(e):this.finish(e,S.LeftCurlyExpected,[p.CurlyR,p.SemiColon])}_parseSelector(e){const n=this.create(In);let r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());)r=!0,n.addChild(this._parseCombinator());return r?this.finish(n):null}_parseDeclaration(e){const n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;const r=this.create(Pe);return r.setProperty(this._parseProperty())?this.accept(p.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,S.PropertyValueExpected)):this.finish(r,S.ColonExpected,[p.Colon],e||[p.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(p.Ident,/^--/))return null;const n=this.create(bp);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(n,S.ColonExpected,[p.Colon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);const r=this.mark();if(this.peek(p.CurlyL)){const s=this.create(gp),a=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(s.setDeclarations(a)&&!a.isErroneous(!0)&&(s.addChild(this._parsePrio()),this.peek(p.SemiColon)))return this.finish(s),n.setPropertySet(s),n.semicolonPosition=this.token.offset,this.finish(n);this.restoreAtMark(r)}const i=this._parseExpr();return i&&!i.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],p.SemiColon,p.EOF))?(n.setValue(i),this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):(this.restoreAtMark(r),n.addChild(this._parseCustomPropertyValue(e)),n.addChild(this._parsePrio()),Te(n.colonPosition)&&this.token.offset===n.colonPosition+1?this.finish(n,S.PropertyValueExpected):this.finish(n))}_parseCustomPropertyValue(e=[p.CurlyR]){const n=this.create(W),r=()=>s===0&&a===0&&o===0,i=()=>e.indexOf(this.token.type)!==-1;let s=0,a=0,o=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(r())break e;break;case p.Exclamation:if(r())break e;break;case p.CurlyL:s++;break;case p.CurlyR:if(s--,s<0){if(i()&&a===0&&o===0)break e;return this.finish(n,S.LeftCurlyExpected)}break;case p.ParenthesisL:a++;break;case p.ParenthesisR:if(a--,a<0){if(i()&&o===0&&s===0)break e;return this.finish(n,S.LeftParenthesisExpected)}break;case p.BracketL:o++;break;case p.BracketR:if(o--,o<0)return this.finish(n,S.LeftSquareBracketExpected);break;case p.BadString:break e;case p.EOF:let l=S.RightCurlyExpected;return o>0?l=S.RightSquareBracketExpected:a>0&&(l=S.RightParenthesisExpected),this.finish(n,l)}this.consumeToken()}return this.finish(n)}_tryToParseDeclaration(e){const n=this.mark();return this._parseProperty()&&this.accept(p.Colon)?(this.restoreAtMark(n),this._parseDeclaration(e)):(this.restoreAtMark(n),null)}_parseProperty(){const e=this.create(Mi),n=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(n),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(p.Charset))return null;const e=this.create(W);return this.consumeToken(),this.accept(p.String)?this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected):this.finish(e,S.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(zi);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,S.URIOrStringExpected):this._completeParseImport(e)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(p.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,S.IdentifierExpected,[p.SemiColon]);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(p.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(p.ParenthesisR))?this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;const e=this.create(Np);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,S.URIExpected,[p.SemiColon]):this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected)}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;const e=this.create(dl);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;const e=this.create(kp);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(p.AtKeyword,this.keyframeRegex))return null;const e=this.create(pl),n=this.create(W);return this.consumeToken(),e.setKeyword(this.finish(n)),n.matches("@-ms-keyframes")&&this.markError(n,S.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,S.IdentifierExpected,[p.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([Q.Keyframe])}_parseKeyframeSelector(){const e=this.create(ml);let n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return null;for(;this.accept(p.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return this.finish(e,S.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){const e=this.create(ml),n=this.mark();let r=!1;if(e.addChild(this._parseIdent())&&(r=!0),this.accept(p.Percentage)&&(r=!0),!r)return null;for(;this.accept(p.Comma);)if(r=!1,e.addChild(this._parseIdent())&&(r=!0),this.accept(p.Percentage)&&(r=!0),!r)return this.restoreAtMark(n),null;return this.peek(p.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(n),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;const e=this.create(Dp);return this.consumeToken(),!this.peekRegExp(p.Ident,/^--/)||!e.setName(this._parseIdent([Q.Property]))?this.finish(e,S.IdentifierExpected):this._parseBody(e,this._parseDeclaration.bind(this))}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;const n=this.create(Ip);this.consumeToken();const r=this._parseLayerNameList();return r&&n.setNames(r),(!r||r.getChildren().length===1)&&this.peek(p.CurlyL)?this._parseBody(n,this._parseLayerDeclaration.bind(this,e)):this.accept(p.SemiColon)?this.finish(n):this.finish(n,S.SemiColonExpected)}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){const e=this.createNode(v.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,S.IdentifierExpected);return this.finish(e)}_parseLayerName(){const e=this.createNode(v.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,S.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;const n=this.create(Ti);return this.consumeToken(),n.addChild(this._parseSupportsCondition()),this._parseBody(n,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){const e=this.create(Ln);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(p.Ident,/^(and|or)$/i)){const n=this.token.text.toLowerCase();for(;this.acceptIdent(n);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){const e=this.create(Ln);if(this.accept(p.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([p.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,S.ConditionExpected):this.accept(p.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[]);if(this.peek(p.Ident)){const n=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=1;for(;this.token.type!==p.EOF&&r!==0;)this.token.type===p.ParenthesisL?r++:this.token.type===p.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(n)}return this.finish(e,S.LeftParenthesisExpected,[],[p.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;const n=this.create(Pi);return this.consumeToken(),n.addChild(this._parseMediaQueryList())?this._parseBody(n,this._parseMediaDeclaration.bind(this,e)):this.finish(n,S.MediaQueryExpected)}_parseMediaQueryList(){const e=this.create(fl);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){const e=this.create(gl),n=this.mark();if(this.acceptIdent("not"),this.peek(p.ParenthesisL))this.restoreAtMark(n),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){const e=this.mark(),n=this.create(Vp);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(n):this.finish(n,S.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){const e=this.create(Mp);this.acceptIdent("not");let n=!0;for(;n;){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);if(this.peek(p.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL]);n=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){const e=[p.ParenthesisR],n=this.create(zp);if(n.addChild(this._parseMediaFeatureName())){if(this.accept(p.Colon)){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e)}}else if(n.addChild(this._parseMediaFeatureValue())){if(!this._parseMediaFeatureRangeOperator())return this.finish(n,S.OperatorExpected,[],e);if(!n.addChild(this._parseMediaFeatureName()))return this.finish(n,S.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e)}else return this.finish(n,S.IdentifierExpected,[],e);return this.finish(n)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){const e=this.create(W);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;const e=this.create(Pp);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(p.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,S.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(p.AtKeyword))return null;const e=this.create(Tp);return this.acceptOneKeyword(mm)||this.markError(e,S.UnknownAtRule,[],[p.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(p.Ident)&&!this.peek(p.Colon))return null;const e=this.create(W);return e.addChild(this._parseIdent()),this.accept(p.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;const e=this.create(Lp);return this.consumeToken(),this.resync([],[p.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;const n=this.create(Ap);return this.consumeToken(),n.addChild(this._parseIdent()),n.addChild(this._parseContainerQuery()),this._parseBody(n,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){const e=this.create(W);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){const e=this.create(W);if(this.accept(p.ParenthesisL)){if(this.peekIdent("not")||this.peek(p.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL])}else if(this.acceptIdent("style")){if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseStyleQuery(){const e=this.create(W);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(p.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([p.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){const e=this.create(W);if(this.accept(p.ParenthesisL)){if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseUnknownAtRule(){if(!this.peek(p.AtKeyword))return null;const e=this.create(wl);e.addChild(this._parseUnknownAtRuleName());const n=()=>i===0&&s===0&&a===0;let r=0,i=0,s=0,a=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(n())break e;break;case p.EOF:return i>0?this.finish(e,S.RightCurlyExpected):a>0?this.finish(e,S.RightSquareBracketExpected):s>0?this.finish(e,S.RightParenthesisExpected):this.finish(e);case p.CurlyL:r++,i++;break;case p.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),a>0)return this.finish(e,S.RightSquareBracketExpected);if(s>0)return this.finish(e,S.RightParenthesisExpected);break e}if(i<0){if(s===0&&a===0)break e;return this.finish(e,S.LeftCurlyExpected)}break;case p.ParenthesisL:s++;break;case p.ParenthesisR:if(s--,s<0)return this.finish(e,S.LeftParenthesisExpected);break;case p.BracketL:a++;break;case p.BracketR:if(a--,a<0)return this.finish(e,S.LeftSquareBracketExpected);break}this.consumeToken()}return e}_parseUnknownAtRuleName(){const e=this.create(W);return this.accept(p.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(p.Dashmatch)||this.peek(p.Includes)||this.peek(p.SubstringOperator)||this.peek(p.PrefixOperator)||this.peek(p.SuffixOperator)||this.peekDelim("=")){const e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}else return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;const e=this.create(W);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){const e=this.create(W);this.consumeToken();const n=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return e.type=v.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){const e=this.create(W);return this.consumeToken(),e.type=v.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){const e=this.create(W);return this.consumeToken(),e.type=v.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){const e=this.create(W);this.consumeToken();const n=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return null}_parseSimpleSelector(){const e=this.create(Yt);let n=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&n++;(n===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)n++;return n>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(v.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(p.Hash)&&!this.peekDelim("#"))return null;const e=this.createNode(v.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,S.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;const e=this.createNode(v.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)}_parseElementName(){const e=this.mark(),n=this.createNode(v.ElementNameSelector);return n.addChild(this._parseNamespacePrefix()),!n.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(n)}_parseNamespacePrefix(){const e=this.mark(),n=this.createNode(v.NamespacePrefix);return!n.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(n):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(p.BracketL))return null;const e=this.create(Wp);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)):this.finish(e,S.IdentifierExpected)}_parsePseudo(){const e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(p.ParenthesisL)){const n=()=>{const i=this.create(W);if(!i.addChild(this._parseSelector(!0)))return null;for(;this.accept(p.Comma)&&i.addChild(this._parseSelector(!0)););return this.peek(p.ParenthesisR)?this.finish(i):null};if(!e.addChild(this.try(n))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(n)))return this.finish(e,S.SelectorExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(p.Colon))return null;const e=this.mark(),n=this.createNode(v.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(p.Colon),this.hasWhitespace()||!n.addChild(this._parseIdent())?this.finish(n,S.IdentifierExpected):this.finish(n))}_tryParsePrio(){const e=this.mark(),n=this._parsePrio();return n||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(p.Exclamation))return null;const e=this.createNode(v.Prio);return this.accept(p.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){const n=this.create(bl);if(!n.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(p.Comma)){if(e)return this.finish(n);this.consumeToken()}if(!n.addChild(this._parseBinaryExpr()))break}return this.finish(n)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;const e=this.create(mp);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(p.BracketL))return null;const e=this.createNode(v.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)}_parseBinaryExpr(e,n){let r=this.create(Oi);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(n||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,S.TermExpected);r=this.finish(r);const i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)}_parseTerm(){let e=this.create(Op);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;const e=this.create(W);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)}_parseNumeric(){if(this.peek(p.Num)||this.peek(p.Percentage)||this.peek(p.Resolution)||this.peek(p.Length)||this.peek(p.EMS)||this.peek(p.EXS)||this.peek(p.Angle)||this.peek(p.Time)||this.peek(p.Dimension)||this.peek(p.ContainerQueryLength)||this.peek(p.Freq)){const e=this.create(Vi);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(p.String)&&!this.peek(p.BadString))return null;const e=this.createNode(v.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(p.Ident,/^url(-prefix)?$/i))return null;const e=this.mark(),n=this.createNode(v.URILiteral);return this.accept(p.Ident),this.hasWhitespace()||!this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),n.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected))}_parseURLArgument(){const e=this.create(W);return!this.accept(p.String)&&!this.accept(p.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)}_parseIdent(e){if(!this.peek(p.Ident))return null;const n=this.create(ze);return e&&(n.referenceTypes=e),n.isCustomProperty=this.peekRegExp(p.Ident,/^--/),this.consumeToken(),this.finish(n)}_parseFunction(){const e=this.mark(),n=this.create(Dn);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)n.getArguments().addChild(this._parseFunctionArgument())||this.markError(n,S.ExpressionExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(p.Ident))return null;const e=this.create(ze);if(e.referenceTypes=[Q.Function],this.acceptIdent("progid")){if(this.accept(p.Colon))for(;this.accept(p.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){const e=this.create(Qt);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(p.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){const e=this.create(Wi);return this.consumeToken(),this.finish(e)}else return null}}function fm(t,e){let n=0,r=t.length;if(r===0)return 0;for(;ne+n||this.offset===e&&this.length===n?this.findInScope(e,n):null}findInScope(e,n=0){const r=e+n,i=fm(this.children,a=>a.offset>r);if(i===0)return this;const s=this.children[i-1];return s.offset<=e&&s.offset+s.length>=e+n?s.findInScope(e,n):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,n){for(let r=0;r/g,">")}function bm(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;let n="";if(e?.documentation!==!1){t.status&&(n+=Lc(t.status)),n+=t.description;const r=Ac(t.browsers);r&&(n+=` +`;default:return""}}function bt(t,e,n){let r;if(e?r={kind:"markdown",value:vm(t,n)}:r={kind:"plaintext",value:wm(t,n)},r.value!=="")return r}function Rr(t){return t=t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),t.replace(//g,">")}function wm(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;let n="";if(e?.documentation!==!1){t.status&&(n+=zc(t.status)),n+=t.description;const r=Pc(t.browsers);r&&(n+=` (`+r+")"),"syntax"in t&&(n+=` Syntax: ${t.syntax}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` -`),n+=t.references.map(r=>`${r.name}: ${r.url}`).join(" | ")),n}function wm(t,e){if(!t.description||t.description==="")return"";let n="";if(e?.documentation!==!1){t.status&&(n+=Lc(t.status)),typeof t.description=="string"?n+=_r(t.description):n+=t.description.kind===He.Markdown?t.description.value:_r(t.description.value);const r=Ac(t.browsers);r&&(n+=` +`),n+=t.references.map(r=>`${r.name}: ${r.url}`).join(" | ")),n}function vm(t,e){if(!t.description||t.description==="")return"";let n="";if(e?.documentation!==!1){t.status&&(n+=zc(t.status)),typeof t.description=="string"?n+=Rr(t.description):n+=t.description.kind===He.Markdown?t.description.value:Rr(t.description.value);const r=Pc(t.browsers);r&&(n+=` -(`+_r(r)+")"),"syntax"in t&&t.syntax&&(n+=` +(`+Rr(r)+")"),"syntax"in t&&t.syntax&&(n+=` -Syntax: ${_r(t.syntax)}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` +Syntax: ${Rr(t.syntax)}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` -`),n+=t.references.map(r=>`[${r.name}](${r.url})`).join(" | ")),n}function Ac(t=[]){return t.length===0?null:t.map(e=>{let n="";const r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in Dc&&(n+=Dc[i]),s&&(n+=" "+s),n}).join(", ")}var Mc;(()=>{var t={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function a(l,c){for(var d,u="",m=0,f=-1,g=0,b=0;b<=l.length;++b){if(b2){var k=u.lastIndexOf("/");if(k!==u.length-1){k===-1?(u="",m=0):m=(u=u.slice(0,k)).length-1-u.lastIndexOf("/"),f=b,g=0;continue}}else if(u.length===2||u.length===1){u="",m=0,f=b,g=0;continue}}c&&(u.length>0?u+="/..":u="..",m=2)}else u.length>0?u+="/"+l.slice(f+1,b):u=l.slice(f+1,b),m=b-f-1;f=b,g=0}else d===46&&g!==-1?++g:g=-1}return u}var o={resolve:function(){for(var l,c="",d=!1,u=arguments.length-1;u>=-1&&!d;u--){var m;u>=0?m=arguments[u]:(l===void 0&&(l=process.cwd()),m=l),s(m),m.length!==0&&(c=m+"/"+c,d=m.charCodeAt(0)===47)}return c=a(c,!d),d?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(l){if(s(l),l.length===0)return".";var c=l.charCodeAt(0)===47,d=l.charCodeAt(l.length-1)===47;return(l=a(l,!c)).length!==0||c||(l="."),l.length>0&&d&&(l+="/"),c?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,c=0;c0&&(l===void 0?l=d:l+="/"+d)}return l===void 0?".":o.normalize(l)},relative:function(l,c){if(s(l),s(c),l===c||(l=o.resolve(l))===(c=o.resolve(c)))return"";for(var d=1;db){if(c.charCodeAt(f+F)===47)return c.slice(f+F+1);if(F===0)return c.slice(f+F)}else m>b&&(l.charCodeAt(d+F)===47?k=F:F===0&&(k=0));break}var N=l.charCodeAt(d+F);if(N!==c.charCodeAt(f+F))break;N===47&&(k=F)}var _="";for(F=d+k+1;F<=u;++F)F!==u&&l.charCodeAt(F)!==47||(_.length===0?_+="..":_+="/..");return _.length>0?_+c.slice(f+k):(f+=k,c.charCodeAt(f)===47&&++f,c.slice(f))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var c=l.charCodeAt(0),d=c===47,u=-1,m=!0,f=l.length-1;f>=1;--f)if((c=l.charCodeAt(f))===47){if(!m){u=f;break}}else m=!1;return u===-1?d?"/":".":d&&u===1?"//":l.slice(0,u)},basename:function(l,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');s(l);var d,u=0,m=-1,f=!0;if(c!==void 0&&c.length>0&&c.length<=l.length){if(c.length===l.length&&c===l)return"";var g=c.length-1,b=-1;for(d=l.length-1;d>=0;--d){var k=l.charCodeAt(d);if(k===47){if(!f){u=d+1;break}}else b===-1&&(f=!1,b=d+1),g>=0&&(k===c.charCodeAt(g)?--g==-1&&(m=d):(g=-1,m=b))}return u===m?m=b:m===-1&&(m=l.length),l.slice(u,m)}for(d=l.length-1;d>=0;--d)if(l.charCodeAt(d)===47){if(!f){u=d+1;break}}else m===-1&&(f=!1,m=d+1);return m===-1?"":l.slice(u,m)},extname:function(l){s(l);for(var c=-1,d=0,u=-1,m=!0,f=0,g=l.length-1;g>=0;--g){var b=l.charCodeAt(g);if(b!==47)u===-1&&(m=!1,u=g+1),b===46?c===-1?c=g:f!==1&&(f=1):c!==-1&&(f=-1);else if(!m){d=g+1;break}}return c===-1||u===-1||f===0||f===1&&c===u-1&&c===d+1?"":l.slice(c,u)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return(function(c,d){var u=d.dir||d.root,m=d.base||(d.name||"")+(d.ext||"");return u?u===d.root?u+m:u+"/"+m:m})(0,l)},parse:function(l){s(l);var c={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return c;var d,u=l.charCodeAt(0),m=u===47;m?(c.root="/",d=1):d=0;for(var f=-1,g=0,b=-1,k=!0,F=l.length-1,N=0;F>=d;--F)if((u=l.charCodeAt(F))!==47)b===-1&&(k=!1,b=F+1),u===46?f===-1?f=F:N!==1&&(N=1):f!==-1&&(N=-1);else if(!k){g=F+1;break}return f===-1||b===-1||N===0||N===1&&f===b-1&&f===g+1?b!==-1&&(c.base=c.name=g===0&&m?l.slice(1,b):l.slice(g,b)):(g===0&&m?(c.name=l.slice(1,f),c.base=l.slice(1,b)):(c.name=l.slice(g,f),c.base=l.slice(g,b)),c.ext=l.slice(f,b)),g>0?c.dir=l.slice(0,g-1):m&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>m,Utils:()=>$}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function l(L,y){if(!L.scheme&&y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${L.authority}", path: "${L.path}", query: "${L.query}", fragment: "${L.fragment}"}`);if(L.scheme&&!s.test(L.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(L.path){if(L.authority){if(!a.test(L.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(L.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const c="",d="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{static isUri(y){return y instanceof m||!!y&&typeof y.authority=="string"&&typeof y.fragment=="string"&&typeof y.path=="string"&&typeof y.query=="string"&&typeof y.scheme=="string"&&typeof y.fsPath=="string"&&typeof y.with=="function"&&typeof y.toString=="function"}scheme;authority;path;query;fragment;constructor(y,E,D,A,M,P=!1){typeof y=="object"?(this.scheme=y.scheme||c,this.authority=y.authority||c,this.path=y.path||c,this.query=y.query||c,this.fragment=y.fragment||c):(this.scheme=(function(H,ee){return H||ee?H:"file"})(y,P),this.authority=E||c,this.path=(function(H,ee){switch(H){case"https":case"http":case"file":ee?ee[0]!==d&&(ee=d+ee):ee=d}return ee})(this.scheme,D||c),this.query=A||c,this.fragment=M||c,l(this,P))}get fsPath(){return N(this)}with(y){if(!y)return this;let{scheme:E,authority:D,path:A,query:M,fragment:P}=y;return E===void 0?E=this.scheme:E===null&&(E=c),D===void 0?D=this.authority:D===null&&(D=c),A===void 0?A=this.path:A===null&&(A=c),M===void 0?M=this.query:M===null&&(M=c),P===void 0?P=this.fragment:P===null&&(P=c),E===this.scheme&&D===this.authority&&A===this.path&&M===this.query&&P===this.fragment?this:new g(E,D,A,M,P)}static parse(y,E=!1){const D=u.exec(y);return D?new g(D[2]||c,V(D[4]||c),V(D[5]||c),V(D[7]||c),V(D[9]||c),E):new g(c,c,c,c,c)}static file(y){let E=c;if(i&&(y=y.replace(/\\/g,d)),y[0]===d&&y[1]===d){const D=y.indexOf(d,2);D===-1?(E=y.substring(2),y=d):(E=y.substring(2,D),y=y.substring(D)||d)}return new g("file",E,y,c,c)}static from(y){const E=new g(y.scheme,y.authority,y.path,y.query,y.fragment);return l(E,!0),E}toString(y=!1){return _(this,y)}toJSON(){return this}static revive(y){if(y){if(y instanceof m)return y;{const E=new g(y);return E._formatted=y.external,E._fsPath=y._sep===f?y.fsPath:null,E}}return y}}const f=i?1:void 0;class g extends m{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=N(this)),this._fsPath}toString(y=!1){return y?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){const y={$mid:1};return this._fsPath&&(y.fsPath=this._fsPath,y._sep=f),this._formatted&&(y.external=this._formatted),this.path&&(y.path=this.path),this.scheme&&(y.scheme=this.scheme),this.authority&&(y.authority=this.authority),this.query&&(y.query=this.query),this.fragment&&(y.fragment=this.fragment),y}}const b={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function k(L,y,E){let D,A=-1;for(let M=0;M=97&&P<=122||P>=65&&P<=90||P>=48&&P<=57||P===45||P===46||P===95||P===126||y&&P===47||E&&P===91||E&&P===93||E&&P===58)A!==-1&&(D+=encodeURIComponent(L.substring(A,M)),A=-1),D!==void 0&&(D+=L.charAt(M));else{D===void 0&&(D=L.substr(0,M));const H=b[P];H!==void 0?(A!==-1&&(D+=encodeURIComponent(L.substring(A,M)),A=-1),D+=H):A===-1&&(A=M)}}return A!==-1&&(D+=encodeURIComponent(L.substring(A))),D!==void 0?D:L}function F(L){let y;for(let E=0;E1&&L.scheme==="file"?`//${L.authority}${L.path}`:L.path.charCodeAt(0)===47&&(L.path.charCodeAt(1)>=65&&L.path.charCodeAt(1)<=90||L.path.charCodeAt(1)>=97&&L.path.charCodeAt(1)<=122)&&L.path.charCodeAt(2)===58?L.path[1].toLowerCase()+L.path.substr(2):L.path,i&&(E=E.replace(/\//g,"\\")),E}function _(L,y){const E=y?F:k;let D="",{scheme:A,authority:M,path:P,query:H,fragment:ee}=L;if(A&&(D+=A,D+=":"),(M||A==="file")&&(D+=d,D+=d),M){let G=M.indexOf("@");if(G!==-1){const xe=M.substr(0,G);M=M.substr(G+1),G=xe.lastIndexOf(":"),G===-1?D+=E(xe,!1,!1):(D+=E(xe.substr(0,G),!1,!1),D+=":",D+=E(xe.substr(G+1),!1,!0)),D+="@"}M=M.toLowerCase(),G=M.lastIndexOf(":"),G===-1?D+=E(M,!1,!0):(D+=E(M.substr(0,G),!1,!0),D+=M.substr(G))}if(P){if(P.length>=3&&P.charCodeAt(0)===47&&P.charCodeAt(2)===58){const G=P.charCodeAt(1);G>=65&&G<=90&&(P=`/${String.fromCharCode(G+32)}:${P.substr(3)}`)}else if(P.length>=2&&P.charCodeAt(1)===58){const G=P.charCodeAt(0);G>=65&&G<=90&&(P=`${String.fromCharCode(G+32)}:${P.substr(2)}`)}D+=E(P,!0,!1)}return H&&(D+="?",D+=E(H,!1,!1)),ee&&(D+="#",D+=y?ee:k(ee,!1,!1)),D}function T(L){try{return decodeURIComponent(L)}catch{return L.length>3?L.substr(0,3)+T(L.substr(3)):L}}const O=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function V(L){return L.match(O)?L.replace(O,(y=>T(y))):L}var I=n(470);const R=I.posix||I,z="/";var $;(function(L){L.joinPath=function(y,...E){return y.with({path:R.join(y.path,...E)})},L.resolvePath=function(y,...E){let D=y.path,A=!1;D[0]!==z&&(D=z+D,A=!0);let M=R.resolve(D,...E);return A&&M[0]===z&&!y.authority&&(M=M.substring(1)),y.with({path:M})},L.dirname=function(y){if(y.path.length===0||y.path===z)return y;let E=R.dirname(y.path);return E.length===1&&E.charCodeAt(0)===46&&(E=""),y.with({path:E})},L.basename=function(y){return R.basename(y.path)},L.extname=function(y){return R.extname(y.path)}})($||($={}))})(),Mc=r})();const{URI:ss,Utils:gt}=Mc;function as(t){return gt.dirname(ss.parse(t)).toString(!0)}function Yt(t,...e){return gt.joinPath(ss.parse(t),...e).toString(!0)}class vm{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,n){const r={items:[],isIncomplete:!1};for(const i of this.literalCompletions){const s=i.uriValue,a=os(s);if(a==="."||a==="..")r.isIncomplete=!0;else{const o=await this.providePathSuggestions(s,i.position,i.range,e,n);for(let l of o)r.items.push(l)}}for(const i of this.importCompletions){const s=i.pathValue,a=os(s);if(a==="."||a==="..")r.isIncomplete=!0;else{let o=await this.providePathSuggestions(s,i.position,i.range,e,n);e.languageId==="scss"&&o.forEach(l=>{pe(l.label,"_")&&sl(l.label,".scss")&&(l.textEdit?l.textEdit.newText=l.label.slice(1,-5):l.label=l.label.slice(1,-5))});for(let l of o)r.items.push(l)}}return r}async providePathSuggestions(e,n,r,i,s){const a=os(e),o=pe(e,"'")||pe(e,'"'),l=o?a.slice(0,n.character-(r.start.character+1)):a.slice(0,n.character-r.start.character),c=i.uri,d=o?Cm(r,1,-1):r,u=xm(l,a,d),m=l.substring(0,l.lastIndexOf("/")+1);let f=s.resolveReference(m||".",c);if(f)try{const g=[],b=await this.readDirectory(f);for(const[k,F]of b)k.charCodeAt(0)!==ym&&(F===Mn.Directory||Yt(f,k)!==c)&&g.push(Sm(k,F===Mn.Directory,u));return g}catch{}return[]}}const ym=46;function os(t){return pe(t,"'")||pe(t,'"')?t.slice(1,-1):t}function xm(t,e,n){let r;const i=t.lastIndexOf("/");if(i===-1)r=n;else{const s=e.slice(i+1),a=Fr(n.end,-s.length),o=s.indexOf(" ");let l;o!==-1?l=Fr(a,o):l=n.end,r=K.create(a,l)}return r}function Sm(t,e,n){return e?(t=t+"/",{label:Er(t),kind:q.Folder,textEdit:j.replace(n,Er(t)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:Er(t),kind:q.File,textEdit:j.replace(n,Er(t))}}function Er(t){return t.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function Fr(t,e){return ye.create(t.line,t.character+e)}function Cm(t,e,n){const r=Fr(t.start,e),i=Fr(t.end,n);return K.create(r,i)}const nt=Ie.Snippet,zc={title:"Suggest",command:"editor.action.triggerSuggest"};var Ge;(function(t){t.Enums=" ",t.Normal="d",t.VendorPrefixed="x",t.Term="y",t.Variable="z"})(Ge||(Ge={}));class ls{constructor(e=null,n,r){this.variablePrefix=e,this.lsOptions=n,this.cssDataManager=r,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new is(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,n,r,i,s=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,n,r,s);const a=new vm(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[a].concat(o);const l=this.doComplete(e,n,r,s);try{const c=await a.computeCompletions(e,i);return{isIncomplete:l.isIncomplete||c.isIncomplete,itemDefaults:l.itemDefaults,items:c.items.concat(l.items)}}finally{this.completionParticipants=o}}doComplete(e,n,r,i){this.offset=e.offsetAt(n),this.position=n,this.currentWord=Fm(e,this.offset),this.defaultReplaceRange=K.create(ye.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=r,this.documentSettings=i;try{const s={isIncomplete:!1,itemDefaults:{editRange:{start:{line:n.line,character:n.character-this.currentWord.length},end:n}},items:[]};this.nodePath=Ri(this.styleSheet,this.offset);for(let a=this.nodePath.length-1;a>=0;a--){const o=this.nodePath[a];if(o instanceof Di)this.getCompletionsForDeclarationProperty(o.getParent(),s);else if(o instanceof ml)o.parent instanceof Oi?this.getVariableProposals(null,s):this.getCompletionsForExpression(o,s);else if(o instanceof Ht){const l=o.findAParent(v.ExtendsReference,v.Ruleset);if(l)if(l.type===v.ExtendsReference)this.getCompletionsForExtendsReference(l,o,s);else{const c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(o instanceof Gt)this.getCompletionsForFunctionArgument(o,o.getParent(),s);else if(o instanceof Ni)this.getCompletionsForDeclarations(o,s);else if(o instanceof hr)this.getCompletionsForVariableDeclaration(o,s);else if(o instanceof Ct)this.getCompletionsForRuleSet(o,s);else if(o instanceof Oi)this.getCompletionsForInterpolation(o,s);else if(o instanceof cr)this.getCompletionsForFunctionDeclaration(o,s);else if(o instanceof dr)this.getCompletionsForMixinReference(o,s);else if(o instanceof Fn)this.getCompletionsForFunctionArgument(null,o,s);else if(o instanceof Mi)this.getCompletionsForSupports(o,s);else if(o instanceof Rn)this.getCompletionsForSupportsCondition(o,s);else if(o instanceof Nn)this.getCompletionsForExtendsReference(o,null,s);else if(o.type===v.URILiteral)this.getCompletionForUriLiteralValue(o,s);else if(o.parent===null)this.getCompletionForTopLevel(s);else if(o.type===v.StringLiteral&&this.isImportPathParent(o.parent.type))this.getCompletionForImportPath(o,s);else continue;if(s.items.length>0||this.offset>o.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===v.Import}finalize(e){return e}findInNodePath(...e){for(let n=this.nodePath.length-1;n>=0;n--){const r=this.nodePath[n];if(e.indexOf(r.type)!==-1)return r}return null}getCompletionsForDeclarationProperty(e,n){return this.getPropertyProposals(e,n)}getPropertyProposals(e,n){const r=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(a=>{let o,l,c=!1;e?(o=this.getCompletionRange(e.getProperty()),l=a.name,Te(e.colonPosition)||(l+=": ",c=!0)):(o=this.getCompletionRange(null),l=a.name+": ",c=!0),!e&&i&&(l+="$0;"),e&&!e.semicolonPosition&&i&&this.offset>=this.textDocument.offsetAt(o.end)&&(l+="$0;");const d={label:a.name,documentation:ft(a,this.doesSupportMarkdown()),tags:zn(a)?[_t.Deprecated]:[],textEdit:j.replace(o,l),insertTextFormat:Ie.Snippet,kind:q.Property};a.restrictions||(c=!1),r&&c&&(d.command=zc);const m=(255-(typeof a.relevance=="number"?Math.min(Math.max(a.relevance,0),99):50)).toString(16),f=pe(a.name,"-")?Ge.VendorPrefixed:Ge.Normal;d.sortText=f+"_"+m,n.items.push(d)}),this.completionParticipants.forEach(a=>{a.onCssProperty&&a.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),n}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,n){const r=e.getFullPropertyName(),i=this.cssDataManager.getProperty(r);let s=e.getValue()||null;for(;s&&s.hasChildren();)s=s.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(a=>{a.onCssPropertyValue&&a.onCssPropertyValue({propertyName:r,propertyValue:this.currentWord,range:this.getCompletionRange(s)})}),i){if(i.restrictions)for(const a of i.restrictions)switch(a){case"color":this.getColorProposals(i,s,n);break;case"position":this.getPositionProposals(i,s,n);break;case"repeat":this.getRepeatStyleProposals(i,s,n);break;case"line-style":this.getLineStyleProposals(i,s,n);break;case"line-width":this.getLineWidthProposals(i,s,n);break;case"geometry-box":this.getGeometryBoxProposals(i,s,n);break;case"box":this.getBoxProposals(i,s,n);break;case"image":this.getImageProposals(i,s,n);break;case"timing-function":this.getTimingFunctionProposals(i,s,n);break;case"shape":this.getBasicShapeProposals(i,s,n);break}this.getValueEnumProposals(i,s,n),this.getCSSWideKeywordProposals(i,s,n),this.getUnitProposals(i,s,n)}else{const a=km(this.styleSheet,e);for(const o of a.getEntries())n.items.push({label:o,textEdit:j.replace(this.getCompletionRange(s),o),kind:q.Value})}return this.getVariableProposals(s,n),this.getTermProposals(i,s,n),n}getValueEnumProposals(e,n,r){if(e.values)for(const i of e.values){let s=i.name,a;if(sl(s,")")){const c=s.lastIndexOf("(");c!==-1&&(s=s.substring(0,c+1)+"$1"+s.substring(c+1),a=nt)}let o=Ge.Enums;pe(i.name,"-")&&(o+=Ge.VendorPrefixed);const l={label:i.name,documentation:ft(i,this.doesSupportMarkdown()),tags:zn(e)?[_t.Deprecated]:[],textEdit:j.replace(this.getCompletionRange(n),s),sortText:o,kind:q.Value,insertTextFormat:a};r.items.push(l)}return r}getCSSWideKeywordProposals(e,n,r){for(const i in Cc)r.items.push({label:i,documentation:Cc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});for(const i in kc){const s=Qt(i);r.items.push({label:i,documentation:kc[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:nt,command:pe(i,"var")?zc:void 0})}return r}getCompletionsForInterpolation(e,n){return this.offset>=e.offset+2&&this.getVariableProposals(null,n),n}getVariableProposals(e,n){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,Q.Variable);for(const i of r){const s=pe(i.name,"--")?`var(${i.name})`:i.name,a={label:i.name,documentation:i.value?al(i.value):i.value,textEdit:j.replace(this.getCompletionRange(e),s),kind:q.Variable,sortText:Ge.Variable};if(typeof a.documentation=="string"&&pc(a.documentation)&&(a.kind=q.Color),i.node.type===v.FunctionParameter){const o=i.node.getParent();o.type===v.MixinDeclaration&&(a.detail=w("argument from '{0}'",o.getName()))}n.items.push(a)}return n}getVariableProposalsForCSSVarFunction(e){const n=new cs;this.styleSheet.acceptVisitor(new Em(n,this.offset));let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,Q.Variable);for(const i of r){if(pe(i.name,"--")){const s={label:i.name,documentation:i.value?al(i.value):i.value,textEdit:j.replace(this.getCompletionRange(null),i.name),kind:q.Variable};typeof s.documentation=="string"&&pc(s.documentation)&&(s.kind=q.Color),e.items.push(s)}n.remove(i.name)}for(const i of n.getEntries())if(pe(i,"--")){const s={label:i,textEdit:j.replace(this.getCompletionRange(null),i),kind:q.Variable};e.items.push(s)}return e}getUnitProposals(e,n,r){let i="0";if(this.currentWord.length>0){const s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(n&&n.parent&&n.parent.type===v.Term&&(n=n.getParent()),e.restrictions)for(const s of e.restrictions){const a=Rc[s];if(a)for(const o of a){const l=i+o;r.items.push({label:l,textEdit:j.replace(this.getCompletionRange(n),l),kind:q.Unit})}}return r}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){const n=e.end!==-1?this.textDocument.positionAt(e.end):this.position,r=this.textDocument.positionAt(e.offset);if(r.line===n.line)return K.create(r,n)}return this.defaultReplaceRange}getColorProposals(e,n,r){for(const s in vr)r.items.push({label:s,documentation:vr[s],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Color});for(const s in rs)r.items.push({label:s,documentation:rs[s],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Value});const i=new cs;this.styleSheet.acceptVisitor(new _m(i,this.offset));for(const s of i.getEntries())r.items.push({label:s,textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Color});for(const s of Zp)r.items.push({label:s.label,detail:s.func,documentation:s.desc,textEdit:j.replace(this.getCompletionRange(n),s.insertText),insertTextFormat:nt,kind:q.Function});return r}getPositionProposals(e,n,r){for(const i in wc)r.items.push({label:i,documentation:wc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getRepeatStyleProposals(e,n,r){for(const i in vc)r.items.push({label:i,documentation:vc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getLineStyleProposals(e,n,r){for(const i in yc)r.items.push({label:i,documentation:yc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getLineWidthProposals(e,n,r){for(const i of hm)r.items.push({label:i,textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getGeometryBoxProposals(e,n,r){for(const i in Sc)r.items.push({label:i,documentation:Sc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getBoxProposals(e,n,r){for(const i in xc)r.items.push({label:i,documentation:xc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getImageProposals(e,n,r){for(const i in _c){const s=Qt(i);r.items.push({label:i,documentation:_c[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:i!==s?nt:void 0})}return r}getTimingFunctionProposals(e,n,r){for(const i in Ec){const s=Qt(i);r.items.push({label:i,documentation:Ec[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:i!==s?nt:void 0})}return r}getBasicShapeProposals(e,n,r){for(const i in Fc){const s=Qt(i);r.items.push({label:i,documentation:Fc[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:i!==s?nt:void 0})}return r}getCompletionsForStylesheet(e){const n=this.styleSheet.findFirstChildBeforeOffset(this.offset);return n?n instanceof Ct?this.getCompletionsForRuleSet(n,e):n instanceof Mi?this.getCompletionsForSupports(n,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(n=>{e.items.push({label:n.name,textEdit:j.replace(this.getCompletionRange(null),n.name),documentation:ft(n,this.doesSupportMarkdown()),tags:zn(n)?[_t.Deprecated]:[],kind:q.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,n){const r=e.getDeclarations();return r&&r.endsWith("}")&&this.offset>=r.end?this.getCompletionForTopLevel(n):!r||this.offset<=r.offset?this.getCompletionsForSelector(e,e.isNested(),n):this.getCompletionsForDeclarations(e.getDeclarations(),n)}getCompletionsForSelector(e,n,r){const i=this.findInNodePath(v.PseudoSelector,v.IdentifierSelector,v.ClassSelector,v.ElementNameSelector);if(!i&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=K.create(ye.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(c=>{const d=Qt(c.name),u={label:c.name,textEdit:j.replace(this.getCompletionRange(i),d),documentation:ft(c,this.doesSupportMarkdown()),tags:zn(c)?[_t.Deprecated]:[],kind:q.Function,insertTextFormat:c.name!==d?nt:void 0};pe(c.name,":-")&&(u.sortText=Ge.VendorPrefixed),r.items.push(u)}),this.cssDataManager.getPseudoElements().forEach(c=>{const d=Qt(c.name),u={label:c.name,textEdit:j.replace(this.getCompletionRange(i),d),documentation:ft(c,this.doesSupportMarkdown()),tags:zn(c)?[_t.Deprecated]:[],kind:q.Function,insertTextFormat:c.name!==d?nt:void 0};pe(c.name,"::-")&&(u.sortText=Ge.VendorPrefixed),r.items.push(u)}),!n){for(const c of dm)r.items.push({label:c,textEdit:j.replace(this.getCompletionRange(i),c),kind:q.Keyword});for(const c of um)r.items.push({label:c,textEdit:j.replace(this.getCompletionRange(i),c),kind:q.Keyword})}const o={};o[this.currentWord]=!0;const l=this.textDocument.getText();if(this.styleSheet.accept(c=>{if(c.type===v.SimpleSelector&&c.length>0){const d=l.substr(c.offset,c.length);return d.charAt(0)==="."&&!o[d]&&(o[d]=!0,r.items.push({label:d,textEdit:j.replace(this.getCompletionRange(i),d),kind:q.Keyword})),!1}return!0}),e&&e.isNested()){const c=e.getSelectors().findFirstChildBeforeOffset(this.offset);c&&e.getSelectors().getChildren().indexOf(c)===0&&this.getPropertyProposals(null,r)}return r}getCompletionsForDeclarations(e,n){if(!e||this.offset===e.offset)return n;const r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,n);if(r instanceof Ii){const i=r;if(!Te(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,n);if(Te(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,n),n}getCompletionsForExpression(e,n){const r=e.getParent();if(r instanceof Gt)return this.getCompletionsForFunctionArgument(r,r.getParent(),n),n;const i=e.findParent(v.Declaration);if(!i)return this.getTermProposals(void 0,null,n),n;const s=e.findChildAtOffset(this.offset,!0);return s?s instanceof Ti||s instanceof ze?this.getCompletionsForDeclarationValue(i,n):n:this.getCompletionsForDeclarationValue(i,n)}getCompletionsForFunctionArgument(e,n,r){const i=n.getIdentifier();return i&&i.matches("var")&&(!n.getArguments().hasChildren()||n.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r}getCompletionsForFunctionDeclaration(e,n){const r=e.getDeclarations();return r&&this.offset>r.offset&&this.offset{s.onCssMixinReference&&s.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(i)})}),n}getTermProposals(e,n,r){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,Q.Function);for(const s of i)s.node instanceof cr&&r.items.push(this.makeTermProposal(s,s.node.getParameters(),n));return r}makeTermProposal(e,n,r){e.node;const i=n.getChildren().map(a=>a instanceof lr?a.getName():a.getText()),s=e.name+"("+i.map((a,o)=>"${"+(o+1)+":"+a+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+i.join(", ")+")",textEdit:j.replace(this.getCompletionRange(r),s),insertTextFormat:nt,kind:q.Function,sortText:Ge.Term}}getCompletionsForSupportsCondition(e,n){const r=e.findFirstChildBeforeOffset(this.offset);if(r){if(r instanceof Pe)return!Te(r.colonPosition)||this.offset<=r.colonPosition?this.getCompletionsForDeclarationProperty(r,n):this.getCompletionsForDeclarationValue(r,n);if(r instanceof Rn)return this.getCompletionsForSupportsCondition(r,n)}return Te(e.lParent)&&this.offset>e.lParent&&(!Te(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,n):n}getCompletionsForSupports(e,n){const r=e.getDeclarations();if(!r||this.offset<=r.offset){const s=e.findFirstChildBeforeOffset(this.offset);return s instanceof Rn?this.getCompletionsForSupportsCondition(s,n):n}return this.getCompletionForTopLevel(n)}getCompletionsForExtendsReference(e,n,r){return r}getCompletionForUriLiteralValue(e,n){let r,i,s;if(e.hasChildren()){const a=e.getChild(0);r=a.getText(),i=this.position,s=this.getCompletionRange(a)}else{r="",i=this.position;const a=this.textDocument.positionAt(e.offset+4);s=K.create(a,a)}return this.completionParticipants.forEach(a=>{a.onCssURILiteralValue&&a.onCssURILiteralValue({uriValue:r,position:i,range:s})}),n}getCompletionForImportPath(e,n){return this.completionParticipants.forEach(r=>{r.onCssImportPath&&r.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),n}hasCharacterAtPosition(e,n){const r=this.textDocument.getText();return e>=0&&e=0&&` -\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}let hs=class Ms{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(const n of this.attributes)if(n.name===e)return n.value}return null}addChild(e){e instanceof Ms&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){const n=this.attributes[this.attributes.length-1];n.value=n.value+e}}prepend(e){if(this.attributes){const n=this.attributes[0];n.value=e+n.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof Kt);)e=e.parent;return e}removeChild(e){if(this.children){const n=this.children.indexOf(e);if(n!==-1)return this.children.splice(n,1),!0}return!1}addAttr(e,n){this.attributes||(this.attributes=[]);for(const r of this.attributes)if(r.name===e){r.value+=" "+n;return}this.attributes.push({name:e,value:n})}clone(e=!0){const n=new Ms;if(this.attributes){n.attributes=[];for(const r of this.attributes)n.addAttr(r.name,r.value)}if(e&&this.children){n.children=[];for(let r=0;r`[${r.name}](${r.url})`).join(" | ")),n}function Pc(t=[]){return t.length===0?null:t.map(e=>{let n="";const r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in Mc&&(n+=Mc[i]),s&&(n+=" "+s),n}).join(", ")}var Tc;(()=>{var t={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function a(l,c){for(var d,u="",m=0,f=-1,g=0,b=0;b<=l.length;++b){if(b2){var _=u.lastIndexOf("/");if(_!==u.length-1){_===-1?(u="",m=0):m=(u=u.slice(0,_)).length-1-u.lastIndexOf("/"),f=b,g=0;continue}}else if(u.length===2||u.length===1){u="",m=0,f=b,g=0;continue}}c&&(u.length>0?u+="/..":u="..",m=2)}else u.length>0?u+="/"+l.slice(f+1,b):u=l.slice(f+1,b),m=b-f-1;f=b,g=0}else d===46&&g!==-1?++g:g=-1}return u}var o={resolve:function(){for(var l,c="",d=!1,u=arguments.length-1;u>=-1&&!d;u--){var m;u>=0?m=arguments[u]:(l===void 0&&(l=process.cwd()),m=l),s(m),m.length!==0&&(c=m+"/"+c,d=m.charCodeAt(0)===47)}return c=a(c,!d),d?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(l){if(s(l),l.length===0)return".";var c=l.charCodeAt(0)===47,d=l.charCodeAt(l.length-1)===47;return(l=a(l,!c)).length!==0||c||(l="."),l.length>0&&d&&(l+="/"),c?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,c=0;c0&&(l===void 0?l=d:l+="/"+d)}return l===void 0?".":o.normalize(l)},relative:function(l,c){if(s(l),s(c),l===c||(l=o.resolve(l))===(c=o.resolve(c)))return"";for(var d=1;db){if(c.charCodeAt(f+F)===47)return c.slice(f+F+1);if(F===0)return c.slice(f+F)}else m>b&&(l.charCodeAt(d+F)===47?_=F:F===0&&(_=0));break}var N=l.charCodeAt(d+F);if(N!==c.charCodeAt(f+F))break;N===47&&(_=F)}var E="";for(F=d+_+1;F<=u;++F)F!==u&&l.charCodeAt(F)!==47||(E.length===0?E+="..":E+="/..");return E.length>0?E+c.slice(f+_):(f+=_,c.charCodeAt(f)===47&&++f,c.slice(f))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var c=l.charCodeAt(0),d=c===47,u=-1,m=!0,f=l.length-1;f>=1;--f)if((c=l.charCodeAt(f))===47){if(!m){u=f;break}}else m=!1;return u===-1?d?"/":".":d&&u===1?"//":l.slice(0,u)},basename:function(l,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');s(l);var d,u=0,m=-1,f=!0;if(c!==void 0&&c.length>0&&c.length<=l.length){if(c.length===l.length&&c===l)return"";var g=c.length-1,b=-1;for(d=l.length-1;d>=0;--d){var _=l.charCodeAt(d);if(_===47){if(!f){u=d+1;break}}else b===-1&&(f=!1,b=d+1),g>=0&&(_===c.charCodeAt(g)?--g==-1&&(m=d):(g=-1,m=b))}return u===m?m=b:m===-1&&(m=l.length),l.slice(u,m)}for(d=l.length-1;d>=0;--d)if(l.charCodeAt(d)===47){if(!f){u=d+1;break}}else m===-1&&(f=!1,m=d+1);return m===-1?"":l.slice(u,m)},extname:function(l){s(l);for(var c=-1,d=0,u=-1,m=!0,f=0,g=l.length-1;g>=0;--g){var b=l.charCodeAt(g);if(b!==47)u===-1&&(m=!1,u=g+1),b===46?c===-1?c=g:f!==1&&(f=1):c!==-1&&(f=-1);else if(!m){d=g+1;break}}return c===-1||u===-1||f===0||f===1&&c===u-1&&c===d+1?"":l.slice(c,u)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return(function(c,d){var u=d.dir||d.root,m=d.base||(d.name||"")+(d.ext||"");return u?u===d.root?u+m:u+"/"+m:m})(0,l)},parse:function(l){s(l);var c={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return c;var d,u=l.charCodeAt(0),m=u===47;m?(c.root="/",d=1):d=0;for(var f=-1,g=0,b=-1,_=!0,F=l.length-1,N=0;F>=d;--F)if((u=l.charCodeAt(F))!==47)b===-1&&(_=!1,b=F+1),u===46?f===-1?f=F:N!==1&&(N=1):f!==-1&&(N=-1);else if(!_){g=F+1;break}return f===-1||b===-1||N===0||N===1&&f===b-1&&f===g+1?b!==-1&&(c.base=c.name=g===0&&m?l.slice(1,b):l.slice(g,b)):(g===0&&m?(c.name=l.slice(1,f),c.base=l.slice(1,b)):(c.name=l.slice(g,f),c.base=l.slice(g,b)),c.ext=l.slice(f,b)),g>0?c.dir=l.slice(0,g-1):m&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>m,Utils:()=>$}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function l(L,y){if(!L.scheme&&y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${L.authority}", path: "${L.path}", query: "${L.query}", fragment: "${L.fragment}"}`);if(L.scheme&&!s.test(L.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(L.path){if(L.authority){if(!a.test(L.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(L.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const c="",d="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{constructor(y,k,D,A,M,P=!1){yt(this,"scheme");yt(this,"authority");yt(this,"path");yt(this,"query");yt(this,"fragment");typeof y=="object"?(this.scheme=y.scheme||c,this.authority=y.authority||c,this.path=y.path||c,this.query=y.query||c,this.fragment=y.fragment||c):(this.scheme=(function(H,ee){return H||ee?H:"file"})(y,P),this.authority=k||c,this.path=(function(H,ee){switch(H){case"https":case"http":case"file":ee?ee[0]!==d&&(ee=d+ee):ee=d}return ee})(this.scheme,D||c),this.query=A||c,this.fragment=M||c,l(this,P))}static isUri(y){return y instanceof m||!!y&&typeof y.authority=="string"&&typeof y.fragment=="string"&&typeof y.path=="string"&&typeof y.query=="string"&&typeof y.scheme=="string"&&typeof y.fsPath=="string"&&typeof y.with=="function"&&typeof y.toString=="function"}get fsPath(){return N(this)}with(y){if(!y)return this;let{scheme:k,authority:D,path:A,query:M,fragment:P}=y;return k===void 0?k=this.scheme:k===null&&(k=c),D===void 0?D=this.authority:D===null&&(D=c),A===void 0?A=this.path:A===null&&(A=c),M===void 0?M=this.query:M===null&&(M=c),P===void 0?P=this.fragment:P===null&&(P=c),k===this.scheme&&D===this.authority&&A===this.path&&M===this.query&&P===this.fragment?this:new g(k,D,A,M,P)}static parse(y,k=!1){const D=u.exec(y);return D?new g(D[2]||c,V(D[4]||c),V(D[5]||c),V(D[7]||c),V(D[9]||c),k):new g(c,c,c,c,c)}static file(y){let k=c;if(i&&(y=y.replace(/\\/g,d)),y[0]===d&&y[1]===d){const D=y.indexOf(d,2);D===-1?(k=y.substring(2),y=d):(k=y.substring(2,D),y=y.substring(D)||d)}return new g("file",k,y,c,c)}static from(y){const k=new g(y.scheme,y.authority,y.path,y.query,y.fragment);return l(k,!0),k}toString(y=!1){return E(this,y)}toJSON(){return this}static revive(y){if(y){if(y instanceof m)return y;{const k=new g(y);return k._formatted=y.external,k._fsPath=y._sep===f?y.fsPath:null,k}}return y}}const f=i?1:void 0;class g extends m{constructor(){super(...arguments);yt(this,"_formatted",null);yt(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=N(this)),this._fsPath}toString(k=!1){return k?E(this,!0):(this._formatted||(this._formatted=E(this,!1)),this._formatted)}toJSON(){const k={$mid:1};return this._fsPath&&(k.fsPath=this._fsPath,k._sep=f),this._formatted&&(k.external=this._formatted),this.path&&(k.path=this.path),this.scheme&&(k.scheme=this.scheme),this.authority&&(k.authority=this.authority),this.query&&(k.query=this.query),this.fragment&&(k.fragment=this.fragment),k}}const b={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function _(L,y,k){let D,A=-1;for(let M=0;M=97&&P<=122||P>=65&&P<=90||P>=48&&P<=57||P===45||P===46||P===95||P===126||y&&P===47||k&&P===91||k&&P===93||k&&P===58)A!==-1&&(D+=encodeURIComponent(L.substring(A,M)),A=-1),D!==void 0&&(D+=L.charAt(M));else{D===void 0&&(D=L.substr(0,M));const H=b[P];H!==void 0?(A!==-1&&(D+=encodeURIComponent(L.substring(A,M)),A=-1),D+=H):A===-1&&(A=M)}}return A!==-1&&(D+=encodeURIComponent(L.substring(A))),D!==void 0?D:L}function F(L){let y;for(let k=0;k1&&L.scheme==="file"?`//${L.authority}${L.path}`:L.path.charCodeAt(0)===47&&(L.path.charCodeAt(1)>=65&&L.path.charCodeAt(1)<=90||L.path.charCodeAt(1)>=97&&L.path.charCodeAt(1)<=122)&&L.path.charCodeAt(2)===58?L.path[1].toLowerCase()+L.path.substr(2):L.path,i&&(k=k.replace(/\//g,"\\")),k}function E(L,y){const k=y?F:_;let D="",{scheme:A,authority:M,path:P,query:H,fragment:ee}=L;if(A&&(D+=A,D+=":"),(M||A==="file")&&(D+=d,D+=d),M){let G=M.indexOf("@");if(G!==-1){const xe=M.substr(0,G);M=M.substr(G+1),G=xe.lastIndexOf(":"),G===-1?D+=k(xe,!1,!1):(D+=k(xe.substr(0,G),!1,!1),D+=":",D+=k(xe.substr(G+1),!1,!0)),D+="@"}M=M.toLowerCase(),G=M.lastIndexOf(":"),G===-1?D+=k(M,!1,!0):(D+=k(M.substr(0,G),!1,!0),D+=M.substr(G))}if(P){if(P.length>=3&&P.charCodeAt(0)===47&&P.charCodeAt(2)===58){const G=P.charCodeAt(1);G>=65&&G<=90&&(P=`/${String.fromCharCode(G+32)}:${P.substr(3)}`)}else if(P.length>=2&&P.charCodeAt(1)===58){const G=P.charCodeAt(0);G>=65&&G<=90&&(P=`${String.fromCharCode(G+32)}:${P.substr(2)}`)}D+=k(P,!0,!1)}return H&&(D+="?",D+=k(H,!1,!1)),ee&&(D+="#",D+=y?ee:_(ee,!1,!1)),D}function T(L){try{return decodeURIComponent(L)}catch{return L.length>3?L.substr(0,3)+T(L.substr(3)):L}}const O=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function V(L){return L.match(O)?L.replace(O,(y=>T(y))):L}var I=n(470);const R=I.posix||I,z="/";var $;(function(L){L.joinPath=function(y,...k){return y.with({path:R.join(y.path,...k)})},L.resolvePath=function(y,...k){let D=y.path,A=!1;D[0]!==z&&(D=z+D,A=!0);let M=R.resolve(D,...k);return A&&M[0]===z&&!y.authority&&(M=M.substring(1)),y.with({path:M})},L.dirname=function(y){if(y.path.length===0||y.path===z)return y;let k=R.dirname(y.path);return k.length===1&&k.charCodeAt(0)===46&&(k=""),y.with({path:k})},L.basename=function(y){return R.basename(y.path)},L.extname=function(y){return R.extname(y.path)}})($||($={}))})(),Tc=r})();const{URI:ls,Utils:wt}=Tc;function cs(t){return wt.dirname(ls.parse(t)).toString(!0)}function en(t,...e){return wt.joinPath(ls.parse(t),...e).toString(!0)}class ym{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,n){const r={items:[],isIncomplete:!1};for(const i of this.literalCompletions){const s=i.uriValue,a=hs(s);if(a==="."||a==="..")r.isIncomplete=!0;else{const o=await this.providePathSuggestions(s,i.position,i.range,e,n);for(let l of o)r.items.push(l)}}for(const i of this.importCompletions){const s=i.pathValue,a=hs(s);if(a==="."||a==="..")r.isIncomplete=!0;else{let o=await this.providePathSuggestions(s,i.position,i.range,e,n);e.languageId==="scss"&&o.forEach(l=>{pe(l.label,"_")&&ll(l.label,".scss")&&(l.textEdit?l.textEdit.newText=l.label.slice(1,-5):l.label=l.label.slice(1,-5))});for(let l of o)r.items.push(l)}}return r}async providePathSuggestions(e,n,r,i,s){const a=hs(e),o=pe(e,"'")||pe(e,'"'),l=o?a.slice(0,n.character-(r.start.character+1)):a.slice(0,n.character-r.start.character),c=i.uri,d=o?km(r,1,-1):r,u=Sm(l,a,d),m=l.substring(0,l.lastIndexOf("/")+1);let f=s.resolveReference(m||".",c);if(f)try{const g=[],b=await this.readDirectory(f);for(const[_,F]of b)_.charCodeAt(0)!==xm&&(F===On.Directory||en(f,_)!==c)&&g.push(Cm(_,F===On.Directory,u));return g}catch{}return[]}}const xm=46;function hs(t){return pe(t,"'")||pe(t,'"')?t.slice(1,-1):t}function Sm(t,e,n){let r;const i=t.lastIndexOf("/");if(i===-1)r=n;else{const s=e.slice(i+1),a=Ir(n.end,-s.length),o=s.indexOf(" ");let l;o!==-1?l=Ir(a,o):l=n.end,r=K.create(a,l)}return r}function Cm(t,e,n){return e?(t=t+"/",{label:Nr(t),kind:q.Folder,textEdit:j.replace(n,Nr(t)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:Nr(t),kind:q.File,textEdit:j.replace(n,Nr(t))}}function Nr(t){return t.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function Ir(t,e){return ye.create(t.line,t.character+e)}function km(t,e,n){const r=Ir(t.start,e),i=Ir(t.end,n);return K.create(r,i)}const it=Ie.Snippet,Oc={title:"Suggest",command:"editor.action.triggerSuggest"};var Ge;(function(t){t.Enums=" ",t.Normal="d",t.VendorPrefixed="x",t.Term="y",t.Variable="z"})(Ge||(Ge={}));class ds{constructor(e=null,n,r){this.variablePrefix=e,this.lsOptions=n,this.cssDataManager=r,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new os(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,n,r,i,s=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,n,r,s);const a=new ym(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[a].concat(o);const l=this.doComplete(e,n,r,s);try{const c=await a.computeCompletions(e,i);return{isIncomplete:l.isIncomplete||c.isIncomplete,itemDefaults:l.itemDefaults,items:c.items.concat(l.items)}}finally{this.completionParticipants=o}}doComplete(e,n,r,i){this.offset=e.offsetAt(n),this.position=n,this.currentWord=Rm(e,this.offset),this.defaultReplaceRange=K.create(ye.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=r,this.documentSettings=i;try{const s={isIncomplete:!1,itemDefaults:{editRange:{start:{line:n.line,character:n.character-this.currentWord.length},end:n}},items:[]};this.nodePath=Di(this.styleSheet,this.offset);for(let a=this.nodePath.length-1;a>=0;a--){const o=this.nodePath[a];if(o instanceof Mi)this.getCompletionsForDeclarationProperty(o.getParent(),s);else if(o instanceof bl)o.parent instanceof $i?this.getVariableProposals(null,s):this.getCompletionsForExpression(o,s);else if(o instanceof Yt){const l=o.findAParent(v.ExtendsReference,v.Ruleset);if(l)if(l.type===v.ExtendsReference)this.getCompletionsForExtendsReference(l,o,s);else{const c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(o instanceof Qt)this.getCompletionsForFunctionArgument(o,o.getParent(),s);else if(o instanceof Li)this.getCompletionsForDeclarations(o,s);else if(o instanceof pr)this.getCompletionsForVariableDeclaration(o,s);else if(o instanceof Ft)this.getCompletionsForRuleSet(o,s);else if(o instanceof $i)this.getCompletionsForInterpolation(o,s);else if(o instanceof ur)this.getCompletionsForFunctionDeclaration(o,s);else if(o instanceof mr)this.getCompletionsForMixinReference(o,s);else if(o instanceof Dn)this.getCompletionsForFunctionArgument(null,o,s);else if(o instanceof Ti)this.getCompletionsForSupports(o,s);else if(o instanceof Ln)this.getCompletionsForSupportsCondition(o,s);else if(o instanceof An)this.getCompletionsForExtendsReference(o,null,s);else if(o.type===v.URILiteral)this.getCompletionForUriLiteralValue(o,s);else if(o.parent===null)this.getCompletionForTopLevel(s);else if(o.type===v.StringLiteral&&this.isImportPathParent(o.parent.type))this.getCompletionForImportPath(o,s);else continue;if(s.items.length>0||this.offset>o.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===v.Import}finalize(e){return e}findInNodePath(...e){for(let n=this.nodePath.length-1;n>=0;n--){const r=this.nodePath[n];if(e.indexOf(r.type)!==-1)return r}return null}getCompletionsForDeclarationProperty(e,n){return this.getPropertyProposals(e,n)}getPropertyProposals(e,n){const r=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(a=>{let o,l,c=!1;e?(o=this.getCompletionRange(e.getProperty()),l=a.name,Te(e.colonPosition)||(l+=": ",c=!0)):(o=this.getCompletionRange(null),l=a.name+": ",c=!0),!e&&i&&(l+="$0;"),e&&!e.semicolonPosition&&i&&this.offset>=this.textDocument.offsetAt(o.end)&&(l+="$0;");const d={label:a.name,documentation:bt(a,this.doesSupportMarkdown()),tags:Wn(a)?[Nt.Deprecated]:[],textEdit:j.replace(o,l),insertTextFormat:Ie.Snippet,kind:q.Property};a.restrictions||(c=!1),r&&c&&(d.command=Oc);const m=(255-(typeof a.relevance=="number"?Math.min(Math.max(a.relevance,0),99):50)).toString(16),f=pe(a.name,"-")?Ge.VendorPrefixed:Ge.Normal;d.sortText=f+"_"+m,n.items.push(d)}),this.completionParticipants.forEach(a=>{a.onCssProperty&&a.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),n}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,n){const r=e.getFullPropertyName(),i=this.cssDataManager.getProperty(r);let s=e.getValue()||null;for(;s&&s.hasChildren();)s=s.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(a=>{a.onCssPropertyValue&&a.onCssPropertyValue({propertyName:r,propertyValue:this.currentWord,range:this.getCompletionRange(s)})}),i){if(i.restrictions)for(const a of i.restrictions)switch(a){case"color":this.getColorProposals(i,s,n);break;case"position":this.getPositionProposals(i,s,n);break;case"repeat":this.getRepeatStyleProposals(i,s,n);break;case"line-style":this.getLineStyleProposals(i,s,n);break;case"line-width":this.getLineWidthProposals(i,s,n);break;case"geometry-box":this.getGeometryBoxProposals(i,s,n);break;case"box":this.getBoxProposals(i,s,n);break;case"image":this.getImageProposals(i,s,n);break;case"timing-function":this.getTimingFunctionProposals(i,s,n);break;case"shape":this.getBasicShapeProposals(i,s,n);break}this.getValueEnumProposals(i,s,n),this.getCSSWideKeywordProposals(i,s,n),this.getUnitProposals(i,s,n)}else{const a=_m(this.styleSheet,e);for(const o of a.getEntries())n.items.push({label:o,textEdit:j.replace(this.getCompletionRange(s),o),kind:q.Value})}return this.getVariableProposals(s,n),this.getTermProposals(i,s,n),n}getValueEnumProposals(e,n,r){if(e.values)for(const i of e.values){let s=i.name,a;if(ll(s,")")){const c=s.lastIndexOf("(");c!==-1&&(s=s.substring(0,c+1)+"$1"+s.substring(c+1),a=it)}let o=Ge.Enums;pe(i.name,"-")&&(o+=Ge.VendorPrefixed);const l={label:i.name,documentation:bt(i,this.doesSupportMarkdown()),tags:Wn(e)?[Nt.Deprecated]:[],textEdit:j.replace(this.getCompletionRange(n),s),sortText:o,kind:q.Value,insertTextFormat:a};r.items.push(l)}return r}getCSSWideKeywordProposals(e,n,r){for(const i in Ec)r.items.push({label:i,documentation:Ec[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});for(const i in Fc){const s=tn(i);r.items.push({label:i,documentation:Fc[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:it,command:pe(i,"var")?Oc:void 0})}return r}getCompletionsForInterpolation(e,n){return this.offset>=e.offset+2&&this.getVariableProposals(null,n),n}getVariableProposals(e,n){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,Q.Variable);for(const i of r){const s=pe(i.name,"--")?`var(${i.name})`:i.name,a={label:i.name,documentation:i.value?cl(i.value):i.value,textEdit:j.replace(this.getCompletionRange(e),s),kind:q.Variable,sortText:Ge.Variable};if(typeof a.documentation=="string"&&gc(a.documentation)&&(a.kind=q.Color),i.node.type===v.FunctionParameter){const o=i.node.getParent();o.type===v.MixinDeclaration&&(a.detail=w("argument from '{0}'",o.getName()))}n.items.push(a)}return n}getVariableProposalsForCSSVarFunction(e){const n=new us;this.styleSheet.acceptVisitor(new Fm(n,this.offset));let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,Q.Variable);for(const i of r){if(pe(i.name,"--")){const s={label:i.name,documentation:i.value?cl(i.value):i.value,textEdit:j.replace(this.getCompletionRange(null),i.name),kind:q.Variable};typeof s.documentation=="string"&&gc(s.documentation)&&(s.kind=q.Color),e.items.push(s)}n.remove(i.name)}for(const i of n.getEntries())if(pe(i,"--")){const s={label:i,textEdit:j.replace(this.getCompletionRange(null),i),kind:q.Variable};e.items.push(s)}return e}getUnitProposals(e,n,r){let i="0";if(this.currentWord.length>0){const s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(n&&n.parent&&n.parent.type===v.Term&&(n=n.getParent()),e.restrictions)for(const s of e.restrictions){const a=Dc[s];if(a)for(const o of a){const l=i+o;r.items.push({label:l,textEdit:j.replace(this.getCompletionRange(n),l),kind:q.Unit})}}return r}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){const n=e.end!==-1?this.textDocument.positionAt(e.end):this.position,r=this.textDocument.positionAt(e.offset);if(r.line===n.line)return K.create(r,n)}return this.defaultReplaceRange}getColorProposals(e,n,r){for(const s in Sr)r.items.push({label:s,documentation:Sr[s],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Color});for(const s in as)r.items.push({label:s,documentation:as[s],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Value});const i=new us;this.styleSheet.acceptVisitor(new Em(i,this.offset));for(const s of i.getEntries())r.items.push({label:s,textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Color});for(const s of em)r.items.push({label:s.label,detail:s.func,documentation:s.desc,textEdit:j.replace(this.getCompletionRange(n),s.insertText),insertTextFormat:it,kind:q.Function});return r}getPositionProposals(e,n,r){for(const i in xc)r.items.push({label:i,documentation:xc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getRepeatStyleProposals(e,n,r){for(const i in Sc)r.items.push({label:i,documentation:Sc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getLineStyleProposals(e,n,r){for(const i in Cc)r.items.push({label:i,documentation:Cc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getLineWidthProposals(e,n,r){for(const i of dm)r.items.push({label:i,textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getGeometryBoxProposals(e,n,r){for(const i in _c)r.items.push({label:i,documentation:_c[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getBoxProposals(e,n,r){for(const i in kc)r.items.push({label:i,documentation:kc[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getImageProposals(e,n,r){for(const i in Rc){const s=tn(i);r.items.push({label:i,documentation:Rc[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:i!==s?it:void 0})}return r}getTimingFunctionProposals(e,n,r){for(const i in Nc){const s=tn(i);r.items.push({label:i,documentation:Nc[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:i!==s?it:void 0})}return r}getBasicShapeProposals(e,n,r){for(const i in Ic){const s=tn(i);r.items.push({label:i,documentation:Ic[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:i!==s?it:void 0})}return r}getCompletionsForStylesheet(e){const n=this.styleSheet.findFirstChildBeforeOffset(this.offset);return n?n instanceof Ft?this.getCompletionsForRuleSet(n,e):n instanceof Ti?this.getCompletionsForSupports(n,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(n=>{e.items.push({label:n.name,textEdit:j.replace(this.getCompletionRange(null),n.name),documentation:bt(n,this.doesSupportMarkdown()),tags:Wn(n)?[Nt.Deprecated]:[],kind:q.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,n){const r=e.getDeclarations();return r&&r.endsWith("}")&&this.offset>=r.end?this.getCompletionForTopLevel(n):!r||this.offset<=r.offset?this.getCompletionsForSelector(e,e.isNested(),n):this.getCompletionsForDeclarations(e.getDeclarations(),n)}getCompletionsForSelector(e,n,r){const i=this.findInNodePath(v.PseudoSelector,v.IdentifierSelector,v.ClassSelector,v.ElementNameSelector);if(!i&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=K.create(ye.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(c=>{const d=tn(c.name),u={label:c.name,textEdit:j.replace(this.getCompletionRange(i),d),documentation:bt(c,this.doesSupportMarkdown()),tags:Wn(c)?[Nt.Deprecated]:[],kind:q.Function,insertTextFormat:c.name!==d?it:void 0};pe(c.name,":-")&&(u.sortText=Ge.VendorPrefixed),r.items.push(u)}),this.cssDataManager.getPseudoElements().forEach(c=>{const d=tn(c.name),u={label:c.name,textEdit:j.replace(this.getCompletionRange(i),d),documentation:bt(c,this.doesSupportMarkdown()),tags:Wn(c)?[Nt.Deprecated]:[],kind:q.Function,insertTextFormat:c.name!==d?it:void 0};pe(c.name,"::-")&&(u.sortText=Ge.VendorPrefixed),r.items.push(u)}),!n){for(const c of um)r.items.push({label:c,textEdit:j.replace(this.getCompletionRange(i),c),kind:q.Keyword});for(const c of pm)r.items.push({label:c,textEdit:j.replace(this.getCompletionRange(i),c),kind:q.Keyword})}const o={};o[this.currentWord]=!0;const l=this.textDocument.getText();if(this.styleSheet.accept(c=>{if(c.type===v.SimpleSelector&&c.length>0){const d=l.substr(c.offset,c.length);return d.charAt(0)==="."&&!o[d]&&(o[d]=!0,r.items.push({label:d,textEdit:j.replace(this.getCompletionRange(i),d),kind:q.Keyword})),!1}return!0}),e&&e.isNested()){const c=e.getSelectors().findFirstChildBeforeOffset(this.offset);c&&e.getSelectors().getChildren().indexOf(c)===0&&this.getPropertyProposals(null,r)}return r}getCompletionsForDeclarations(e,n){if(!e||this.offset===e.offset)return n;const r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,n);if(r instanceof Ai){const i=r;if(!Te(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,n);if(Te(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,n),n}getCompletionsForExpression(e,n){const r=e.getParent();if(r instanceof Qt)return this.getCompletionsForFunctionArgument(r,r.getParent(),n),n;const i=e.findParent(v.Declaration);if(!i)return this.getTermProposals(void 0,null,n),n;const s=e.findChildAtOffset(this.offset,!0);return s?s instanceof Vi||s instanceof ze?this.getCompletionsForDeclarationValue(i,n):n:this.getCompletionsForDeclarationValue(i,n)}getCompletionsForFunctionArgument(e,n,r){const i=n.getIdentifier();return i&&i.matches("var")&&(!n.getArguments().hasChildren()||n.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r}getCompletionsForFunctionDeclaration(e,n){const r=e.getDeclarations();return r&&this.offset>r.offset&&this.offset{s.onCssMixinReference&&s.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(i)})}),n}getTermProposals(e,n,r){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,Q.Function);for(const s of i)s.node instanceof ur&&r.items.push(this.makeTermProposal(s,s.node.getParameters(),n));return r}makeTermProposal(e,n,r){e.node;const i=n.getChildren().map(a=>a instanceof dr?a.getName():a.getText()),s=e.name+"("+i.map((a,o)=>"${"+(o+1)+":"+a+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+i.join(", ")+")",textEdit:j.replace(this.getCompletionRange(r),s),insertTextFormat:it,kind:q.Function,sortText:Ge.Term}}getCompletionsForSupportsCondition(e,n){const r=e.findFirstChildBeforeOffset(this.offset);if(r){if(r instanceof Pe)return!Te(r.colonPosition)||this.offset<=r.colonPosition?this.getCompletionsForDeclarationProperty(r,n):this.getCompletionsForDeclarationValue(r,n);if(r instanceof Ln)return this.getCompletionsForSupportsCondition(r,n)}return Te(e.lParent)&&this.offset>e.lParent&&(!Te(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,n):n}getCompletionsForSupports(e,n){const r=e.getDeclarations();if(!r||this.offset<=r.offset){const s=e.findFirstChildBeforeOffset(this.offset);return s instanceof Ln?this.getCompletionsForSupportsCondition(s,n):n}return this.getCompletionForTopLevel(n)}getCompletionsForExtendsReference(e,n,r){return r}getCompletionForUriLiteralValue(e,n){let r,i,s;if(e.hasChildren()){const a=e.getChild(0);r=a.getText(),i=this.position,s=this.getCompletionRange(a)}else{r="",i=this.position;const a=this.textDocument.positionAt(e.offset+4);s=K.create(a,a)}return this.completionParticipants.forEach(a=>{a.onCssURILiteralValue&&a.onCssURILiteralValue({uriValue:r,position:i,range:s})}),n}getCompletionForImportPath(e,n){return this.completionParticipants.forEach(r=>{r.onCssImportPath&&r.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),n}hasCharacterAtPosition(e,n){const r=this.textDocument.getText();return e>=0&&e=0&&` +\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}let ps=class Ts{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(const n of this.attributes)if(n.name===e)return n.value}return null}addChild(e){e instanceof Ts&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){const n=this.attributes[this.attributes.length-1];n.value=n.value+e}}prepend(e){if(this.attributes){const n=this.attributes[0];n.value=e+n.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof nn);)e=e.parent;return e}removeChild(e){if(this.children){const n=this.children.indexOf(e);if(n!==-1)return this.children.splice(n,1),!0}return!1}addAttr(e,n){this.attributes||(this.attributes=[]);for(const r of this.attributes)if(r.name===e){r.value+=" "+n;return}this.attributes.push({name:e,value:n})}clone(e=!0){const n=new Ts;if(this.attributes){n.attributes=[];for(const r of this.attributes)n.addAttr(r.name,r.value)}if(e&&this.children){n.children=[];for(let r=0;r"),this.writeLine(n,i.join(""))}}var rt;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){const i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(rt||(rt={}));class us{constructor(){this.id=0,this.attr=0,this.tag=0}}function Tc(t,e){let n=new hs;for(const r of t.getChildren())switch(r.type){case v.SelectorCombinator:if(e){const o=r.getText().split("&");if(o.length===1){n.addAttr("name",o[0]);break}n=e.cloneWithParent(),o[0]&&n.findRoot().prepend(o[0]);for(let l=1;l1){const c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(o[l])}}break;case v.SelectorPlaceholder:if(r.matches("@at-root"))return n;case v.ElementNameSelector:const i=r.getText();n.addAttr("name",i==="*"?"element":Oe(i));break;case v.ClassSelector:n.addAttr("class",Oe(r.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Oe(r.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",r.getName());break;case v.PseudoSelector:n.addAttr(Oe(r.getText()),"");break;case v.AttributeSelector:const s=r,a=s.getIdentifier();if(a){const o=s.getValue(),l=s.getOperator();let c;if(o&&l)switch(Oe(l.getText())){case"|=":c=`${rt.remove(Oe(o.getText()))}-…`;break;case"^=":c=`${rt.remove(Oe(o.getText()))}…`;break;case"$=":c=`…${rt.remove(Oe(o.getText()))}`;break;case"~=":c=` … ${rt.remove(Oe(o.getText()))} … `;break;case"*=":c=`…${rt.remove(Oe(o.getText()))}…`;break;default:c=rt.remove(Oe(o.getText()));break}n.addAttr(Oe(a.getText()),c)}break}return n}function Oe(t){const e=new _n;e.setSource(t);const n=e.scanUnquotedString();return n?n.text:t}class Rm{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,n){const r=Dm(e);if(r){const i=new Pc('"').print(r,n);return i.push(this.selectorToSpecificityMarkedString(e)),i}else return[]}simpleSelectorToMarkedString(e){const n=Tc(e),r=new Pc('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}isPseudoElementIdentifier(e){const n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1}selectorToSpecificityMarkedString(e){const n=s=>{const a=new us;let o=new us;for(const l of s)for(const c of l.getChildren()){const d=r(c);if(d.id>o.id){o=d;continue}else if(d.ido.attr){o=d;continue}else if(d.attro.tag){o=d;continue}}return a.id+=o.id,a.attr+=o.attr,a.tag+=o.tag,a},r=s=>{const a=new us;e:for(const o of s.getChildren()){switch(o.type){case v.IdentifierSelector:a.id++;break;case v.ClassSelector:case v.AttributeSelector:a.attr++;break;case v.ElementNameSelector:if(o.matches("*"))break;a.tag++;break;case v.PseudoSelector:const l=o.getText(),c=o.getChildren();if(this.isPseudoElementIdentifier(l)){if(l.match(/^::slotted/i)&&c.length>0){a.tag++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}a.tag++;continue e}if(l.match(/^:where/i))continue e;if(l.match(/^:(?:not|has|is)/i)&&c.length>0){let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:host|host-context)/i)&&c.length>0){a.attr++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:nth-child|nth-last-child)/i)&&c.length>0){if(a.attr++,c.length===3&&c[1].type===23){let g=n(c[2].getChildren());a.id+=g.id,a.attr+=g.attr,a.tag+=g.tag;continue e}const d=new Sr,u=c[1].getText();d.scanner.setSource(u);const m=d.scanner.scan(),f=d.scanner.scan();if(m.text==="n"||m.text==="-n"&&f.text==="of"){const g=[],k=u.slice(f.offset+2).split(",");for(const N of k){const _=d.internalParse(N,d._parseSelector);_&&g.push(_)}let F=n(g);a.id+=F.id,a.attr+=F.attr,a.tag+=F.tag;continue e}continue e}a.attr++;continue e}if(o.getChildren().length>0){const l=r(o);a.id+=l.id,a.attr+=l.attr,a.tag+=l.tag}}return a},i=r(e);return`[${w("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}}class Nm{constructor(e){this.prev=null,this.element=e}processSelector(e){let n=null;if(!(this.element instanceof Kt)&&e.getChildren().some(r=>r.hasChildren()&&r.getChild(0).type===v.SelectorCombinator)){const r=this.element.findRoot();r.parent instanceof Kt&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(const r of e.getChildren()){if(r instanceof Ht){if(this.prev instanceof Ht){const a=new ds("…");this.element.addChild(a),this.element=a}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&this.element.addChild(new ds("⋮"));const i=Tc(r,n),s=i.findRoot();this.element.addChild(s),this.element=i}(r instanceof Ht||r.type===v.SelectorCombinatorParent||r.type===v.SelectorCombinatorShadowPiercingDescendant||r.type===v.SelectorCombinatorSibling||r.type===v.SelectorCombinatorAllSiblings)&&(this.prev=r)}}}function Im(t){switch(t.type){case v.MixinDeclaration:case v.Stylesheet:return!0}return!1}function Dm(t){if(t.matches("@at-root"))return null;const e=new Kt,n=[],r=t.getParent();if(r instanceof Ct){let s=r.getParent();for(;s&&!Im(s);){if(s instanceof Ct){if(s.getSelectors().matches("@at-root"))break;n.push(s)}s=s.getParent()}}const i=new Nm(e);for(let s=n.length-1;s>=0;s--){const a=n[s].getSelectors().getChild(0);a&&i.processSelector(a)}return i.processSelector(t),e}class ps{constructor(e,n){this.clientCapabilities=e,this.cssDataManager=n,this.selectorPrinting=new Rm(n)}configure(e){this.defaultSettings=e}doHover(e,n,r,i=this.defaultSettings){function s(d){return K.create(e.positionAt(d.offset),e.positionAt(d.end))}const a=e.offsetAt(n),o=Ri(r,a);let l=null,c;for(let d=0;dtypeof n=="string"?n:n.value):e.value}doesSupportMarkdown(){if(!Te(this.supportsMarkdown)){if(!Te(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&e.contentFormat.indexOf(He.Markdown)!==-1}return this.supportsMarkdown}}const Oc=/^\w+:\/\//,Wc=/^data:/;class ms{constructor(e,n){this.fileSystemProvider=e,this.resolveModuleReferences=n}configure(e){this.defaultSettings=e}findDefinition(e,n,r){const i=new is(r),s=e.offsetAt(n),a=Fi(r,s);if(!a)return null;const o=i.findSymbolFromNode(a);return o?{uri:e.uri,range:it(o.node,e)}:null}findReferences(e,n,r){return this.findDocumentHighlights(e,n,r).map(s=>({uri:e.uri,range:s.range}))}getHighlightNode(e,n,r){const i=e.offsetAt(n);let s=Fi(r,i);if(!(!s||s.type===v.Stylesheet||s.type===v.Declarations))return s.type===v.Identifier&&s.parent&&s.parent.type===v.ClassSelector&&(s=s.parent),s}findDocumentHighlights(e,n,r){const i=[],s=this.getHighlightNode(e,n,r);if(!s)return i;const a=new is(r),o=a.findSymbolFromNode(s),l=s.getText();return r.accept(c=>{if(o){if(a.matchesSymbol(c,o))return i.push({kind:$c(c),range:it(c,e)}),!1}else s&&s.type===c.type&&c.matches(l)&&i.push({kind:$c(c),range:it(c,e)});return!0}),i}isRawStringDocumentLinkNode(e){return e.type===v.Import}findDocumentLinks(e,n,r){const i=this.findUnresolvedLinks(e,n),s=[];for(let a of i){const o=a.link,l=o.target;if(!(!l||Wc.test(l)))if(Oc.test(l))s.push(o);else{const c=r.resolveReference(l,e.uri);c&&(o.target=c),s.push(o)}}return s}async findDocumentLinks2(e,n,r){const i=this.findUnresolvedLinks(e,n),s=[];for(let a of i){const o=a.link,l=o.target;if(!(!l||Wc.test(l)))if(Oc.test(l))s.push(o);else{const c=await this.resolveReference(l,e.uri,r,a.isRawLink);c!==void 0&&(o.target=c,s.push(o))}}return s}findUnresolvedLinks(e,n){const r=[],i=s=>{let a=s.getText();const o=it(s,e);if(o.start.line===o.end.line&&o.start.character===o.end.character)return;(pe(a,"'")||pe(a,'"'))&&(a=a.slice(1,-1));const l=s.parent?this.isRawStringDocumentLinkNode(s.parent):!1;r.push({link:{target:a,range:o},isRawLink:l})};return n.accept(s=>{if(s.type===v.URILiteral){const a=s.getChild(0);return a&&i(a),!1}if(s.parent&&this.isRawStringDocumentLinkNode(s.parent)){const a=s.getText();return(pe(a,"'")||pe(a,'"'))&&i(s),!1}return!0}),r}findSymbolInformations(e,n){const r=[],i=(s,a,o)=>{const l=o instanceof W?it(o,e):o,c={name:s||w(""),kind:a,location:Dn.create(e.uri,l)};r.push(c)};return this.collectDocumentSymbols(e,n,i),r}findDocumentSymbols(e,n){const r=[],i=[],s=(a,o,l,c,d)=>{const u=l instanceof W?it(l,e):l;let m=c instanceof W?it(c,e):c;(!m||!Vc(u,m))&&(m=K.create(u.start,u.start));const f={name:a||w(""),kind:o,range:u,selectionRange:m};let g=i.pop();for(;g&&!Vc(g[1],u);)g=i.pop();if(g){const b=g[0];b.children||(b.children=[]),b.children.push(f),i.push(g)}else r.push(f);d&&i.push([f,it(d,e)])};return this.collectDocumentSymbols(e,n,s),r}collectDocumentSymbols(e,n,r){n.accept(i=>{if(i instanceof Ct){for(const s of i.getSelectors().getChildren())if(s instanceof En){const a=K.create(e.positionAt(s.offset),e.positionAt(i.end));r(s.getText(),tt.Class,a,s,i.getDeclarations())}}else if(i instanceof hr)r(i.getName(),tt.Variable,i,i.getVariable(),void 0);else if(i instanceof In)r(i.getName(),tt.Method,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof cr)r(i.getName(),tt.Function,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof hl){const s=w("@keyframes {0}",i.getName());r(s,tt.Class,i,i.getIdentifier(),i.getDeclarations())}else if(i instanceof ll){const s=w("@font-face");r(s,tt.Class,i,void 0,i.getDeclarations())}else if(i instanceof Ai){const s=i.getChild(0);if(s instanceof ul){const a="@media "+s.getText();r(a,tt.Module,i,s,i.getDeclarations())}}return!0})}findDocumentColors(e,n){const r=[];return n.accept(i=>{const s=Lm(i,e);return s&&r.push(s),!0}),r}getColorPresentations(e,n,r,i){const s=[],a=Math.round(r.red*255),o=Math.round(r.green*255),l=Math.round(r.blue*255);let c;r.alpha===1?c=`rgb(${a}, ${o}, ${l})`:c=`rgba(${a}, ${o}, ${l}, ${r.alpha})`,s.push({label:c,textEdit:j.replace(i,c)}),r.alpha===1?c=`#${Et(a)}${Et(o)}${Et(l)}`:c=`#${Et(a)}${Et(o)}${Et(l)}${Et(Math.round(r.alpha*255))}`,s.push({label:c,textEdit:j.replace(i,c)});const d=bc(r);d.a===1?c=`hsl(${d.h}, ${Math.round(d.s*100)}%, ${Math.round(d.l*100)}%)`:c=`hsla(${d.h}, ${Math.round(d.s*100)}%, ${Math.round(d.l*100)}%, ${d.a})`,s.push({label:c,textEdit:j.replace(i,c)});const u=lm(r);return u.a===1?c=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}%)`:c=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}% / ${u.a})`,s.push({label:c,textEdit:j.replace(i,c)}),s}prepareRename(e,n,r){const i=this.getHighlightNode(e,n,r);if(i)return K.create(e.positionAt(i.offset),e.positionAt(i.end))}doRename(e,n,r,i){const a=this.findDocumentHighlights(e,n,i).map(o=>j.replace(o.range,r));return{changes:{[e.uri]:a}}}async resolveModuleReference(e,n,r){if(pe(n,"file://")){const i=Am(e);if(i&&i!=="."&&i!==".."){const s=r.resolveReference("/",n),a=as(n),o=await this.resolvePathToModule(i,a,s);if(o){const l=e.substring(i.length+1);return Yt(o,l)}}}}async mapReference(e,n){return e}async resolveReference(e,n,r,i=!1,s=this.defaultSettings){if(e[0]==="~"&&e[1]!=="/"&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,n,r),i);const a=await this.mapReference(r.resolveReference(e,n),i);if(this.resolveModuleReferences){if(a&&await this.fileExists(a))return a;const o=await this.mapReference(await this.resolveModuleReference(e,n,r),i);if(o)return o}if(a&&!await this.fileExists(a)){const o=r.resolveReference("/",n);if(s&&o){if(e in s)return this.mapReference(Yt(o,s[e]),i);const l=e.indexOf("/"),c=`${e.substring(0,l)}/`;if(c in s){const d=s[c].slice(0,-1);let u=Yt(o,d);return this.mapReference(u=Yt(u,e.substring(c.length-1)),i)}}}return a}async resolvePathToModule(e,n,r){const i=Yt(n,"node_modules",e,"package.json");if(await this.fileExists(i))return as(i);if(r&&n.startsWith(r)&&n.length!==r.length)return this.resolvePathToModule(e,as(n),r)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{const n=await this.fileSystemProvider.stat(e);return!(n.type===Mn.Unknown&&n.size===-1)}catch{return!1}}}function Lm(t,e){const n=cm(t);if(n){const r=it(t,e);return{color:n,range:r}}return null}function it(t,e){return K.create(e.positionAt(t.offset),e.positionAt(t.end))}function Vc(t,e){const n=e.start.line,r=e.end.line,i=t.start.line,s=t.end.line;return!(ns||r>s||n===i&&e.start.charactert.end.character)}function $c(t){if(t.type===v.Selector||t instanceof ze&&t.parent&&t.parent instanceof Di&&t.isCustomProperty)return Xt.Write;if(t.parent)switch(t.parent.type){case v.FunctionDeclaration:case v.MixinDeclaration:case v.Keyframe:case v.VariableDeclaration:case v.FunctionParameter:return Xt.Write}return Xt.Read}function Et(t){const e=t.toString(16);return e.length!==2?"0"+e:e}function Am(t){const e=t.indexOf("/");if(e===-1)return"";if(t[0]==="@"){const n=t.indexOf("/",e+1);return n===-1?t:t.substring(0,n)}return t.substring(0,e)}const Zt=Ne.Warning,Uc=Ne.Error,Ve=Ne.Ignore;class me{constructor(e,n,r){this.id=e,this.message=n,this.defaultValue=r}}class Mm{constructor(e,n,r){this.id=e,this.message=n,this.defaultValue=r}}const ie={AllVendorPrefixes:new me("compatibleVendorPrefixes",w("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Ve),IncludeStandardPropertyWhenUsingVendorPrefix:new me("vendorPrefix",w("When using a vendor-specific prefix also include the standard property"),Zt),DuplicateDeclarations:new me("duplicateProperties",w("Do not use duplicate style definitions"),Ve),EmptyRuleSet:new me("emptyRules",w("Do not use empty rulesets"),Zt),ImportStatemement:new me("importStatement",w("Import statements do not load in parallel"),Ve),BewareOfBoxModelSize:new me("boxModel",w("Do not use width or height when using padding or border"),Ve),UniversalSelector:new me("universalSelector",w("The universal selector (*) is known to be slow"),Ve),ZeroWithUnit:new me("zeroUnits",w("No unit for zero needed"),Ve),RequiredPropertiesForFontFace:new me("fontFaceProperties",w("@font-face rule must define 'src' and 'font-family' properties"),Zt),HexColorLength:new me("hexColorLength",w("Hex colors must consist of three, four, six or eight hex numbers"),Uc),ArgsInColorFunction:new me("argumentsInColorFunction",w("Invalid number of parameters"),Uc),UnknownProperty:new me("unknownProperties",w("Unknown property."),Zt),UnknownAtRules:new me("unknownAtRules",w("Unknown at-rule."),Zt),IEStarHack:new me("ieHack",w("IE hacks are only necessary when supporting IE7 and older"),Ve),UnknownVendorSpecificProperty:new me("unknownVendorSpecificProperties",w("Unknown vendor specific property."),Ve),PropertyIgnoredDueToDisplay:new me("propertyIgnoredDueToDisplay",w("Property is ignored due to the display."),Zt),AvoidImportant:new me("important",w("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Ve),AvoidFloat:new me("float",w("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Ve),AvoidIdSelector:new me("idSelector",w("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Ve)},zm={ValidProperties:new Mm("validProperties",w("A list of properties that are not validated against the `unknownProperties` rule."),[])};class Pm{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){const n=Tm(this.conf[e.id]);if(n)return n}return e.defaultValue}getSetting(e){return this.conf[e.id]}}function Tm(t){switch(t){case"ignore":return Ne.Ignore;case"warning":return Ne.Warning;case"error":return Ne.Error}return null}class fs{constructor(e){this.cssDataManager=e}doCodeActions(e,n,r,i){return this.doCodeActions2(e,n,r,i).map(s=>{const a=s.edit&&s.edit.documentChanges&&s.edit.documentChanges[0];return kt.create(s.title,"_css.applyCodeAction",e.uri,e.version,a&&a.edits)})}doCodeActions2(e,n,r,i){const s=[];if(r.diagnostics)for(const a of r.diagnostics)this.appendFixesForMarker(e,i,a,s);return s}getFixesForUnknownProperty(e,n,r,i){const s=n.getName(),a=[];this.cssDataManager.getProperties().forEach(l=>{const c=hp(s,l.name);c>=s.length/2&&a.push({property:l.name,score:c})}),a.sort((l,c)=>c.score-l.score||l.property.localeCompare(c.property));let o=3;for(const l of a){const c=l.property,d=w("Rename to '{0}'",c),u=j.replace(r.range,c),m=Xi.create(e.uri,e.version),f={documentChanges:[fr.create(m,[u])]},g=Ki.create(d,f,Qi.QuickFix);if(g.diagnostics=[r],i.push(g),--o<=0)return}}appendFixesForMarker(e,n,r,i){if(r.code!==ie.UnknownProperty.id)return;const s=e.offsetAt(r.range.start),a=e.offsetAt(r.range.end),o=Ri(n,s);for(let l=o.length-1;l>=0;l--){const c=o[l];if(c instanceof Pe){const d=c.getProperty();if(d&&d.offset===s&&d.end===a){this.getFixesForUnknownProperty(e,d,r,i);return}}}}}class Om{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}}function Pn(t,e,n,r){const i=t[e];i.value=n,n&&(Nc(i.properties,r)||i.properties.push(r))}function Wm(t,e,n){Pn(t,"top",e,n),Pn(t,"right",e,n),Pn(t,"bottom",e,n),Pn(t,"left",e,n)}function we(t,e,n,r){e==="top"||e==="right"||e==="bottom"||e==="left"?Pn(t,e,n,r):Wm(t,n,r)}function gs(t,e,n){switch(e.length){case 1:we(t,void 0,e[0],n);break;case 2:we(t,"top",e[0],n),we(t,"bottom",e[0],n),we(t,"right",e[1],n),we(t,"left",e[1],n);break;case 3:we(t,"top",e[0],n),we(t,"right",e[1],n),we(t,"left",e[1],n),we(t,"bottom",e[2],n);break;case 4:we(t,"top",e[0],n),we(t,"right",e[1],n),we(t,"bottom",e[2],n),we(t,"left",e[3],n);break}}function bs(t,e){for(let n of e)if(t.matches(n))return!0;return!1}function Tn(t,e=!0){return e&&bs(t,["initial","unset"])?!1:parseFloat(t.getText())!==0}function Bc(t,e=!0){return t.map(n=>Tn(n,e))}function Rr(t,e=!0){return!(bs(t,["none","hidden"])||e&&bs(t,["initial","unset"]))}function Vm(t,e=!0){return t.map(n=>Rr(n,e))}function $m(t){const e=t.getChildren();if(e.length===1){const n=e[0];return Tn(n)&&Rr(n)}for(const n of e){const r=n;if(!Tn(r,!1)||!Rr(r,!1))return!1}return!0}function Um(t){const e={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(const n of t){const r=n.node.value;if(!(typeof r>"u"))switch(n.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=n;break;case"height":e.height=n;break;default:const i=n.fullPropertyName.split("-");switch(i[0]){case"border":switch(i[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(i[2]){case void 0:we(e,i[1],$m(r),n);break;case"width":we(e,i[1],Tn(r,!1),n);break;case"style":we(e,i[1],Rr(r,!0),n);break}break;case"width":gs(e,Bc(r.getChildren(),!1),n);break;case"style":gs(e,Vm(r.getChildren(),!0),n);break}break;case"padding":i.length===1?gs(e,Bc(r.getChildren(),!0),n):we(e,i[1],Tn(r,!0),n);break}break}}return e}class qc{constructor(){this.data={}}add(e,n,r){let i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(n),r&&i.nodes.push(r)}}class en{static entries(e,n,r,i,s){const a=new en(n,r,i);return e.acceptVisitor(a),a.completeValidations(),a.getEntries(s)}constructor(e,n,r){this.cssDataManager=r,this.warnings=[],this.settings=n,this.documentText=e.getText(),this.keyframes=new qc,this.validProperties={};const i=n.getSetting(zm.ValidProperties);Array.isArray(i)&&i.forEach(s=>{if(typeof s=="string"){const a=s.trim().toLowerCase();a.length&&(this.validProperties[a]=!0)}})}isValidPropertyDeclaration(e){const n=e.fullPropertyName;return this.validProperties[n]}fetch(e,n){const r=[];for(const i of e)i.fullPropertyName===n&&r.push(i);return r}fetchWithValue(e,n,r){const i=[];for(const s of e)if(s.fullPropertyName===n){const a=s.node.getValue();a&&this.findValueInExpression(a,r)&&i.push(s)}return i}findValueInExpression(e,n){let r=!1;return e.accept(i=>(i.type===v.Identifier&&i.matches(n)&&(r=!0),!r)),r}getEntries(e=Ne.Warning|Ne.Error){return this.warnings.filter(n=>(n.getLevel()&e)!==0)}addEntry(e,n,r){const i=new bl(e,n,this.settings.getRule(n),r);this.warnings.push(i)}getMissingNames(e,n){const r=e.slice(0);for(let s=0;s0){const l=this.fetch(r,"float");for(let c=0;c0){const l=this.fetch(r,"vertical-align");for(let c=0;c1)for(let m=0;mO.startsWith(T))&&g.delete(N)}}const b=[];for(let F=0,N=en.prefixes.length;Fs instanceof zi?(i+=1,!1):!0),i!==r&&this.addEntry(e,ie.ArgsInColorFunction)),!0}}en.prefixes=["-ms-","-moz-","-o-","-webkit-"];class ws{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,n,r=this.settings){if(r&&r.validate===!1)return[];const i=[];i.push.apply(i,Vi.entries(n)),i.push.apply(i,en.entries(n,e,new Pm(r&&r.lint),this.cssDataManager));const s=[];for(const o in ie)s.push(ie[o].id);function a(o){const l=K.create(e.positionAt(o.getOffset()),e.positionAt(o.getOffset()+o.getLength())),c=e.languageId;return{code:o.getRule().id,source:c,message:o.getMessage(),severity:o.getLevel()===Ne.Warning?pr.Warning:pr.Error,range:l}}return i.filter(o=>o.getLevel()!==Ne.Ignore).map(a)}}const jc=47,Bm=10,qm=13,jm=12,Hm=36,Gm=35,Jm=123,On=61,Xm=33,Ym=60,Qm=62,vs=46;let st=p.CustomToken;const ys=st++,Nr=st++;st++;const Hc=st++,Gc=st++,xs=st++,Ss=st++,Ir=st++;st++;class Jc extends _n{scanNext(e){if(this.stream.advanceIfChar(Hm)){const n=["$"];if(this.ident(n))return this.finishToken(e,ys,n.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([Gm,Jm])?this.finishToken(e,Nr):this.stream.advanceIfChars([On,On])?this.finishToken(e,Hc):this.stream.advanceIfChars([Xm,On])?this.finishToken(e,Gc):this.stream.advanceIfChar(Ym)?this.stream.advanceIfChar(On)?this.finishToken(e,Ss):this.finishToken(e,p.Delim):this.stream.advanceIfChar(Qm)?this.stream.advanceIfChar(On)?this.finishToken(e,xs):this.finishToken(e,p.Delim):this.stream.advanceIfChars([vs,vs,vs])?this.finishToken(e,Ir):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([jc,jc])?(this.stream.advanceWhileChar(e=>{switch(e){case Bm:case qm:case jm:return!1;default:return!0}}),!0):!1}}class Cs{constructor(e,n){this.id=e,this.message=n}}const ks={FromExpected:new Cs("scss-fromexpected",w("'from' expected")),ThroughOrToExpected:new Cs("scss-throughexpected",w("'through' or 'to' expected")),InExpected:new Cs("scss-fromexpected",w("'in' expected"))};class Km extends Sr{constructor(){super(new Jc)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(Li);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,S.URIOrStringExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,S.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(ys))return null;const n=this.create(hr);if(!n.setVariable(this._parseVariable()))return null;if(!this.accept(p.Colon))return this.finish(n,S.ColonExpected);if(this.prevToken&&(n.colonPosition=this.prevToken.offset),!n.setValue(this._parseExpr()))return this.finish(n,S.VariableValueExpected,[],e);for(;this.peek(p.Exclamation);)if(!n.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(p.Ident,/^(default|global)$/))return this.finish(n,S.UnknownKeyword);this.consumeToken()}return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(Ss)||this.accept(xs)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(ys))return null;const e=this.create(Wi);return this.consumeToken(),e}_parseModuleMember(){const e=this.mark(),n=this.create(gl);return n.setIdentifier(this._parseIdent([Q.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):n.addChild(this._parseVariable()||this._parseFunction())?n:this.finish(n,S.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(p.Ident)&&!this.peek(Nr)&&!this.peekDelim("-"))return null;const n=this.create(ze);n.referenceTypes=e,n.isCustomProperty=this.peekRegExp(p.Ident,/^--/);let r=!1;const i=()=>{const s=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(s),null):this._parseInterpolation()};for(;(this.accept(p.Ident)||n.addChild(i())||r&&this.acceptRegexp(/^[\w-]/))&&(r=!0,!this.hasWhitespace()););return r?this.finish(n):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(Nr)){const e=this.create(Oi);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(p.CurlyR)?this.finish(e):this.finish(e,S.ExpressionExpected):this.accept(p.CurlyR)?this.finish(e):this.finish(e,S.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(Hc)||this.peek(Gc)||this.peek(xs)||this.peek(Ss)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){const e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){const e=this.create(W);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){const n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;const r=this.create(Pe);if(!r.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(r,S.ColonExpected,[p.Colon],e||[p.SemiColon]);this.prevToken&&(r.colonPosition=this.prevToken.offset);let i=!1;if(r.setValue(this._parseExpr())&&(i=!0,r.addChild(this._parsePrio())),this.peek(p.CurlyL))r.setNestedProperties(this._parseNestedProperties());else if(!i)return this.finish(r,S.PropertyValueExpected);return this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)}_parseNestedProperties(){const e=this.create(cl);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){const e=this.create(Nn);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,S.SelectorExpected);for(;this.accept(p.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(p.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,S.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){const e=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}else if(this.peekKeyword("@at-root")){const e=this.createNode(v.SelectorPlaceholder);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,S.IdentifierExpected);if(!this.accept(p.Colon))return this.finish(e,S.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,S.IdentifierExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.CurlyR])}return this.finish(e)}return null}_parseElementName(){const e=this.mark(),n=super._parseElementName();return n&&!this.hasWhitespace()&&this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):n}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;const e=this.createNode(v.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(p.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){const n=this.create(wp);if(this.consumeToken(),!n.setExpression(this._parseExpr(!0)))return this.finish(n,S.ExpressionExpected);if(this._parseBody(n,e),this.acceptKeyword("@else")){if(this.peekIdent("if"))n.setElseClause(this._internalParseIfStatement(e));else if(this.peek(p.CurlyL)){const r=this.create(Sp);this._parseBody(r,e),n.setElseClause(r)}}return this.finish(n)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;const n=this.create(vp);return this.consumeToken(),n.setVariable(this._parseVariable())?this.acceptIdent("from")?n.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(n,ks.ThroughOrToExpected,[p.CurlyR]):n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,S.ExpressionExpected,[p.CurlyR]):this.finish(n,S.ExpressionExpected,[p.CurlyR]):this.finish(n,ks.FromExpected,[p.CurlyR]):this.finish(n,S.VariableNameExpected,[p.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;const n=this.create(yp);this.consumeToken();const r=n.getVariables();if(!r.addChild(this._parseVariable()))return this.finish(n,S.VariableNameExpected,[p.CurlyR]);for(;this.accept(p.Comma);)if(!r.addChild(this._parseVariable()))return this.finish(n,S.VariableNameExpected,[p.CurlyR]);return this.finish(r),this.acceptIdent("in")?n.addChild(this._parseExpr())?this._parseBody(n,e):this.finish(n,S.ExpressionExpected,[p.CurlyR]):this.finish(n,ks.InExpected,[p.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;const n=this.create(xp);return this.consumeToken(),n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,S.ExpressionExpected,[p.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword("@function"))return null;const e=this.create(cr);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([Q.Function])))return this.finish(e,S.IdentifierExpected,[p.CurlyR]);if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,S.VariableNameExpected)}return this.accept(p.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,S.RightParenthesisExpected,[p.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;const e=this.createNode(v.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,S.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;const e=this.create(In);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([Q.Mixin])))return this.finish(e,S.IdentifierExpected,[p.CurlyR]);if(this.accept(p.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){const e=this.create(lr);return e.setIdentifier(this._parseVariable())?(this.accept(Ir),this.accept(p.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;const e=this.create(Bp);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;const e=this.create(dr);this.consumeToken();const n=this._parseIdent([Q.Mixin]);if(!e.setIdentifier(n))return this.finish(e,S.IdentifierExpected,[p.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){const r=this._parseIdent([Q.Mixin]);if(!r)return this.finish(e,S.IdentifierExpected,[p.CurlyR]);const i=this.create(gl);n.referenceTypes=[Q.Module],i.setIdentifier(n),e.setIdentifier(r),e.addChild(i)}if(this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(p.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){const e=this.create(qp);if(this.acceptIdent("using")){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.CurlyL])}return this.peek(p.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){const e=this.create(Gt),n=this.mark(),r=this._parseVariable();if(r)if(this.accept(p.Colon))e.setIdentifier(r);else{if(this.accept(Ir))return e.setValue(r),this.finish(e);this.restoreAtMark(n)}return e.setValue(this._parseExpr(!0))?(this.accept(Ir),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){const e=this.mark(),n=super._parseURLArgument();if(!n||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);const r=this.create(W);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;const e=this.create(W);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(p.Comma);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)}_parseListElement(){const e=this.create(jp),n=this._parseBinaryExpr();if(!n)return null;if(this.accept(p.Colon)){if(e.setKey(n),!e.setValue(this._parseBinaryExpr()))return this.finish(e,S.ExpressionExpected)}else e.setValue(n);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;const e=this.create(kp);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,S.StringLiteralExpected);if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|with/))return this.finish(e,S.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([Q.Module]))&&!this.acceptDelim("*"))return this.finish(e,S.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,S.SemiColonExpected):this.finish(e)}_parseModuleConfigDeclaration(){const e=this.create(_p);return e.setIdentifier(this._parseVariable())?!this.accept(p.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.accept(p.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(e,S.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;const e=this.create(Ep);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,S.StringLiteralExpected);if(this.acceptIdent("as")){const n=this._parseIdent([Q.Forward]);if(!e.setIdentifier(n))return this.finish(e,S.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,S.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,S.IdentifierOrVariableExpected);return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,S.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){const e=this.create(Fp);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(p.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}}const at=w("Sass documentation");class ge extends ls{constructor(e,n){super("$",e,n),Xc(ge.scssModuleLoaders),Xc(ge.scssModuleBuiltIns)}isImportPathParent(e){return e===v.Forward||e===v.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,n){const r=e.getParent().type;if(r===v.Forward||r===v.Use)for(let i of ge.scssModuleBuiltIns){const s={label:i.label,documentation:i.documentation,textEdit:j.replace(this.getCompletionRange(e),`'${i.label}'`),kind:q.Module};n.items.push(s)}return super.getCompletionForImportPath(e,n)}createReplaceFunction(){let e=1;return(n,r)=>"\\"+r+": ${"+e+++":"+(ge.variableDefaults[r]||"")+"}"}createFunctionProposals(e,n,r,i){for(const s of e){const a=s.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),l={label:s.func.substr(0,s.func.indexOf("(")),detail:s.func,documentation:s.desc,textEdit:j.replace(this.getCompletionRange(n),a),insertTextFormat:Ie.Snippet,kind:q.Function};r&&(l.sortText="z"),i.items.push(l)}return i}getCompletionsForSelector(e,n,r){return this.createFunctionProposals(ge.selectorFuncs,null,!0,r),super.getCompletionsForSelector(e,n,r)}getTermProposals(e,n,r){let i=ge.builtInFuncs;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(e,n,r)}getColorProposals(e,n,r){return this.createFunctionProposals(ge.colorProposals,n,!1,r),super.getColorProposals(e,n,r)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionForAtDirectives(n),this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}getCompletionsForExtendsReference(e,n,r){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,Q.Rule);for(const s of i){const a={label:s.name,textEdit:j.replace(this.getCompletionRange(n),s.name),kind:q.Function};r.items.push(a)}return r}getCompletionForAtDirectives(e){return e.items.push(...ge.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...ge.scssModuleLoaders),e}}ge.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},ge.colorProposals=[{func:"red($color)",desc:w("Gets the red component of a color.")},{func:"green($color)",desc:w("Gets the green component of a color.")},{func:"blue($color)",desc:w("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:w("Mixes two colors together.")},{func:"hue($color)",desc:w("Gets the hue component of a color.")},{func:"saturation($color)",desc:w("Gets the saturation component of a color.")},{func:"lightness($color)",desc:w("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:w("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:w("Makes a color lighter.")},{func:"darken($color, $amount)",desc:w("Makes a color darker.")},{func:"saturate($color, $amount)",desc:w("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:w("Makes a color less saturated.")},{func:"grayscale($color)",desc:w("Converts a color to grayscale.")},{func:"complement($color)",desc:w("Returns the complement of a color.")},{func:"invert($color)",desc:w("Returns the inverse of a color.")},{func:"alpha($color)",desc:w("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:w("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:w("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:w("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:w("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:w("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:w("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:w("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:w("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:w("Converts a color into the format understood by IE filters.")}],ge.selectorFuncs=[{func:"selector-nest($selectors…)",desc:w("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:w("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:w("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:w("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:w("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:w("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:w("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:w("Parses a selector into the format returned by &.")}],ge.builtInFuncs=[{func:"unquote($string)",desc:w("Removes quotes from a string.")},{func:"quote($string)",desc:w("Adds quotes to a string.")},{func:"str-length($string)",desc:w("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:w("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:w("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:w("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:w("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:w("Converts a string to lower case.")},{func:"percentage($number)",desc:w("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:w("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:w("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:w("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:w("Returns the absolute value of a number.")},{func:"min($numbers)",desc:w("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:w("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:w("Returns a random number.")},{func:"length($list)",desc:w("Returns the length of a list.")},{func:"nth($list, $n)",desc:w("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:w("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:w("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:w("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:w("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:w("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:w("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:w("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:w("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:w("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:w("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:w("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:w("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:w("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:w("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:w("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:w("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:w("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:w("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:w("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:w("Returns the type of a value.")},{func:"unit($number)",desc:w("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:w("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:w("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:w("Dynamically calls a Sass function.")}],ge.scssAtDirectives=[{label:"@extend",documentation:w("Inherits the styles of another selector."),kind:q.Keyword},{label:"@at-root",documentation:w("Causes one or more rules to be emitted at the root of the document."),kind:q.Keyword},{label:"@debug",documentation:w("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:q.Keyword},{label:"@warn",documentation:w("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:q.Keyword},{label:"@error",documentation:w("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:q.Keyword},{label:"@if",documentation:w("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} { +`),[{language:"html",value:r}]}doPrint(e,n){for(const r of e)this.doPrintElement(r,n),r.children&&this.doPrint(r.children,n+1)}writeLine(e,n){const r=new Array(e+1).join(" ");this.result.push(r+n)}doPrintElement(e,n){const r=e.findAttribute("name");if(e instanceof ms||r==="…"){this.writeLine(n,r);return}const i=["<"];if(r?i.push(r):i.push("element"),e.attributes){for(const s of e.attributes)if(s.name!=="name"){i.push(" "),i.push(s.name);const a=s.value;a&&(i.push("="),i.push(st.ensure(a,this.quote)))}}i.push(">"),this.writeLine(n,i.join(""))}}var st;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){const i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(st||(st={}));class fs{constructor(){this.id=0,this.attr=0,this.tag=0}}function Vc(t,e){let n=new ps;for(const r of t.getChildren())switch(r.type){case v.SelectorCombinator:if(e){const o=r.getText().split("&");if(o.length===1){n.addAttr("name",o[0]);break}n=e.cloneWithParent(),o[0]&&n.findRoot().prepend(o[0]);for(let l=1;l1){const c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(o[l])}}break;case v.SelectorPlaceholder:if(r.matches("@at-root"))return n;case v.ElementNameSelector:const i=r.getText();n.addAttr("name",i==="*"?"element":Oe(i));break;case v.ClassSelector:n.addAttr("class",Oe(r.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Oe(r.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",r.getName());break;case v.PseudoSelector:n.addAttr(Oe(r.getText()),"");break;case v.AttributeSelector:const s=r,a=s.getIdentifier();if(a){const o=s.getValue(),l=s.getOperator();let c;if(o&&l)switch(Oe(l.getText())){case"|=":c=`${st.remove(Oe(o.getText()))}-…`;break;case"^=":c=`${st.remove(Oe(o.getText()))}…`;break;case"$=":c=`…${st.remove(Oe(o.getText()))}`;break;case"~=":c=` … ${st.remove(Oe(o.getText()))} … `;break;case"*=":c=`…${st.remove(Oe(o.getText()))}…`;break;default:c=st.remove(Oe(o.getText()));break}n.addAttr(Oe(a.getText()),c)}break}return n}function Oe(t){const e=new Nn;e.setSource(t);const n=e.scanUnquotedString();return n?n.text:t}class Nm{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,n){const r=Lm(e);if(r){const i=new Wc('"').print(r,n);return i.push(this.selectorToSpecificityMarkedString(e)),i}else return[]}simpleSelectorToMarkedString(e){const n=Vc(e),r=new Wc('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}isPseudoElementIdentifier(e){const n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1}selectorToSpecificityMarkedString(e){const n=s=>{const a=new fs;let o=new fs;for(const l of s)for(const c of l.getChildren()){const d=r(c);if(d.id>o.id){o=d;continue}else if(d.ido.attr){o=d;continue}else if(d.attro.tag){o=d;continue}}return a.id+=o.id,a.attr+=o.attr,a.tag+=o.tag,a},r=s=>{const a=new fs;e:for(const o of s.getChildren()){switch(o.type){case v.IdentifierSelector:a.id++;break;case v.ClassSelector:case v.AttributeSelector:a.attr++;break;case v.ElementNameSelector:if(o.matches("*"))break;a.tag++;break;case v.PseudoSelector:const l=o.getText(),c=o.getChildren();if(this.isPseudoElementIdentifier(l)){if(l.match(/^::slotted/i)&&c.length>0){a.tag++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}a.tag++;continue e}if(l.match(/^:where/i))continue e;if(l.match(/^:(?:not|has|is)/i)&&c.length>0){let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:host|host-context)/i)&&c.length>0){a.attr++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:nth-child|nth-last-child)/i)&&c.length>0){if(a.attr++,c.length===3&&c[1].type===23){let g=n(c[2].getChildren());a.id+=g.id,a.attr+=g.attr,a.tag+=g.tag;continue e}const d=new _r,u=c[1].getText();d.scanner.setSource(u);const m=d.scanner.scan(),f=d.scanner.scan();if(m.text==="n"||m.text==="-n"&&f.text==="of"){const g=[],_=u.slice(f.offset+2).split(",");for(const N of _){const E=d.internalParse(N,d._parseSelector);E&&g.push(E)}let F=n(g);a.id+=F.id,a.attr+=F.attr,a.tag+=F.tag;continue e}continue e}a.attr++;continue e}if(o.getChildren().length>0){const l=r(o);a.id+=l.id,a.attr+=l.attr,a.tag+=l.tag}}return a},i=r(e);return`[${w("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}}class Im{constructor(e){this.prev=null,this.element=e}processSelector(e){let n=null;if(!(this.element instanceof nn)&&e.getChildren().some(r=>r.hasChildren()&&r.getChild(0).type===v.SelectorCombinator)){const r=this.element.findRoot();r.parent instanceof nn&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(const r of e.getChildren()){if(r instanceof Yt){if(this.prev instanceof Yt){const a=new ms("…");this.element.addChild(a),this.element=a}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&this.element.addChild(new ms("⋮"));const i=Vc(r,n),s=i.findRoot();this.element.addChild(s),this.element=i}(r instanceof Yt||r.type===v.SelectorCombinatorParent||r.type===v.SelectorCombinatorShadowPiercingDescendant||r.type===v.SelectorCombinatorSibling||r.type===v.SelectorCombinatorAllSiblings)&&(this.prev=r)}}}function Dm(t){switch(t.type){case v.MixinDeclaration:case v.Stylesheet:return!0}return!1}function Lm(t){if(t.matches("@at-root"))return null;const e=new nn,n=[],r=t.getParent();if(r instanceof Ft){let s=r.getParent();for(;s&&!Dm(s);){if(s instanceof Ft){if(s.getSelectors().matches("@at-root"))break;n.push(s)}s=s.getParent()}}const i=new Im(e);for(let s=n.length-1;s>=0;s--){const a=n[s].getSelectors().getChild(0);a&&i.processSelector(a)}return i.processSelector(t),e}class gs{constructor(e,n){this.clientCapabilities=e,this.cssDataManager=n,this.selectorPrinting=new Nm(n)}configure(e){this.defaultSettings=e}doHover(e,n,r,i=this.defaultSettings){function s(d){return K.create(e.positionAt(d.offset),e.positionAt(d.end))}const a=e.offsetAt(n),o=Di(r,a);let l=null,c;for(let d=0;dtypeof n=="string"?n:n.value):e.value}doesSupportMarkdown(){if(!Te(this.supportsMarkdown)){if(!Te(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&e.contentFormat.indexOf(He.Markdown)!==-1}return this.supportsMarkdown}}const $c=/^\w+:\/\//,Uc=/^data:/;class bs{constructor(e,n){this.fileSystemProvider=e,this.resolveModuleReferences=n}configure(e){this.defaultSettings=e}findDefinition(e,n,r){const i=new os(r),s=e.offsetAt(n),a=Ii(r,s);if(!a)return null;const o=i.findSymbolFromNode(a);return o?{uri:e.uri,range:at(o.node,e)}:null}findReferences(e,n,r){return this.findDocumentHighlights(e,n,r).map(s=>({uri:e.uri,range:s.range}))}getHighlightNode(e,n,r){const i=e.offsetAt(n);let s=Ii(r,i);if(!(!s||s.type===v.Stylesheet||s.type===v.Declarations))return s.type===v.Identifier&&s.parent&&s.parent.type===v.ClassSelector&&(s=s.parent),s}findDocumentHighlights(e,n,r){const i=[],s=this.getHighlightNode(e,n,r);if(!s)return i;const a=new os(r),o=a.findSymbolFromNode(s),l=s.getText();return r.accept(c=>{if(o){if(a.matchesSymbol(c,o))return i.push({kind:qc(c),range:at(c,e)}),!1}else s&&s.type===c.type&&c.matches(l)&&i.push({kind:qc(c),range:at(c,e)});return!0}),i}isRawStringDocumentLinkNode(e){return e.type===v.Import}findDocumentLinks(e,n,r){const i=this.findUnresolvedLinks(e,n),s=[];for(let a of i){const o=a.link,l=o.target;if(!(!l||Uc.test(l)))if($c.test(l))s.push(o);else{const c=r.resolveReference(l,e.uri);c&&(o.target=c),s.push(o)}}return s}async findDocumentLinks2(e,n,r){const i=this.findUnresolvedLinks(e,n),s=[];for(let a of i){const o=a.link,l=o.target;if(!(!l||Uc.test(l)))if($c.test(l))s.push(o);else{const c=await this.resolveReference(l,e.uri,r,a.isRawLink);c!==void 0&&(o.target=c,s.push(o))}}return s}findUnresolvedLinks(e,n){const r=[],i=s=>{let a=s.getText();const o=at(s,e);if(o.start.line===o.end.line&&o.start.character===o.end.character)return;(pe(a,"'")||pe(a,'"'))&&(a=a.slice(1,-1));const l=s.parent?this.isRawStringDocumentLinkNode(s.parent):!1;r.push({link:{target:a,range:o},isRawLink:l})};return n.accept(s=>{if(s.type===v.URILiteral){const a=s.getChild(0);return a&&i(a),!1}if(s.parent&&this.isRawStringDocumentLinkNode(s.parent)){const a=s.getText();return(pe(a,"'")||pe(a,'"'))&&i(s),!1}return!0}),r}findSymbolInformations(e,n){const r=[],i=(s,a,o)=>{const l=o instanceof W?at(o,e):o,c={name:s||w(""),kind:a,location:zn.create(e.uri,l)};r.push(c)};return this.collectDocumentSymbols(e,n,i),r}findDocumentSymbols(e,n){const r=[],i=[],s=(a,o,l,c,d)=>{const u=l instanceof W?at(l,e):l;let m=c instanceof W?at(c,e):c;(!m||!Bc(u,m))&&(m=K.create(u.start,u.start));const f={name:a||w(""),kind:o,range:u,selectionRange:m};let g=i.pop();for(;g&&!Bc(g[1],u);)g=i.pop();if(g){const b=g[0];b.children||(b.children=[]),b.children.push(f),i.push(g)}else r.push(f);d&&i.push([f,at(d,e)])};return this.collectDocumentSymbols(e,n,s),r}collectDocumentSymbols(e,n,r){n.accept(i=>{if(i instanceof Ft){for(const s of i.getSelectors().getChildren())if(s instanceof In){const a=K.create(e.positionAt(s.offset),e.positionAt(i.end));r(s.getText(),rt.Class,a,s,i.getDeclarations())}}else if(i instanceof pr)r(i.getName(),rt.Variable,i,i.getVariable(),void 0);else if(i instanceof Mn)r(i.getName(),rt.Method,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof ur)r(i.getName(),rt.Function,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof pl){const s=w("@keyframes {0}",i.getName());r(s,rt.Class,i,i.getIdentifier(),i.getDeclarations())}else if(i instanceof dl){const s=w("@font-face");r(s,rt.Class,i,void 0,i.getDeclarations())}else if(i instanceof Pi){const s=i.getChild(0);if(s instanceof fl){const a="@media "+s.getText();r(a,rt.Module,i,s,i.getDeclarations())}}return!0})}findDocumentColors(e,n){const r=[];return n.accept(i=>{const s=Am(i,e);return s&&r.push(s),!0}),r}getColorPresentations(e,n,r,i){const s=[],a=Math.round(r.red*255),o=Math.round(r.green*255),l=Math.round(r.blue*255);let c;r.alpha===1?c=`rgb(${a}, ${o}, ${l})`:c=`rgba(${a}, ${o}, ${l}, ${r.alpha})`,s.push({label:c,textEdit:j.replace(i,c)}),r.alpha===1?c=`#${It(a)}${It(o)}${It(l)}`:c=`#${It(a)}${It(o)}${It(l)}${It(Math.round(r.alpha*255))}`,s.push({label:c,textEdit:j.replace(i,c)});const d=yc(r);d.a===1?c=`hsl(${d.h}, ${Math.round(d.s*100)}%, ${Math.round(d.l*100)}%)`:c=`hsla(${d.h}, ${Math.round(d.s*100)}%, ${Math.round(d.l*100)}%, ${d.a})`,s.push({label:c,textEdit:j.replace(i,c)});const u=cm(r);return u.a===1?c=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}%)`:c=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}% / ${u.a})`,s.push({label:c,textEdit:j.replace(i,c)}),s}prepareRename(e,n,r){const i=this.getHighlightNode(e,n,r);if(i)return K.create(e.positionAt(i.offset),e.positionAt(i.end))}doRename(e,n,r,i){const a=this.findDocumentHighlights(e,n,i).map(o=>j.replace(o.range,r));return{changes:{[e.uri]:a}}}async resolveModuleReference(e,n,r){if(pe(n,"file://")){const i=Mm(e);if(i&&i!=="."&&i!==".."){const s=r.resolveReference("/",n),a=cs(n),o=await this.resolvePathToModule(i,a,s);if(o){const l=e.substring(i.length+1);return en(o,l)}}}}async mapReference(e,n){return e}async resolveReference(e,n,r,i=!1,s=this.defaultSettings){if(e[0]==="~"&&e[1]!=="/"&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,n,r),i);const a=await this.mapReference(r.resolveReference(e,n),i);if(this.resolveModuleReferences){if(a&&await this.fileExists(a))return a;const o=await this.mapReference(await this.resolveModuleReference(e,n,r),i);if(o)return o}if(a&&!await this.fileExists(a)){const o=r.resolveReference("/",n);if(s&&o){if(e in s)return this.mapReference(en(o,s[e]),i);const l=e.indexOf("/"),c=`${e.substring(0,l)}/`;if(c in s){const d=s[c].slice(0,-1);let u=en(o,d);return this.mapReference(u=en(u,e.substring(c.length-1)),i)}}}return a}async resolvePathToModule(e,n,r){const i=en(n,"node_modules",e,"package.json");if(await this.fileExists(i))return cs(i);if(r&&n.startsWith(r)&&n.length!==r.length)return this.resolvePathToModule(e,cs(n),r)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{const n=await this.fileSystemProvider.stat(e);return!(n.type===On.Unknown&&n.size===-1)}catch{return!1}}}function Am(t,e){const n=hm(t);if(n){const r=at(t,e);return{color:n,range:r}}return null}function at(t,e){return K.create(e.positionAt(t.offset),e.positionAt(t.end))}function Bc(t,e){const n=e.start.line,r=e.end.line,i=t.start.line,s=t.end.line;return!(ns||r>s||n===i&&e.start.charactert.end.character)}function qc(t){if(t.type===v.Selector||t instanceof ze&&t.parent&&t.parent instanceof Mi&&t.isCustomProperty)return Zt.Write;if(t.parent)switch(t.parent.type){case v.FunctionDeclaration:case v.MixinDeclaration:case v.Keyframe:case v.VariableDeclaration:case v.FunctionParameter:return Zt.Write}return Zt.Read}function It(t){const e=t.toString(16);return e.length!==2?"0"+e:e}function Mm(t){const e=t.indexOf("/");if(e===-1)return"";if(t[0]==="@"){const n=t.indexOf("/",e+1);return n===-1?t:t.substring(0,n)}return t.substring(0,e)}const rn=Ne.Warning,jc=Ne.Error,Ve=Ne.Ignore;class me{constructor(e,n,r){this.id=e,this.message=n,this.defaultValue=r}}class zm{constructor(e,n,r){this.id=e,this.message=n,this.defaultValue=r}}const ie={AllVendorPrefixes:new me("compatibleVendorPrefixes",w("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Ve),IncludeStandardPropertyWhenUsingVendorPrefix:new me("vendorPrefix",w("When using a vendor-specific prefix also include the standard property"),rn),DuplicateDeclarations:new me("duplicateProperties",w("Do not use duplicate style definitions"),Ve),EmptyRuleSet:new me("emptyRules",w("Do not use empty rulesets"),rn),ImportStatemement:new me("importStatement",w("Import statements do not load in parallel"),Ve),BewareOfBoxModelSize:new me("boxModel",w("Do not use width or height when using padding or border"),Ve),UniversalSelector:new me("universalSelector",w("The universal selector (*) is known to be slow"),Ve),ZeroWithUnit:new me("zeroUnits",w("No unit for zero needed"),Ve),RequiredPropertiesForFontFace:new me("fontFaceProperties",w("@font-face rule must define 'src' and 'font-family' properties"),rn),HexColorLength:new me("hexColorLength",w("Hex colors must consist of three, four, six or eight hex numbers"),jc),ArgsInColorFunction:new me("argumentsInColorFunction",w("Invalid number of parameters"),jc),UnknownProperty:new me("unknownProperties",w("Unknown property."),rn),UnknownAtRules:new me("unknownAtRules",w("Unknown at-rule."),rn),IEStarHack:new me("ieHack",w("IE hacks are only necessary when supporting IE7 and older"),Ve),UnknownVendorSpecificProperty:new me("unknownVendorSpecificProperties",w("Unknown vendor specific property."),Ve),PropertyIgnoredDueToDisplay:new me("propertyIgnoredDueToDisplay",w("Property is ignored due to the display."),rn),AvoidImportant:new me("important",w("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Ve),AvoidFloat:new me("float",w("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Ve),AvoidIdSelector:new me("idSelector",w("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Ve)},Pm={ValidProperties:new zm("validProperties",w("A list of properties that are not validated against the `unknownProperties` rule."),[])};class Tm{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){const n=Om(this.conf[e.id]);if(n)return n}return e.defaultValue}getSetting(e){return this.conf[e.id]}}function Om(t){switch(t){case"ignore":return Ne.Ignore;case"warning":return Ne.Warning;case"error":return Ne.Error}return null}class ws{constructor(e){this.cssDataManager=e}doCodeActions(e,n,r,i){return this.doCodeActions2(e,n,r,i).map(s=>{const a=s.edit&&s.edit.documentChanges&&s.edit.documentChanges[0];return Rt.create(s.title,"_css.applyCodeAction",e.uri,e.version,a&&a.edits)})}doCodeActions2(e,n,r,i){const s=[];if(r.diagnostics)for(const a of r.diagnostics)this.appendFixesForMarker(e,i,a,s);return s}getFixesForUnknownProperty(e,n,r,i){const s=n.getName(),a=[];this.cssDataManager.getProperties().forEach(l=>{const c=dp(s,l.name);c>=s.length/2&&a.push({property:l.name,score:c})}),a.sort((l,c)=>c.score-l.score||l.property.localeCompare(c.property));let o=3;for(const l of a){const c=l.property,d=w("Rename to '{0}'",c),u=j.replace(r.range,c),m=Ki.create(e.uri,e.version),f={documentChanges:[wr.create(m,[u])]},g=ts.create(d,f,es.QuickFix);if(g.diagnostics=[r],i.push(g),--o<=0)return}}appendFixesForMarker(e,n,r,i){if(r.code!==ie.UnknownProperty.id)return;const s=e.offsetAt(r.range.start),a=e.offsetAt(r.range.end),o=Di(n,s);for(let l=o.length-1;l>=0;l--){const c=o[l];if(c instanceof Pe){const d=c.getProperty();if(d&&d.offset===s&&d.end===a){this.getFixesForUnknownProperty(e,d,r,i);return}}}}}class Wm{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}}function Vn(t,e,n,r){const i=t[e];i.value=n,n&&(Lc(i.properties,r)||i.properties.push(r))}function Vm(t,e,n){Vn(t,"top",e,n),Vn(t,"right",e,n),Vn(t,"bottom",e,n),Vn(t,"left",e,n)}function we(t,e,n,r){e==="top"||e==="right"||e==="bottom"||e==="left"?Vn(t,e,n,r):Vm(t,n,r)}function vs(t,e,n){switch(e.length){case 1:we(t,void 0,e[0],n);break;case 2:we(t,"top",e[0],n),we(t,"bottom",e[0],n),we(t,"right",e[1],n),we(t,"left",e[1],n);break;case 3:we(t,"top",e[0],n),we(t,"right",e[1],n),we(t,"left",e[1],n),we(t,"bottom",e[2],n);break;case 4:we(t,"top",e[0],n),we(t,"right",e[1],n),we(t,"bottom",e[2],n),we(t,"left",e[3],n);break}}function ys(t,e){for(let n of e)if(t.matches(n))return!0;return!1}function $n(t,e=!0){return e&&ys(t,["initial","unset"])?!1:parseFloat(t.getText())!==0}function Hc(t,e=!0){return t.map(n=>$n(n,e))}function Dr(t,e=!0){return!(ys(t,["none","hidden"])||e&&ys(t,["initial","unset"]))}function $m(t,e=!0){return t.map(n=>Dr(n,e))}function Um(t){const e=t.getChildren();if(e.length===1){const n=e[0];return $n(n)&&Dr(n)}for(const n of e){const r=n;if(!$n(r,!1)||!Dr(r,!1))return!1}return!0}function Bm(t){const e={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(const n of t){const r=n.node.value;if(!(typeof r>"u"))switch(n.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=n;break;case"height":e.height=n;break;default:const i=n.fullPropertyName.split("-");switch(i[0]){case"border":switch(i[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(i[2]){case void 0:we(e,i[1],Um(r),n);break;case"width":we(e,i[1],$n(r,!1),n);break;case"style":we(e,i[1],Dr(r,!0),n);break}break;case"width":vs(e,Hc(r.getChildren(),!1),n);break;case"style":vs(e,$m(r.getChildren(),!0),n);break}break;case"padding":i.length===1?vs(e,Hc(r.getChildren(),!0),n):we(e,i[1],$n(r,!0),n);break}break}}return e}class Gc{constructor(){this.data={}}add(e,n,r){let i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(n),r&&i.nodes.push(r)}}class sn{static entries(e,n,r,i,s){const a=new sn(n,r,i);return e.acceptVisitor(a),a.completeValidations(),a.getEntries(s)}constructor(e,n,r){this.cssDataManager=r,this.warnings=[],this.settings=n,this.documentText=e.getText(),this.keyframes=new Gc,this.validProperties={};const i=n.getSetting(Pm.ValidProperties);Array.isArray(i)&&i.forEach(s=>{if(typeof s=="string"){const a=s.trim().toLowerCase();a.length&&(this.validProperties[a]=!0)}})}isValidPropertyDeclaration(e){const n=e.fullPropertyName;return this.validProperties[n]}fetch(e,n){const r=[];for(const i of e)i.fullPropertyName===n&&r.push(i);return r}fetchWithValue(e,n,r){const i=[];for(const s of e)if(s.fullPropertyName===n){const a=s.node.getValue();a&&this.findValueInExpression(a,r)&&i.push(s)}return i}findValueInExpression(e,n){let r=!1;return e.accept(i=>(i.type===v.Identifier&&i.matches(n)&&(r=!0),!r)),r}getEntries(e=Ne.Warning|Ne.Error){return this.warnings.filter(n=>(n.getLevel()&e)!==0)}addEntry(e,n,r){const i=new yl(e,n,this.settings.getRule(n),r);this.warnings.push(i)}getMissingNames(e,n){const r=e.slice(0);for(let s=0;s0){const l=this.fetch(r,"float");for(let c=0;c0){const l=this.fetch(r,"vertical-align");for(let c=0;c1)for(let m=0;mO.startsWith(T))&&g.delete(N)}}const b=[];for(let F=0,N=sn.prefixes.length;Fs instanceof Oi?(i+=1,!1):!0),i!==r&&this.addEntry(e,ie.ArgsInColorFunction)),!0}}sn.prefixes=["-ms-","-moz-","-o-","-webkit-"];class xs{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,n,r=this.settings){if(r&&r.validate===!1)return[];const i=[];i.push.apply(i,Bi.entries(n)),i.push.apply(i,sn.entries(n,e,new Tm(r&&r.lint),this.cssDataManager));const s=[];for(const o in ie)s.push(ie[o].id);function a(o){const l=K.create(e.positionAt(o.getOffset()),e.positionAt(o.getOffset()+o.getLength())),c=e.languageId;return{code:o.getRule().id,source:c,message:o.getMessage(),severity:o.getLevel()===Ne.Warning?gr.Warning:gr.Error,range:l}}return i.filter(o=>o.getLevel()!==Ne.Ignore).map(a)}}const Jc=47,qm=10,jm=13,Hm=12,Gm=36,Jm=35,Xm=123,Un=61,Ym=33,Qm=60,Km=62,Ss=46;let ot=p.CustomToken;const Cs=ot++,Lr=ot++;ot++;const Xc=ot++,Yc=ot++,ks=ot++,_s=ot++,Ar=ot++;ot++;class Qc extends Nn{scanNext(e){if(this.stream.advanceIfChar(Gm)){const n=["$"];if(this.ident(n))return this.finishToken(e,Cs,n.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([Jm,Xm])?this.finishToken(e,Lr):this.stream.advanceIfChars([Un,Un])?this.finishToken(e,Xc):this.stream.advanceIfChars([Ym,Un])?this.finishToken(e,Yc):this.stream.advanceIfChar(Qm)?this.stream.advanceIfChar(Un)?this.finishToken(e,_s):this.finishToken(e,p.Delim):this.stream.advanceIfChar(Km)?this.stream.advanceIfChar(Un)?this.finishToken(e,ks):this.finishToken(e,p.Delim):this.stream.advanceIfChars([Ss,Ss,Ss])?this.finishToken(e,Ar):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([Jc,Jc])?(this.stream.advanceWhileChar(e=>{switch(e){case qm:case jm:case Hm:return!1;default:return!0}}),!0):!1}}class Es{constructor(e,n){this.id=e,this.message=n}}const Fs={FromExpected:new Es("scss-fromexpected",w("'from' expected")),ThroughOrToExpected:new Es("scss-throughexpected",w("'through' or 'to' expected")),InExpected:new Es("scss-fromexpected",w("'in' expected"))};class Zm extends _r{constructor(){super(new Qc)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(zi);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,S.URIOrStringExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,S.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(Cs))return null;const n=this.create(pr);if(!n.setVariable(this._parseVariable()))return null;if(!this.accept(p.Colon))return this.finish(n,S.ColonExpected);if(this.prevToken&&(n.colonPosition=this.prevToken.offset),!n.setValue(this._parseExpr()))return this.finish(n,S.VariableValueExpected,[],e);for(;this.peek(p.Exclamation);)if(!n.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(p.Ident,/^(default|global)$/))return this.finish(n,S.UnknownKeyword);this.consumeToken()}return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(_s)||this.accept(ks)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(Cs))return null;const e=this.create(Ui);return this.consumeToken(),e}_parseModuleMember(){const e=this.mark(),n=this.create(vl);return n.setIdentifier(this._parseIdent([Q.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):n.addChild(this._parseVariable()||this._parseFunction())?n:this.finish(n,S.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(p.Ident)&&!this.peek(Lr)&&!this.peekDelim("-"))return null;const n=this.create(ze);n.referenceTypes=e,n.isCustomProperty=this.peekRegExp(p.Ident,/^--/);let r=!1;const i=()=>{const s=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(s),null):this._parseInterpolation()};for(;(this.accept(p.Ident)||n.addChild(i())||r&&this.acceptRegexp(/^[\w-]/))&&(r=!0,!this.hasWhitespace()););return r?this.finish(n):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(Lr)){const e=this.create($i);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(p.CurlyR)?this.finish(e):this.finish(e,S.ExpressionExpected):this.accept(p.CurlyR)?this.finish(e):this.finish(e,S.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(Xc)||this.peek(Yc)||this.peek(ks)||this.peek(_s)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){const e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){const e=this.create(W);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){const n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;const r=this.create(Pe);if(!r.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(r,S.ColonExpected,[p.Colon],e||[p.SemiColon]);this.prevToken&&(r.colonPosition=this.prevToken.offset);let i=!1;if(r.setValue(this._parseExpr())&&(i=!0,r.addChild(this._parsePrio())),this.peek(p.CurlyL))r.setNestedProperties(this._parseNestedProperties());else if(!i)return this.finish(r,S.PropertyValueExpected);return this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)}_parseNestedProperties(){const e=this.create(ul);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){const e=this.create(An);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,S.SelectorExpected);for(;this.accept(p.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(p.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,S.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){const e=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}else if(this.peekKeyword("@at-root")){const e=this.createNode(v.SelectorPlaceholder);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,S.IdentifierExpected);if(!this.accept(p.Colon))return this.finish(e,S.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,S.IdentifierExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.CurlyR])}return this.finish(e)}return null}_parseElementName(){const e=this.mark(),n=super._parseElementName();return n&&!this.hasWhitespace()&&this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):n}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;const e=this.createNode(v.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(p.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){const n=this.create(vp);if(this.consumeToken(),!n.setExpression(this._parseExpr(!0)))return this.finish(n,S.ExpressionExpected);if(this._parseBody(n,e),this.acceptKeyword("@else")){if(this.peekIdent("if"))n.setElseClause(this._internalParseIfStatement(e));else if(this.peek(p.CurlyL)){const r=this.create(Cp);this._parseBody(r,e),n.setElseClause(r)}}return this.finish(n)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;const n=this.create(yp);return this.consumeToken(),n.setVariable(this._parseVariable())?this.acceptIdent("from")?n.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(n,Fs.ThroughOrToExpected,[p.CurlyR]):n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,S.ExpressionExpected,[p.CurlyR]):this.finish(n,S.ExpressionExpected,[p.CurlyR]):this.finish(n,Fs.FromExpected,[p.CurlyR]):this.finish(n,S.VariableNameExpected,[p.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;const n=this.create(xp);this.consumeToken();const r=n.getVariables();if(!r.addChild(this._parseVariable()))return this.finish(n,S.VariableNameExpected,[p.CurlyR]);for(;this.accept(p.Comma);)if(!r.addChild(this._parseVariable()))return this.finish(n,S.VariableNameExpected,[p.CurlyR]);return this.finish(r),this.acceptIdent("in")?n.addChild(this._parseExpr())?this._parseBody(n,e):this.finish(n,S.ExpressionExpected,[p.CurlyR]):this.finish(n,Fs.InExpected,[p.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;const n=this.create(Sp);return this.consumeToken(),n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,S.ExpressionExpected,[p.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword("@function"))return null;const e=this.create(ur);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([Q.Function])))return this.finish(e,S.IdentifierExpected,[p.CurlyR]);if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,S.VariableNameExpected)}return this.accept(p.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,S.RightParenthesisExpected,[p.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;const e=this.createNode(v.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,S.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;const e=this.create(Mn);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([Q.Mixin])))return this.finish(e,S.IdentifierExpected,[p.CurlyR]);if(this.accept(p.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){const e=this.create(dr);return e.setIdentifier(this._parseVariable())?(this.accept(Ar),this.accept(p.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;const e=this.create(qp);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;const e=this.create(mr);this.consumeToken();const n=this._parseIdent([Q.Mixin]);if(!e.setIdentifier(n))return this.finish(e,S.IdentifierExpected,[p.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){const r=this._parseIdent([Q.Mixin]);if(!r)return this.finish(e,S.IdentifierExpected,[p.CurlyR]);const i=this.create(vl);n.referenceTypes=[Q.Module],i.setIdentifier(n),e.setIdentifier(r),e.addChild(i)}if(this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(p.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){const e=this.create(jp);if(this.acceptIdent("using")){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.CurlyL])}return this.peek(p.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){const e=this.create(Qt),n=this.mark(),r=this._parseVariable();if(r)if(this.accept(p.Colon))e.setIdentifier(r);else{if(this.accept(Ar))return e.setValue(r),this.finish(e);this.restoreAtMark(n)}return e.setValue(this._parseExpr(!0))?(this.accept(Ar),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){const e=this.mark(),n=super._parseURLArgument();if(!n||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);const r=this.create(W);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;const e=this.create(W);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(p.Comma);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)}_parseListElement(){const e=this.create(Hp),n=this._parseBinaryExpr();if(!n)return null;if(this.accept(p.Colon)){if(e.setKey(n),!e.setValue(this._parseBinaryExpr()))return this.finish(e,S.ExpressionExpected)}else e.setValue(n);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;const e=this.create(_p);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,S.StringLiteralExpected);if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|with/))return this.finish(e,S.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([Q.Module]))&&!this.acceptDelim("*"))return this.finish(e,S.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,S.SemiColonExpected):this.finish(e)}_parseModuleConfigDeclaration(){const e=this.create(Ep);return e.setIdentifier(this._parseVariable())?!this.accept(p.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.accept(p.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(e,S.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;const e=this.create(Fp);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,S.StringLiteralExpected);if(this.acceptIdent("as")){const n=this._parseIdent([Q.Forward]);if(!e.setIdentifier(n))return this.finish(e,S.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,S.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,S.IdentifierOrVariableExpected);return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,S.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){const e=this.create(Rp);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(p.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}}const lt=w("Sass documentation");class ge extends ds{constructor(e,n){super("$",e,n),Kc(ge.scssModuleLoaders),Kc(ge.scssModuleBuiltIns)}isImportPathParent(e){return e===v.Forward||e===v.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,n){const r=e.getParent().type;if(r===v.Forward||r===v.Use)for(let i of ge.scssModuleBuiltIns){const s={label:i.label,documentation:i.documentation,textEdit:j.replace(this.getCompletionRange(e),`'${i.label}'`),kind:q.Module};n.items.push(s)}return super.getCompletionForImportPath(e,n)}createReplaceFunction(){let e=1;return(n,r)=>"\\"+r+": ${"+e+++":"+(ge.variableDefaults[r]||"")+"}"}createFunctionProposals(e,n,r,i){for(const s of e){const a=s.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),l={label:s.func.substr(0,s.func.indexOf("(")),detail:s.func,documentation:s.desc,textEdit:j.replace(this.getCompletionRange(n),a),insertTextFormat:Ie.Snippet,kind:q.Function};r&&(l.sortText="z"),i.items.push(l)}return i}getCompletionsForSelector(e,n,r){return this.createFunctionProposals(ge.selectorFuncs,null,!0,r),super.getCompletionsForSelector(e,n,r)}getTermProposals(e,n,r){let i=ge.builtInFuncs;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(e,n,r)}getColorProposals(e,n,r){return this.createFunctionProposals(ge.colorProposals,n,!1,r),super.getColorProposals(e,n,r)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionForAtDirectives(n),this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}getCompletionsForExtendsReference(e,n,r){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,Q.Rule);for(const s of i){const a={label:s.name,textEdit:j.replace(this.getCompletionRange(n),s.name),kind:q.Function};r.items.push(a)}return r}getCompletionForAtDirectives(e){return e.items.push(...ge.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...ge.scssModuleLoaders),e}}ge.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},ge.colorProposals=[{func:"red($color)",desc:w("Gets the red component of a color.")},{func:"green($color)",desc:w("Gets the green component of a color.")},{func:"blue($color)",desc:w("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:w("Mixes two colors together.")},{func:"hue($color)",desc:w("Gets the hue component of a color.")},{func:"saturation($color)",desc:w("Gets the saturation component of a color.")},{func:"lightness($color)",desc:w("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:w("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:w("Makes a color lighter.")},{func:"darken($color, $amount)",desc:w("Makes a color darker.")},{func:"saturate($color, $amount)",desc:w("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:w("Makes a color less saturated.")},{func:"grayscale($color)",desc:w("Converts a color to grayscale.")},{func:"complement($color)",desc:w("Returns the complement of a color.")},{func:"invert($color)",desc:w("Returns the inverse of a color.")},{func:"alpha($color)",desc:w("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:w("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:w("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:w("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:w("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:w("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:w("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:w("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:w("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:w("Converts a color into the format understood by IE filters.")}],ge.selectorFuncs=[{func:"selector-nest($selectors…)",desc:w("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:w("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:w("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:w("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:w("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:w("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:w("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:w("Parses a selector into the format returned by &.")}],ge.builtInFuncs=[{func:"unquote($string)",desc:w("Removes quotes from a string.")},{func:"quote($string)",desc:w("Adds quotes to a string.")},{func:"str-length($string)",desc:w("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:w("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:w("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:w("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:w("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:w("Converts a string to lower case.")},{func:"percentage($number)",desc:w("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:w("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:w("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:w("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:w("Returns the absolute value of a number.")},{func:"min($numbers)",desc:w("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:w("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:w("Returns a random number.")},{func:"length($list)",desc:w("Returns the length of a list.")},{func:"nth($list, $n)",desc:w("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:w("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:w("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:w("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:w("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:w("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:w("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:w("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:w("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:w("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:w("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:w("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:w("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:w("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:w("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:w("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:w("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:w("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:w("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:w("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:w("Returns the type of a value.")},{func:"unit($number)",desc:w("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:w("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:w("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:w("Dynamically calls a Sass function.")}],ge.scssAtDirectives=[{label:"@extend",documentation:w("Inherits the styles of another selector."),kind:q.Keyword},{label:"@at-root",documentation:w("Causes one or more rules to be emitted at the root of the document."),kind:q.Keyword},{label:"@debug",documentation:w("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:q.Keyword},{label:"@warn",documentation:w("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:q.Keyword},{label:"@error",documentation:w("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:q.Keyword},{label:"@if",documentation:w("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} { $0 }`,insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@for",documentation:w("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@each",documentation:w("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@while",documentation:w("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} { $0 }`,insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@mixin",documentation:w("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} { $0 -}`,insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@include",documentation:w("Includes the styles defined by another mixin into the current rule."),kind:q.Keyword},{label:"@function",documentation:w("Defines complex operations that can be re-used throughout stylesheets."),kind:q.Keyword}],ge.scssModuleLoaders=[{label:"@use",documentation:w("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:at,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@forward",documentation:w("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:at,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Ie.Snippet,kind:q.Keyword}],ge.scssModuleBuiltIns=[{label:"sass:math",documentation:w("Provides functions that operate on numbers."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:w("Makes it easy to combine, search, or split apart strings."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:w("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:w("Lets you access and modify values in lists."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:w("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:w("Provides access to Sass’s powerful selector engine."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:w("Exposes the details of Sass’s inner workings."),references:[{name:at,url:"https://sass-lang.com/documentation/modules/meta"}]}];function Xc(t){t.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){const n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=` +}`,insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@include",documentation:w("Includes the styles defined by another mixin into the current rule."),kind:q.Keyword},{label:"@function",documentation:w("Defines complex operations that can be re-used throughout stylesheets."),kind:q.Keyword}],ge.scssModuleLoaders=[{label:"@use",documentation:w("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:lt,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Ie.Snippet,kind:q.Keyword},{label:"@forward",documentation:w("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:lt,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Ie.Snippet,kind:q.Keyword}],ge.scssModuleBuiltIns=[{label:"sass:math",documentation:w("Provides functions that operate on numbers."),references:[{name:lt,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:w("Makes it easy to combine, search, or split apart strings."),references:[{name:lt,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:w("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:lt,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:w("Lets you access and modify values in lists."),references:[{name:lt,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:w("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:lt,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:w("Provides access to Sass’s powerful selector engine."),references:[{name:lt,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:w("Exposes the details of Sass’s inner workings."),references:[{name:lt,url:"https://sass-lang.com/documentation/modules/meta"}]}];function Kc(t){t.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){const n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=` -`,n.value+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | "),e.documentation=n}})}const Yc=47,Zm=10,ef=13,tf=12,_s=96,Es=46;let nf=p.CustomToken;const Fs=nf++;class Qc extends _n{scanNext(e){const n=this.escapedJavaScript();return n!==null?this.finishToken(e,n):this.stream.advanceIfChars([Es,Es,Es])?this.finishToken(e,Fs):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([Yc,Yc])?(this.stream.advanceWhileChar(e=>{switch(e){case Zm:case ef:case tf:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===_s?(this.stream.advance(1),this.stream.advanceWhileChar(n=>n!==_s),this.stream.advanceIfChar(_s)?p.EscapedJavaScript:p.BadEscapedJavaScript):null}}class rf extends Sr{constructor(){super(new Qc)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;const e=this.create(Li);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(e,S.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,S.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e))}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(v.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected):this.finish(e,S.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const n=this.create(pl);return n.addChild(this._parseVariable())?this.finish(n):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){const n=this.create(hr),r=this.mark();if(!n.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseDetachedRuleSet()))n.needsSemicolon=!1;else if(!n.setValue(this._parseExpr()))return this.finish(n,S.VariableValueExpected,[],e);n.addChild(this._parsePrio())}else return this.restoreAtMark(r),null;return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=this.create(In);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,S.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(e),null}else return this.restoreAtMark(e),null;if(!this.peek(p.CurlyL))return null;const n=this.create(oe);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let n=!1;for(;this.peek(p.BracketL)&&(n=!0),!!e.addChild(this._parseLookupValue());)n=!1;return!n}_parseLookupValue(){const e=this.create(W),n=this.mark();return this.accept(p.BracketL)?(e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?e:(this.restoreAtMark(n),null):(this.restoreAtMark(n),null)}_parseVariable(e=!1,n=!1){const r=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!r&&!this.peek(p.AtKeyword))return null;const i=this.create(Wi),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(s),null):!n&&this.peek(p.BracketL)&&!this._addLookupChildren(i)?(this.restoreAtMark(s),null):i}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){const e=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(v.EscapedValue);return this.consumeToken(),this.accept(p.String)||this.accept(p.EscapedJavaScript)?this.finish(e):this.finish(e,S.TermExpected)}return null}_parseOperator(){const e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){const e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),e}else if(this.peekDelim("=")){const e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("<"),e}else if(this.peekDelim("<")){const e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([Q.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){const n=this.create(En);let r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());){r=!0;const i=this.mark();if(n.addChild(this._parseGuard())&&this.peek(p.CurlyL))break;this.restoreAtMark(i),n.addChild(this._parseCombinator())}return r?this.finish(n):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;const e=this.createNode(v.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){const n=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,n))return null;const r=this.mark(),i=this.create(ze);i.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let s=!1;return e?i.isCustomProperty?s=i.addChild(this._parseIdent()):s=i.addChild(this._parseRegexp(n)):i.isCustomProperty?s=this._acceptInterpolatedIdent(i):s=this._acceptInterpolatedIdent(i,n),s?(!e&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(i)):(this.restoreAtMark(r),null)}peekInterpolatedIdent(){return this.peek(p.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,n){let r=!1;const i=()=>{const a=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(a),null):this._parseInterpolation()},s=n?()=>this.acceptRegexp(n):()=>this.accept(p.Ident);for(;(s()||e.addChild(this._parseInterpolation()||this.try(i)))&&(r=!0,!this.hasWhitespace()););return r}_parseInterpolation(){const e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){const n=this.createNode(v.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.CurlyL)?(this.restoreAtMark(e),null):n.addChild(this._parseIdent())?this.accept(p.CurlyR)?this.finish(n):this.finish(n,S.RightCurlyExpected):this.finish(n,S.IdentifierExpected)}return null}_tryParseMixinDeclaration(){const e=this.mark(),n=this.create(In);if(!n.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)n.getParameters().addChild(this._parseMixinParameter())||this.markError(n,S.IdentifierExpected,[],[p.ParenthesisR]);return this.accept(p.ParenthesisR)?(n.setGuard(this._parseGuard()),this.peek(p.CurlyL)?this._parseBody(n,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(ze),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else if(this.peek(p.Hash))e=this.create(ze),this.consumeToken();else return null;return e.referenceTypes=[Q.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(p.Colon))return null;const e=this.mark(),n=this.create(Nn);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(n):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;const e=this.mark(),n=this.create(Nn);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(e),null):this._completeExtends(n)}_completeExtends(e){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected);const n=e.getSelectors();if(!n.addChild(this._parseSelector(!0)))return this.finish(e,S.SelectorExpected);for(;this.accept(p.Comma);)if(!n.addChild(this._parseSelector(!0)))return this.finish(e,S.SelectorExpected);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(p.AtKeyword))return null;const e=this.mark(),n=this.create(dr);return n.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(p.ParenthesisL))?(this.restoreAtMark(e),null):this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)}_tryParseMixinReference(e=!0){const n=this.mark(),r=this.create(dr);let i=this._parseMixinDeclarationIdentifier();for(;i;){this.acceptDelim(">");const a=this._parseMixinDeclarationIdentifier();if(a)r.getNamespaces().addChild(i),i=a;else break}if(!r.setIdentifier(i))return this.restoreAtMark(n),null;let s=!1;if(this.accept(p.ParenthesisL)){if(s=!0,r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(r,S.RightParenthesisExpected);i.referenceTypes=[Q.Mixin]}else i.referenceTypes=[Q.Mixin,Q.Rule];return this.peek(p.BracketL)?e||this._addLookupChildren(r):r.addChild(this._parsePrio()),!s&&!this.peek(p.SemiColon)&&!this.peek(p.CurlyR)&&!this.peek(p.EOF)?(this.restoreAtMark(n),null):this.finish(r)}_parseMixinArgument(){const e=this.create(Gt),n=this.mark(),r=this._parseVariable();return r&&(this.accept(p.Colon)?e.setIdentifier(r):this.restoreAtMark(n)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(n),null)}_parseMixinParameter(){const e=this.create(lr);if(this.peekKeyword("@rest")){const r=this.create(W);return this.consumeToken(),this.accept(Fs)?(e.setIdentifier(this.finish(r)),this.finish(e)):this.finish(e,S.DotExpected,[],[p.Comma,p.ParenthesisR])}if(this.peek(Fs)){const r=this.create(W);return this.consumeToken(),e.setIdentifier(this.finish(r)),this.finish(e)}let n=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(p.Colon),n=!0),!e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!n?null:this.finish(e)}_parseGuard(){if(!this.peekIdent("when"))return null;const e=this.create(Hp);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,S.ConditionExpected);for(;this.acceptIdent("and")||this.accept(p.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,S.ConditionExpected);return this.finish(e)}_parseGuardCondition(){const e=this.create(Gp);return e.isNegated=this.acceptIdent("not"),this.accept(p.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)):e.isNegated?this.finish(e,S.LeftParenthesisExpected):null}_parseFunction(){const e=this.mark(),n=this.create(Fn);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,S.ExpressionExpected)}return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){const e=this.create(ze);return e.referenceTypes=[Q.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){const e=this.mark(),n=super._parseURLArgument();if(!n||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);const r=this.create(W);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n}}class tn extends ls{constructor(e,n){super("@",e,n)}createFunctionProposals(e,n,r,i){for(const s of e){const a={label:s.name,detail:s.example,documentation:s.description,textEdit:j.replace(this.getCompletionRange(n),s.name+"($0)"),insertTextFormat:Ie.Snippet,kind:q.Function};r&&(a.sortText="z"),i.items.push(a)}return i}getTermProposals(e,n,r){let i=tn.builtInProposals;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(e,n,r)}getColorProposals(e,n,r){return this.createFunctionProposals(tn.colorProposals,n,!1,r),super.getColorProposals(e,n,r)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}}tn.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:w("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:w('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:w("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:w("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:w("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:w("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:w("URL encodes a string")},{name:"e",example:"e(@string);",description:w("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:w("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:w("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:w("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:w("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:w("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:w("absolute value of a number"),example:"abs(number);"},{name:"acos",description:w("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:w("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:w("rounds up to an integer")},{name:"cos",description:w("cosine function"),example:"cos(number);"},{name:"floor",description:w("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:w("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:w("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:w("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:w("sine function"),example:"sin(number);"},{name:"tan",description:w("tangent function"),example:"tan(number);"},{name:"atan",description:w("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:w("returns pi"),example:"pi();"},{name:"pow",description:w("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:w("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:w("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:w("returns the lowest of one or more values"),example:"max(@x, @y);"}],tn.colorProposals=[{name:"argb",example:"argb(@color);",description:w("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:w("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:w("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:w("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:w("creates a color")},{name:"hue",example:"hue(@color);",description:w("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:w("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:w("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:w("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:w("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:w("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:w("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:w("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:w("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:w("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:w("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:w("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:w("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:w("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:w("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:w("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:w("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:w("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:w("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:w("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:w("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:w("return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}];function sf(t,e){const n=af(t);return of(n,e)}function af(t){function e(d){return t.positionAt(d.offset).line}function n(d){return t.positionAt(d.offset+d.len).line}function r(){switch(t.languageId){case"scss":return new Jc;case"less":return new Qc;default:return new _n}}function i(d,u){const m=e(d),f=n(d);return m!==f?{startLine:m,endLine:f,kind:u}:null}const s=[],a=[],o=r();o.ignoreComment=!1,o.setSource(t.getText());let l=o.scan(),c=null;for(;l.type!==p.EOF;){switch(l.type){case p.CurlyL:case Nr:{a.push({line:e(l),type:"brace",isStart:!0});break}case p.CurlyR:{if(a.length!==0){const d=Kc(a,"brace");if(!d)break;let u=n(l);d.type==="brace"&&(c&&n(c)!==u&&u--,d.line!==u&&s.push({startLine:d.line,endLine:u,kind:void 0}))}break}case p.Comment:{const d=f=>f==="#region"?{line:e(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1},m=(f=>{const g=f.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(g)return d(g[1]);if(t.languageId==="scss"||t.languageId==="less"){const b=f.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(b)return d(b[1])}return null})(l);if(m)if(m.isStart)a.push(m);else{const f=Kc(a,"comment");if(!f)break;f.type==="comment"&&f.line!==m.line&&s.push({startLine:f.line,endLine:m.line,kind:"region"})}else{const f=i(l,"comment");f&&s.push(f)}break}}c=l,l=o.scan()}return s}function Kc(t,e){if(t.length===0)return null;for(let n=t.length-1;n>=0;n--)if(t[n].type===e&&t[n].isStart)return t.splice(n,1)[0];return null}function of(t,e){const n=e&&e.rangeLimit||Number.MAX_VALUE,r=t.sort((a,o)=>{let l=a.startLine-o.startLine;return l===0&&(l=a.endLine-o.endLine),l}),i=[];let s=-1;return r.forEach(a=>{a.startLine=0;c--)if(this.__items[c].match(l))return!0;return!1},s.prototype.set_indent=function(l,c){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(l){this.__items.push(l);var c=l.lastIndexOf(` +`,n.value+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | "),e.documentation=n}})}const Zc=47,ef=10,tf=13,nf=12,Rs=96,Ns=46;let rf=p.CustomToken;const Is=rf++;class eh extends Nn{scanNext(e){const n=this.escapedJavaScript();return n!==null?this.finishToken(e,n):this.stream.advanceIfChars([Ns,Ns,Ns])?this.finishToken(e,Is):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([Zc,Zc])?(this.stream.advanceWhileChar(e=>{switch(e){case ef:case tf:case nf:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===Rs?(this.stream.advance(1),this.stream.advanceWhileChar(n=>n!==Rs),this.stream.advanceIfChar(Rs)?p.EscapedJavaScript:p.BadEscapedJavaScript):null}}class sf extends _r{constructor(){super(new eh)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;const e=this.create(zi);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(e,S.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,S.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e))}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(v.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected):this.finish(e,S.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const n=this.create(gl);return n.addChild(this._parseVariable())?this.finish(n):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){const n=this.create(pr),r=this.mark();if(!n.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseDetachedRuleSet()))n.needsSemicolon=!1;else if(!n.setValue(this._parseExpr()))return this.finish(n,S.VariableValueExpected,[],e);n.addChild(this._parsePrio())}else return this.restoreAtMark(r),null;return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=this.create(Mn);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,S.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(e),null}else return this.restoreAtMark(e),null;if(!this.peek(p.CurlyL))return null;const n=this.create(oe);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let n=!1;for(;this.peek(p.BracketL)&&(n=!0),!!e.addChild(this._parseLookupValue());)n=!1;return!n}_parseLookupValue(){const e=this.create(W),n=this.mark();return this.accept(p.BracketL)?(e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?e:(this.restoreAtMark(n),null):(this.restoreAtMark(n),null)}_parseVariable(e=!1,n=!1){const r=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!r&&!this.peek(p.AtKeyword))return null;const i=this.create(Ui),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(s),null):!n&&this.peek(p.BracketL)&&!this._addLookupChildren(i)?(this.restoreAtMark(s),null):i}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){const e=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(v.EscapedValue);return this.consumeToken(),this.accept(p.String)||this.accept(p.EscapedJavaScript)?this.finish(e):this.finish(e,S.TermExpected)}return null}_parseOperator(){const e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){const e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),e}else if(this.peekDelim("=")){const e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("<"),e}else if(this.peekDelim("<")){const e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([Q.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){const n=this.create(In);let r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());){r=!0;const i=this.mark();if(n.addChild(this._parseGuard())&&this.peek(p.CurlyL))break;this.restoreAtMark(i),n.addChild(this._parseCombinator())}return r?this.finish(n):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;const e=this.createNode(v.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){const n=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,n))return null;const r=this.mark(),i=this.create(ze);i.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let s=!1;return e?i.isCustomProperty?s=i.addChild(this._parseIdent()):s=i.addChild(this._parseRegexp(n)):i.isCustomProperty?s=this._acceptInterpolatedIdent(i):s=this._acceptInterpolatedIdent(i,n),s?(!e&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(i)):(this.restoreAtMark(r),null)}peekInterpolatedIdent(){return this.peek(p.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,n){let r=!1;const i=()=>{const a=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(a),null):this._parseInterpolation()},s=n?()=>this.acceptRegexp(n):()=>this.accept(p.Ident);for(;(s()||e.addChild(this._parseInterpolation()||this.try(i)))&&(r=!0,!this.hasWhitespace()););return r}_parseInterpolation(){const e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){const n=this.createNode(v.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.CurlyL)?(this.restoreAtMark(e),null):n.addChild(this._parseIdent())?this.accept(p.CurlyR)?this.finish(n):this.finish(n,S.RightCurlyExpected):this.finish(n,S.IdentifierExpected)}return null}_tryParseMixinDeclaration(){const e=this.mark(),n=this.create(Mn);if(!n.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)n.getParameters().addChild(this._parseMixinParameter())||this.markError(n,S.IdentifierExpected,[],[p.ParenthesisR]);return this.accept(p.ParenthesisR)?(n.setGuard(this._parseGuard()),this.peek(p.CurlyL)?this._parseBody(n,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(ze),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else if(this.peek(p.Hash))e=this.create(ze),this.consumeToken();else return null;return e.referenceTypes=[Q.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(p.Colon))return null;const e=this.mark(),n=this.create(An);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(n):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;const e=this.mark(),n=this.create(An);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(e),null):this._completeExtends(n)}_completeExtends(e){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected);const n=e.getSelectors();if(!n.addChild(this._parseSelector(!0)))return this.finish(e,S.SelectorExpected);for(;this.accept(p.Comma);)if(!n.addChild(this._parseSelector(!0)))return this.finish(e,S.SelectorExpected);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(p.AtKeyword))return null;const e=this.mark(),n=this.create(mr);return n.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(p.ParenthesisL))?(this.restoreAtMark(e),null):this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)}_tryParseMixinReference(e=!0){const n=this.mark(),r=this.create(mr);let i=this._parseMixinDeclarationIdentifier();for(;i;){this.acceptDelim(">");const a=this._parseMixinDeclarationIdentifier();if(a)r.getNamespaces().addChild(i),i=a;else break}if(!r.setIdentifier(i))return this.restoreAtMark(n),null;let s=!1;if(this.accept(p.ParenthesisL)){if(s=!0,r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(r,S.RightParenthesisExpected);i.referenceTypes=[Q.Mixin]}else i.referenceTypes=[Q.Mixin,Q.Rule];return this.peek(p.BracketL)?e||this._addLookupChildren(r):r.addChild(this._parsePrio()),!s&&!this.peek(p.SemiColon)&&!this.peek(p.CurlyR)&&!this.peek(p.EOF)?(this.restoreAtMark(n),null):this.finish(r)}_parseMixinArgument(){const e=this.create(Qt),n=this.mark(),r=this._parseVariable();return r&&(this.accept(p.Colon)?e.setIdentifier(r):this.restoreAtMark(n)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(n),null)}_parseMixinParameter(){const e=this.create(dr);if(this.peekKeyword("@rest")){const r=this.create(W);return this.consumeToken(),this.accept(Is)?(e.setIdentifier(this.finish(r)),this.finish(e)):this.finish(e,S.DotExpected,[],[p.Comma,p.ParenthesisR])}if(this.peek(Is)){const r=this.create(W);return this.consumeToken(),e.setIdentifier(this.finish(r)),this.finish(e)}let n=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(p.Colon),n=!0),!e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!n?null:this.finish(e)}_parseGuard(){if(!this.peekIdent("when"))return null;const e=this.create(Gp);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,S.ConditionExpected);for(;this.acceptIdent("and")||this.accept(p.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,S.ConditionExpected);return this.finish(e)}_parseGuardCondition(){const e=this.create(Jp);return e.isNegated=this.acceptIdent("not"),this.accept(p.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)):e.isNegated?this.finish(e,S.LeftParenthesisExpected):null}_parseFunction(){const e=this.mark(),n=this.create(Dn);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,S.ExpressionExpected)}return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){const e=this.create(ze);return e.referenceTypes=[Q.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){const e=this.mark(),n=super._parseURLArgument();if(!n||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);const r=this.create(W);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n}}class an extends ds{constructor(e,n){super("@",e,n)}createFunctionProposals(e,n,r,i){for(const s of e){const a={label:s.name,detail:s.example,documentation:s.description,textEdit:j.replace(this.getCompletionRange(n),s.name+"($0)"),insertTextFormat:Ie.Snippet,kind:q.Function};r&&(a.sortText="z"),i.items.push(a)}return i}getTermProposals(e,n,r){let i=an.builtInProposals;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(e,n,r)}getColorProposals(e,n,r){return this.createFunctionProposals(an.colorProposals,n,!1,r),super.getColorProposals(e,n,r)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}}an.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:w("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:w('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:w("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:w("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:w("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:w("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:w("URL encodes a string")},{name:"e",example:"e(@string);",description:w("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:w("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:w("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:w("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:w("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:w("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:w("absolute value of a number"),example:"abs(number);"},{name:"acos",description:w("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:w("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:w("rounds up to an integer")},{name:"cos",description:w("cosine function"),example:"cos(number);"},{name:"floor",description:w("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:w("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:w("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:w("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:w("sine function"),example:"sin(number);"},{name:"tan",description:w("tangent function"),example:"tan(number);"},{name:"atan",description:w("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:w("returns pi"),example:"pi();"},{name:"pow",description:w("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:w("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:w("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:w("returns the lowest of one or more values"),example:"max(@x, @y);"}],an.colorProposals=[{name:"argb",example:"argb(@color);",description:w("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:w("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:w("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:w("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:w("creates a color")},{name:"hue",example:"hue(@color);",description:w("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:w("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:w("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:w("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:w("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:w("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:w("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:w("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:w("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:w("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:w("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:w("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:w("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:w("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:w("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:w("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:w("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:w("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:w("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:w("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:w("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:w("return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}];function af(t,e){const n=of(t);return lf(n,e)}function of(t){function e(d){return t.positionAt(d.offset).line}function n(d){return t.positionAt(d.offset+d.len).line}function r(){switch(t.languageId){case"scss":return new Qc;case"less":return new eh;default:return new Nn}}function i(d,u){const m=e(d),f=n(d);return m!==f?{startLine:m,endLine:f,kind:u}:null}const s=[],a=[],o=r();o.ignoreComment=!1,o.setSource(t.getText());let l=o.scan(),c=null;for(;l.type!==p.EOF;){switch(l.type){case p.CurlyL:case Lr:{a.push({line:e(l),type:"brace",isStart:!0});break}case p.CurlyR:{if(a.length!==0){const d=th(a,"brace");if(!d)break;let u=n(l);d.type==="brace"&&(c&&n(c)!==u&&u--,d.line!==u&&s.push({startLine:d.line,endLine:u,kind:void 0}))}break}case p.Comment:{const d=f=>f==="#region"?{line:e(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1},m=(f=>{const g=f.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(g)return d(g[1]);if(t.languageId==="scss"||t.languageId==="less"){const b=f.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(b)return d(b[1])}return null})(l);if(m)if(m.isStart)a.push(m);else{const f=th(a,"comment");if(!f)break;f.type==="comment"&&f.line!==m.line&&s.push({startLine:f.line,endLine:m.line,kind:"region"})}else{const f=i(l,"comment");f&&s.push(f)}break}}c=l,l=o.scan()}return s}function th(t,e){if(t.length===0)return null;for(let n=t.length-1;n>=0;n--)if(t[n].type===e&&t[n].isStart)return t.splice(n,1)[0];return null}function lf(t,e){const n=e&&e.rangeLimit||Number.MAX_VALUE,r=t.sort((a,o)=>{let l=a.startLine-o.startLine;return l===0&&(l=a.endLine-o.endLine),l}),i=[];let s=-1;return r.forEach(a=>{a.startLine=0;c--)if(this.__items[c].match(l))return!0;return!1},s.prototype.set_indent=function(l,c){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(l){this.__items.push(l);var c=l.lastIndexOf(` `);c!==-1?this.__character_count=l.length-c:this.__character_count+=l.length},s.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function a(l,c){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),c=c||"",l.indent_level>0&&(c=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}a.prototype.get_indent_size=function(l,c){var d=this.__base_string_length;return c=c||0,l<0&&(d=0),d+=l*this.__indent_size,d+=c,d},a.prototype.get_indent_string=function(l,c){var d=this.__base_string;return c=c||0,l<0&&(l=0,d=""),c+=l*this.__indent_size,this.__ensure_cache(c),d+=this.__cache[c],d},a.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var l=this.__cache.length,c=0,d="";this.__indent_size&&l>=this.__indent_size&&(c=Math.floor(l/this.__indent_size),l-=c*this.__indent_size,d=new Array(c+1).join(this.__indent_string)),l&&(d+=new Array(l+1).join(" ")),this.__cache.push(d)};function o(l,c){this.__indent_cache=new a(l,c),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(l,c){return this.__indent_cache.get_indent_string(l,c)},o.prototype.get_indent_size=function(l,c){return this.__indent_cache.get_indent_size(l,c)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(l){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` `&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(` `);return l!==` @@ -64,17 +64,17 @@ Syntax: ${_r(t.syntax)}`)}return t.references&&t.references.length>0&&e?.referen `+c+` You passed in: '`+this.raw_options[l]+"'");return u[0]},s.prototype._get_selection_list=function(l,c,d){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(d=d||[c[0]],!this._is_valid_selection(d,c))throw new Error("Invalid Default Value!");var u=this._get_array(l,d);if(!this._is_valid_selection(u,c))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values: `+c+` -You passed in: '`+this.raw_options[l]+"'");return u},s.prototype._is_valid_selection=function(l,c){return l.length&&c.length&&!l.some(function(d){return c.indexOf(d)===-1})};function a(l,c){var d={};l=o(l);var u;for(u in l)u!==c&&(d[u]=l[u]);if(c&&l[c])for(u in l[c])d[u]=l[c][u];return d}function o(l){var c={},d;for(d in l){var u=d.replace(/-/g,"_");c[u]=l[d]}return c}i.exports.Options=s,i.exports.normalizeOpts=o,i.exports.mergeOpts=a}),,(function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function a(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position=0&&o=0&&l=o.length&&this.__input.substring(l-o.length,l).toLowerCase()===o},i.exports.InputScanner=a}),,,,,(function(i){function s(a,o){a=typeof a=="string"?a:a.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+o,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(a);l;)o[l[1]]=l[2],l=this.__directive_pattern.exec(a);return o},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s}),,(function(i,s,a){var o=a(16).Beautifier,l=a(17).Options;function c(d,u){var m=new o(d,u);return m.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new l}}),(function(i,s,a){var o=a(17).Options,l=a(2).Output,c=a(8).InputScanner,d=a(13).Directives,u=new d(/\/\*/,/\*\//),m=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,g=/\s/,b=/(?:\s|\n)+/g,k=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,F=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function N(_,T){this._source_text=_||"",this._options=new o(T),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}N.prototype.eatString=function(_){var T="";for(this._ch=this._input.next();this._ch;){if(T+=this._ch,this._ch==="\\")T+=this._input.next();else if(_.indexOf(this._ch)!==-1||this._ch===` -`)break;this._ch=this._input.next()}return T},N.prototype.eatWhitespace=function(_){for(var T=g.test(this._input.peek()),O=0;g.test(this._input.peek());)this._ch=this._input.next(),_&&this._ch===` -`&&(O===0||O0&&this._indentLevel--},N.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _=this._source_text,T=this._options.eol;T==="auto"&&(T=` -`,_&&m.test(_||"")&&(T=_.match(m)[0])),_=_.replace(f,` -`);var O=_.match(/^[\t ]*/)[0];this._output=new l(this._options,O),this._input=new c(_),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var V=0,I=!1,R=!1,z=!1,$=!1,L=!1,y=this._ch,E=!1,D,A,M;D=this._input.read(b),A=D!=="",M=y,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),y=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var P=this._input.read(k),H=u.get_directives(P);H&&H.ignore==="start"&&(P+=u.readIgnored(this._input)),this.print_string(P),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(F)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(A),this.print_string(this._ch);var ee=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ee.match(/[ :]$/)&&(ee=this.eatString(": ").replace(/\s+$/,""),this.print_string(ee),this._output.space_before_token=!0),V===0&&ee.indexOf(":")!==-1&&(R=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(A),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var G=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);G.match(/[ :]$/)&&(G=this.eatString(": ").replace(/\s+$/,""),this.print_string(G),this._output.space_before_token=!0),V===0&&G.indexOf(":")!==-1?(R=!0,this.indent()):G in this.NESTED_AT_RULE?(this._nestedLevel+=1,G in this.CONDITIONAL_GROUP_RULE&&(z=!0)):V===0&&!R&&($=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(A),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")R&&(R=!1,this.outdent()),$=!1,z?(z=!1,I=this._indentLevel>=this._nestedLevel):I=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&I&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(M==="("?this._output.space_before_token=!1:M!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),M==="{"&&this._output.trim(!0),R&&(this.outdent(),R=!1),this.print_string(this._ch),I=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var xe=0;xe"||this._ch==="+"||this._ch==="~")&&!R&&V===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&g.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(A),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),g.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var As=M==='"'||M==="'";this.preserveSingleSpace(As||A),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` -`&&E&&this._output.add_new_line()}var ln=this._output.get_code(T);return ln},i.exports.Beautifier=N}),(function(i,s,a){var o=a(6).Options;function l(c){o.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var d=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||d;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var m=0;m0&&nh(r,u-1);)u--;u===0||th(r,u-1)?d=u:u0){const d=n.insertSpaces?ol(" ",o*s):ol(" ",s);c=c.split(` +You passed in: '`+this.raw_options[l]+"'");return u},s.prototype._is_valid_selection=function(l,c){return l.length&&c.length&&!l.some(function(d){return c.indexOf(d)===-1})};function a(l,c){var d={};l=o(l);var u;for(u in l)u!==c&&(d[u]=l[u]);if(c&&l[c])for(u in l[c])d[u]=l[c][u];return d}function o(l){var c={},d;for(d in l){var u=d.replace(/-/g,"_");c[u]=l[d]}return c}i.exports.Options=s,i.exports.normalizeOpts=o,i.exports.mergeOpts=a}),,(function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function a(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position=0&&o=0&&l=o.length&&this.__input.substring(l-o.length,l).toLowerCase()===o},i.exports.InputScanner=a}),,,,,(function(i){function s(a,o){a=typeof a=="string"?a:a.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+o,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(a);l;)o[l[1]]=l[2],l=this.__directive_pattern.exec(a);return o},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s}),,(function(i,s,a){var o=a(16).Beautifier,l=a(17).Options;function c(d,u){var m=new o(d,u);return m.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new l}}),(function(i,s,a){var o=a(17).Options,l=a(2).Output,c=a(8).InputScanner,d=a(13).Directives,u=new d(/\/\*/,/\*\//),m=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,g=/\s/,b=/(?:\s|\n)+/g,_=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,F=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function N(E,T){this._source_text=E||"",this._options=new o(T),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}N.prototype.eatString=function(E){var T="";for(this._ch=this._input.next();this._ch;){if(T+=this._ch,this._ch==="\\")T+=this._input.next();else if(E.indexOf(this._ch)!==-1||this._ch===` +`)break;this._ch=this._input.next()}return T},N.prototype.eatWhitespace=function(E){for(var T=g.test(this._input.peek()),O=0;g.test(this._input.peek());)this._ch=this._input.next(),E&&this._ch===` +`&&(O===0||O0&&this._indentLevel--},N.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E=this._source_text,T=this._options.eol;T==="auto"&&(T=` +`,E&&m.test(E||"")&&(T=E.match(m)[0])),E=E.replace(f,` +`);var O=E.match(/^[\t ]*/)[0];this._output=new l(this._options,O),this._input=new c(E),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var V=0,I=!1,R=!1,z=!1,$=!1,L=!1,y=this._ch,k=!1,D,A,M;D=this._input.read(b),A=D!=="",M=y,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),y=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var P=this._input.read(_),H=u.get_directives(P);H&&H.ignore==="start"&&(P+=u.readIgnored(this._input)),this.print_string(P),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(F)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(A),this.print_string(this._ch);var ee=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ee.match(/[ :]$/)&&(ee=this.eatString(": ").replace(/\s+$/,""),this.print_string(ee),this._output.space_before_token=!0),V===0&&ee.indexOf(":")!==-1&&(R=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(A),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var G=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);G.match(/[ :]$/)&&(G=this.eatString(": ").replace(/\s+$/,""),this.print_string(G),this._output.space_before_token=!0),V===0&&G.indexOf(":")!==-1?(R=!0,this.indent()):G in this.NESTED_AT_RULE?(this._nestedLevel+=1,G in this.CONDITIONAL_GROUP_RULE&&(z=!0)):V===0&&!R&&($=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(A),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")R&&(R=!1,this.outdent()),$=!1,z?(z=!1,I=this._indentLevel>=this._nestedLevel):I=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&I&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(M==="("?this._output.space_before_token=!1:M!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),M==="{"&&this._output.trim(!0),R&&(this.outdent(),R=!1),this.print_string(this._ch),I=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var xe=0;xe"||this._ch==="+"||this._ch==="~")&&!R&&V===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&g.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(A),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),g.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Ps=M==='"'||M==="'";this.preserveSingleSpace(Ps||A),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` +`&&k&&this._output.add_new_line()}var un=this._output.get_code(T);return un},i.exports.Beautifier=N}),(function(i,s,a){var o=a(6).Options;function l(c){o.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var d=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||d;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var m=0;m0&&sh(r,u-1);)u--;u===0||ih(r,u-1)?d=u:u0){const d=n.insertSpaces?hl(" ",o*s):hl(" ",s);c=c.split(` `).join(` -`+d),e.start.character===0&&(c=d+c)}return[{range:e,newText:c}]}function eh(t){return t.replace(/^\s+/,"")}const hf=123,df=125;function uf(t,e){for(;e>=0;){const n=t.charCodeAt(e);if(n===hf)return!0;if(n===df)return!1;e--}return!1}function ot(t,e,n){if(t&&t.hasOwnProperty(e)){const r=t[e];if(r!==null)return r}return n}function pf(t,e,n){let r=e,i=0;const s=n.tabSize||4;for(;r && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",browsers:["E12","FF28","S9","C29","IE11","O16"],values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."},{name:"start"},{name:"end"},{name:"normal"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"space-around"},{name:"space-between"},{name:"space-evenly"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | | | ? ",relevance:66,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-content"}],description:"Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",browsers:["E12","FF20","S9","C29","IE11","O16"],values:[{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"normal"},{name:"start"},{name:"end"},{name:"self-start"},{name:"self-end"},{name:"first baseline"},{name:"last baseline"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | stretch | | [ ? ]",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-items"}],description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","S9","C52","IE11","O12.1"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"safe"},{name:"unsafe"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-items"}],description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",browsers:["E16","FF45","S10.1","C57","IE10","O44"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:55,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-self"}],description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",browsers:["E12","FF20","S9","C29","IE10","O12.1"],values:[{name:"auto",description:"Computes to the value of 'align-items' on the element's parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"normal"},{name:"self-end"},{name:"self-start"},{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"safe"},{name:"unsafe"}],syntax:"auto | normal | stretch | | ? ",relevance:73,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-self"}],description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert | revert-layer",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",browsers:["E12","FF16","S9","C43","IE10","O30"],values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:82,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",browsers:["E12","FF16","S9","C43","IE10","O30"],syntax:"'},{Icon:lr,label:"Flex Row",tag:"div",category:"Layout",defaultHtml:'
Item
Item
'},{Icon:cg,label:"Grid",tag:"div",category:"Layout",defaultHtml:'
Grid Item
Grid Item
Grid Item
Grid Item
'}],Vy=["Layout","Text","UI","Media"],Zy={All:ou,Layout:lr,Text:ey,UI:fr,Media:iy},Qy=({onInsert:o,onDragStart:s,onDragEnd:u})=>{const[c,f]=m.useState("All"),[h,y]=m.useState(""),[j,E]=m.useState(null),S=["All",...Vy],R=Fy.filter(b=>{const C=c==="All"||b.category===c,T=!h||b.label.toLowerCase().includes(h.toLowerCase())||b.tag.toLowerCase().includes(h.toLowerCase());return C&&T});return i.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#1e1e1e"},children:[i.jsxs("div",{style:{height:30,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 10px",borderBottom:"1px solid #3a3a3a",fontSize:10,fontWeight:700,color:"#888",letterSpacing:"0.07em",textTransform:"uppercase"},children:[i.jsx("span",{children:"Elements"}),i.jsxs("span",{style:{fontSize:9,color:"#666",letterSpacing:"normal",textTransform:"none"},children:[R.length," found"]})]}),i.jsx("div",{style:{padding:"6px 8px",borderBottom:"1px solid #2a2a2a",flexShrink:0},children:i.jsx("input",{value:h,onChange:b=>y(b.target.value),placeholder:"Search elements…",style:{width:"100%",background:"#2a2a2a",border:"1px solid #3a3a3a",borderRadius:4,padding:"4px 8px",fontSize:11,color:"#ccc",outline:"none",boxSizing:"border-box",fontFamily:"inherit"}})}),i.jsx("div",{style:{display:"flex",borderBottom:"1px solid #2a2a2a",flexShrink:0,flexWrap:"wrap",padding:"5px 4px",gap:3},children:S.map(b=>i.jsxs("button",{onClick:()=>f(b),style:{padding:"3px 7px",fontSize:10,borderRadius:12,cursor:"pointer",fontFamily:"inherit",border:"none",margin:"1px",background:c===b?"rgba(229,164,90,0.2)":"transparent",color:c===b?"#e5a45a":"#666",fontWeight:c===b?700:400,display:"inline-flex",alignItems:"center",gap:4},children:[Nt.createElement(Zy[b],{size:10}),b]},b))}),i.jsx("div",{style:{flex:1,overflowY:"auto",padding:"4px"},children:R.map((b,C)=>i.jsxs("div",{draggable:!0,onDragStart:T=>{E(b),T.dataTransfer.setData("text/html-element",b.defaultHtml),T.dataTransfer.setData("text/html-element-label",b.label),T.dataTransfer.effectAllowed="copy",s?.(b)},onDragEnd:()=>{E(null),u?.()},onClick:()=>o(b.defaultHtml),title:`Click or drag to insert <${b.tag}>`,style:{display:"flex",alignItems:"center",gap:8,padding:"7px 8px",borderRadius:5,cursor:"grab",marginBottom:4,background:j===b?"rgba(229,164,90,0.15)":"transparent",border:"1px solid transparent",transition:"background 0.1s, border-color 0.1s",userSelect:"none"},onMouseEnter:T=>{T.currentTarget.style.background="rgba(255,255,255,0.06)",T.currentTarget.style.borderColor="#333"},onMouseLeave:T=>{T.currentTarget.style.background=j===b?"rgba(229,164,90,0.15)":"transparent",T.currentTarget.style.borderColor="transparent"},children:[i.jsx("span",{style:{width:26,height:26,flexShrink:0,background:"linear-gradient(135deg, #2b2b2b, #202020)",borderRadius:6,border:"1px solid #363636",display:"flex",alignItems:"center",justifyContent:"center",color:"#e5a45a"},children:i.jsx(b.Icon,{size:14})}),i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsx("div",{style:{fontSize:11,color:"#ccc",fontWeight:500,lineHeight:1.3},children:b.label}),i.jsxs("div",{style:{fontSize:9,color:"#555",fontFamily:"monospace"},children:["<",b.tag,">"]})]}),i.jsx("span",{style:{fontSize:9,color:"#666",flexShrink:0,border:"1px solid #3a3a3a",borderRadius:4,padding:"1px 4px"},children:"DND"})]},C))}),i.jsxs("div",{style:{height:22,flexShrink:0,borderTop:"1px solid #3a3a3a",display:"flex",alignItems:"center",padding:"0 8px",fontSize:10,color:"#666",justifyContent:"space-between"},children:[i.jsx("span",{children:"Click or drag to insert"}),i.jsx("span",{children:"DND"})]})]})},kh=["nw","n","ne","e","se","s","sw","w"],zh={nw:"nw-resize",n:"n-resize",ne:"ne-resize",e:"e-resize",se:"se-resize",s:"s-resize",sw:"sw-resize",w:"w-resize"};function Wy(o,s){const u=s.left+s.width/2,c=s.top+s.height/2,f={nw:s.left,n:u,ne:s.left+s.width,e:s.left+s.width,se:s.left+s.width,s:u,sw:s.left,w:s.left},h={nw:s.top,n:s.top,ne:s.top,e:c,se:s.top+s.height,s:s.top+s.height,sw:s.top+s.height,w:c};return{x:f[o],y:h[o]}}const wl=new Set(["html","head","body","script","style","meta","link","title","base","noscript"]),Th=8,vn="data-vi-id",He={bg:"#1e1e1e",surface:"#252526",border:"#3a3a3a",borderHi:"#3e3e3e",accent:"#e5a45a",accentBg:"rgba(229,164,90,0.15)",accentBrd:"rgba(229,164,90,0.45)",blue:"#7ab8f5",blueBg:"rgba(100,160,255,0.15)",blueBrd:"rgba(100,160,255,0.4)",dim:"#888",muted:"#666",canvas:"#2a2a2a"};function kg(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`vi_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,11)}`}function cr(o){return o.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Ch(o){o.getAttribute(vn)||o.setAttribute(vn,kg())}function Eh(o){const s=[o,...Array.from(o.querySelectorAll("*"))];for(const u of s)u.setAttribute(vn,kg())}const Ky=["color","background-color","background","font-size","font-weight","font-family","text-align","text-decoration","text-transform","line-height","letter-spacing","display","position","width","height","min-width","min-height","max-width","max-height","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","border","border-width","border-color","border-style","border-radius","box-shadow","text-shadow","opacity","z-index","overflow","left","top","right","bottom","flex-direction","justify-content","align-items","gap","grid-template-columns","grid-template-rows","transform","transition","animation","flex-wrap","background-size","background-image","background-position","background-repeat","-webkit-background-clip","-webkit-text-fill-color","background-clip","border-image-source","border-image-slice"];function Ra(o){return Math.round(o/Th)*Th}function ur(o){return o.replace(/["\\#.:,[\]>+~*^$|= !]/g,"\\$&")}function jl(o){if(o.id)return`#${ur(o.id)}`;const s=o.getAttribute(vn);if(s)return`[${vn}="${cr(s)}"]`;const u=[];let c=o;for(;c&&c.tagName.toLowerCase()!=="body";){const f=c.parentElement;if(!f)break;const h=c.tagName.toLowerCase(),y=c.tagName,E=Array.from(f.children).filter(S=>S instanceof HTMLElement).filter(S=>S.tagName===y).indexOf(c)+1;u.unshift(`${h}:nth-of-type(${Math.max(1,E)})`),c=f}return u.length===0?"body":`body > ${u.join(" > ")}`}function $y(o){if(o.id)return`#${ur(o.id)}`;const s=o.getAttribute(vn);if(s)return`[${vn}="${cr(s)}"]`;const u=Array.from(o.classList).filter(Boolean);return u.length?`.${u.map(ur).join(".")}`:jl(o)}function Mh(o,s){const u=s?.getComputedStyle(o),c={};return Ky.forEach(f=>{c[f]=u?.getPropertyValue(f)||""}),c["inline-style"]=o.getAttribute("style")||"",c.selector=$y(o),c}function Iy(o){const s=[];let u=o;for(;u&&u.tagName&&u.tagName.toLowerCase()!=="html";)s.unshift(u),u=u.parentElement;return s}function Rh(o){const s=o.tagName.toLowerCase();if(o.id)return`${s}#${o.id}`;const u=Array.from(o.classList).filter(Boolean);return u.length?`${s}.${u[0]}`:s}function Dh(o){document.body.style.cursor=o,document.body.style.userSelect="none";const s=document.getElementById("__drag-capture");s&&(s.style.display="block",s.style.cursor=o)}function Ah(){document.body.style.cursor="",document.body.style.userSelect="";const o=document.getElementById("__drag-capture");o&&(o.style.display="none")}const Jy={full:void 0,desktop:1280,tablet:768,mobile:375},Py=3;function ex(o){let s=o;for(;s;){if(!wl.has(s.tagName.toLowerCase()))return s;s=s.parentElement}return null}const zg=()=>{const{files:o,updateFileContent:s,setSelectedElement:u,addConsoleEntry:c,timelineAnimationStyle:f,setSelectedSelector:h,setVisualBridge:y,selectedSelector:j,showNotification:E}=Ht(),S=m.useRef(null),[R,b]=m.useState(""),C=m.useRef(null),T=m.useRef(f),Y=m.useRef(null),z=m.useRef(null),I=m.useRef(null),_=m.useRef(o),[U,se]=m.useState(null),[oe,Q]=m.useState(null),[re,fe]=m.useState({left:0,top:0}),me=m.useRef({left:0,top:0}),ke=m.useRef(null),De=m.useRef(null),[Ue,Oe]=m.useState(0),[ee,ie]=m.useState(0),[be,O]=m.useState(null),{show:ne,element:g}=Ui(),te=m.useRef(null),[P,ce]=m.useState("select"),[ye,Se]=m.useState(new Set),A=m.useRef(new Set),[K,w]=m.useState("full"),[G,ae]=m.useState(!0),[le,Me]=m.useState(!0),[Te,Xe]=m.useState(!1),[Ze,B]=m.useState(!1),[$,Ne]=m.useState(null),[Ee,ot]=m.useState(null);m.useRef(null);const[qt,ln]=m.useState(null);m.useEffect(()=>{me.current=re},[re]),m.useEffect(()=>{ke.current=oe},[oe]),m.useEffect(()=>{De.current=U},[U]),m.useEffect(()=>{A.current=ye},[ye]),m.useEffect(()=>()=>{te.current?.(),te.current=null},[]);const _t=m.useCallback(()=>sr(o,{editorCss:``,includeBridge:!1,fallbackHtml:'No HTML file'}),[o,P]),Gt=m.useCallback(()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{b(_t())},80)},[_t]);m.useEffect(()=>(Gt(),()=>{C.current&&clearTimeout(C.current)}),[Gt]),m.useEffect(()=>{const v=_.current,Z=o;_.current=Z;const J=S.current?.contentDocument,ue=!!J?.body,ve=v.find(Je=>Je.type==="html")?.content??"",we=Z.find(Je=>Je.type==="html")?.content??"",je=v.find(Je=>Je.type==="js")?.content??"",pe=Z.find(Je=>Je.type==="js")?.content??"";if(!(ve!==we)&&!(je!==pe)&&ue&&J){let Je=!0;if(Z.filter(ct=>ct.type==="css").forEach(ct=>{if(v.find(Jn=>Jn.id===ct.id)?.content===ct.content)return;const ut=J.querySelector(`style[data-src="${ct.id}"]`)??J.querySelector(`style[data-src="${ct.name}"]`);ut?ut.textContent=ct.content:Je=!1}),Je)return}const Fe=Y.current;I.current=Fe,Gt(),Q(null),Fe||(z.current=null,se(null),u(null),h(null))},[o,P,Gt,h,u]),m.useEffect(()=>{const v=()=>{const J=S.current?.getBoundingClientRect();J&&fe({left:J.left,top:J.top})};v();const Z=new ResizeObserver(v);return S.current&&Z.observe(S.current),window.addEventListener("scroll",v,!0),window.addEventListener("resize",v),()=>{Z.disconnect(),window.removeEventListener("scroll",v,!0),window.removeEventListener("resize",v)}},[]);const Xt=m.useCallback(()=>{if(!U?.isConnected)return null;const v=U.getBoundingClientRect();return{left:re.left+v.left,top:re.top+v.top,width:v.width,height:v.height}},[U,re,ee]),St=m.useCallback(()=>{if(!oe?.isConnected||oe===U)return null;const v=oe.getBoundingClientRect();return{left:re.left+v.left,top:re.top+v.top,width:v.width,height:v.height}},[oe,U,re,ee]),En=v=>`${v.doctype?``:""} +${v.documentElement.outerHTML}`,Rt=(v,Z,J)=>{const ue=J.getAttribute(vn);if(ue){const je=v.querySelector(`[${vn}="${cr(ue)}"]`);if(je)return je}const ve=v.querySelector(Z);if(ve)return ve;if(J.id){const je=v.getElementById(J.id);if(je)return je}const we=Array.from(J.classList).filter(Boolean);if(we.length>0){const je=v.querySelector(`.${we.map(ur).join(".")}`);if(je)return je}return null},Ke=m.useCallback(v=>{const Z=o.find(je=>je.type==="html");if(!Z)return!1;const ue=new DOMParser().parseFromString(Z.content,"text/html");if(v(ue,Z.id)===!1)return!1;const we=En(ue);return we===Z.content?!1:(s(Z.id,we),!0)},[o,s]),q=m.useCallback((v,Z)=>{const J=o.find(he=>he.type==="html");if(!J)return;const ue=jl(v),we=new DOMParser().parseFromString(J.content,"text/html"),je=Rt(we,ue,v);if(!je)return;Z(je);const pe=En(we);pe!==J.content&&s(J.id,pe)},[o,s]),de=m.useCallback(v=>{const Z=v.getAttribute("style")||"";q(v,J=>{Z?J.setAttribute("style",Z):J.removeAttribute("style")})},[q]),Ie=m.useCallback(v=>{q(v,Z=>{Z.innerHTML=v.innerHTML})},[q]),Dt=m.useCallback(v=>{const Z=S.current,J=Ht.getState().selectedElement;J&&u({...J,tagName:v.tagName.toLowerCase(),id:v.id,className:v.className||"",styles:Mh(v,Z?.contentWindow),innerHTML:v.innerHTML,textContent:v.textContent||""})},[u]),wt=m.useCallback((v,Z,J)=>{v?.isConnected&&(Z(v),ie(ue=>ue+1),Dt(v),de(v),J&&E(J))},[Dt,E,de]),Qe=m.useCallback(()=>{const v=De.current;if(v?.isConnected)return v;const Z=S.current?.contentDocument,J=Y.current||j;if(!Z||!J)return null;const ue=Z.querySelector(J);return ue&&!wl.has(ue.tagName.toLowerCase())?ue:null},[j]);m.useEffect(()=>{T.current=f},[f]),m.useEffect(()=>(y({applyStyle:(v,Z)=>{const J=Qe();if(J){J.style.setProperty(v,Z);for(const ue of A.current)ue.isConnected&&ue!==J&&(ue.style.setProperty(v,Z),de(ue));ie(ue=>ue+1),Dt(J),de(J)}},applyContent:v=>{const Z=Qe();Z&&(Z.innerHTML=v,ie(J=>J+1),Dt(Z),Ie(Z))}}),()=>y(null)),[Qe,Dt,y,Ie,de]);const ht=m.useCallback((v,Z)=>{let J=v.getElementById("__timeline-anim-style");J||(J=v.createElement("style"),J.id="__timeline-anim-style",v.head?.appendChild(J)),J.textContent=Z},[]);m.useEffect(()=>{const v=S.current?.contentDocument;v&&ht(v,f)},[f,ee,ht]);const xt=m.useCallback((v,Z=!1)=>{Se(Z?he=>{const ge=new Set(he);return ge.has(v)?ge.delete(v):ge.add(v),ge}:new Set);const J=jl(v);z.current=v.getAttribute(vn),Y.current=J,h(J),se(v),Q(null),ie(he=>he+1);const ue=S.current,we=(ue?.contentWindow?.getComputedStyle(v)??{}).transform||"none";let je=0;if(we!=="none"){const he=we.match(/matrix\((-?[\d.]+),\s*(-?[\d.]+)/);he&&(je=Math.round(Math.atan2(parseFloat(he[2]),parseFloat(he[1]))*(180/Math.PI)))}Oe(je);const pe=Mh(v,ue?.contentWindow);u({tagName:v.tagName.toLowerCase(),id:v.id,className:v.className||"",styles:pe,innerHTML:v.innerHTML,textContent:v.textContent||""}),c({type:"info",message:`Selected <${v.tagName.toLowerCase()}${v.id?"#"+v.id:""}${v.className?"."+v.className.trim().split(/\s+/).join("."):""}>`,timestamp:new Date})},[h,u,c]),In=m.useCallback(v=>{const Z=jl(v);if(!Ke(ve=>{const we=Rt(ve,Z,v);if(!we)return!1;const je=we.cloneNode(!0);return je.removeAttribute("id"),Eh(je),we.after(je),!0}))return;const ue=v.cloneNode(!0);ue.removeAttribute("id"),Eh(ue),v.after(ue),ie(ve=>ve+1),E("Element duplicated")},[E,Ke]),Tl=m.useCallback(v=>{let Z="";Ke(ue=>{const ve=De.current;let we=null;if(ve?.isConnected){const he=jl(ve);we=Rt(ue,he,ve)}const je=ue.createElement("div");je.innerHTML=v;const pe=je.firstElementChild;return pe?(Ch(pe),Z=pe.tagName.toLowerCase(),we&&we.parentElement?we.after(pe):ue.body.appendChild(pe),!0):!1})&&Z&&E(`Inserted <${Z}>`)},[E,Ke]),gr=m.useCallback((v,Z,J)=>{let ue="";Ke(we=>{const je=we.createElement("div");je.innerHTML=v;const pe=je.firstElementChild;if(!pe)return!1;Ch(pe);const he=me.current,ge=S.current?.contentWindow,Fe=Math.max(0,Math.round(Z-he.left+(ge?.scrollX||0))),Je=Math.max(0,Math.round(J-he.top+(ge?.scrollY||0))),ct=pe.getAttribute("style")||"",At=ct.trim()&&!ct.trim().endsWith(";")?"; ":"";return pe.setAttribute("style",`${ct}${At}position:absolute;left:${Fe}px;top:${Je}px;`),ue=pe.tagName.toLowerCase(),we.body.appendChild(pe),!0})&&ue&&E(`Inserted <${ue}> near cursor`)},[E,Ke]),Yi=m.useCallback((v,Z)=>{const J=jl(v);Ke(ue=>{const ve=Rt(ue,J,v);if(!ve||!ve.parentElement)return!1;const we=ve.parentElement,je=Array.from(we.children),pe=je.indexOf(ve);if(Z==="up"&&pe>0)we.insertBefore(ve,je[pe-1]);else if(Z==="down"&&pe{if(v===Z||v.contains(Z)||Z.tagName.toLowerCase()==="html")return;const ue=jl(v),ve=jl(Z);Ke(je=>{const pe=je.querySelector(ue),he=je.querySelector(ve);return!pe||!he||pe===he||pe.contains(he)?!1:(J==="inside"?he.appendChild(pe):he.parentElement&&(J==="before"?he.parentElement.insertBefore(pe,he):he.parentElement.insertBefore(pe,he.nextSibling)),!0)})&&(v.isConnected&&Z.isConnected&&(J==="inside"?Z.appendChild(v):Z.parentElement&&(J==="before"?Z.parentElement.insertBefore(v,Z):Z.parentElement.insertBefore(v,Z.nextSibling)),ie(je=>je+1),xt(v)),E("Layer reordered"))},[E,xt,Ke]),Cl=m.useCallback(v=>{const Z=S.current?.contentDocument;if(!Z)return;const ue=Array.from(Z.querySelectorAll("*")).reduce((ve,we)=>{const je=parseInt(we.style.zIndex||"0",10);return isNaN(je)?ve:Math.max(ve,je)},0);v.style.zIndex=String(ue+10),v.style.position=v.style.position||"relative",ie(ve=>ve+1),de(v),E("Brought to front")},[de,E]),Mn=m.useCallback(v=>{v.style.zIndex="0",v.style.position=v.style.position||"relative",ie(Z=>Z+1),de(v),E("Sent to back")},[de,E]),mr=m.useCallback(()=>{const v=S.current?.contentDocument;if(!v)return;const Z=S.current?.contentWindow??v.defaultView;T.current&&ht(v,T.current),ln(v);const J=I.current;if(J){I.current=null;const ge=(z.current?v.querySelector(`[${vn}="${cr(z.current)}"]`):null)??v.querySelector(J);if(ge&&!wl.has(ge.tagName.toLowerCase()))setTimeout(()=>xt(ge),0);else{const Fe=De.current,Je=ex(Fe?.parentElement??null);Je?setTimeout(()=>xt(Je),0):(Y.current=null,z.current=null,se(null),u(null))}}const ue=he=>{const ge=he.target;if(!ge||wl.has(ge.tagName.toLowerCase())){Q(null);return}ge!==ke.current&&Q(ge)},ve=he=>{if(P==="select")he.preventDefault(),he.stopPropagation();else return;const ge=he.target;if(!ge||wl.has(ge.tagName.toLowerCase())){Y.current=null,z.current=null,se(null),u(null),h(null),Se(new Set);return}xt(ge,he.shiftKey)},we=he=>{if(P!=="select")return;const ge=he.target;if(!ge||wl.has(ge.tagName.toLowerCase()))return;ge.setAttribute("contenteditable","true"),ge.focus(),ge.style.outline="2px solid #7ab8f5";const Fe=()=>{ge.removeAttribute("contenteditable"),ge.style.outline="",ge.removeEventListener("blur",Fe),Ie(ge),ie(Je=>Je+1),E("Text updated")};ge.addEventListener("blur",Fe),he.preventDefault(),he.stopPropagation()},je=he=>{he.preventDefault(),he.stopPropagation();const ge=he.target;if(!ge||wl.has(ge.tagName.toLowerCase()))return;const Fe=me.current,Je=Fe.left+he.clientX,ct=Fe.top+he.clientY;ne({preventDefault:()=>{},stopPropagation:()=>{},clientX:Je,clientY:ct},[{label:`<${ge.tagName.toLowerCase()}${ge.id?"#"+ge.id:""}>`,disabled:!0},{separator:!0,label:""},{label:"Select",icon:"↖",action:()=>xt(ge)},{label:"Duplicate",icon:"⧉",action:()=>In(ge)},{separator:!0,label:""},{label:"Bring to Front",icon:"⬆",action:()=>Cl(ge)},{label:"Send to Back",icon:"⬇",action:()=>Mn(ge)},{separator:!0,label:""},{label:"Copy HTML",icon:"<>",action:()=>{navigator.clipboard.writeText(ge.outerHTML)}},{label:"Copy styles",icon:"CSS",action:()=>{navigator.clipboard.writeText(ge.getAttribute("style")||"")}},{separator:!0,label:""},{label:"Reset styles",icon:"↺",action:()=>{ge.removeAttribute("style"),ie(ut=>ut+1),de(ge)}},{label:"Hide element",icon:"◌",action:()=>{ge.style.display="none",ie(ut=>ut+1),de(ge)}},{label:"Delete element",icon:"⌫",danger:!0,action:()=>{q(ge,ut=>ut.remove()),ge.remove(),Y.current=null,z.current=null,se(null),u(null),h(null)}},{separator:!0,label:""},{label:"Select parent",icon:"↑",action:()=>{const ut=ge.parentElement;ut&&!wl.has(ut.tagName.toLowerCase())&&xt(ut)}}])},pe=()=>{ie(he=>he+1)};return v.addEventListener("mousemove",ue),v.addEventListener("click",ve,!0),v.addEventListener("dblclick",we,!0),v.addEventListener("contextmenu",je,!0),v.addEventListener("scroll",pe,!0),Z?.addEventListener("resize",pe),()=>{v.removeEventListener("mousemove",ue),v.removeEventListener("click",ve,!0),v.removeEventListener("dblclick",we,!0),v.removeEventListener("contextmenu",je,!0),v.removeEventListener("scroll",pe,!0),Z?.removeEventListener("resize",pe)}},[ht,P,xt,In,Cl,Mn,h,u,ne,de,Ie,q,E]),wn=m.useRef(null),Ha=m.useCallback((v,Z)=>{Z.preventDefault(),Z.stopPropagation();const J=Qe();if(!J?.isConnected)return;const ue=S.current?.contentWindow;if(!ue)return;const ve=ue.getComputedStyle(J),we=J.getBoundingClientRect(),je=Array.from(A.current).filter(he=>he!==J&&he.isConnected).map(he=>{const ge=ue.getComputedStyle(he);return{el:he,initLeft:parseFloat(ge.left)||0,initTop:parseFloat(ge.top)||0}});wn.current={type:v,startX:Z.clientX,startY:Z.clientY,initLeft:parseFloat(ve.left)||0,initTop:parseFloat(ve.top)||0,initW:we.width,initH:we.height,el:J,multiEls:je,moved:!1};const pe=v==="move"?"move":zh[v]||"default";Dh(pe),O(v)},[]);m.useEffect(()=>{const v=J=>{const ue=wn.current;if(!ue||!ue.el.isConnected)return;let ve=J.clientX-ue.startX,we=J.clientY-ue.startY;if(!ue.moved&&Math.hypot(ve,we)At+1)},Z=()=>{const J=wn.current;if(J&&(wn.current=null,Ah(),O(null),!!J.moved)){J.el.isConnected&&de(J.el);for(const{el:ue}of J.multiEls)ue.isConnected&&de(ue)}};return window.addEventListener("mousemove",v),window.addEventListener("mouseup",Z),()=>{window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",Z)}},[de]);const Rn=m.useRef(null),Na=m.useCallback(v=>{v.preventDefault(),v.stopPropagation();const Z=Xt(),J=De.current;if(!Z||!J?.isConnected)return;const ue=Z.left+Z.width/2,ve=Z.top+Z.height/2;Rn.current={cx:ue,cy:ve,startAngle:Math.atan2(v.clientY-ve,v.clientX-ue)*(180/Math.PI),initRot:Ue,el:J},Dh("crosshair"),O("rotate")},[Ue,Xt]);m.useEffect(()=>{const v=J=>{const ue=Rn.current;if(!ue||!ue.el.isConnected)return;const ve=Math.atan2(J.clientY-ue.cy,J.clientX-ue.cx)*(180/Math.PI),we=ue.initRot+(ve-ue.startAngle);ue.el.style.transform=`rotate(${we}deg)`,Oe(Math.round(we)),ie(je=>je+1)},Z=()=>{if(!Rn.current)return;const{el:J}=Rn.current;Rn.current=null,Ah(),O(null),J.isConnected&&de(J)};return window.addEventListener("mousemove",v),window.addEventListener("mouseup",Z),()=>{window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",Z)}},[de]);const rt=Xt(),El=St(),an=be!==null,gt=Jy[K],zt=cu(o),Dn=U?Iy(U):[];return i.jsxs("div",{style:{position:"relative",flex:1,overflow:"hidden",background:He.bg,display:"flex",flexDirection:"column"},children:[i.jsxs("div",{style:{height:34,flexShrink:0,background:He.surface,borderBottom:`1px solid ${He.borderHi}`,display:"flex",alignItems:"center",padding:"0 10px",gap:6,zIndex:5,flexWrap:"nowrap",overflowX:"auto"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,paddingRight:6,borderRight:`1px solid ${He.border}`},children:[i.jsx("span",{style:{fontSize:10,color:He.muted},children:"Panels"}),i.jsxs("button",{title:"Toggle Layers panel",onClick:()=>ae(v=>!v),style:{background:G?He.blueBg:"transparent",border:`1px solid ${G?He.blueBrd:He.border}`,borderRadius:4,cursor:"pointer",fontSize:10,color:G?He.blue:He.muted,padding:"2px 8px",fontFamily:"inherit",flexShrink:0,display:"flex",alignItems:"center",gap:4,lineHeight:1},children:[i.jsx(P1,{size:12})," Layers"]}),i.jsxs("button",{title:"Toggle Elements palette",onClick:()=>Me(v=>!v),style:{background:le?He.blueBg:"transparent",border:`1px solid ${le?He.blueBrd:He.border}`,borderRadius:4,cursor:"pointer",fontSize:10,color:le?He.blue:He.muted,padding:"2px 8px",fontFamily:"inherit",flexShrink:0,display:"flex",alignItems:"center",gap:4,lineHeight:1},children:[i.jsx(cg,{size:12})," Elements"]})]}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,paddingRight:6,borderRight:`1px solid ${He.border}`},children:[i.jsx("span",{style:{fontSize:10,color:He.dim,flexShrink:0},children:"Preview"}),[{key:"mobile",icon:i.jsx(ig,{size:11}),label:"375",title:"Mobile (375px)"},{key:"tablet",icon:i.jsx(ag,{size:11}),label:"768",title:"Tablet (768px)"},{key:"desktop",icon:i.jsx(iu,{size:11}),label:"1280",title:"Desktop (1280px)"},{key:"full",icon:i.jsx(sg,{size:11}),label:"Full",title:"Full width"}].map(v=>i.jsxs("button",{title:v.title,onClick:()=>w(v.key),style:{background:K===v.key?He.accentBg:"transparent",border:`1px solid ${K===v.key?He.accentBrd:He.border}`,borderRadius:4,cursor:"pointer",fontSize:10,color:K===v.key?He.accent:He.dim,padding:"2px 8px",fontFamily:"inherit",flexShrink:0,display:"flex",alignItems:"center",gap:4},children:[v.icon,v.label]},v.key))]}),i.jsx("div",{style:{flex:1}}),i.jsx("span",{style:{fontSize:10,color:zt==="static"?He.dim:He.accent,border:`1px solid ${zt==="static"?He.border:He.accentBrd}`,borderRadius:10,padding:"1px 7px",flexShrink:0},children:gg(zt)}),i.jsx("button",{onClick:()=>ce(v=>v==="select"?"interact":"select"),style:{background:He.surface,border:`1px solid ${He.border}`,borderRadius:4,cursor:"pointer",fontSize:10,color:P==="select"?He.accent:He.blue,padding:"2px 8px",fontFamily:"inherit",flexShrink:0,display:"flex",alignItems:"center",gap:4,lineHeight:1},title:P==="select"?"Switch to Interact mode (lets page events fire)":"Switch to Select mode (click to select elements)",children:P==="select"?i.jsxs(i.Fragment,{children:[i.jsx(rg,{size:11})," Select"]}):i.jsxs(i.Fragment,{children:[i.jsx(su,{size:11})," Interact"]})}),i.jsx("span",{style:{fontSize:10,color:U?He.accent:He.muted,flexShrink:0},children:U?`Selected ${ye.size>0?ye.size+1:1}`:"No selection"}),U&&i.jsxs("button",{onClick:()=>{Y.current=null,z.current=null,se(null),Q(null),u(null),h(null),Se(new Set)},style:{background:"transparent",border:`1px solid ${He.border}`,borderRadius:4,cursor:"pointer",fontSize:10,color:He.dim,padding:"2px 8px",fontFamily:"inherit",flexShrink:0,display:"flex",alignItems:"center",gap:4,lineHeight:1},children:[i.jsx(Sn,{size:11})," Deselect"]})]}),i.jsxs("div",{style:{flex:1,display:"flex",overflow:"hidden",minHeight:0},children:[G&&i.jsx("div",{style:{width:176,flexShrink:0,overflow:"hidden",display:"flex",flexDirection:"column",borderRight:`1px solid ${He.border}`},children:i.jsx(Xy,{iframeDoc:qt,selectedEl:U,multiSel:ye,tick:ee,onSelect:(v,Z)=>xt(v,Z),onMove:Yi,onReorder:qi})}),i.jsxs("div",{style:{flex:1,overflow:gt?"auto":"hidden",position:"relative",background:He.canvas,display:"flex",justifyContent:"center"},children:[i.jsx("iframe",{ref:S,title:"Visual Editor",onLoad:()=>{ce("select"),te.current?.();const v=mr();te.current=typeof v=="function"?v:null},srcDoc:R,sandbox:"allow-scripts allow-same-origin",style:{border:"none",background:"#fff",width:gt?gt+"px":"100%",height:"100%",flexShrink:0,boxShadow:gt?"0 0 30px rgba(0,0,0,0.5)":"none"}}),Ze&&i.jsxs("div",{style:{position:"absolute",inset:0,zIndex:200,border:`3px dashed ${Te?"#e5a45a":"rgba(229,164,90,0.4)"}`,background:Te?"rgba(229,164,90,0.08)":"rgba(229,164,90,0.03)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.1s"},onDragOver:v=>{v.preventDefault(),Xe(!0),Ne(J=>J?{...J,x:v.clientX+14,y:v.clientY+14}:null);const Z=v.currentTarget.getBoundingClientRect();ot({x:Math.max(16,Math.min(Z.width-16,v.clientX-Z.left)),y:Math.max(14,Math.min(Z.height-14,v.clientY-Z.top))})},onDragLeave:()=>{Xe(!1),ot(null)},onDrop:v=>{v.preventDefault(),Xe(!1);const Z=v.dataTransfer.getData("text/html-element");Z&&gr(Z,v.clientX,v.clientY),B(!1),Ne(null),ot(null)},children:[i.jsx("div",{style:{background:"#e5a45a",color:"#1a1a1a",padding:"8px 18px",borderRadius:6,fontSize:13,fontWeight:700,opacity:Te?1:.7,transition:"opacity 0.1s"},children:Te?"Release to insert element":"Drag here to insert element"}),$&&i.jsxs("div",{style:{position:"fixed",left:$.x,top:$.y,zIndex:220,maxWidth:260,pointerEvents:"none",transform:"scale(0.92)",transformOrigin:"top left",background:"rgba(255,255,255,0.92)",border:"1px solid rgba(229,164,90,0.9)",borderRadius:8,boxShadow:"0 12px 32px rgba(0,0,0,0.35)",padding:8,color:"#111"},children:[i.jsx("div",{style:{fontSize:10,fontWeight:700,color:"#8a5a1e",marginBottom:5},children:$.label}),i.jsx("div",{dangerouslySetInnerHTML:{__html:$.html}})]}),Ee&&i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{position:"absolute",left:0,right:0,top:Ee.y,borderTop:"2px dashed rgba(229,164,90,0.85)",zIndex:215,pointerEvents:"none"}}),i.jsx("div",{style:{position:"absolute",left:Ee.x-8,top:Ee.y-8,width:16,height:16,borderRadius:"50%",border:"2px solid rgba(229,164,90,0.95)",background:"rgba(0,0,0,0.35)",zIndex:216,pointerEvents:"none"}})]})]}),El&&!an&&i.jsx("div",{style:{position:"fixed",zIndex:50,pointerEvents:"none",left:El.left,top:El.top,width:El.width,height:El.height,outline:"1px dashed rgba(229,164,90,0.35)"}}),Array.from(ye).map((v,Z)=>{if(!v.isConnected||v===U)return null;const J=v.getBoundingClientRect();return i.jsx("div",{style:{position:"fixed",zIndex:49,pointerEvents:"none",left:re.left+J.left,top:re.top+J.top,width:J.width,height:J.height,outline:"2px solid #64a0ff"}},Z)}),rt&&U&&i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{position:"fixed",zIndex:51,left:rt.left,top:rt.top,width:rt.width,height:rt.height,outline:"2px solid #e5a45a",cursor:"move"},onMouseDown:v=>Ha("move",v),onContextMenu:v=>{v.preventDefault(),ne(v,[{label:U.outerHTML.slice(0,50)+"…",disabled:!0},{separator:!0,label:""},{label:"Duplicate",icon:"⧉",action:()=>In(U)},{label:"Bring to Front",icon:"⬆",action:()=>Cl(U)},{label:"Send to Back",icon:"⬇",action:()=>Mn(U)},{separator:!0,label:""},{label:"Copy HTML",icon:"<>",action:()=>navigator.clipboard.writeText(U.outerHTML)},{label:"Copy inline style",icon:"CSS",action:()=>navigator.clipboard.writeText(U.getAttribute("style")||"")},{separator:!0,label:""},{label:"Reset styles",icon:"↺",action:()=>wt(U,Z=>Z.removeAttribute("style"))},{label:"Delete element",icon:"⌫",danger:!0,action:()=>{q(U,Z=>{Z.remove()}),U.remove(),Y.current=null,z.current=null,se(null),u(null),h(null)}},{separator:!0,label:""},{label:"Deselect",icon:"✕",action:()=>{Y.current=null,z.current=null,se(null),u(null),Se(new Set)}}])}}),i.jsxs("div",{style:{position:"fixed",zIndex:55,pointerEvents:"none",left:rt.left,top:Math.max(0,rt.top-20),background:"#e5a45a",color:"#1a1a1a",fontSize:11,fontFamily:"monospace",fontWeight:600,padding:"1px 7px 2px",borderRadius:"3px 3px 0 0",whiteSpace:"nowrap"},children:["<",U.tagName.toLowerCase(),U.id?"#"+U.id:"",">"," ",Math.round(rt.width),"×",Math.round(rt.height),Ue!==0&&` ${Ue}°`]}),kh.map(v=>{const Z=Wy(v,rt);return i.jsx("div",{style:{position:"fixed",zIndex:54,left:Z.x-6,top:Z.y-6,width:12,height:12,background:"#1e1e1e",border:"2px solid #e5a45a",borderRadius:2,cursor:zh[v],boxSizing:"border-box"},onMouseDown:J=>{J.stopPropagation(),Ha(v,J)}},v)}),i.jsx("div",{title:"Drag to rotate",style:{position:"fixed",zIndex:54,left:rt.left+rt.width/2-8,top:rt.top-38,width:16,height:16,background:"#1e1e1e",border:"2px solid #e5a45a",borderRadius:"50%",cursor:"crosshair",boxSizing:"border-box"},onMouseDown:Na}),i.jsx("div",{style:{position:"fixed",zIndex:52,pointerEvents:"none",left:rt.left+rt.width/2-.5,top:Math.max(0,rt.top-22),width:1,height:22,background:"rgba(229,164,90,0.5)"}}),an&&i.jsx("div",{style:{position:"fixed",zIndex:60,pointerEvents:"none",left:rt.left+rt.width/2,top:rt.top+rt.height+8,transform:"translateX(-50%)",background:"rgba(0,0,0,0.85)",color:"#ccc",fontSize:11,fontFamily:"monospace",padding:"2px 8px",borderRadius:3,whiteSpace:"nowrap"},children:be==="rotate"?`${Ue}°`:`${Math.round(rt.width)} × ${Math.round(rt.height)}${wn.current&&(wn.current.type==="move"||kh.includes(wn.current.type))?" (Shift=snap to 8px)":""}`})]})]}),le&&i.jsx("div",{style:{width:176,flexShrink:0,overflow:"hidden",display:"flex",flexDirection:"column",borderLeft:`1px solid ${He.border}`},children:i.jsx(Qy,{onInsert:Tl,onDragStart:v=>{B(!0),Ne({x:0,y:0,html:v.defaultHtml,label:v.label})},onDragEnd:()=>{B(!1),Xe(!1),Ne(null),ot(null)}})})]}),i.jsxs("div",{style:{height:26,flexShrink:0,background:He.surface,borderTop:`1px solid ${He.border}`,display:"flex",alignItems:"center",padding:"0 10px",gap:0,overflow:"hidden",zIndex:5},children:[i.jsx("span",{style:{fontSize:10,color:He.muted,marginRight:6,flexShrink:0},children:P==="select"?"Select Mode":"Interact Mode"}),Dn.length>0?Dn.map((v,Z)=>i.jsxs(Nt.Fragment,{children:[Z>0&&i.jsx("span",{style:{fontSize:10,color:He.border,margin:"0 4px"},children:"›"}),i.jsx("button",{onClick:()=>xt(v),title:`Select <${Rh(v)}>`,style:{background:v===U?He.accentBg:"transparent",border:"none",cursor:"pointer",fontSize:10,fontFamily:"monospace",color:v===U?He.accent:He.dim,padding:"0 4px",borderRadius:3,fontWeight:v===U?700:400},children:Rh(v)})]},Z)):i.jsx("span",{style:{fontSize:10,color:He.muted},children:U?"":"Click any element to select • Shift+click to multi-select • Double-click to edit text • Shift+drag to snap to 8px grid"})]}),g]})},X={bg:"#1e1e1e",surface:"#252526",surface2:"#2d2d2d",border:"#3a3a3a",accent:"#e5a45a",accentBg:"rgba(229,164,90,0.12)",accentBrd:"rgba(229,164,90,0.35)",text:"#d4d4d4",muted:"#888",dim:"#555"},Lh={fadeIn:"@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }",slideUp:"@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }",slideLeft:"@keyframes slideLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }",slideRight:"@keyframes slideRight { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }",bounce:"@keyframes bounce { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-20px); } 60% { transform: translateY(-10px); } }",pulse:"@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.05); } }",spin:"@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }",zoom:"@keyframes zoom { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }",shake:"@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }",flip:"@keyframes flip { from { opacity: 0; transform: perspective(400px) rotateX(-90deg); } to { opacity: 1; transform: perspective(400px) rotateX(0); } }"};function gu(o,s){const u=o.replace(/\n?\s*/i,"");if(!s.trim())return u;const c=``;return u.includes("")?u.replace("",`${c} +`):`${c} +${u}`}function tx(o,s,u,c){const f=o.match(/]*>([\s\S]*?)<\/script>/i);let h={};if(f)try{h=JSON.parse(f[1])}catch{h={}}h[s]=u;const y=JSON.stringify(h);let j=o.replace(/\n?\s*]*>[\s\S]*?<\/script>/i,"").replace(/\n?\s*]*>[\s\S]*?<\/script>/i,"");c&&(j=gu(j,c));const E=` - - - - - + + + + + + + HTML Editor – Free Online Visual & Code Web Page Builder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/dist/manifest.json b/dist/manifest.json new file mode 100644 index 0000000..1f610d5 --- /dev/null +++ b/dist/manifest.json @@ -0,0 +1,69 @@ +{ + "name": "HTML Editor – Visual & Code Web Page Builder", + "short_name": "HTML Editor", + "description": "Free browser-based HTML editor with Monaco code editor, drag-and-drop visual designer, CSS animations timeline, live preview, and ZIP export.", + "start_url": "/", + "scope": "/", + "display": "standalone", + "display_override": ["window-controls-overlay", "standalone", "browser"], + "background_color": "#1e1e1e", + "theme_color": "#e34c26", + "orientation": "landscape", + "lang": "en", + "dir": "ltr", + "id": "html-editor-app", + "categories": ["developer", "productivity", "utilities"], + "icons": [ + { + "src": "/icon-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any" + }, + { + "src": "/icon-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any" + }, + { + "src": "/icon-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "/favicon.svg", + "sizes": "any", + "type": "image/svg+xml", + "purpose": "any" + } + ], + "screenshots": [ + { + "src": "/og-image.jpg", + "sizes": "1280x720", + "type": "image/jpeg", + "form_factor": "wide", + "label": "HTML Editor – Split view with Monaco code editor and live preview" + } + ], + "shortcuts": [ + { + "name": "Open Editor", + "short_name": "Editor", + "description": "Open the HTML code editor", + "url": "/", + "icons": [{ "src": "/icon-192.png", "sizes": "192x192" }] + }, + { + "name": "SEO Tutorial", + "short_name": "SEO Guide", + "description": "HTML & SEO tutorial with live examples", + "url": "/seo", + "icons": [{ "src": "/icon-192.png", "sizes": "192x192" }] + } + ], + "prefer_related_applications": false, + "related_applications": [] +} diff --git a/dist/og-image.jpg b/dist/og-image.jpg new file mode 100644 index 0000000..dc19d70 Binary files /dev/null and b/dist/og-image.jpg differ diff --git a/dist/og-image.png b/dist/og-image.png new file mode 100644 index 0000000..962c146 Binary files /dev/null and b/dist/og-image.png differ diff --git a/dist/og-seo-tutorial.png b/dist/og-seo-tutorial.png new file mode 100644 index 0000000..cf203be Binary files /dev/null and b/dist/og-seo-tutorial.png differ diff --git a/dist/public/assets/index-BHx0otgT.js b/dist/public/assets/index-BHx0otgT.js deleted file mode 100644 index 7ee5a77..0000000 --- a/dist/public/assets/index-BHx0otgT.js +++ /dev/null @@ -1,278 +0,0 @@ -(function(){const S=document.createElement("link").relList;if(S&&S.supports&&S.supports("modulepreload"))return;for(const g of document.querySelectorAll('link[rel="modulepreload"]'))c(g);new MutationObserver(g=>{for(const d of g)if(d.type==="childList")for(const y of d.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&c(y)}).observe(document,{childList:!0,subtree:!0});function o(g){const d={};return g.integrity&&(d.integrity=g.integrity),g.referrerPolicy&&(d.referrerPolicy=g.referrerPolicy),g.crossOrigin==="use-credentials"?d.credentials="include":g.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(g){if(g.ep)return;g.ep=!0;const d=o(g);fetch(g.href,d)}})();var $n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ps={exports:{}},sl={};var fh;function Mm(){if(fh)return sl;fh=1;var r=Symbol.for("react.transitional.element"),S=Symbol.for("react.fragment");function o(c,g,d){var y=null;if(d!==void 0&&(y=""+d),g.key!==void 0&&(y=""+g.key),"key"in g){d={};for(var h in g)h!=="key"&&(d[h]=g[h])}else d=g;return g=d.ref,{$$typeof:r,type:c,key:y,ref:g!==void 0?g:null,props:d}}return sl.Fragment=S,sl.jsx=o,sl.jsxs=o,sl}var dh;function Rm(){return dh||(dh=1,Ps.exports=Mm()),Ps.exports}var s=Rm(),eu={exports:{}},ul={},tu={exports:{}},nu={};var hh;function Om(){return hh||(hh=1,(function(r){function S(F,J){var ye=F.length;F.push(J);e:for(;0>>1,E=F[N];if(0>>1;Ng(le,ye))Hg($,le)?(F[N]=$,F[H]=ye,N=H):(F[N]=le,F[D]=ye,N=D);else if(Hg($,ye))F[N]=$,F[H]=ye,N=H;else break e}}return J}function g(F,J){var ye=F.sortIndex-J.sortIndex;return ye!==0?ye:F.id-J.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var y=Date,h=y.now();r.unstable_now=function(){return y.now()-h}}var m=[],b=[],_=1,M=null,f=3,v=!1,k=!1,w=!1,R=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function W(F){for(var J=o(b);J!==null;){if(J.callback===null)c(b);else if(J.startTime<=F)c(b),J.sortIndex=J.expirationTime,S(m,J);else break;J=o(b)}}function Z(F){if(w=!1,W(F),!k)if(o(m)!==null)k=!0,X||(X=!0,U());else{var J=o(b);J!==null&&ae(Z,J.startTime-F)}}var X=!1,G=-1,te=5,I=-1;function ce(){return R?!0:!(r.unstable_now()-IF&&ce());){var N=M.callback;if(typeof N=="function"){M.callback=null,f=M.priorityLevel;var E=N(M.expirationTime<=F);if(F=r.unstable_now(),typeof E=="function"){M.callback=E,W(F),J=!0;break t}M===o(m)&&c(m),W(F)}else c(m);M=o(m)}if(M!==null)J=!0;else{var z=o(b);z!==null&&ae(Z,z.startTime-F),J=!1}}break e}finally{M=null,f=ye,v=!1}J=void 0}}finally{J?U():X=!1}}}var U;if(typeof B=="function")U=function(){B(me)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,x=oe.port2;oe.port1.onmessage=me,U=function(){x.postMessage(null)}}else U=function(){A(me,0)};function ae(F,J){G=A(function(){F(r.unstable_now())},J)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(F){F.callback=null},r.unstable_forceFrameRate=function(F){0>F||125N?(F.sortIndex=ye,S(b,F),o(m)===null&&F===o(b)&&(w?(C(G),G=-1):w=!0,ae(Z,ye-N))):(F.sortIndex=E,S(m,F),k||v||(k=!0,X||(X=!0,U()))),F},r.unstable_shouldYield=ce,r.unstable_wrapCallback=function(F){var J=f;return function(){var ye=f;f=J;try{return F.apply(this,arguments)}finally{f=ye}}}})(nu)),nu}var ph;function Dm(){return ph||(ph=1,tu.exports=Om()),tu.exports}var au={exports:{}},Be={};var mh;function Bm(){if(mh)return Be;mh=1;var r=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),y=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),M=Symbol.iterator;function f(E){return E===null||typeof E!="object"?null:(E=M&&E[M]||E["@@iterator"],typeof E=="function"?E:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,w={};function R(E,z,D){this.props=E,this.context=z,this.refs=w,this.updater=D||v}R.prototype.isReactComponent={},R.prototype.setState=function(E,z){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,z,"setState")},R.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function A(){}A.prototype=R.prototype;function C(E,z,D){this.props=E,this.context=z,this.refs=w,this.updater=D||v}var B=C.prototype=new A;B.constructor=C,k(B,R.prototype),B.isPureReactComponent=!0;var W=Array.isArray,Z={H:null,A:null,T:null,S:null,V:null},X=Object.prototype.hasOwnProperty;function G(E,z,D,le,H,$){return D=$.ref,{$$typeof:r,type:E,key:z,ref:D!==void 0?D:null,props:$}}function te(E,z){return G(E.type,z,void 0,void 0,void 0,E.props)}function I(E){return typeof E=="object"&&E!==null&&E.$$typeof===r}function ce(E){var z={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(D){return z[D]})}var me=/\/+/g;function U(E,z){return typeof E=="object"&&E!==null&&E.key!=null?ce(""+E.key):z.toString(36)}function oe(){}function x(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(oe,oe):(E.status="pending",E.then(function(z){E.status==="pending"&&(E.status="fulfilled",E.value=z)},function(z){E.status==="pending"&&(E.status="rejected",E.reason=z)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function ae(E,z,D,le,H){var $=typeof E;($==="undefined"||$==="boolean")&&(E=null);var be=!1;if(E===null)be=!0;else switch($){case"bigint":case"string":case"number":be=!0;break;case"object":switch(E.$$typeof){case r:case S:be=!0;break;case _:return be=E._init,ae(be(E._payload),z,D,le,H)}}if(be)return H=H(E),be=le===""?"."+U(E,0):le,W(H)?(D="",be!=null&&(D=be.replace(me,"$&/")+"/"),ae(H,z,D,"",function(Te){return Te})):H!=null&&(I(H)&&(H=te(H,D+(H.key==null||E&&E.key===H.key?"":(""+H.key).replace(me,"$&/")+"/")+be)),z.push(H)),1;be=0;var ze=le===""?".":le+":";if(W(E))for(var xe=0;xe"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(S){console.error(S)}}return r(),iu.exports=Lm(),iu.exports}var bh;function Nm(){if(bh)return ul;bh=1;var r=Dm(),S=vu(),o=Um();function c(e){var t="https://react.dev/errors/"+e;if(1E||(e.current=N[E],N[E]=null,E--)}function le(e,t){E++,N[E]=e.current,e.current=t}var H=z(null),$=z(null),be=z(null),ze=z(null);function xe(e,t){switch(le(be,t),le($,e),le(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Yd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D(H),le(H,e)}function Te(){D(H),D($),D(be)}function Ce(e){e.memoizedState!==null&&le(ze,e);var t=H.current,n=Yd(t,e.type);t!==n&&(le($,e),le(H,n))}function Ne(e){$.current===e&&(D(H),D($)),ze.current===e&&(D(ze),al._currentValue=ye)}var He=Object.prototype.hasOwnProperty,L=r.unstable_scheduleCallback,u=r.unstable_cancelCallback,V=r.unstable_shouldYield,Q=r.unstable_requestPaint,O=r.unstable_now,T=r.unstable_getCurrentPriorityLevel,Y=r.unstable_ImmediatePriority,fe=r.unstable_UserBlockingPriority,he=r.unstable_NormalPriority,ee=r.unstable_LowPriority,ve=r.unstable_IdlePriority,_e=r.log,Se=r.unstable_setDisableYieldValue,je=null,De=null;function Ae(e){if(typeof _e=="function"&&Se(e),De&&typeof De.setStrictMode=="function")try{De.setStrictMode(je,e)}catch{}}var Pe=Math.clz32?Math.clz32:ta,ea=Math.log,Zt=Math.LN2;function ta(e){return e>>>=0,e===0?32:31-(ea(e)/Zt|0)|0}var et=256,un=4194304;function Jt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function jt(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,l=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var j=a&134217727;return j!==0?(a=j&~l,a!==0?i=Jt(a):(p&=j,p!==0?i=Jt(p):n||(n=j&~e,n!==0&&(i=Jt(n))))):(j=a&~l,j!==0?i=Jt(j):p!==0?i=Jt(p):n||(n=a&~e,n!==0&&(i=Jt(n)))),i===0?0:t!==0&&t!==i&&(t&l)===0&&(l=i&-i,n=t&-t,l>=n||l===32&&(n&4194048)!==0)?t:i}function jn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Zr(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ml(){var e=et;return et<<=1,(et&4194048)===0&&(et=256),e}function gl(){var e=un;return un<<=1,(un&62914560)===0&&(un=4194304),e}function Sa(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $t(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wa(e,t,n,a,i,l){var p=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var j=e.entanglements,q=e.expirationTimes,re=e.hiddenUpdates;for(n=p&~n;0)":-1i||q[a]!==re[i]){var de=` -`+q[a].replace(" at new "," at ");return e.displayName&&de.includes("")&&(de=de.replace("",e.displayName)),de}while(1<=a&&0<=i);break}}}finally{Fr=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ta(n):""}function Ep(e){switch(e.tag){case 26:case 27:case 5:return Ta(e.type);case 16:return Ta("Lazy");case 13:return Ta("Suspense");case 19:return Ta("SuspenseList");case 0:case 15:return Kr(e.type,!1);case 11:return Kr(e.type.render,!1);case 1:return Kr(e.type,!0);case 31:return Ta("Activity");default:return""}}function Ru(e){try{var t="";do t+=Ep(e),e=e.return;while(e);return t}catch(n){return` -Error generating stack: `+n.message+` -`+n.stack}}function qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ou(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jp(e){var t=Ou(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(p){a=""+p,l.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bl(e){e._valueTracker||(e._valueTracker=jp(e))}function Du(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Ou(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function xl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var kp=/[\n"\\]/g;function Xt(e){return e.replace(kp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Wr(e,t,n,a,i,l,p,j){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+qt(t)):e.value!==""+qt(t)&&(e.value=""+qt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?Ir(e,p,qt(t)):n!=null?Ir(e,p,qt(n)):a!=null&&e.removeAttribute("value"),i==null&&l!=null&&(e.defaultChecked=!!l),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+qt(j):e.removeAttribute("name")}function Bu(e,t,n,a,i,l,p,j){if(l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.type=l),t!=null||n!=null){if(!(l!=="submit"&&l!=="reset"||t!=null))return;n=n!=null?""+qt(n):"",t=t!=null?""+qt(t):n,j||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=j?e.checked:!!a,e.defaultChecked=!!a,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p)}function Ir(e,t,n){t==="number"&&xl(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ca(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),to=!1;if(fn)try{var yi={};Object.defineProperty(yi,"passive",{get:function(){to=!0}}),window.addEventListener("test",yi,yi),window.removeEventListener("test",yi,yi)}catch{to=!1}var Tn=null,no=null,wl=null;function qu(){if(wl)return wl;var e,t=no,n=t.length,a,i="value"in Tn?Tn.value:Tn.textContent,l=i.length;for(e=0;e=xi),Ku=" ",Wu=!1;function Iu(e,t){switch(e){case"keyup":return t0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ju(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oa=!1;function a0(e,t){switch(e){case"compositionend":return Ju(t);case"keypress":return t.which!==32?null:(Wu=!0,Ku);case"textInput":return e=t.data,e===Ku&&Wu?null:e;default:return null}}function i0(e,t){if(Oa)return e==="compositionend"||!oo&&Iu(e,t)?(e=qu(),wl=no=Tn=null,Oa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lc(n)}}function oc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=xl(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xl(e.document)}return t}function co(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var d0=fn&&"documentMode"in document&&11>=document.documentMode,Da=null,fo=null,zi=null,ho=!1;function uc(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ho||Da==null||Da!==xl(a)||(a=Da,"selectionStart"in a&&co(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),zi&&_i(zi,a)||(zi=a,a=dr(fo,"onSelect"),0>=p,i-=p,hn=1<<32-Pe(t)+i|n<l?l:8;var p=F.T,j={};F.T=j,$o(e,!1,t,n);try{var q=i(),re=F.S;if(re!==null&&re(j,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var de=S0(q,a);Hi(e,t,de,Ut(e))}else Hi(e,t,a,Ut(e))}catch(ge){Hi(e,t,{then:function(){},status:"rejected",reason:ge},Ut())}finally{J.p=l,F.T=p}}function j0(){}function Io(e,t,n,a){if(e.tag!==5)throw Error(c(476));var i=ff(e).queue;cf(e,i,t,ye,n===null?j0:function(){return df(e),n(a)})}function ff(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:ye},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function df(e){var t=ff(e).next.queue;Hi(e,t,{},Ut())}function Jo(){return _t(al)}function hf(){return ct().memoizedState}function pf(){return ct().memoizedState}function k0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ut();e=Mn(n);var a=Rn(t,e,n);a!==null&&(Nt(a,t,n),Oi(a,t,n)),t={cache:ko()},e.payload=t;return}t=t.return}}function T0(e,t,n){var a=Ut();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Ql(e)?gf(t,n):(n=yo(e,t,n,a),n!==null&&(Nt(n,e,a),yf(n,t,a)))}function mf(e,t,n){var a=Ut();Hi(e,t,n,a)}function Hi(e,t,n,a){var i={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ql(e))gf(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var p=t.lastRenderedState,j=l(p,n);if(i.hasEagerState=!0,i.eagerState=j,Rt(j,p))return Cl(e,t,i,0),tt===null&&Tl(),!1}catch{}if(n=yo(e,t,i,a),n!==null)return Nt(n,e,a),yf(n,t,a),!0}return!1}function $o(e,t,n,a){if(a={lane:2,revertLane:As(),action:a,hasEagerState:!1,eagerState:null,next:null},Ql(e)){if(t)throw Error(c(479))}else t=yo(e,n,a,2),t!==null&&Nt(t,e,2)}function Ql(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function gf(e,t){Ga=Yl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,zu(e,n)}}var Fl={readContext:_t,use:ql,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot},vf={readContext:_t,use:ql,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:ef,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Vl(4194308,4,lf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vl(4194308,4,e,t)},useInsertionEffect:function(e,t){Vl(4,2,e,t)},useMemo:function(e,t){var n=Ct();t=t===void 0?null:t;var a=e();if(pa){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Ct();if(n!==void 0){var i=n(t);if(pa){Ae(!0);try{n(t)}finally{Ae(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=T0.bind(null,Le,e),[a.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:function(e){e=Qo(e);var t=e.queue,n=mf.bind(null,Le,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ko,useDeferredValue:function(e,t){var n=Ct();return Wo(n,e,t)},useTransition:function(){var e=Qo(!1);return e=cf.bind(null,Le,e.queue,!0,!1),Ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Le,i=Ct();if(Qe){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),tt===null)throw Error(c(349));(Ge&124)!==0||Nc(a,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,ef(Yc.bind(null,a,l,e),[e]),a.flags|=2048,Qa(9,Gl(),Hc.bind(null,a,l,n,t),null),n},useId:function(){var e=Ct(),t=tt.identifierPrefix;if(Qe){var n=pn,a=hn;n=(a&~(1<<32-Pe(a)-1)).toString(32)+n,t="«"+t+"R"+n,n=Zl++,0Re?(gt=ke,ke=null):gt=ke.sibling;var Ve=se(P,ke,ne[Re],pe);if(Ve===null){ke===null&&(ke=gt);break}e&&ke&&Ve.alternate===null&&t(P,ke),K=l(Ve,K,Re),Ye===null?Ee=Ve:Ye.sibling=Ve,Ye=Ve,ke=gt}if(Re===ne.length)return n(P,ke),Qe&&sa(P,Re),Ee;if(ke===null){for(;ReRe?(gt=ke,ke=null):gt=ke.sibling;var Wn=se(P,ke,Ve.value,pe);if(Wn===null){ke===null&&(ke=gt);break}e&&ke&&Wn.alternate===null&&t(P,ke),K=l(Wn,K,Re),Ye===null?Ee=Wn:Ye.sibling=Wn,Ye=Wn,ke=gt}if(Ve.done)return n(P,ke),Qe&&sa(P,Re),Ee;if(ke===null){for(;!Ve.done;Re++,Ve=ne.next())Ve=ge(P,Ve.value,pe),Ve!==null&&(K=l(Ve,K,Re),Ye===null?Ee=Ve:Ye.sibling=Ve,Ye=Ve);return Qe&&sa(P,Re),Ee}for(ke=a(ke);!Ve.done;Re++,Ve=ne.next())Ve=ue(ke,P,Re,Ve.value,pe),Ve!==null&&(e&&Ve.alternate!==null&&ke.delete(Ve.key===null?Re:Ve.key),K=l(Ve,K,Re),Ye===null?Ee=Ve:Ye.sibling=Ve,Ye=Ve);return e&&ke.forEach(function(Am){return t(P,Am)}),Qe&&sa(P,Re),Ee}function Je(P,K,ne,pe){if(typeof ne=="object"&&ne!==null&&ne.type===k&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case f:e:{for(var Ee=ne.key;K!==null;){if(K.key===Ee){if(Ee=ne.type,Ee===k){if(K.tag===7){n(P,K.sibling),pe=i(K,ne.props.children),pe.return=P,P=pe;break e}}else if(K.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===te&&xf(Ee)===K.type){n(P,K.sibling),pe=i(K,ne.props),Zi(pe,ne),pe.return=P,P=pe;break e}n(P,K);break}else t(P,K);K=K.sibling}ne.type===k?(pe=ra(ne.props.children,P.mode,pe,ne.key),pe.return=P,P=pe):(pe=Ml(ne.type,ne.key,ne.props,null,P.mode,pe),Zi(pe,ne),pe.return=P,P=pe)}return p(P);case v:e:{for(Ee=ne.key;K!==null;){if(K.key===Ee)if(K.tag===4&&K.stateNode.containerInfo===ne.containerInfo&&K.stateNode.implementation===ne.implementation){n(P,K.sibling),pe=i(K,ne.children||[]),pe.return=P,P=pe;break e}else{n(P,K);break}else t(P,K);K=K.sibling}pe=xo(ne,P.mode,pe),pe.return=P,P=pe}return p(P);case te:return Ee=ne._init,ne=Ee(ne._payload),Je(P,K,ne,pe)}if(ae(ne))return Oe(P,K,ne,pe);if(U(ne)){if(Ee=U(ne),typeof Ee!="function")throw Error(c(150));return ne=Ee.call(ne),Me(P,K,ne,pe)}if(typeof ne.then=="function")return Je(P,K,Kl(ne),pe);if(ne.$$typeof===B)return Je(P,K,Bl(P,ne),pe);Wl(P,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,K!==null&&K.tag===6?(n(P,K.sibling),pe=i(K,ne),pe.return=P,P=pe):(n(P,K),pe=bo(ne,P.mode,pe),pe.return=P,P=pe),p(P)):n(P,K)}return function(P,K,ne,pe){try{Yi=0;var Ee=Je(P,K,ne,pe);return Fa=null,Ee}catch(ke){if(ke===Mi||ke===Ul)throw ke;var Ye=Ot(29,ke,null,P.mode);return Ye.lanes=pe,Ye.return=P,Ye}}}var Ka=Sf(!0),wf=Sf(!1),Kt=z(null),ln=null;function Dn(e){var t=e.alternate;le(dt,dt.current&1),le(Kt,e),ln===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(ln=e)}function _f(e){if(e.tag===22){if(le(dt,dt.current),le(Kt,e),ln===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(ln=e)}}else Bn()}function Bn(){le(dt,dt.current),le(Kt,Kt.current)}function vn(e){D(Kt),ln===e&&(ln=null),D(dt)}var dt=z(0);function Il(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||qs(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Po(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:_({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var es={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Ut(),i=Mn(a);i.payload=t,n!=null&&(i.callback=n),t=Rn(e,i,a),t!==null&&(Nt(t,e,a),Oi(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Ut(),i=Mn(a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Rn(e,i,a),t!==null&&(Nt(t,e,a),Oi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ut(),a=Mn(n);a.tag=2,t!=null&&(a.callback=t),t=Rn(e,a,n),t!==null&&(Nt(t,e,n),Oi(t,e,n))}};function zf(e,t,n,a,i,l,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,l,p):t.prototype&&t.prototype.isPureReactComponent?!_i(n,a)||!_i(i,l):!0}function Ef(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&es.enqueueReplaceState(t,t.state,null)}function ma(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=_({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}var Jl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function jf(e){Jl(e)}function kf(e){console.error(e)}function Tf(e){Jl(e)}function $l(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Cf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function ts(e,t,n){return n=Mn(n),n.tag=3,n.payload={element:null},n.callback=function(){$l(e,t)},n}function Af(e){return e=Mn(e),e.tag=3,e}function Mf(e,t,n,a){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var l=a.value;e.payload=function(){return i(l)},e.callback=function(){Cf(t,n,a)}}var p=n.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Cf(t,n,a),typeof i!="function"&&(Zn===null?Zn=new Set([this]):Zn.add(this));var j=a.stack;this.componentDidCatch(a.value,{componentStack:j!==null?j:""})})}function A0(e,t,n,a,i){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Ti(t,n,i,!0),n=Kt.current,n!==null){switch(n.tag){case 13:return ln===null?Es():n.alternate===null&<===0&&(lt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,a===Ao?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),ks(e,a,i)),!1;case 22:return n.flags|=65536,a===Ao?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),ks(e,a,i)),!1}throw Error(c(435,n.tag))}return ks(e,a,i),Es(),!1}if(Qe)return t=Kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==_o&&(e=Error(c(422),{cause:a}),ki(Gt(e,n)))):(a!==_o&&(t=Error(c(423),{cause:a}),ki(Gt(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=Gt(a,n),i=ts(e.stateNode,a,i),Oo(e,i),lt!==4&&(lt=2)),!1;var l=Error(c(520),{cause:a});if(l=Gt(l,n),Ki===null?Ki=[l]:Ki.push(l),lt!==4&&(lt=2),t===null)return!0;a=Gt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=ts(n.stateNode,a,e),Oo(n,e),!1;case 1:if(t=n.type,l=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(Zn===null||!Zn.has(l))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Af(i),Mf(i,e,n,a),Oo(n,i),!1}n=n.return}while(n!==null);return!1}var Rf=Error(c(461)),pt=!1;function yt(e,t,n,a){t.child=e===null?wf(t,null,n,a):Ka(t,e.child,n,a)}function Of(e,t,n,a,i){n=n.render;var l=t.ref;if("ref"in a){var p={};for(var j in a)j!=="ref"&&(p[j]=a[j])}else p=a;return da(t),a=No(e,t,n,p,l,i),j=Ho(),e!==null&&!pt?(Yo(e,t,i),bn(e,t,i)):(Qe&&j&&So(t),t.flags|=1,yt(e,t,a,i),t.child)}function Df(e,t,n,a,i){if(e===null){var l=n.type;return typeof l=="function"&&!vo(l)&&l.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=l,Bf(e,t,l,a,i)):(e=Ml(n.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!us(e,i)){var p=l.memoizedProps;if(n=n.compare,n=n!==null?n:_i,n(p,a)&&e.ref===t.ref)return bn(e,t,i)}return t.flags|=1,e=dn(l,a),e.ref=t.ref,e.return=t,t.child=e}function Bf(e,t,n,a,i){if(e!==null){var l=e.memoizedProps;if(_i(l,a)&&e.ref===t.ref)if(pt=!1,t.pendingProps=a=l,us(e,i))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,bn(e,t,i)}return ns(e,t,n,a,i)}function Lf(e,t,n){var a=t.pendingProps,i=a.children,l=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if((t.flags&128)!==0){if(a=l!==null?l.baseLanes|n:n,e!==null){for(i=t.child=e.child,l=0;i!==null;)l=l|i.lanes|i.childLanes,i=i.sibling;t.childLanes=l&~a}else t.childLanes=0,t.child=null;return Uf(e,t,a,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ll(t,l!==null?l.cachePool:null),l!==null?Dc(t,l):Bo(),_f(t);else return t.lanes=t.childLanes=536870912,Uf(e,t,l!==null?l.baseLanes|n:n,n)}else l!==null?(Ll(t,l.cachePool),Dc(t,l),Bn(),t.memoizedState=null):(e!==null&&Ll(t,null),Bo(),Bn());return yt(e,t,i,n),t.child}function Uf(e,t,n,a){var i=Co();return i=i===null?null:{parent:ft._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Ll(t,null),Bo(),_f(t),e!==null&&Ti(e,t,a,!0),null}function Pl(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function ns(e,t,n,a,i){return da(t),n=No(e,t,n,a,void 0,i),a=Ho(),e!==null&&!pt?(Yo(e,t,i),bn(e,t,i)):(Qe&&a&&So(t),t.flags|=1,yt(e,t,n,i),t.child)}function Nf(e,t,n,a,i,l){return da(t),t.updateQueue=null,n=Lc(t,a,n,i),Bc(e),a=Ho(),e!==null&&!pt?(Yo(e,t,l),bn(e,t,l)):(Qe&&a&&So(t),t.flags|=1,yt(e,t,n,l),t.child)}function Hf(e,t,n,a,i){if(da(t),t.stateNode===null){var l=Na,p=n.contextType;typeof p=="object"&&p!==null&&(l=_t(p)),l=new n(a,l),t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=es,t.stateNode=l,l._reactInternals=t,l=t.stateNode,l.props=a,l.state=t.memoizedState,l.refs={},Mo(t),p=n.contextType,l.context=typeof p=="object"&&p!==null?_t(p):Na,l.state=t.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(Po(t,n,p,a),l.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(p=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),p!==l.state&&es.enqueueReplaceState(l,l.state,null),Bi(t,a,l,i),Di(),l.state=t.memoizedState),typeof l.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){l=t.stateNode;var j=t.memoizedProps,q=ma(n,j);l.props=q;var re=l.context,de=n.contextType;p=Na,typeof de=="object"&&de!==null&&(p=_t(de));var ge=n.getDerivedStateFromProps;de=typeof ge=="function"||typeof l.getSnapshotBeforeUpdate=="function",j=t.pendingProps!==j,de||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(j||re!==p)&&Ef(t,l,a,p),An=!1;var se=t.memoizedState;l.state=se,Bi(t,a,l,i),Di(),re=t.memoizedState,j||se!==re||An?(typeof ge=="function"&&(Po(t,n,ge,a),re=t.memoizedState),(q=An||zf(t,n,q,a,se,re,p))?(de||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=re),l.props=a,l.state=re,l.context=p,a=q):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{l=t.stateNode,Ro(e,t),p=t.memoizedProps,de=ma(n,p),l.props=de,ge=t.pendingProps,se=l.context,re=n.contextType,q=Na,typeof re=="object"&&re!==null&&(q=_t(re)),j=n.getDerivedStateFromProps,(re=typeof j=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(p!==ge||se!==q)&&Ef(t,l,a,q),An=!1,se=t.memoizedState,l.state=se,Bi(t,a,l,i),Di();var ue=t.memoizedState;p!==ge||se!==ue||An||e!==null&&e.dependencies!==null&&Dl(e.dependencies)?(typeof j=="function"&&(Po(t,n,j,a),ue=t.memoizedState),(de=An||zf(t,n,de,a,se,ue,q)||e!==null&&e.dependencies!==null&&Dl(e.dependencies))?(re||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(a,ue,q),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(a,ue,q)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||p===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=ue),l.props=a,l.state=ue,l.context=q,a=de):(typeof l.componentDidUpdate!="function"||p===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),a=!1)}return l=a,Pl(e,t),a=(t.flags&128)!==0,l||a?(l=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:l.render(),t.flags|=1,e!==null&&a?(t.child=Ka(t,e.child,null,i),t.child=Ka(t,null,n,i)):yt(e,t,n,i),t.memoizedState=l.state,e=t.child):e=bn(e,t,i),e}function Yf(e,t,n,a){return ji(),t.flags|=256,yt(e,t,n,a),t.child}var as={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function is(e){return{baseLanes:e,cachePool:jc()}}function ls(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Wt),e}function Zf(e,t,n){var a=t.pendingProps,i=!1,l=(t.flags&128)!==0,p;if((p=l)||(p=e!==null&&e.memoizedState===null?!1:(dt.current&2)!==0),p&&(i=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Qe){if(i?Dn(t):Bn(),Qe){var j=it,q;if(q=j){e:{for(q=j,j=an;q.nodeType!==8;){if(!j){j=null;break e}if(q=tn(q.nextSibling),q===null){j=null;break e}}j=q}j!==null?(t.memoizedState={dehydrated:j,treeContext:oa!==null?{id:hn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},q=Ot(18,null,null,0),q.stateNode=j,q.return=t,t.child=q,Et=t,it=null,q=!0):q=!1}q||ca(t)}if(j=t.memoizedState,j!==null&&(j=j.dehydrated,j!==null))return qs(j)?t.lanes=32:t.lanes=536870912,null;vn(t)}return j=a.children,a=a.fallback,i?(Bn(),i=t.mode,j=er({mode:"hidden",children:j},i),a=ra(a,i,n,null),j.return=t,a.return=t,j.sibling=a,t.child=j,i=t.child,i.memoizedState=is(n),i.childLanes=ls(e,p,n),t.memoizedState=as,a):(Dn(t),rs(t,j))}if(q=e.memoizedState,q!==null&&(j=q.dehydrated,j!==null)){if(l)t.flags&256?(Dn(t),t.flags&=-257,t=os(e,t,n)):t.memoizedState!==null?(Bn(),t.child=e.child,t.flags|=128,t=null):(Bn(),i=a.fallback,j=t.mode,a=er({mode:"visible",children:a.children},j),i=ra(i,j,n,null),i.flags|=2,a.return=t,i.return=t,a.sibling=i,t.child=a,Ka(t,e.child,null,n),a=t.child,a.memoizedState=is(n),a.childLanes=ls(e,p,n),t.memoizedState=as,t=i);else if(Dn(t),qs(j)){if(p=j.nextSibling&&j.nextSibling.dataset,p)var re=p.dgst;p=re,a=Error(c(419)),a.stack="",a.digest=p,ki({value:a,source:null,stack:null}),t=os(e,t,n)}else if(pt||Ti(e,t,n,!1),p=(n&e.childLanes)!==0,pt||p){if(p=tt,p!==null&&(a=n&-n,a=(a&42)!==0?1:qr(a),a=(a&(p.suspendedLanes|n))!==0?0:a,a!==0&&a!==q.retryLane))throw q.retryLane=a,Ua(e,a),Nt(p,e,a),Rf;j.data==="$?"||Es(),t=os(e,t,n)}else j.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=q.treeContext,it=tn(j.nextSibling),Et=t,Qe=!0,ua=null,an=!1,e!==null&&(Qt[Ft++]=hn,Qt[Ft++]=pn,Qt[Ft++]=oa,hn=e.id,pn=e.overflow,oa=t),t=rs(t,a.children),t.flags|=4096);return t}return i?(Bn(),i=a.fallback,j=t.mode,q=e.child,re=q.sibling,a=dn(q,{mode:"hidden",children:a.children}),a.subtreeFlags=q.subtreeFlags&65011712,re!==null?i=dn(re,i):(i=ra(i,j,n,null),i.flags|=2),i.return=t,a.return=t,a.sibling=i,t.child=a,a=i,i=t.child,j=e.child.memoizedState,j===null?j=is(n):(q=j.cachePool,q!==null?(re=ft._currentValue,q=q.parent!==re?{parent:re,pool:re}:q):q=jc(),j={baseLanes:j.baseLanes|n,cachePool:q}),i.memoizedState=j,i.childLanes=ls(e,p,n),t.memoizedState=as,a):(Dn(t),n=e.child,e=n.sibling,n=dn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=n,t.memoizedState=null,n)}function rs(e,t){return t=er({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function er(e,t){return e=Ot(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function os(e,t,n){return Ka(t,e.child,null,n),e=rs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Eo(e.return,t,n)}function ss(e,t,n,a,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=a,l.tail=n,l.tailMode=i)}function Xf(e,t,n){var a=t.pendingProps,i=a.revealOrder,l=a.tail;if(yt(e,t,a.children,n),a=dt.current,(a&2)!==0)a=a&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qf(e,n,t);else if(e.tag===19)qf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}switch(le(dt,a),i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Il(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ss(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Il(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ss(t,!0,n,null,l);break;case"together":ss(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function bn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ti(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=dn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=dn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function us(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Dl(e)))}function M0(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),Cn(t,ft,e.memoizedState.cache),ji();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:Cn(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Dn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Zf(e,t,n):(Dn(t),e=bn(e,t,n),e!==null?e.sibling:null);Dn(t);break;case 19:var i=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Ti(e,t,n,!1),a=(n&t.childLanes)!==0),i){if(a)return Xf(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),le(dt,dt.current),a)break;return null;case 22:case 23:return t.lanes=0,Lf(e,t,n);case 24:Cn(t,ft,e.memoizedState.cache)}return bn(e,t,n)}function Gf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!us(e,n)&&(t.flags&128)===0)return pt=!1,M0(e,t,n);pt=(e.flags&131072)!==0}else pt=!1,Qe&&(t.flags&1048576)!==0&&bc(t,Ol,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,i=a._init;if(a=i(a._payload),t.type=a,typeof a=="function")vo(a)?(e=ma(a,e),t.tag=1,t=Hf(null,t,a,e,n)):(t.tag=0,t=ns(null,t,a,e,n));else{if(a!=null){if(i=a.$$typeof,i===W){t.tag=11,t=Of(null,t,a,e,n);break e}else if(i===G){t.tag=14,t=Df(null,t,a,e,n);break e}}throw t=x(a)||a,Error(c(306,t,""))}}return t;case 0:return ns(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=ma(a,t.pendingProps),Hf(e,t,a,i,n);case 3:e:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var l=t.memoizedState;i=l.element,Ro(e,t),Bi(t,a,null,n);var p=t.memoizedState;if(a=p.cache,Cn(t,ft,a),a!==l.cache&&jo(t,[ft],n,!0),Di(),a=p.element,l.isDehydrated)if(l={element:a,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){t=Yf(e,t,a,n);break e}else if(a!==i){i=Gt(Error(c(424)),t),ki(i),t=Yf(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,it=tn(e.firstChild),Et=t,Qe=!0,ua=null,an=!0,n=wf(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ji(),a===i){t=bn(e,t,n);break e}yt(e,t,a,n)}t=t.child}return t;case 26:return Pl(e,t),e===null?(n=Kd(t.type,null,t.pendingProps,null))?t.memoizedState=n:Qe||(n=t.type,e=t.pendingProps,a=pr(be.current).createElement(n),a[wt]=t,a[kt]=e,bt(a,n,e),ht(a),t.stateNode=a):t.memoizedState=Kd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&Qe&&(a=t.stateNode=Vd(t.type,t.pendingProps,be.current),Et=t,an=!0,i=it,Gn(t.type)?(Xs=i,it=tn(a.firstChild)):it=i),yt(e,t,t.pendingProps.children,n),Pl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Qe&&((i=a=it)&&(a=lm(a,t.type,t.pendingProps,an),a!==null?(t.stateNode=a,Et=t,it=tn(a.firstChild),an=!1,i=!0):i=!1),i||ca(t)),Ce(t),i=t.type,l=t.pendingProps,p=e!==null?e.memoizedProps:null,a=l.children,Hs(i,l)?a=null:p!==null&&Hs(i,p)&&(t.flags|=32),t.memoizedState!==null&&(i=No(e,t,_0,null,null,n),al._currentValue=i),Pl(e,t),yt(e,t,a,n),t.child;case 6:return e===null&&Qe&&((e=n=it)&&(n=rm(n,t.pendingProps,an),n!==null?(t.stateNode=n,Et=t,it=null,e=!0):e=!1),e||ca(t)),null;case 13:return Zf(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ka(t,null,a,n):yt(e,t,a,n),t.child;case 11:return Of(e,t,t.type,t.pendingProps,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Cn(t,t.type,a.value),yt(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,da(t),i=_t(i),a=a(i),t.flags|=1,yt(e,t,a,n),t.child;case 14:return Df(e,t,t.type,t.pendingProps,n);case 15:return Bf(e,t,t.type,t.pendingProps,n);case 19:return Xf(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=er(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=dn(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Lf(e,t,n);case 24:return da(t),a=_t(ft),e===null?(i=Co(),i===null&&(i=tt,l=ko(),i.pooledCache=l,l.refCount++,l!==null&&(i.pooledCacheLanes|=n),i=l),t.memoizedState={parent:a,cache:i},Mo(t),Cn(t,ft,i)):((e.lanes&n)!==0&&(Ro(e,t),Bi(t,null,null,n),Di()),i=e.memoizedState,l=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Cn(t,ft,a)):(a=l.cache,Cn(t,ft,a),a!==i.cache&&jo(t,[ft],n,!0))),yt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function xn(e){e.flags|=4}function Vf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pd(t)){if(t=Kt.current,t!==null&&((Ge&4194048)===Ge?ln!==null:(Ge&62914560)!==Ge&&(Ge&536870912)===0||t!==ln))throw Ri=Ao,kc;e.flags|=8192}}function tr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?gl():536870912,e.lanes|=t,$a|=t)}function qi(e,t){if(!Qe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function R0(e,t,n){var a=t.pendingProps;switch(wo(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),gn(ft),Te(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ei(t)?xn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wc())),at(t),null;case 26:return n=t.memoizedState,e===null?(xn(t),n!==null?(at(t),Vf(t,n)):(at(t),t.flags&=-16777217)):n?n!==e.memoizedState?(xn(t),at(t),Vf(t,n)):(at(t),t.flags&=-16777217):(e.memoizedProps!==a&&xn(t),at(t),t.flags&=-16777217),null;case 27:Ne(t),n=be.current;var i=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&xn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return at(t),null}e=H.current,Ei(t)?xc(t):(e=Vd(i,a,n),t.stateNode=e,xn(t))}return at(t),null;case 5:if(Ne(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&xn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return at(t),null}if(e=H.current,Ei(t))xc(t);else{switch(i=pr(be.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=i.createElement("div"),e.innerHTML=" - - - -
- - diff --git a/dist/public/opengraph.jpg b/dist/public/opengraph.jpg deleted file mode 100644 index 5ee7365..0000000 Binary files a/dist/public/opengraph.jpg and /dev/null differ diff --git a/dist/robots.txt b/dist/robots.txt new file mode 100644 index 0000000..b511125 --- /dev/null +++ b/dist/robots.txt @@ -0,0 +1,13 @@ +User-agent: * +Allow: / +Disallow: /node_modules/ +Disallow: /.git/ +Disallow: /dist/ +Disallow: /src/ + +# Sitemaps +Sitemap: https://html-viewer-gray-beta.vercel.app/sitemap.xml +Sitemap: https://html-viewer-f2v.pages.dev/sitemap.xml + +# Crawl-delay (optional, polite crawling) +Crawl-delay: 1 diff --git a/dist/sitemap.xml b/dist/sitemap.xml new file mode 100644 index 0000000..af3fd52 --- /dev/null +++ b/dist/sitemap.xml @@ -0,0 +1,34 @@ + + + + + + https://html-viewer-gray-beta.vercel.app/ + 2026-04-17 + monthly + 1.0 + + https://html-viewer-gray-beta.vercel.app/og-image.png + HTML Editor – Monaco code editor with live HTML preview + Free browser-based HTML editor with drag-and-drop visual designer and live preview + + + + + + https://html-viewer-gray-beta.vercel.app/seo + 2026-04-17 + monthly + 0.8 + + https://html-viewer-gray-beta.vercel.app/og-seo-tutorial.png + HTML & SEO Tutorial – meta charset, HTML tags, CSS, Image SEO, Open Graph + Comprehensive HTML and SEO tutorial covering meta charset, HTML tags, CSS basics, Image SEO, and Open Graph tags + + + + diff --git a/dist/sw.js b/dist/sw.js new file mode 100644 index 0000000..726016c --- /dev/null +++ b/dist/sw.js @@ -0,0 +1,52 @@ +const CACHE_VERSION = 'html-editor-v3'; +const STATIC_ASSETS = ['/manifest.json', '/favicon.svg', '/icon-192.png', '/icon-512.png']; + +// ─── Install: pre-cache only icons/manifest (not hashed JS/CSS) ─── +self.addEventListener('install', (event) => { + event.waitUntil( + caches.open(CACHE_VERSION).then((cache) => cache.addAll(STATIC_ASSETS)) + ); + self.skipWaiting(); +}); + +// ─── Activate: wipe ALL old caches so stale JS chunks never get served ─── +self.addEventListener('activate', (event) => { + event.waitUntil( + caches.keys().then((keys) => + Promise.all( + keys + .filter((k) => k !== CACHE_VERSION) + .map((k) => caches.delete(k)) + ) + ) + ); + self.clients.claim(); +}); + +// ─── Fetch: Network-first for everything so fresh JS is always loaded ─── +self.addEventListener('fetch', (event) => { + if (event.request.method !== 'GET') return; + + const url = new URL(event.request.url); + + // Skip cross-origin (CDN, fonts, APIs) + if (url.origin !== self.location.origin) return; + + // Network-first for all requests — prevents stale hashed chunk issues + event.respondWith(networkFirst(event.request)); +}); + +async function networkFirst(request) { + try { + const response = await fetch(request); + // Only cache successful, same-origin, non-opaque responses + if (response && response.status === 200 && response.type === 'basic') { + const cache = await caches.open(CACHE_VERSION); + cache.put(request, response.clone()); + } + return response; + } catch { + const cached = await caches.match(request); + return cached || new Response('Offline', { status: 503, statusText: 'Offline' }); + } +} diff --git a/index (5).html b/index (5).html deleted file mode 100644 index d86e0ea..0000000 --- a/index (5).html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - - HTML Editor — Free Online Visual & Code Web Page Builder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - diff --git a/package-lock.json b/package-lock.json index 4107fdc..aeb6e86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,15 @@ "": { "name": "html-editor", "version": "0.0.0", + "dependencies": { + "@webcontainer/api": "^1.6.4", + "@xterm/addon-fit": "^0.10.0", + "@xterm/addon-unicode11": "^0.8.0", + "@xterm/addon-web-links": "^0.11.0", + "@xterm/xterm": "^5.5.0", + "isomorphic-git": "^1.37.5", + "memfs": "^4.57.2" + }, "devDependencies": { "@hookform/resolvers": "^3.10.0", "@monaco-editor/react": "^4.7.0", @@ -48,6 +57,7 @@ "@types/react": "^19.2.0", "@types/react-dom": "^19.2.0", "@vitejs/plugin-react": "^5.0.4", + "buffer": "^6.0.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", @@ -74,6 +84,7 @@ "typescript": "~5.9.2", "vaul": "^1.1.2", "vite": "^7.3.0", + "vite-plugin-node-polyfills": "^0.26.0", "wouter": "^3.3.5", "zod": "^3.25.76", "zustand": "^5.0.12" @@ -922,6 +933,415 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@jsonjoy.com/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/buffers": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-17.67.0.tgz", + "integrity": "sha512-tfExRpYxBvi32vPs9ZHaTjSP4fHAfzSmcahOfNxtvGHcyJel+aibkPlGeBB+7AoC6hL7lXIE++8okecBxx7lcw==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/codegen": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/codegen/-/codegen-1.0.0.tgz", + "integrity": "sha512-E8Oy+08cmCf0EK/NMxpaJZmOxPqM+6iSe2S4nlSBrPZOORoDJILxtbSUEDKQyTamm/BVAhIGllOBNU79/dwf0g==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-core": { + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-core/-/fs-core-4.57.2.tgz", + "integrity": "sha512-SVjwklkpIV5wrynpYtuYnfYH1QF4/nDuLBX7VXdb+3miglcAgBVZb/5y0cOsehRV/9Vb+3UqhkMq3/NR3ztdkQ==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2", + "thingies": "^2.5.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-fsa": { + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-fsa/-/fs-fsa-4.57.2.tgz", + "integrity": "sha512-fhO8+iR2I+OCw668ISDJdn1aArc9zx033sWejIyzQ8RBeXa9bDSaUeA3ix0poYOfrj1KdOzytmYNv2/uLDfV6g==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-core": "4.57.2", + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2", + "thingies": "^2.5.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-node": { + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node/-/fs-node-4.57.2.tgz", + "integrity": "sha512-nX2AdL6cOFwLdju9G4/nbRnYevmCJbh7N7hvR3gGm97Cs60uEjyd0rpR+YBS7cTg175zzl22pGKXR5USaQMvKg==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-core": "4.57.2", + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2", + "@jsonjoy.com/fs-print": "4.57.2", + "@jsonjoy.com/fs-snapshot": "4.57.2", + "glob-to-regex.js": "^1.0.0", + "thingies": "^2.5.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-node-builtins": { + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-builtins/-/fs-node-builtins-4.57.2.tgz", + "integrity": "sha512-xhiegylRmhw43Ki2HO1ZBL7DQ5ja/qpRsL29VtQ2xuUHiuDGbgf2uD4p9Qd8hJI5P6RCtGYD50IXHXVq/Ocjcg==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-node-to-fsa": { + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-to-fsa/-/fs-node-to-fsa-4.57.2.tgz", + "integrity": "sha512-18LmWTSONhoAPW+IWRuf8w/+zRolPFGPeGwMxlAhhfY11EKzX+5XHDBPAw67dBF5dxDErHJbl40U+3IXSDRXSQ==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-fsa": "4.57.2", + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-node-utils": { + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-utils/-/fs-node-utils-4.57.2.tgz", + "integrity": "sha512-rsPSJgekz43IlNbLyAM/Ab+ouYLWGp5DDBfYBNNEqDaSpsbXfthBn29Q4muFA9L0F+Z3mKo+CWlgSCXrf+mOyQ==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-node-builtins": "4.57.2" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-print": { + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-print/-/fs-print-4.57.2.tgz", + "integrity": "sha512-wK9NSow48i4DbDl9F1CQE5TqnyZOJ04elU3WFG5aJ76p+YxO/ulyBBQvKsessPxdo381Bc2pcEoyPujMOhcRqQ==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-node-utils": "4.57.2", + "tree-dump": "^1.1.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot": { + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-snapshot/-/fs-snapshot-4.57.2.tgz", + "integrity": "sha512-GdduDZuoP5V/QCgJkx9+BZ6SC0EZ/smXAdTS7PfMqgMTGXLlt/bH/FqMYaqB9JmLf05sJPtO0XRbAwwkEEPbVw==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/buffers": "^17.65.0", + "@jsonjoy.com/fs-node-utils": "4.57.2", + "@jsonjoy.com/json-pack": "^17.65.0", + "@jsonjoy.com/util": "^17.65.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/base64": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-17.67.0.tgz", + "integrity": "sha512-5SEsJGsm15aP8TQGkDfJvz9axgPwAEm98S5DxOuYe8e1EbfajcDmgeXXzccEjh+mLnjqEKrkBdjHWS5vFNwDdw==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/codegen": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/codegen/-/codegen-17.67.0.tgz", + "integrity": "sha512-idnkUplROpdBOV0HMcwhsCUS5TRUi9poagdGs70A6S4ux9+/aPuKbh8+UYRTLYQHtXvAdNfQWXDqZEx5k4Dj2Q==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/json-pack": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-17.67.0.tgz", + "integrity": "sha512-t0ejURcGaZsn1ClbJ/3kFqSOjlryd92eQY465IYrezsXmPcfHPE/av4twRSxf6WE+TkZgLY+71vCZbiIiFKA/w==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/base64": "17.67.0", + "@jsonjoy.com/buffers": "17.67.0", + "@jsonjoy.com/codegen": "17.67.0", + "@jsonjoy.com/json-pointer": "17.67.0", + "@jsonjoy.com/util": "17.67.0", + "hyperdyperid": "^1.2.0", + "thingies": "^2.5.0", + "tree-dump": "^1.1.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/json-pointer": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-17.67.0.tgz", + "integrity": "sha512-+iqOFInH+QZGmSuaybBUNdh7yvNrXvqR+h3wjXm0N/3JK1EyyFAeGJvqnmQL61d1ARLlk/wJdFKSL+LHJ1eaUA==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/util": "17.67.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/util": { + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-17.67.0.tgz", + "integrity": "sha512-6+8xBaz1rLSohlGh68D1pdw3AwDi9xydm8QNlAFkvnavCJYSze+pxoW2VKP8p308jtlMRLs5NTHfPlZLd4w7ew==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/buffers": "17.67.0", + "@jsonjoy.com/codegen": "17.67.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.21.0.tgz", + "integrity": "sha512-+AKG+R2cfZMShzrF2uQw34v3zbeDYUqnQ+jg7ORic3BGtfw9p/+N6RJbq/kkV8JmYZaINknaEQ2m0/f693ZPpg==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/base64": "^1.1.2", + "@jsonjoy.com/buffers": "^1.2.0", + "@jsonjoy.com/codegen": "^1.0.0", + "@jsonjoy.com/json-pointer": "^1.0.2", + "@jsonjoy.com/util": "^1.9.0", + "hyperdyperid": "^1.2.0", + "thingies": "^2.5.0", + "tree-dump": "^1.1.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack/node_modules/@jsonjoy.com/buffers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.2.1.tgz", + "integrity": "sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pointer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-1.0.2.tgz", + "integrity": "sha512-Fsn6wM2zlDzY1U+v4Nc8bo3bVqgfNTGcn6dMgs6FjrEnt4ZCe60o6ByKRjOGlI2gow0aE/Q41QOigdTqkyK5fg==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/codegen": "^1.0.0", + "@jsonjoy.com/util": "^1.9.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/util": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.9.0.tgz", + "integrity": "sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/buffers": "^1.0.0", + "@jsonjoy.com/codegen": "^1.0.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/util/node_modules/@jsonjoy.com/buffers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.2.1.tgz", + "integrity": "sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, "node_modules/@monaco-editor/loader": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.7.0.tgz", @@ -2695,6 +3115,52 @@ "dev": true, "license": "MIT" }, + "node_modules/@rollup/plugin-inject": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz", + "integrity": "sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", + "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.60.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.1.tgz", @@ -3558,12 +4024,63 @@ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/aria-hidden": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz", - "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==", - "dev": true, - "license": "MIT", + "node_modules/@webcontainer/api": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@webcontainer/api/-/api-1.6.4.tgz", + "integrity": "sha512-r9sHCXg1FcC1AMgppGwAc0vYWaQhqvg282cnsuPbJEzYnWifAdCVvg+8ngJUEHyHcomhJJp+/zuytite4ITHLw==", + "license": "MIT" + }, + "node_modules/@xterm/addon-fit": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.10.0.tgz", + "integrity": "sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/addon-unicode11": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-unicode11/-/addon-unicode11-0.8.0.tgz", + "integrity": "sha512-LxinXu8SC4OmVa6FhgwsVCBZbr8WoSGzBl2+vqe8WcQ6hb1r6Gj9P99qTNdPiFPh4Ceiu2pC8xukZ6+2nnh49Q==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/addon-web-links": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-web-links/-/addon-web-links-0.11.0.tgz", + "integrity": "sha512-nIHQ38pQI+a5kXnRaTgwqSHnX7KE6+4SVoceompgHL26unAxdfP6IPqUTSYPQgSwM56hsElfoNrrW5V7BUED/Q==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/xterm": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0.tgz", + "integrity": "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==", + "license": "MIT" + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/aria-hidden": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz", + "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==", + "dev": true, + "license": "MIT", "dependencies": { "tslib": "^2.0.0" }, @@ -3571,6 +4088,80 @@ "node": ">=10" } }, + "node_modules/asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz", + "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/assert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, + "node_modules/async-lock": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", + "license": "MIT" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/baseline-browser-mapping": { "version": "2.10.18", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.18.tgz", @@ -3584,6 +4175,158 @@ "node": ">=6.0.0" } }, + "node_modules/bn.js": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.3.tgz", + "integrity": "sha512-EAcmnPkxpntVL+DS7bO1zhcZNvCkxqtkd0ZY53h06GNQ3DEkkGZ/gKgmDv6DdZQGj9BgfSPKtJJ7Dp1GPP8f7w==", + "dev": true, + "license": "MIT" + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/browser-resolve": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", + "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.17.0" + } + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.1.tgz", + "integrity": "sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^5.2.1", + "randombytes": "^2.1.0", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/browserify-rsa/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/browserify-sign": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.5.tgz", + "integrity": "sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw==", + "dev": true, + "license": "ISC", + "dependencies": { + "bn.js": "^5.2.2", + "browserify-rsa": "^4.1.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.6.1", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.9", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/browserify-sign/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "~1.0.5" + } + }, "node_modules/browserslist": { "version": "4.28.2", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", @@ -3618,6 +4361,91 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/call-bind": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", + "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "get-intrinsic": "^1.3.0", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001788", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001788.tgz", @@ -3639,6 +4467,42 @@ ], "license": "CC-BY-4.0" }, + "node_modules/cipher-base": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.7.tgz", + "integrity": "sha512-Mz9QMT5fJe7bKI7MH31UilT5cEK5EHHRCccw/YRFsRY47AuNgaV6HY3rscp0/I4Q+tTW/5zoqpSeRRI54TkDWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cipher-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/class-variance-authority": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz", @@ -3652,6 +4516,12 @@ "url": "https://polar.sh/cva" } }, + "node_modules/clean-git-ref": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", + "integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==", + "license": "Apache-2.0" + }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -3679,6 +4549,19 @@ "react-dom": "^18 || ^19 || ^19.0.0-rc" } }, + "node_modules/console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", + "dev": true, + "license": "MIT" + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -3693,6 +4576,99 @@ "dev": true, "license": "MIT" }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "license": "Apache-2.0", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz", + "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/crypto-browserify": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", + "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-cipher": "^1.0.1", + "browserify-sign": "^4.2.3", + "create-ecdh": "^4.0.4", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "diffie-hellman": "^5.0.3", + "hash-base": "~3.0.4", + "inherits": "^2.0.4", + "pbkdf2": "^3.1.2", + "public-encrypt": "^4.0.3", + "randombytes": "^2.1.0", + "randomfill": "^1.0.4" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -3888,8 +4864,69 @@ "dev": true, "license": "MIT" }, - "node_modules/detect-libc": { - "version": "2.1.2", + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "dev": true, @@ -3905,6 +4942,31 @@ "dev": true, "license": "MIT" }, + "node_modules/diff3": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz", + "integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==", + "license": "MIT" + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz", + "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==", + "dev": true, + "license": "MIT" + }, "node_modules/dom-helpers": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", @@ -3916,6 +4978,19 @@ "csstype": "^3.0.2" } }, + "node_modules/domain-browser": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", + "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/dompurify": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz", @@ -3926,6 +5001,20 @@ "@types/trusted-types": "^2.0.7" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.336", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.336.tgz", @@ -3933,6 +5022,29 @@ "dev": true, "license": "ISC" }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz", + "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==", + "dev": true, + "license": "MIT" + }, "node_modules/embla-carousel": { "version": "8.6.0", "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.6.0.tgz", @@ -3978,6 +5090,36 @@ "node": ">=10.13.0" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/esbuild": { "version": "0.27.7", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", @@ -4030,6 +5172,22 @@ "node": ">=6" } }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -4037,6 +5195,26 @@ "dev": true, "license": "MIT" }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "node_modules/fast-equals": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.4.0.tgz", @@ -4072,75 +5250,345 @@ "dev": true, "license": "MIT" }, - "node_modules/framer-motion": { - "version": "12.38.0", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.38.0.tgz", - "integrity": "sha512-rFYkY/pigbcswl1XQSb7q424kSTQ8q6eAC+YUsSKooHQYuLdzdHjrt6uxUC+PRAO++q5IS7+TamgIw1AphxR+g==", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/framer-motion": { + "version": "12.38.0", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.38.0.tgz", + "integrity": "sha512-rFYkY/pigbcswl1XQSb7q424kSTQ8q6eAC+YUsSKooHQYuLdzdHjrt6uxUC+PRAO++q5IS7+TamgIw1AphxR+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "motion-dom": "^12.38.0", + "motion-utils": "^12.36.0", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-nonce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", + "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob-to-regex.js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/glob-to-regex.js/-/glob-to-regex.js-1.2.0.tgz", + "integrity": "sha512-QMwlOQKU/IzqMUOAZWubUOT8Qft+Y0KQWnX9nK3ch0CJg0tTp4TvGZsTfudYKv2NzoQSyPcnA6TYeIQ3jGichQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", + "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/hash-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "license": "MIT", "dependencies": { - "motion-dom": "^12.38.0", - "motion-utils": "^12.36.0", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "@emotion/is-prop-valid": "*", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/is-prop-valid": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - } + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, + "node_modules/hasown": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], + "dependencies": { + "function-bind": "^1.1.2" + }, "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">= 0.4" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", "dev": true, "license": "MIT", - "engines": { - "node": ">=6.9.0" + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/get-nonce": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", - "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", + "node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", "dev": true, + "license": "MIT" + }, + "node_modules/hyperdyperid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", + "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", "license": "MIT", "engines": { - "node": ">=6" + "node": ">=10.18" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } }, "node_modules/immediate": { "version": "3.0.6", @@ -4153,7 +5601,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, "license": "ISC" }, "node_modules/input-otp": { @@ -4177,6 +5624,122 @@ "node": ">=12" } }, + "node_modules/is-arguments": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", + "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -4184,6 +5747,86 @@ "dev": true, "license": "MIT" }, + "node_modules/isomorphic-git": { + "version": "1.37.5", + "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.37.5.tgz", + "integrity": "sha512-wek54c5uFvd3WsxewLWt6h0GXKWQh0P8rRXns9bN1rHNjcgCb3+0lmyAsP594NeTtQFeCJQVS9b0kjbkD1l5qg==", + "license": "MIT", + "dependencies": { + "async-lock": "^1.4.1", + "clean-git-ref": "^2.0.1", + "crc-32": "^1.2.0", + "diff3": "0.0.3", + "ignore": "^5.1.4", + "minimisted": "^2.0.0", + "pako": "^1.0.10", + "pify": "^4.0.1", + "readable-stream": "^4.0.0", + "sha.js": "^2.4.12", + "simple-get": "^4.0.1" + }, + "bin": { + "isogit": "cli.cjs" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/isomorphic-git/node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/isomorphic-git/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/isomorphic-git/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/isomorphic-timers-promises": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-timers-promises/-/isomorphic-timers-promises-1.0.1.tgz", + "integrity": "sha512-u4sej9B1LPSxTGKB/HiuzvEQnXH0ECYkSVQU39koSwmFAxhlEAFl9RdTvLv4TOTQUgBS5O3O5fwUxk6byBZ+IQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/jiti": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", @@ -4511,6 +6154,22 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lodash": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", @@ -4551,27 +6210,142 @@ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/marked": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz", + "integrity": "sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/memfs": { + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.57.2.tgz", + "integrity": "sha512-2nWzSsJzrukurSDna4Z0WywuScK4Id3tSKejgu74u8KCdW4uNrseKRSIDg75C6Yw5ZRqBe0F0EtMNlTbUq8bAQ==", + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/fs-core": "4.57.2", + "@jsonjoy.com/fs-fsa": "4.57.2", + "@jsonjoy.com/fs-node": "4.57.2", + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-to-fsa": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2", + "@jsonjoy.com/fs-print": "4.57.2", + "@jsonjoy.com/fs-snapshot": "4.57.2", + "@jsonjoy.com/json-pack": "^1.11.0", + "@jsonjoy.com/util": "^1.9.0", + "glob-to-regex.js": "^1.0.1", + "thingies": "^2.5.0", + "tree-dump": "^1.0.3", + "tslib": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz", + "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", "dev": true, + "license": "MIT" + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/marked": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz", - "integrity": "sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==", - "dev": true, + "node_modules/minimisted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz", + "integrity": "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==", "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 18" + "dependencies": { + "minimist": "^1.2.5" } }, "node_modules/mitt": { @@ -4660,6 +6434,85 @@ "dev": true, "license": "MIT" }, + "node_modules/node-stdlib-browser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-stdlib-browser/-/node-stdlib-browser-1.3.1.tgz", + "integrity": "sha512-X75ZN8DCLftGM5iKwoYLA3rjnrAEs97MkzvSd4q2746Tgpg8b8XWiBGiBG4ZpgcAqBgtgPHTiAc8ZMCvZuikDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert": "^2.0.0", + "browser-resolve": "^2.0.0", + "browserify-zlib": "^0.2.0", + "buffer": "^5.7.1", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "create-require": "^1.1.1", + "crypto-browserify": "^3.12.1", + "domain-browser": "4.22.0", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "isomorphic-timers-promises": "^1.0.1", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.1", + "pkg-dir": "^5.0.0", + "process": "^0.11.10", + "punycode": "^1.4.1", + "querystring-es3": "^0.2.1", + "readable-stream": "^3.6.0", + "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.1", + "url": "^0.11.4", + "util": "^0.12.4", + "vm-browserify": "^1.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-stdlib-browser/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/node-stdlib-browser/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -4670,13 +6523,222 @@ "node": ">=0.10.0" } }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true, "license": "(MIT AND Zlib)" }, + "node_modules/parse-asn1": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.9.tgz", + "integrity": "sha512-fIYNuZ/HastSb80baGOuPRo1O9cf4baWw5WsAp7dBuUzeTD/BoaG8sVTdlPFksBE2lF21dN+A1AnrpIjSWqHHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "asn1.js": "^4.10.1", + "browserify-aes": "^1.2.0", + "evp_bytestokey": "^1.0.3", + "pbkdf2": "^3.1.5", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse-asn1/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/pbkdf2": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.5.tgz", + "integrity": "sha512-Q3CG/cYvCO1ye4QKkuH7EXxs3VC/rI1/trd+qX2+PolbaKG0H+bgcZzrTt96mMyRtejk+JMCiLUn3y29W8qmFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "ripemd160": "^2.0.3", + "safe-buffer": "^5.2.1", + "sha.js": "^2.4.12", + "to-buffer": "^1.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pbkdf2/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -4697,6 +6759,37 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-dir": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", + "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^5.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.5.9", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.9.tgz", @@ -4740,6 +6833,15 @@ "node": ">=4" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -4766,6 +6868,81 @@ "dev": true, "license": "MIT" }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz", + "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.15.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz", + "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, "node_modules/react": { "version": "19.1.0", "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", @@ -5043,6 +7220,79 @@ "node": ">=8" } }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ripemd160": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.3.tgz", + "integrity": "sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.1.2", + "inherits": "^2.0.4" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ripemd160/node_modules/hash-base": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.2.tgz", + "integrity": "sha512-Bb33KbowVTIj5s7Ked1OsqHUeCpz//tPwR+E2zJgJKo9Z5XolZ9b6bdUgjmYlwnWhoOQKoTd1TYToZGn5mAYOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ripemd160/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/rollup": { "version": "4.60.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.1.tgz", @@ -5095,6 +7345,24 @@ "dev": true, "license": "MIT" }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/scheduler": { "version": "0.26.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", @@ -5112,6 +7380,23 @@ "semver": "bin/semver.js" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -5119,6 +7404,167 @@ "dev": true, "license": "MIT" }, + "node_modules/sha.js": { + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" + }, + "bin": { + "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sha.js/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "node_modules/sonner": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz", @@ -5147,6 +7593,60 @@ "dev": true, "license": "MIT" }, + "node_modules/stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/stream-browserify/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "dev": true, + "license": "MIT", + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, + "node_modules/stream-http/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -5157,6 +7657,19 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/tailwind-merge": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.5.0.tgz", @@ -5189,6 +7702,35 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/thingies": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-2.6.0.tgz", + "integrity": "sha512-rMHRjmlFLM1R96UYPvpmnc3LYtdFrT33JIB7L9hetGue1qAPfn1N2LJeEjxUSidu1Iku+haLZXDuEXUHNGO/lg==", + "license": "MIT", + "engines": { + "node": ">=10.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "^2" + } + }, + "node_modules/timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tiny-invariant": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", @@ -5213,13 +7755,75 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, + "node_modules/to-buffer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", + "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==", + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/to-buffer/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/to-buffer/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/tree-dump": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.1.0.tgz", + "integrity": "sha512-rMuvhU4MCDbcbnleZTFezWsaZXRFemSqAM+7jPnzUl1fo9w3YEKOxAeui0fz3OI4EU4hf23iyA7uQRVko+UaBA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, "license": "0BSD" }, + "node_modules/tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true, + "license": "MIT" + }, "node_modules/tw-animate-css": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/tw-animate-css/-/tw-animate-css-1.4.0.tgz", @@ -5230,6 +7834,20 @@ "url": "https://github.com/sponsors/Wombosvideo" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", @@ -5282,6 +7900,20 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/url": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.4.tgz", + "integrity": "sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^1.4.1", + "qs": "^6.12.3" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/use-callback-ref": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", @@ -5337,6 +7969,20 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -5456,6 +8102,51 @@ } } }, + "node_modules/vite-plugin-node-polyfills": { + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/vite-plugin-node-polyfills/-/vite-plugin-node-polyfills-0.26.0.tgz", + "integrity": "sha512-BAe5YzJf368XGev02hDvioidx4uVH8dqEJlG73bjQSxM26/AQnGcKFomq9n3vGq5yqpSHKN4h1XQNxx9l98mBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/plugin-inject": "^5.0.5", + "node-stdlib-browser": "^1.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/davidmyersdev" + }, + "peerDependencies": { + "vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/which-typed-array": { + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", + "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wouter": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/wouter/-/wouter-3.9.0.tgz", @@ -5471,6 +8162,22 @@ "react": ">=16.8.0" } }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -5478,6 +8185,19 @@ "dev": true, "license": "ISC" }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", diff --git a/package.json b/package.json index c5293d8..9669c78 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "@types/react": "^19.2.0", "@types/react-dom": "^19.2.0", "@vitejs/plugin-react": "^5.0.4", + "buffer": "^6.0.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", @@ -76,8 +77,19 @@ "typescript": "~5.9.2", "vaul": "^1.1.2", "vite": "^7.3.0", + "vite-plugin-node-polyfills": "^0.26.0", "wouter": "^3.3.5", "zod": "^3.25.76", "zustand": "^5.0.12" + }, + "dependencies": { + "@webcontainer/api": "^1.6.4", + "@xterm/addon-fit": "^0.10.0", + "@xterm/addon-search": "^0.16.0", + "@xterm/addon-unicode11": "^0.8.0", + "@xterm/addon-web-links": "^0.11.0", + "@xterm/xterm": "^5.5.0", + "isomorphic-git": "^1.37.5", + "memfs": "^4.57.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d929bd..764111f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,31 @@ settings: importers: .: + dependencies: + '@webcontainer/api': + specifier: ^1.6.4 + version: 1.6.4 + '@xterm/addon-fit': + specifier: ^0.10.0 + version: 0.10.0(@xterm/xterm@5.5.0) + '@xterm/addon-search': + specifier: ^0.16.0 + version: 0.16.0 + '@xterm/addon-unicode11': + specifier: ^0.8.0 + version: 0.8.0(@xterm/xterm@5.5.0) + '@xterm/addon-web-links': + specifier: ^0.11.0 + version: 0.11.0(@xterm/xterm@5.5.0) + '@xterm/xterm': + specifier: ^5.5.0 + version: 5.5.0 + isomorphic-git: + specifier: ^1.37.5 + version: 1.37.5 + memfs: + specifier: ^4.57.2 + version: 4.57.2(tslib@2.8.1) devDependencies: '@hookform/resolvers': specifier: ^3.10.0 @@ -128,6 +153,9 @@ importers: '@vitejs/plugin-react': specifier: ^5.0.4 version: 5.2.0(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)) + buffer: + specifier: ^6.0.3 + version: 6.0.3 class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -206,6 +234,9 @@ importers: vite: specifier: ^7.3.0 version: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0) + vite-plugin-node-polyfills: + specifier: ^0.26.0 + version: 0.26.0(rollup@4.60.1)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)) wouter: specifier: ^3.3.5 version: 3.9.0(react@19.1.0) @@ -500,6 +531,126 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@jsonjoy.com/base64@1.1.2': + resolution: {integrity: sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/base64@17.67.0': + resolution: {integrity: sha512-5SEsJGsm15aP8TQGkDfJvz9axgPwAEm98S5DxOuYe8e1EbfajcDmgeXXzccEjh+mLnjqEKrkBdjHWS5vFNwDdw==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/buffers@1.2.1': + resolution: {integrity: sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/buffers@17.67.0': + resolution: {integrity: sha512-tfExRpYxBvi32vPs9ZHaTjSP4fHAfzSmcahOfNxtvGHcyJel+aibkPlGeBB+7AoC6hL7lXIE++8okecBxx7lcw==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/codegen@1.0.0': + resolution: {integrity: sha512-E8Oy+08cmCf0EK/NMxpaJZmOxPqM+6iSe2S4nlSBrPZOORoDJILxtbSUEDKQyTamm/BVAhIGllOBNU79/dwf0g==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/codegen@17.67.0': + resolution: {integrity: sha512-idnkUplROpdBOV0HMcwhsCUS5TRUi9poagdGs70A6S4ux9+/aPuKbh8+UYRTLYQHtXvAdNfQWXDqZEx5k4Dj2Q==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/fs-core@4.57.2': + resolution: {integrity: sha512-SVjwklkpIV5wrynpYtuYnfYH1QF4/nDuLBX7VXdb+3miglcAgBVZb/5y0cOsehRV/9Vb+3UqhkMq3/NR3ztdkQ==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/fs-fsa@4.57.2': + resolution: {integrity: sha512-fhO8+iR2I+OCw668ISDJdn1aArc9zx033sWejIyzQ8RBeXa9bDSaUeA3ix0poYOfrj1KdOzytmYNv2/uLDfV6g==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/fs-node-builtins@4.57.2': + resolution: {integrity: sha512-xhiegylRmhw43Ki2HO1ZBL7DQ5ja/qpRsL29VtQ2xuUHiuDGbgf2uD4p9Qd8hJI5P6RCtGYD50IXHXVq/Ocjcg==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/fs-node-to-fsa@4.57.2': + resolution: {integrity: sha512-18LmWTSONhoAPW+IWRuf8w/+zRolPFGPeGwMxlAhhfY11EKzX+5XHDBPAw67dBF5dxDErHJbl40U+3IXSDRXSQ==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/fs-node-utils@4.57.2': + resolution: {integrity: sha512-rsPSJgekz43IlNbLyAM/Ab+ouYLWGp5DDBfYBNNEqDaSpsbXfthBn29Q4muFA9L0F+Z3mKo+CWlgSCXrf+mOyQ==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/fs-node@4.57.2': + resolution: {integrity: sha512-nX2AdL6cOFwLdju9G4/nbRnYevmCJbh7N7hvR3gGm97Cs60uEjyd0rpR+YBS7cTg175zzl22pGKXR5USaQMvKg==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/fs-print@4.57.2': + resolution: {integrity: sha512-wK9NSow48i4DbDl9F1CQE5TqnyZOJ04elU3WFG5aJ76p+YxO/ulyBBQvKsessPxdo381Bc2pcEoyPujMOhcRqQ==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/fs-snapshot@4.57.2': + resolution: {integrity: sha512-GdduDZuoP5V/QCgJkx9+BZ6SC0EZ/smXAdTS7PfMqgMTGXLlt/bH/FqMYaqB9JmLf05sJPtO0XRbAwwkEEPbVw==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/json-pack@1.21.0': + resolution: {integrity: sha512-+AKG+R2cfZMShzrF2uQw34v3zbeDYUqnQ+jg7ORic3BGtfw9p/+N6RJbq/kkV8JmYZaINknaEQ2m0/f693ZPpg==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/json-pack@17.67.0': + resolution: {integrity: sha512-t0ejURcGaZsn1ClbJ/3kFqSOjlryd92eQY465IYrezsXmPcfHPE/av4twRSxf6WE+TkZgLY+71vCZbiIiFKA/w==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/json-pointer@1.0.2': + resolution: {integrity: sha512-Fsn6wM2zlDzY1U+v4Nc8bo3bVqgfNTGcn6dMgs6FjrEnt4ZCe60o6ByKRjOGlI2gow0aE/Q41QOigdTqkyK5fg==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/json-pointer@17.67.0': + resolution: {integrity: sha512-+iqOFInH+QZGmSuaybBUNdh7yvNrXvqR+h3wjXm0N/3JK1EyyFAeGJvqnmQL61d1ARLlk/wJdFKSL+LHJ1eaUA==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/util@1.9.0': + resolution: {integrity: sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + '@jsonjoy.com/util@17.67.0': + resolution: {integrity: sha512-6+8xBaz1rLSohlGh68D1pdw3AwDi9xydm8QNlAFkvnavCJYSze+pxoW2VKP8p308jtlMRLs5NTHfPlZLd4w7ew==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + '@monaco-editor/loader@1.7.0': resolution: {integrity: sha512-gIwR1HrJrrx+vfyOhYmCZ0/JcWqG5kbfG7+d3f/C1LXk2EvzAbHSg3MQ5lO2sMlo9izoAZ04shohfKLVT6crVA==} @@ -1178,6 +1329,24 @@ packages: '@rolldown/pluginutils@1.0.0-rc.3': resolution: {integrity: sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==} + '@rollup/plugin-inject@5.0.5': + resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/pluginutils@5.3.0': + resolution: {integrity: sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/rollup-android-arm-eabi@4.60.1': resolution: {integrity: sha512-d6FinEBLdIiK+1uACUttJKfgZREXrF0Qc2SmLII7W2AD8FfiZ9Wjd+rD/iRuf5s5dWrr1GgwXCvPqOuDquOowA==} cpu: [arm] @@ -1475,26 +1644,133 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + '@webcontainer/api@1.6.4': + resolution: {integrity: sha512-r9sHCXg1FcC1AMgppGwAc0vYWaQhqvg282cnsuPbJEzYnWifAdCVvg+8ngJUEHyHcomhJJp+/zuytite4ITHLw==} + + '@xterm/addon-fit@0.10.0': + resolution: {integrity: sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==} + peerDependencies: + '@xterm/xterm': ^5.0.0 + + '@xterm/addon-search@0.16.0': + resolution: {integrity: sha512-9OeuBFu0/uZJPu+9AHKY6g/w0Czyb/Ut0A5t79I4ULoU4IfU5BEpPFVGQxP4zTTMdfZEYkVIRYbHBX1xWwjeSA==} + + '@xterm/addon-unicode11@0.8.0': + resolution: {integrity: sha512-LxinXu8SC4OmVa6FhgwsVCBZbr8WoSGzBl2+vqe8WcQ6hb1r6Gj9P99qTNdPiFPh4Ceiu2pC8xukZ6+2nnh49Q==} + peerDependencies: + '@xterm/xterm': ^5.0.0 + + '@xterm/addon-web-links@0.11.0': + resolution: {integrity: sha512-nIHQ38pQI+a5kXnRaTgwqSHnX7KE6+4SVoceompgHL26unAxdfP6IPqUTSYPQgSwM56hsElfoNrrW5V7BUED/Q==} + peerDependencies: + '@xterm/xterm': ^5.0.0 + + '@xterm/xterm@5.5.0': + resolution: {integrity: sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==} + + abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + aria-hidden@1.2.6: resolution: {integrity: sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==} engines: {node: '>=10'} + asn1.js@4.10.1: + resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} + + assert@2.1.0: + resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==} + + async-lock@1.4.1: + resolution: {integrity: sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==} + + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + baseline-browser-mapping@2.10.18: resolution: {integrity: sha512-VSnGQAOLtP5mib/DPyg2/t+Tlv65NTBz83BJBJvmLVHHuKJVaDOBvJJykiT5TR++em5nfAySPccDZDa4oSrn8A==} engines: {node: '>=6.0.0'} hasBin: true + bn.js@4.12.3: + resolution: {integrity: sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==} + + bn.js@5.2.3: + resolution: {integrity: sha512-EAcmnPkxpntVL+DS7bO1zhcZNvCkxqtkd0ZY53h06GNQ3DEkkGZ/gKgmDv6DdZQGj9BgfSPKtJJ7Dp1GPP8f7w==} + + brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + + browser-resolve@2.0.0: + resolution: {integrity: sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==} + + browserify-aes@1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + + browserify-cipher@1.0.1: + resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + + browserify-des@1.0.2: + resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + + browserify-rsa@4.1.1: + resolution: {integrity: sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==} + engines: {node: '>= 0.10'} + + browserify-sign@4.2.5: + resolution: {integrity: sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw==} + engines: {node: '>= 0.10'} + + browserify-zlib@0.2.0: + resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} + browserslist@4.28.2: resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + buffer-xor@1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + + builtin-status-codes@3.0.0: + resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bind@1.0.9: + resolution: {integrity: sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + caniuse-lite@1.0.30001787: resolution: {integrity: sha512-mNcrMN9KeI68u7muanUpEejSLghOKlVhRqS/Za2IeyGllJ9I9otGpR9g3nsw7n4W378TE/LyIteA0+/FOZm4Kg==} + cipher-base@1.0.7: + resolution: {integrity: sha512-Mz9QMT5fJe7bKI7MH31UilT5cEK5EHHRCccw/YRFsRY47AuNgaV6HY3rscp0/I4Q+tTW/5zoqpSeRRI54TkDWA==} + engines: {node: '>= 0.10'} + class-variance-authority@0.7.1: resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} + clean-git-ref@2.0.1: + resolution: {integrity: sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==} + clsx@2.1.1: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} @@ -1505,12 +1781,39 @@ packages: react: ^18 || ^19 || ^19.0.0-rc react-dom: ^18 || ^19 || ^19.0.0-rc + console-browserify@1.2.0: + resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} + + constants-browserify@1.0.0: + resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + crc-32@1.2.2: + resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} + engines: {node: '>=0.8'} + hasBin: true + + create-ecdh@4.0.4: + resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + + create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + + create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + + crypto-browserify@3.12.1: + resolution: {integrity: sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==} + engines: {node: '>= 0.10'} + cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -1584,6 +1887,21 @@ packages: decimal.js-light@2.5.1: resolution: {integrity: sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==} + decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + + des.js@1.1.0: + resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} + detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} @@ -1591,15 +1909,32 @@ packages: detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} + diff3@0.0.3: + resolution: {integrity: sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==} + + diffie-hellman@5.0.3: + resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + dom-helpers@5.2.1: resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} + domain-browser@4.22.0: + resolution: {integrity: sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==} + engines: {node: '>=10'} + dompurify@3.2.7: resolution: {integrity: sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + electron-to-chromium@1.5.335: resolution: {integrity: sha512-q9n5T4BR4Xwa2cwbrwcsDJtHD/enpQ5S1xF1IAtdqf5AAgqDFmR/aakqH3ChFdqd/QXJhS3rnnXFtexU7rax6Q==} + elliptic@6.6.1: + resolution: {integrity: sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==} + embla-carousel-react@8.6.0: resolution: {integrity: sha512-0/PjqU7geVmo6F734pmPqpyHqiM99olvyecY7zdweCw+6tKEXnrE90pBiBbMMU8s5tICemzpQ3hi5EpxzGW+JA==} peerDependencies: @@ -1617,6 +1952,18 @@ packages: resolution: {integrity: sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==} engines: {node: '>=10.13.0'} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + esbuild@0.27.7: resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==} engines: {node: '>=18'} @@ -1626,9 +1973,23 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + evp_bytestokey@1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + fast-equals@5.4.0: resolution: {integrity: sha512-jt2DW/aNFNwke7AUd+Z+e6pz39KO5rzdbbFCg2sGafS4mk13MI7Z8O5z9cADNn5lhGODIgLwug6TZO2ctf7kcw==} engines: {node: '>=6.0.0'} @@ -1645,6 +2006,14 @@ packages: file-saver@2.0.5: resolution: {integrity: sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + for-each@0.3.5: + resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} + engines: {node: '>= 0.4'} + framer-motion@12.38.0: resolution: {integrity: sha512-rFYkY/pigbcswl1XQSb7q424kSTQ8q6eAC+YUsSKooHQYuLdzdHjrt6uxUC+PRAO++q5IS7+TamgIw1AphxR+g==} peerDependencies: @@ -1664,17 +2033,85 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + generator-function@2.0.1: + resolution: {integrity: sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==} + engines: {node: '>= 0.4'} + gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + get-nonce@1.0.1: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} engines: {node: '>=6'} + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + glob-to-regex.js@1.2.0: + resolution: {integrity: sha512-QMwlOQKU/IzqMUOAZWubUOT8Qft+Y0KQWnX9nK3ch0CJg0tTp4TvGZsTfudYKv2NzoQSyPcnA6TYeIQ3jGichQ==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hash-base@3.0.5: + resolution: {integrity: sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==} + engines: {node: '>= 0.10'} + + hash-base@3.1.2: + resolution: {integrity: sha512-Bb33KbowVTIj5s7Ked1OsqHUeCpz//tPwR+E2zJgJKo9Z5XolZ9b6bdUgjmYlwnWhoOQKoTd1TYToZGn5mAYOg==} + engines: {node: '>= 0.8'} + + hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + + hasown@2.0.3: + resolution: {integrity: sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==} + engines: {node: '>= 0.4'} + + hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + + https-browserify@1.0.0: + resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} + + hyperdyperid@1.2.0: + resolution: {integrity: sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==} + engines: {node: '>=10.18'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + immediate@3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} @@ -1691,9 +2128,49 @@ packages: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} engines: {node: '>=12'} + is-arguments@1.2.0: + resolution: {integrity: sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==} + engines: {node: '>= 0.4'} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} + engines: {node: '>= 0.4'} + + is-generator-function@1.1.2: + resolution: {integrity: sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==} + engines: {node: '>= 0.4'} + + is-nan@1.3.2: + resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} + engines: {node: '>= 0.4'} + + is-regex@1.2.1: + resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.15: + resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} + engines: {node: '>= 0.4'} + isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + + isomorphic-git@1.37.5: + resolution: {integrity: sha512-wek54c5uFvd3WsxewLWt6h0GXKWQh0P8rRXns9bN1rHNjcgCb3+0lmyAsP594NeTtQFeCJQVS9b0kjbkD1l5qg==} + engines: {node: '>=14.17'} + hasBin: true + + isomorphic-timers-promises@1.0.1: + resolution: {integrity: sha512-u4sej9B1LPSxTGKB/HiuzvEQnXH0ECYkSVQU39koSwmFAxhlEAFl9RdTvLv4TOTQUgBS5O3O5fwUxk6byBZ+IQ==} + engines: {node: '>=10'} + jiti@2.6.1: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true @@ -1787,6 +2264,10 @@ packages: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + lodash@4.18.1: resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} @@ -1810,6 +2291,38 @@ packages: engines: {node: '>= 18'} hasBin: true + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + + memfs@4.57.2: + resolution: {integrity: sha512-2nWzSsJzrukurSDna4Z0WywuScK4Id3tSKejgu74u8KCdW4uNrseKRSIDg75C6Yw5ZRqBe0F0EtMNlTbUq8bAQ==} + peerDependencies: + tslib: '2' + + miller-rabin@4.0.1: + resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true + + mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minimisted@2.0.1: + resolution: {integrity: sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==} + mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} @@ -1842,13 +2355,65 @@ packages: node-releases@2.0.37: resolution: {integrity: sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==} + node-stdlib-browser@1.3.1: + resolution: {integrity: sha512-X75ZN8DCLftGM5iKwoYLA3rjnrAEs97MkzvSd4q2746Tgpg8b8XWiBGiBG4ZpgcAqBgtgPHTiAc8ZMCvZuikDw==} + engines: {node: '>=10'} + object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + object-is@1.1.6: + resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} + engines: {node: '>= 0.4'} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.7: + resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==} + engines: {node: '>= 0.4'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + os-browserify@0.3.0: + resolution: {integrity: sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + parse-asn1@5.1.9: + resolution: {integrity: sha512-fIYNuZ/HastSb80baGOuPRo1O9cf4baWw5WsAp7dBuUzeTD/BoaG8sVTdlPFksBE2lF21dN+A1AnrpIjSWqHHg==} + engines: {node: '>= 0.10'} + + path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + pbkdf2@3.1.5: + resolution: {integrity: sha512-Q3CG/cYvCO1ye4QKkuH7EXxs3VC/rI1/trd+qX2+PolbaKG0H+bgcZzrTt96mMyRtejk+JMCiLUn3y29W8qmFQ==} + engines: {node: '>= 0.10'} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -1856,6 +2421,18 @@ packages: resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + pkg-dir@5.0.0: + resolution: {integrity: sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==} + engines: {node: '>=10'} + + possible-typed-array-names@1.1.0: + resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} + engines: {node: '>= 0.4'} + postcss-selector-parser@6.0.10: resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==} engines: {node: '>=4'} @@ -1867,9 +2444,33 @@ packages: process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + public-encrypt@4.0.3: + resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + + punycode@1.4.1: + resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} + + qs@6.15.1: + resolution: {integrity: sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==} + engines: {node: '>=0.6'} + + querystring-es3@0.2.1: + resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==} + engines: {node: '>=0.4.x'} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + randomfill@1.0.4: + resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + react-day-picker@9.14.0: resolution: {integrity: sha512-tBaoDWjPwe0M5pGrum4H0SR6Lyk+BO9oHnp9JbKpGKW2mlraNPgP9BMfsg5pWpwrssARmeqk7YBl2oXutZTaHA==} engines: {node: '>=18'} @@ -1957,6 +2558,14 @@ packages: readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readable-stream@4.7.0: + resolution: {integrity: sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + recharts-scale@0.4.5: resolution: {integrity: sha512-kivNFO+0OcUNu7jQquLXAxz1FIwZj8nrj+YkOKc5694NbjCvcT6aSZiIzNzd2Kul4o4rTto8QVR9lMNtxD4G1w==} @@ -1971,6 +2580,15 @@ packages: resolution: {integrity: sha512-RSYAtP31mvYLkAHrOlh25pCNQ5hWnT106VukGaaFfuJrZFkGRX5GhUAdPqpSDXxOhA2c4akmRuplv1mRqnBn6Q==} engines: {node: '>=8'} + resolve@1.22.12: + resolution: {integrity: sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==} + engines: {node: '>= 0.4'} + hasBin: true + + ripemd160@2.0.3: + resolution: {integrity: sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==} + engines: {node: '>= 0.8'} + rollup@4.60.1: resolution: {integrity: sha512-VmtB2rFU/GroZ4oL8+ZqXgSA38O6GR8KSIvWmEFv63pQ0G6KaBH9s07PO8XTXP4vI+3UJUEypOfjkGfmSBBR0w==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -1979,6 +2597,13 @@ packages: safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-regex-test@1.1.0: + resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} + engines: {node: '>= 0.4'} + scheduler@0.26.0: resolution: {integrity: sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==} @@ -1986,9 +2611,40 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + sha.js@2.4.12: + resolution: {integrity: sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==} + engines: {node: '>= 0.10'} + hasBin: true + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} + engines: {node: '>= 0.4'} + + simple-concat@1.0.1: + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + + simple-get@4.0.1: + resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} + sonner@2.0.7: resolution: {integrity: sha512-W6ZN4p58k8aDKA4XPcx2hpIQXBRAgyiWVkYhT7CvK6D3iAu7xjvVyhQHg2/iaKJZ1XVJ4r7XuwGL+WGEK37i9w==} peerDependencies: @@ -2002,9 +2658,22 @@ packages: state-local@1.0.7: resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==} + stream-browserify@3.0.0: + resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} + + stream-http@3.2.0: + resolution: {integrity: sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==} + string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + tailwind-merge@3.5.0: resolution: {integrity: sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A==} @@ -2015,6 +2684,16 @@ packages: resolution: {integrity: sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==} engines: {node: '>=6'} + thingies@2.6.0: + resolution: {integrity: sha512-rMHRjmlFLM1R96UYPvpmnc3LYtdFrT33JIB7L9hetGue1qAPfn1N2LJeEjxUSidu1Iku+haLZXDuEXUHNGO/lg==} + engines: {node: '>=10.18'} + peerDependencies: + tslib: ^2 + + timers-browserify@2.0.12: + resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} + engines: {node: '>=0.6.0'} + tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} @@ -2022,12 +2701,29 @@ packages: resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} engines: {node: '>=12.0.0'} + to-buffer@1.2.2: + resolution: {integrity: sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==} + engines: {node: '>= 0.4'} + + tree-dump@1.1.0: + resolution: {integrity: sha512-rMuvhU4MCDbcbnleZTFezWsaZXRFemSqAM+7jPnzUl1fo9w3YEKOxAeui0fz3OI4EU4hf23iyA7uQRVko+UaBA==} + engines: {node: '>=10.0'} + peerDependencies: + tslib: '2' + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tty-browserify@0.0.1: + resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} + tw-animate-css@1.4.0: resolution: {integrity: sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ==} + typed-array-buffer@1.0.3: + resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} + engines: {node: '>= 0.4'} + typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -2042,6 +2738,10 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + url@0.11.4: + resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} + engines: {node: '>= 0.4'} + use-callback-ref@1.3.3: resolution: {integrity: sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==} engines: {node: '>=10'} @@ -2070,6 +2770,9 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + vaul@1.1.2: resolution: {integrity: sha512-ZFkClGpWyI2WUQjdLJ/BaGuV6AVQiJ3uELGk3OYtP+B6yCO7Cmn9vPFXVJkRaGkOJu3m8bQMgtyzNHixULceQA==} peerDependencies: @@ -2079,6 +2782,11 @@ packages: victory-vendor@36.9.2: resolution: {integrity: sha512-PnpQQMuxlwYdocC8fIJqVXvkeViHYzotI+NJrCuav0ZYFoq912ZHBk3mCeuj+5/VpodOjPe1z0Fk2ihgzlXqjQ==} + vite-plugin-node-polyfills@0.26.0: + resolution: {integrity: sha512-BAe5YzJf368XGev02hDvioidx4uVH8dqEJlG73bjQSxM26/AQnGcKFomq9n3vGq5yqpSHKN4h1XQNxx9l98mBg==} + peerDependencies: + vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + vite@7.3.2: resolution: {integrity: sha512-Bby3NOsna2jsjfLVOHKes8sGwgl4TT0E6vvpYgnAYDIF/tie7MRaFthmKuHx1NSXjiTueXH3do80FMQgvEktRg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2119,14 +2827,32 @@ packages: yaml: optional: true + vm-browserify@1.1.2: + resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} + + which-typed-array@1.1.20: + resolution: {integrity: sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==} + engines: {node: '>= 0.4'} + wouter@3.9.0: resolution: {integrity: sha512-sF/od/PIgqEQBQcrN7a2x3MX6MQE6nW0ygCfy9hQuUkuB28wEZuu/6M5GyqkrrEu9M6jxdkgE12yDFsQMKos4Q==} peerDependencies: react: '>=16.8.0' + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} @@ -2384,33 +3110,160 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@monaco-editor/loader@1.7.0': + '@jsonjoy.com/base64@1.1.2(tslib@2.8.1)': dependencies: - state-local: 1.0.7 + tslib: 2.8.1 - '@monaco-editor/react@4.7.0(monaco-editor@0.55.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': + '@jsonjoy.com/base64@17.67.0(tslib@2.8.1)': dependencies: - '@monaco-editor/loader': 1.7.0 - monaco-editor: 0.55.1 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) + tslib: 2.8.1 - '@radix-ui/number@1.1.1': {} + '@jsonjoy.com/buffers@1.2.1(tslib@2.8.1)': + dependencies: + tslib: 2.8.1 - '@radix-ui/primitive@1.1.3': {} + '@jsonjoy.com/buffers@17.67.0(tslib@2.8.1)': + dependencies: + tslib: 2.8.1 - '@radix-ui/react-accordion@1.2.12(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': + '@jsonjoy.com/codegen@1.0.0(tslib@2.8.1)': dependencies: - '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.1.0) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.14)(react@19.1.0) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.14)(react@19.1.0) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.14)(react@19.1.0) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.14)(react@19.1.0) - react: 19.1.0 + tslib: 2.8.1 + + '@jsonjoy.com/codegen@17.67.0(tslib@2.8.1)': + dependencies: + tslib: 2.8.1 + + '@jsonjoy.com/fs-core@4.57.2(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/fs-node-builtins': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.57.2(tslib@2.8.1) + thingies: 2.6.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/fs-fsa@4.57.2(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/fs-core': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.57.2(tslib@2.8.1) + thingies: 2.6.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/fs-node-builtins@4.57.2(tslib@2.8.1)': + dependencies: + tslib: 2.8.1 + + '@jsonjoy.com/fs-node-to-fsa@4.57.2(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/fs-fsa': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.57.2(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/fs-node-utils@4.57.2(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/fs-node-builtins': 4.57.2(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/fs-node@4.57.2(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/fs-core': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-print': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-snapshot': 4.57.2(tslib@2.8.1) + glob-to-regex.js: 1.2.0(tslib@2.8.1) + thingies: 2.6.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/fs-print@4.57.2(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/fs-node-utils': 4.57.2(tslib@2.8.1) + tree-dump: 1.1.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/fs-snapshot@4.57.2(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/buffers': 17.67.0(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/json-pack': 17.67.0(tslib@2.8.1) + '@jsonjoy.com/util': 17.67.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/json-pack@1.21.0(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/base64': 1.1.2(tslib@2.8.1) + '@jsonjoy.com/buffers': 1.2.1(tslib@2.8.1) + '@jsonjoy.com/codegen': 1.0.0(tslib@2.8.1) + '@jsonjoy.com/json-pointer': 1.0.2(tslib@2.8.1) + '@jsonjoy.com/util': 1.9.0(tslib@2.8.1) + hyperdyperid: 1.2.0 + thingies: 2.6.0(tslib@2.8.1) + tree-dump: 1.1.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/json-pack@17.67.0(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/base64': 17.67.0(tslib@2.8.1) + '@jsonjoy.com/buffers': 17.67.0(tslib@2.8.1) + '@jsonjoy.com/codegen': 17.67.0(tslib@2.8.1) + '@jsonjoy.com/json-pointer': 17.67.0(tslib@2.8.1) + '@jsonjoy.com/util': 17.67.0(tslib@2.8.1) + hyperdyperid: 1.2.0 + thingies: 2.6.0(tslib@2.8.1) + tree-dump: 1.1.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/json-pointer@1.0.2(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/codegen': 1.0.0(tslib@2.8.1) + '@jsonjoy.com/util': 1.9.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/json-pointer@17.67.0(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/util': 17.67.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/util@1.9.0(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/buffers': 1.2.1(tslib@2.8.1) + '@jsonjoy.com/codegen': 1.0.0(tslib@2.8.1) + tslib: 2.8.1 + + '@jsonjoy.com/util@17.67.0(tslib@2.8.1)': + dependencies: + '@jsonjoy.com/buffers': 17.67.0(tslib@2.8.1) + '@jsonjoy.com/codegen': 17.67.0(tslib@2.8.1) + tslib: 2.8.1 + + '@monaco-editor/loader@1.7.0': + dependencies: + state-local: 1.0.7 + + '@monaco-editor/react@4.7.0(monaco-editor@0.55.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': + dependencies: + '@monaco-editor/loader': 1.7.0 + monaco-editor: 0.55.1 + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + + '@radix-ui/number@1.1.1': {} + + '@radix-ui/primitive@1.1.3': {} + + '@radix-ui/react-accordion@1.2.12(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.1.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.14)(react@19.1.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.14)(react@19.1.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.14)(react@19.1.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.14)(react@19.1.0) + react: 19.1.0 react-dom: 19.1.0(react@19.1.0) optionalDependencies: '@types/react': 19.2.14 @@ -3108,6 +3961,22 @@ snapshots: '@rolldown/pluginutils@1.0.0-rc.3': {} + '@rollup/plugin-inject@5.0.5(rollup@4.60.1)': + dependencies: + '@rollup/pluginutils': 5.3.0(rollup@4.60.1) + estree-walker: 2.0.2 + magic-string: 0.30.21 + optionalDependencies: + rollup: 4.60.1 + + '@rollup/pluginutils@5.3.0(rollup@4.60.1)': + dependencies: + '@types/estree': 1.0.8 + estree-walker: 2.0.2 + picomatch: 4.0.4 + optionalDependencies: + rollup: 4.60.1 + '@rollup/rollup-android-arm-eabi@4.60.1': optional: true @@ -3341,12 +4210,110 @@ snapshots: transitivePeerDependencies: - supports-color + '@webcontainer/api@1.6.4': {} + + '@xterm/addon-fit@0.10.0(@xterm/xterm@5.5.0)': + dependencies: + '@xterm/xterm': 5.5.0 + + '@xterm/addon-search@0.16.0': {} + + '@xterm/addon-unicode11@0.8.0(@xterm/xterm@5.5.0)': + dependencies: + '@xterm/xterm': 5.5.0 + + '@xterm/addon-web-links@0.11.0(@xterm/xterm@5.5.0)': + dependencies: + '@xterm/xterm': 5.5.0 + + '@xterm/xterm@5.5.0': {} + + abort-controller@3.0.0: + dependencies: + event-target-shim: 5.0.1 + aria-hidden@1.2.6: dependencies: tslib: 2.8.1 + asn1.js@4.10.1: + dependencies: + bn.js: 4.12.3 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + + assert@2.1.0: + dependencies: + call-bind: 1.0.9 + is-nan: 1.3.2 + object-is: 1.1.6 + object.assign: 4.1.7 + util: 0.12.5 + + async-lock@1.4.1: {} + + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.1.0 + + base64-js@1.5.1: {} + baseline-browser-mapping@2.10.18: {} + bn.js@4.12.3: {} + + bn.js@5.2.3: {} + + brorand@1.1.0: {} + + browser-resolve@2.0.0: + dependencies: + resolve: 1.22.12 + + browserify-aes@1.2.0: + dependencies: + buffer-xor: 1.0.3 + cipher-base: 1.0.7 + create-hash: 1.2.0 + evp_bytestokey: 1.0.3 + inherits: 2.0.4 + safe-buffer: 5.1.2 + + browserify-cipher@1.0.1: + dependencies: + browserify-aes: 1.2.0 + browserify-des: 1.0.2 + evp_bytestokey: 1.0.3 + + browserify-des@1.0.2: + dependencies: + cipher-base: 1.0.7 + des.js: 1.1.0 + inherits: 2.0.4 + safe-buffer: 5.1.2 + + browserify-rsa@4.1.1: + dependencies: + bn.js: 5.2.3 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + + browserify-sign@4.2.5: + dependencies: + bn.js: 5.2.3 + browserify-rsa: 4.1.1 + create-hash: 1.2.0 + create-hmac: 1.1.7 + elliptic: 6.6.1 + inherits: 2.0.4 + parse-asn1: 5.1.9 + readable-stream: 2.3.8 + safe-buffer: 5.2.1 + + browserify-zlib@0.2.0: + dependencies: + pako: 1.0.11 + browserslist@4.28.2: dependencies: baseline-browser-mapping: 2.10.18 @@ -3355,12 +4322,51 @@ snapshots: node-releases: 2.0.37 update-browserslist-db: 1.2.3(browserslist@4.28.2) + buffer-xor@1.0.3: {} + + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + buffer@6.0.3: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + builtin-status-codes@3.0.0: {} + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bind@1.0.9: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + get-intrinsic: 1.3.0 + set-function-length: 1.2.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + caniuse-lite@1.0.30001787: {} + cipher-base@1.0.7: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + to-buffer: 1.2.2 + class-variance-authority@0.7.1: dependencies: clsx: 2.1.1 + clean-git-ref@2.0.1: {} + clsx@2.1.1: {} cmdk@1.1.1(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0): @@ -3375,10 +4381,55 @@ snapshots: - '@types/react' - '@types/react-dom' + console-browserify@1.2.0: {} + + constants-browserify@1.0.0: {} + convert-source-map@2.0.0: {} core-util-is@1.0.3: {} + crc-32@1.2.2: {} + + create-ecdh@4.0.4: + dependencies: + bn.js: 4.12.3 + elliptic: 6.6.1 + + create-hash@1.2.0: + dependencies: + cipher-base: 1.0.7 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.3 + sha.js: 2.4.12 + + create-hmac@1.1.7: + dependencies: + cipher-base: 1.0.7 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.3 + safe-buffer: 5.1.2 + sha.js: 2.4.12 + + create-require@1.1.1: {} + + crypto-browserify@3.12.1: + dependencies: + browserify-cipher: 1.0.1 + browserify-sign: 4.2.5 + create-ecdh: 4.0.4 + create-hash: 1.2.0 + create-hmac: 1.1.7 + diffie-hellman: 5.0.3 + hash-base: 3.0.5 + inherits: 2.0.4 + pbkdf2: 3.1.5 + public-encrypt: 4.0.3 + randombytes: 2.1.0 + randomfill: 1.0.4 + cssesc@3.0.0: {} csstype@3.2.3: {} @@ -3433,21 +4484,68 @@ snapshots: decimal.js-light@2.5.1: {} + decompress-response@6.0.0: + dependencies: + mimic-response: 3.1.0 + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + + des.js@1.1.0: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + detect-libc@2.1.2: {} detect-node-es@1.1.0: {} + diff3@0.0.3: {} + + diffie-hellman@5.0.3: + dependencies: + bn.js: 4.12.3 + miller-rabin: 4.0.1 + randombytes: 2.1.0 + dom-helpers@5.2.1: dependencies: '@babel/runtime': 7.29.2 csstype: 3.2.3 + domain-browser@4.22.0: {} + dompurify@3.2.7: optionalDependencies: '@types/trusted-types': 2.0.7 + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + electron-to-chromium@1.5.335: {} + elliptic@6.6.1: + dependencies: + bn.js: 4.12.3 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + embla-carousel-react@8.6.0(react@19.1.0): dependencies: embla-carousel: 8.6.0 @@ -3465,6 +4563,14 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.3.2 + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 + esbuild@0.27.7: optionalDependencies: '@esbuild/aix-ppc64': 0.27.7 @@ -3496,8 +4602,19 @@ snapshots: escalade@3.2.0: {} + estree-walker@2.0.2: {} + + event-target-shim@5.0.1: {} + eventemitter3@4.0.7: {} + events@3.3.0: {} + + evp_bytestokey@1.0.3: + dependencies: + md5.js: 1.3.5 + safe-buffer: 5.1.2 + fast-equals@5.4.0: {} fdir@6.5.0(picomatch@4.0.4): @@ -3506,6 +4623,15 @@ snapshots: file-saver@2.0.5: {} + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + for-each@0.3.5: + dependencies: + is-callable: 1.2.7 + framer-motion@12.38.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: motion-dom: 12.38.0 @@ -3518,12 +4644,85 @@ snapshots: fsevents@2.3.3: optional: true + function-bind@1.1.2: {} + + generator-function@2.0.1: {} + gensync@1.0.0-beta.2: {} + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.3 + math-intrinsics: 1.1.0 + get-nonce@1.0.1: {} + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + + glob-to-regex.js@1.2.0(tslib@2.8.1): + dependencies: + tslib: 2.8.1 + + gopd@1.2.0: {} + graceful-fs@4.2.11: {} + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.1 + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hash-base@3.0.5: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + + hash-base@3.1.2: + dependencies: + inherits: 2.0.4 + readable-stream: 2.3.8 + safe-buffer: 5.2.1 + to-buffer: 1.2.2 + + hash.js@1.1.7: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + + hasown@2.0.3: + dependencies: + function-bind: 1.1.2 + + hmac-drbg@1.0.1: + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + + https-browserify@1.0.0: {} + + hyperdyperid@1.2.0: {} + + ieee754@1.2.1: {} + + ignore@5.3.2: {} + immediate@3.0.6: {} inherits@2.0.4: {} @@ -3535,8 +4734,61 @@ snapshots: internmap@2.0.3: {} + is-arguments@1.2.0: + dependencies: + call-bound: 1.0.4 + has-tostringtag: 1.0.2 + + is-callable@1.2.7: {} + + is-core-module@2.16.1: + dependencies: + hasown: 2.0.3 + + is-generator-function@1.1.2: + dependencies: + call-bound: 1.0.4 + generator-function: 2.0.1 + get-proto: 1.0.1 + has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 + + is-nan@1.3.2: + dependencies: + call-bind: 1.0.9 + define-properties: 1.2.1 + + is-regex@1.2.1: + dependencies: + call-bound: 1.0.4 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + hasown: 2.0.3 + + is-typed-array@1.1.15: + dependencies: + which-typed-array: 1.1.20 + isarray@1.0.0: {} + isarray@2.0.5: {} + + isomorphic-git@1.37.5: + dependencies: + async-lock: 1.4.1 + clean-git-ref: 2.0.1 + crc-32: 1.2.2 + diff3: 0.0.3 + ignore: 5.3.2 + minimisted: 2.0.1 + pako: 1.0.11 + pify: 4.0.1 + readable-stream: 4.7.0 + sha.js: 2.4.12 + simple-get: 4.0.1 + + isomorphic-timers-promises@1.0.1: {} + jiti@2.6.1: {} js-tokens@4.0.0: {} @@ -3605,6 +4857,10 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + lodash@4.18.1: {} loose-envify@1.4.0: @@ -3625,6 +4881,48 @@ snapshots: marked@14.0.0: {} + math-intrinsics@1.1.0: {} + + md5.js@1.3.5: + dependencies: + hash-base: 3.0.5 + inherits: 2.0.4 + safe-buffer: 5.1.2 + + memfs@4.57.2(tslib@2.8.1): + dependencies: + '@jsonjoy.com/fs-core': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-fsa': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-builtins': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-to-fsa': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-node-utils': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-print': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/fs-snapshot': 4.57.2(tslib@2.8.1) + '@jsonjoy.com/json-pack': 1.21.0(tslib@2.8.1) + '@jsonjoy.com/util': 1.9.0(tslib@2.8.1) + glob-to-regex.js: 1.2.0(tslib@2.8.1) + thingies: 2.6.0(tslib@2.8.1) + tree-dump: 1.1.0(tslib@2.8.1) + tslib: 2.8.1 + + miller-rabin@4.0.1: + dependencies: + bn.js: 4.12.3 + brorand: 1.1.0 + + mimic-response@3.1.0: {} + + minimalistic-assert@1.0.1: {} + + minimalistic-crypto-utils@1.0.1: {} + + minimist@1.2.8: {} + + minimisted@2.0.1: + dependencies: + minimist: 1.2.8 + mitt@3.0.1: {} modern-screenshot@4.6.8: {} @@ -3651,14 +4949,107 @@ snapshots: node-releases@2.0.37: {} + node-stdlib-browser@1.3.1: + dependencies: + assert: 2.1.0 + browser-resolve: 2.0.0 + browserify-zlib: 0.2.0 + buffer: 5.7.1 + console-browserify: 1.2.0 + constants-browserify: 1.0.0 + create-require: 1.1.1 + crypto-browserify: 3.12.1 + domain-browser: 4.22.0 + events: 3.3.0 + https-browserify: 1.0.0 + isomorphic-timers-promises: 1.0.1 + os-browserify: 0.3.0 + path-browserify: 1.0.1 + pkg-dir: 5.0.0 + process: 0.11.10 + punycode: 1.4.1 + querystring-es3: 0.2.1 + readable-stream: 3.6.2 + stream-browserify: 3.0.0 + stream-http: 3.2.0 + string_decoder: 1.1.1 + timers-browserify: 2.0.12 + tty-browserify: 0.0.1 + url: 0.11.4 + util: 0.12.5 + vm-browserify: 1.1.2 + object-assign@4.1.1: {} + object-inspect@1.13.4: {} + + object-is@1.1.6: + dependencies: + call-bind: 1.0.9 + define-properties: 1.2.1 + + object-keys@1.1.1: {} + + object.assign@4.1.7: + dependencies: + call-bind: 1.0.9 + call-bound: 1.0.4 + define-properties: 1.2.1 + es-object-atoms: 1.1.1 + has-symbols: 1.1.0 + object-keys: 1.1.1 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + os-browserify@0.3.0: {} + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + pako@1.0.11: {} + parse-asn1@5.1.9: + dependencies: + asn1.js: 4.10.1 + browserify-aes: 1.2.0 + evp_bytestokey: 1.0.3 + pbkdf2: 3.1.5 + safe-buffer: 5.2.1 + + path-browserify@1.0.1: {} + + path-exists@4.0.0: {} + + path-parse@1.0.7: {} + + pbkdf2@3.1.5: + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.3 + safe-buffer: 5.2.1 + sha.js: 2.4.12 + to-buffer: 1.2.2 + picocolors@1.1.1: {} picomatch@4.0.4: {} + pify@4.0.1: {} + + pkg-dir@5.0.0: + dependencies: + find-up: 5.0.0 + + possible-typed-array-names@1.1.0: {} + postcss-selector-parser@6.0.10: dependencies: cssesc: 3.0.0 @@ -3672,12 +5063,40 @@ snapshots: process-nextick-args@2.0.1: {} + process@0.11.10: {} + prop-types@15.8.1: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 react-is: 16.13.1 + public-encrypt@4.0.3: + dependencies: + bn.js: 4.12.3 + browserify-rsa: 4.1.1 + create-hash: 1.2.0 + parse-asn1: 5.1.9 + randombytes: 2.1.0 + safe-buffer: 5.1.2 + + punycode@1.4.1: {} + + qs@6.15.1: + dependencies: + side-channel: 1.1.0 + + querystring-es3@0.2.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.1.2 + + randomfill@1.0.4: + dependencies: + randombytes: 2.1.0 + safe-buffer: 5.1.2 + react-day-picker@9.14.0(react@19.1.0): dependencies: '@date-fns/tz': 1.4.1 @@ -3766,6 +5185,20 @@ snapshots: string_decoder: 1.1.1 util-deprecate: 1.0.2 + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + + readable-stream@4.7.0: + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + string_decoder: 1.3.0 + recharts-scale@0.4.5: dependencies: decimal.js-light: 2.5.1 @@ -3785,6 +5218,18 @@ snapshots: regexparam@3.0.0: {} + resolve@1.22.12: + dependencies: + es-errors: 1.3.0 + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + ripemd160@2.0.3: + dependencies: + hash-base: 3.1.2 + inherits: 2.0.4 + rollup@4.60.1: dependencies: '@types/estree': 1.0.8 @@ -3818,12 +5263,71 @@ snapshots: safe-buffer@5.1.2: {} + safe-buffer@5.2.1: {} + + safe-regex-test@1.1.0: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + is-regex: 1.2.1 + scheduler@0.26.0: {} semver@6.3.1: {} + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.3.0 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + setimmediate@1.0.5: {} + sha.js@2.4.12: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + to-buffer: 1.2.2 + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + simple-concat@1.0.1: {} + + simple-get@4.0.1: + dependencies: + decompress-response: 6.0.0 + once: 1.4.0 + simple-concat: 1.0.1 + sonner@2.0.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: react: 19.1.0 @@ -3833,16 +5337,42 @@ snapshots: state-local@1.0.7: {} + stream-browserify@3.0.0: + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + + stream-http@3.2.0: + dependencies: + builtin-status-codes: 3.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + xtend: 4.0.2 + string_decoder@1.1.1: dependencies: safe-buffer: 5.1.2 + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + supports-preserve-symlinks-flag@1.0.0: {} + tailwind-merge@3.5.0: {} tailwindcss@4.2.2: {} tapable@2.3.2: {} + thingies@2.6.0(tslib@2.8.1): + dependencies: + tslib: 2.8.1 + + timers-browserify@2.0.12: + dependencies: + setimmediate: 1.0.5 + tiny-invariant@1.3.3: {} tinyglobby@0.2.16: @@ -3850,10 +5380,28 @@ snapshots: fdir: 6.5.0(picomatch@4.0.4) picomatch: 4.0.4 + to-buffer@1.2.2: + dependencies: + isarray: 2.0.5 + safe-buffer: 5.2.1 + typed-array-buffer: 1.0.3 + + tree-dump@1.1.0(tslib@2.8.1): + dependencies: + tslib: 2.8.1 + tslib@2.8.1: {} + tty-browserify@0.0.1: {} + tw-animate-css@1.4.0: {} + typed-array-buffer@1.0.3: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + is-typed-array: 1.1.15 + typescript@5.9.3: {} undici-types@7.19.2: {} @@ -3864,6 +5412,11 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + url@0.11.4: + dependencies: + punycode: 1.4.1 + qs: 6.15.1 + use-callback-ref@1.3.3(@types/react@19.2.14)(react@19.1.0): dependencies: react: 19.1.0 @@ -3885,6 +5438,14 @@ snapshots: util-deprecate@1.0.2: {} + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.2.0 + is-generator-function: 1.1.2 + is-typed-array: 1.1.15 + which-typed-array: 1.1.20 + vaul@1.1.2(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -3911,6 +5472,14 @@ snapshots: d3-time: 3.1.0 d3-timer: 3.0.1 + vite-plugin-node-polyfills@0.26.0(rollup@4.60.1)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)): + dependencies: + '@rollup/plugin-inject': 5.0.5(rollup@4.60.1) + node-stdlib-browser: 1.3.1 + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0) + transitivePeerDependencies: + - rollup + vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0): dependencies: esbuild: 0.27.7 @@ -3925,6 +5494,18 @@ snapshots: jiti: 2.6.1 lightningcss: 1.32.0 + vm-browserify@1.1.2: {} + + which-typed-array@1.1.20: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.9 + call-bound: 1.0.4 + for-each: 0.3.5 + get-proto: 1.0.1 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + wouter@3.9.0(react@19.1.0): dependencies: mitt: 3.0.1 @@ -3932,8 +5513,14 @@ snapshots: regexparam: 3.0.0 use-sync-external-store: 1.6.0(react@19.1.0) + wrappy@1.0.2: {} + + xtend@4.0.2: {} + yallist@3.1.1: {} + yocto-queue@0.1.0: {} + zod@3.25.76: {} zustand@5.0.12(@types/react@19.2.14)(react@19.1.0)(use-sync-external-store@1.6.0(react@19.1.0)): diff --git a/replit.md b/replit.md index 8fa6cc9..7cd01f9 100644 --- a/replit.md +++ b/replit.md @@ -2,15 +2,17 @@ ## Overview -Single-package React + Vite app. All code lives at the project root with one shared `node_modules`. +Single-package React + Vite app. All code lives in `html-viewer/` with its own `node_modules`. ## Stack - **Framework**: React 19 + Vite 7 - **Language**: TypeScript 5.9 -- **Package manager**: pnpm (single package, no workspace) +- **Package manager**: npm (inside html-viewer/) - **Styling**: Tailwind CSS v4 + Radix UI - **Editor**: Monaco Editor +- **Terminal**: xterm.js (@xterm/xterm + addons) +- **Layout**: react-resizable-panels (VSCode-style) - **State**: Zustand - **Routing**: Wouter @@ -22,6 +24,37 @@ Single-package React + Vite app. All code lives at the project root with one sha - `vite.config.ts` — Vite configuration - `package.json` — All dependencies +## Layout (VSCode-style, added 2026-04-19) + +The UI now uses a VSCode-inspired layout: + +- **Activity Bar** (far left, 48px): Icons for Files, Search, Source Control, Terminal toggle +- **Primary Sidebar** (collapsible, ~18%): File Explorer / Search / Git panels +- **Editor Area** (center): Tabbed panels with `react-resizable-panels` + - Split mode: Code + Preview side by side (resizable) + - Visual mode: Visual Editor + Properties (resizable) + - Single tab: any individual panel +- **Bottom Panel** (collapsible, Ctrl+`): Terminal / Timeline with maximize support +- **Status Bar** (24px blue): Branch, mode, file info, terminal toggle, AI status + +## Terminal (xterm.js, added 2026-04-19) + +- `src/components/TerminalPane.tsx` — Full xterm.js terminal with: + - Multi-tab support (add/close terminal sessions) + - PTY-mode input forwarding to WebContainer process + - Command history (ArrowUp/Down) + - Ctrl+C to kill, Ctrl+L to clear + - Quick action buttons (npm install, npm run dev, ls, etc.) + - GitHub Dark theme with colored output + - Auto-resize via ResizeObserver + FitAddon + - WebLinks addon for clickable URLs + +## File System Sync (added 2026-04-19) + +Bidirectional sync between editor store and WebContainer: +- **Editor → Container**: `App.tsx` watches `files` in Zustand; writes changed files to container FS via `writeFileToContainer()` +- **Container → Editor**: After terminal commands that mutate files (touch, mkdir, rm, cp, npm, etc.), reads file contents back via `readFileFromContainer()` and updates Zustand store + ## SEO (Added 2026-04-17) - `index.html` — full SEO meta tags: title, description, keywords, author (Jignesh D Maru), canonical, OG, Twitter Card, JSON-LD structured data, manifest/favicon links @@ -30,36 +63,42 @@ Single-package React + Vite app. All code lives at the project root with one sha - `public/favicon.svg` — Updated SVG favicon with `` icon - `public/sitemap.xml` — Updated with `/seo` route - `src/pages/SEOPage.tsx` — Comprehensive HTML & SEO tutorial page at `/seo` - - Tab 1: `` — working vs not working with live iframe preview - - Tab 2: All basic HTML tags reference - - Tab 3: CSS basics examples - - Tab 4: Image SEO (Google Images) guide - - Tab 5: Open Graph + Favicon complete guide - `src/main.tsx` — Wouter routing added (`/` = editor, `/seo` = tutorial) ## Features -- VS Code-style dark theme (amber accent) +- VSCode-style dark theme with blue accent - Monaco code editor for HTML/CSS/JS with syntax highlighting - Visual editor with element selection, move, resize, rotate -- Properties panel with full CSS editing (typography, layout, background, borders, shadows, animations) -- Timeline panel with draggable animation tracks, Play previews animations in iframe, "Apply to Page" button -- Floating + dockable window system with distinct per-window default sizes -- MenuBar dropdowns properly z-indexed above all panels (z-index: 9999) +- Properties panel with full CSS editing +- Timeline panel with animation tracks +- xterm.js terminal with WebContainer integration - Live preview panel with viewport switching - File Explorer with upload support - Export to ZIP (jszip + file-saver) -- Resizable docked panels via drag dividers +- Resizable panels via react-resizable-panels ## Key Commands -- `PORT=5000 BASE_PATH=/ pnpm run dev` — start development server -- `pnpm run build` — production build -- `pnpm run typecheck` — TypeScript typecheck +- `cd html-viewer && PORT=5000 BASE_PATH=/ npm run dev` — start development server +- `cd html-viewer && npm run build` — production build +- `cd html-viewer && npm run typecheck` — TypeScript typecheck + +## Keyboard Shortcuts + +- `Ctrl+\`` — Toggle terminal +- `Ctrl+Shift+E` — Toggle file explorer +- `Ctrl+Shift+F` — Toggle search +- `Ctrl+1` — Code layout +- `Ctrl+2` — Visual layout +- `Ctrl+3` — Split layout +- `Ctrl+R` — Refresh preview +- `Ctrl+E` — Export ZIP +- `Ctrl+S` — Save notification ## Architecture Notes -- Timeline animations stored in Zustand (`timelineAnimationStyle`) and injected into VisualEditor iframe via ``; - // Match by file.name or file.id (folder path like "styles/main.css") - const refs = [css.name, ...(css.id !== css.name ? [css.id] : [])]; - let matched = false; - for (const ref of refs) { - const linkRe = new RegExp(`]*href=["']${escRe(ref)}["'][^>]*/?>`, 'gi'); - if (linkRe.test(html)) { html = html.replace(linkRe, tag); matched = true; break; } - } - if (!matched) { - if (html.toLowerCase().includes('')) { - html = html.replace(/<\/head>/i, `${tag}\n`); - } else { html = `${tag}\n${html}`; } - } - }); - - files.filter(f => f.type === 'js').forEach(js => { - const tag = ` - -`; - -const DEFAULT_CSS = `* { box-sizing: border-box; margin: 0; padding: 0; } - -body { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; - color: #333; - line-height: 1.6; -} - -/* Header */ -.header { - display: flex; - align-items: center; - justify-content: space-between; - padding: 16px 40px; - background: #1a1a2e; - color: white; -} -.header h1 { font-size: 1.4rem; font-weight: 700; } -nav a { - color: rgba(255,255,255,0.75); - text-decoration: none; - margin-left: 24px; - font-size: 0.9rem; - transition: color 0.2s; -} -nav a:hover { color: #f0a500; } - -/* Hero */ -.hero { - display: flex; - flex-direction: column; - align-items: center; - text-align: center; - padding: 80px 40px; - background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); - color: white; - min-height: 50vh; - justify-content: center; -} -.hero h2 { - font-size: 3rem; - font-weight: 800; - margin-bottom: 16px; - background: linear-gradient(90deg, #f0a500, #e94560); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - background-clip: text; -} -.hero p { - font-size: 1.1rem; - color: rgba(255,255,255,0.75); - max-width: 560px; - margin-bottom: 36px; -} -.btn { - padding: 14px 36px; - background: #f0a500; - color: #1a1a2e; - border: none; - border-radius: 8px; - font-size: 1rem; - font-weight: 700; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; -} -.btn:hover { - transform: translateY(-2px); - box-shadow: 0 8px 24px rgba(240,165,0,0.4); -} - -/* Features */ -.features { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); - gap: 24px; - padding: 60px 40px; - background: #f8f9fa; -} -.card { - background: white; - border-radius: 12px; - padding: 28px; - box-shadow: 0 2px 12px rgba(0,0,0,0.08); - transition: transform 0.2s, box-shadow 0.2s; -} -.card:hover { - transform: translateY(-4px); - box-shadow: 0 8px 24px rgba(0,0,0,0.12); -} -.card h3 { - font-size: 1.1rem; - font-weight: 700; - margin-bottom: 10px; - color: #1a1a2e; -} -.card p { color: #666; font-size: 0.9rem; } - -/* Footer */ -.footer { - text-align: center; - padding: 24px; - background: #1a1a2e; - color: rgba(255,255,255,0.5); - font-size: 0.85rem; -} -`; - -const DEFAULT_JS = `// JavaScript is live — edits here run instantly in preview -document.addEventListener('DOMContentLoaded', () => { - console.log('Page ready!'); - - // Animate cards on scroll - const cards = document.querySelectorAll('.card'); - const observer = new IntersectionObserver((entries) => { - entries.forEach((entry, i) => { - if (entry.isIntersecting) { - setTimeout(() => { - entry.target.style.opacity = '1'; - entry.target.style.transform = 'translateY(0)'; - }, i * 100); - } - }); - }, { threshold: 0.1 }); - - cards.forEach(card => { - card.style.opacity = '0'; - card.style.transform = 'translateY(20px)'; - card.style.transition = 'opacity 0.4s ease, transform 0.4s ease'; - observer.observe(card); - }); -}); -`; - -const FILES_STORAGE_KEY = 'html-editor-files-v1'; -const FOLDERS_STORAGE_KEY = 'html-editor-folders-v1'; -const ACTIVE_FILE_KEY = 'html-editor-active-file-v1'; -const TIMELINE_STORAGE_KEY = 'html-editor-timeline-state-v1'; -const DEFAULT_TIMELINE_TRACKS: TimelineTrack[] = [ - { id: '1', element: '.hero', animation: 'fadeIn', duration: 1.2, delay: 0, color: '#e5a45a', easing: 'ease', iteration: '1' }, - { id: '2', element: 'h2', animation: 'slideUp', duration: 0.8, delay: 0.3, color: '#4ec9b0', easing: 'ease', iteration: '1' }, - { id: '3', element: '.btn', animation: 'zoom', duration: 0.5, delay: 0.8, color: '#9cdcfe', easing: 'ease', iteration: '1' }, - { id: '4', element: '.card', animation: 'fadeIn', duration: 0.6, delay: 1.0, color: '#dcdcaa', easing: 'ease', iteration: '1' }, -]; - -const DEFAULT_TIMELINE_STATE: TimelineState = { - tracks: DEFAULT_TIMELINE_TRACKS, - playing: false, - currentTime: 0, - animationsApplied: false, -}; - -/* ─── Files persistence ─── */ -const DEFAULT_FILES: FileItem[] = [ - { id: 'index.html', name: 'index.html', type: 'html', content: DEFAULT_HTML }, - { id: 'styles.css', name: 'styles.css', type: 'css', content: DEFAULT_CSS }, - { id: 'script.js', name: 'script.js', type: 'js', content: DEFAULT_JS }, -]; - -function serializeFiles(files: FileItem[]): FileItem[] { - return files.map(f => { - if (f.type === 'image' && f.url?.startsWith('blob:')) { - return { ...f, url: undefined }; - } - return f; - }); -} - -function saveFiles(files: FileItem[]) { - try { - localStorage.setItem(FILES_STORAGE_KEY, JSON.stringify(serializeFiles(files))); - } catch { /* quota exceeded — ignore */ } -} - -function loadFiles(): FileItem[] { - try { - const raw = localStorage.getItem(FILES_STORAGE_KEY); - if (!raw) return DEFAULT_FILES; - const parsed = JSON.parse(raw) as FileItem[]; - if (!Array.isArray(parsed) || parsed.length === 0) return DEFAULT_FILES; - return parsed; - } catch { - return DEFAULT_FILES; - } -} - -function saveFolders(folders: string[]) { - try { localStorage.setItem(FOLDERS_STORAGE_KEY, JSON.stringify(folders)); } catch {} -} - -function loadFolders(): string[] { - try { - const raw = localStorage.getItem(FOLDERS_STORAGE_KEY); - return raw ? (JSON.parse(raw) as string[]) : []; - } catch { return []; } -} - -function saveActiveFile(id: string | null) { - try { localStorage.setItem(ACTIVE_FILE_KEY, id ?? ''); } catch {} -} - -function loadActiveFile(files: FileItem[]): string | null { - try { - const id = localStorage.getItem(ACTIVE_FILE_KEY); - if (id && files.find(f => f.id === id)) return id; - return files[0]?.id ?? null; - } catch { - return files[0]?.id ?? null; - } -} - -function loadTimelineState(): TimelineState { - try { - const raw = localStorage.getItem(TIMELINE_STORAGE_KEY); - if (!raw) return DEFAULT_TIMELINE_STATE; - const parsed = JSON.parse(raw) as Partial; - if (!parsed || !Array.isArray(parsed.tracks)) return DEFAULT_TIMELINE_STATE; - return { - tracks: parsed.tracks, - playing: !!parsed.playing, - currentTime: typeof parsed.currentTime === 'number' ? parsed.currentTime : 0, - animationsApplied: !!parsed.animationsApplied, - }; - } catch { - return DEFAULT_TIMELINE_STATE; - } -} - -function saveTimelineState(state: TimelineState) { - try { - localStorage.setItem(TIMELINE_STORAGE_KEY, JSON.stringify(state)); - } catch { - // ignore quota/storage errors - } -} - -const _initFiles = loadFiles(); -const _initActiveFileId = loadActiveFile(_initFiles); -const _initFolders = loadFolders(); - -export const useEditorStore = create((set, get) => ({ - files: _initFiles, - activeFileId: _initActiveFileId, - - addFile: (file) => set((s) => { - const next = [...s.files, file]; - saveFiles(next); - return { files: next }; - }), - removeFile: (id) => set((s) => { - const next = s.files.filter(f => f.id !== id); - const nextActive = s.activeFileId === id ? (next.find(f => f.id !== id)?.id ?? next[0]?.id ?? null) : s.activeFileId; - saveFiles(next); - saveActiveFile(nextActive); - return { files: next, activeFileId: nextActive }; - }), - updateFileContent: (id, content) => set((s) => { - const file = s.files.find(f => f.id === id); - const isHtmlFile = file?.type === 'html'; - const isBlank = content.trim().length < 30; - let timelinePatch: Partial = {}; - if (isHtmlFile && isBlank) { - const clearedTimeline: TimelineState = { ...s.timelineState, animationsApplied: false, tracks: [], playing: false, currentTime: 0 }; - saveTimelineState(clearedTimeline); - timelinePatch = { timelineState: clearedTimeline, timelineAnimationStyle: '' }; - } - const next = s.files.map(f => f.id === id ? { ...f, content } : f); - saveFiles(next); - return { - files: next, - previewRefreshKey: s.previewRefreshKey + 1, - ...timelinePatch, - }; - }), - setActiveFile: (id) => { - saveActiveFile(id); - set({ activeFileId: id }); - }, - moveFileToFolder: (fileId, folder) => set((s) => { - const next = s.files.map(f => f.id === fileId ? { ...f, folder } : f); - saveFiles(next); - return { files: next }; - }), - - folders: _initFolders, - addFolder: (name) => set((s) => { - const next = s.folders.includes(name) ? s.folders : [...s.folders, name]; - saveFolders(next); - return { folders: next }; - }), - removeFolder: (name) => set((s) => { - const nextFolders = s.folders.filter(f => f !== name); - const nextFiles = s.files.map(f => f.folder === name ? { ...f, folder: undefined } : f); - saveFolders(nextFolders); - saveFiles(nextFiles); - return { folders: nextFolders, files: nextFiles }; - }), - renameFolder: (oldName, newName) => set((s) => { - const nextFolders = s.folders.map(f => f === oldName ? newName : f); - const nextFiles = s.files.map(f => f.folder === oldName ? { ...f, folder: newName } : f); - saveFolders(nextFolders); - saveFiles(nextFiles); - return { folders: nextFolders, files: nextFiles }; - }), - - mode: 'split', - setMode: (mode) => set({ mode }), - - selectedSelector: null, - setSelectedSelector: (selector) => set({ selectedSelector: selector }), - - selectedElement: null, - setSelectedElement: (el) => set({ selectedElement: el }), - - visualBridge: null, - setVisualBridge: (bridge) => set({ visualBridge: bridge }), - - applySelectedStyle: (property, value) => { - const bridge = get().visualBridge; - if (!bridge) return; - bridge.applyStyle(property, value); - }, - - applySelectedContent: (html) => { - const bridge = get().visualBridge; - if (!bridge) return; - bridge.applyContent(html); - }, - - animationConfig: { - preset: 'none', - trigger: 'load', - duration: '0.6s', - easing: 'ease', - delay: '0s', - iteration: '1', - direction: 'normal', - fillMode: 'forwards', - customKeyframes: '', - }, - setAnimationConfig: (config) => set((s) => ({ - animationConfig: { ...s.animationConfig, ...config } - })), - - panels: { - filePanel: true, - propertiesPanel: true, - timelinePanel: true, - devtools: false, - filesPanelWidth: 220, - propertiesPanelWidth: 268, - timelineHeight: 180, - devtoolsHeight: 220, - }, - setPanels: (panels) => set((s) => ({ panels: { ...s.panels, ...panels } })), - - consoleEntries: [], - addConsoleEntry: (entry) => set((s) => ({ - consoleEntries: [...s.consoleEntries.slice(-300), { ...entry, id: Math.random().toString(36) }], - })), - clearConsole: () => set({ consoleEntries: [] }), - - previewTabs: [{ id: 'tab-1', title: 'My Page', favicon: '', active: true, previewType: 'page' }], - activePreviewTabId: 'tab-1', - addPreviewTab: (opts) => { - const id = `tab-${Date.now()}`; - const newTab: PreviewTab = { - id, - title: opts?.title ?? 'New Tab', - favicon: '', - active: true, - previewType: opts?.previewType ?? 'page', - imageFileId: opts?.imageFileId, - }; - set((s) => ({ - previewTabs: [...s.previewTabs.map(t => ({ ...t, active: false })), newTab], - activePreviewTabId: id, - })); - }, - closePreviewTab: (id) => set((s) => { - const remaining = s.previewTabs.filter(t => t.id !== id); - if (remaining.length === 0) return s; - const wasActive = s.activePreviewTabId === id; - const newActive = wasActive ? remaining[remaining.length - 1].id : s.activePreviewTabId; - return { - previewTabs: remaining.map(t => ({ ...t, active: t.id === newActive })), - activePreviewTabId: newActive, - }; - }), - setActivePreviewTab: (id) => set((s) => ({ - previewTabs: s.previewTabs.map(t => ({ ...t, active: t.id === id })), - activePreviewTabId: id, - })), - updatePreviewTab: (id, update) => set((s) => ({ - previewTabs: s.previewTabs.map(t => t.id === id ? { ...t, ...update } : t), - })), - - notification: null, - showNotification: (msg) => { - set({ notification: msg }); - setTimeout(() => set({ notification: null }), 2800); - }, - - previewRefreshKey: 0, - refreshPreview: () => set((s) => ({ previewRefreshKey: s.previewRefreshKey + 1 })), - - timelineAnimationStyle: '', - setTimelineAnimationStyle: (css: string) => set({ timelineAnimationStyle: css }), - - timelineRestartKey: 0, - triggerTimelineRestart: () => set((s) => ({ timelineRestartKey: s.timelineRestartKey + 1 })), - - timelineState: loadTimelineState(), - setTimelineState: (update) => set((s) => { - const nextState = typeof update === 'function' ? update(s.timelineState) : { ...s.timelineState, ...update }; - saveTimelineState(nextState); - return { timelineState: nextState }; - }), - resetTimelineState: () => set(() => { - saveTimelineState(DEFAULT_TIMELINE_STATE); - return { timelineState: DEFAULT_TIMELINE_STATE }; - }), - - pendingFileDialog: null, - setPendingFileDialog: (d) => set({ pendingFileDialog: d }), -})); diff --git a/src/src/utils/export.ts b/src/src/utils/export.ts deleted file mode 100644 index 07030d8..0000000 --- a/src/src/utils/export.ts +++ /dev/null @@ -1,30 +0,0 @@ -import JSZip from 'jszip'; -import { saveAs } from 'file-saver'; -import type { FileItem } from '../store/editorStore'; - -export async function exportProject(files: FileItem[]) { - const zip = new JSZip(); - - for (const file of files) { - if (file.type === 'image' && file.url) { - // Fetch the blob for uploaded images - try { - const response = await fetch(file.url); - const blob = await response.blob(); - zip.file(file.name, blob); - } catch { - // Skip if can't fetch - } - } else if (file.content) { - zip.file(file.name, file.content); - } - } - - const blob = await zip.generateAsync({ type: 'blob' }); - saveAs(blob, 'project.zip'); -} - -export function exportSingleFile(file: FileItem) { - const blob = new Blob([file.content], { type: 'text/plain;charset=utf-8' }); - saveAs(blob, file.name); -} diff --git a/src/store/editorStore.ts b/src/store/editorStore.ts index de74622..2e8be49 100644 --- a/src/store/editorStore.ts +++ b/src/store/editorStore.ts @@ -1,15 +1,22 @@ import { create } from 'zustand'; +import { + dbSaveFiles, dbLoadFiles, dbSaveFolders, dbLoadFolders, + dbSaveMeta, dbLoadMeta, syncFilesToMemFs, writeFileToMemFs, +} from '../utils/fileSystemDB'; export interface FileItem { id: string; name: string; - type: 'html' | 'css' | 'js' | 'image' | 'other'; + type: FileType; content: string; url?: string; mimeType?: string; folder?: string; } +export type FileType = 'html' | 'css' | 'js' | 'ts' | 'tsx' | 'jsx' | 'json' | 'image' | 'other'; +export type ProjectType = 'static' | 'react' | 'node' | 'fullstack'; + export interface SelectedElement { tagName: string; id: string; @@ -61,8 +68,11 @@ export interface PreviewTab { title: string; favicon: string; active: boolean; - previewType: 'page' | 'image'; + tabType: 'static' | 'port' | 'image'; + htmlFileId?: string; + portUrl?: string; imageFileId?: string; + viewport: 'desktop' | 'tablet' | 'mobile'; } export interface TimelineTrack { @@ -86,10 +96,13 @@ export interface TimelineState { interface EditorStore { files: FileItem[]; activeFileId: string | null; + editorOpenIds: string[]; addFile: (file: FileItem) => void; removeFile: (id: string) => void; updateFileContent: (id: string, content: string) => void; setActiveFile: (id: string) => void; + openInEditor: (id: string) => void; + closeInEditor: (id: string) => void; moveFileToFolder: (fileId: string, folder: string | undefined) => void; folders: string[]; @@ -124,7 +137,14 @@ interface EditorStore { previewTabs: PreviewTab[]; activePreviewTabId: string; - addPreviewTab: (opts?: { fileId?: string; title?: string; previewType?: 'page' | 'image'; imageFileId?: string }) => void; + addPreviewTab: (opts?: { + tabType?: 'static' | 'port' | 'image'; + title?: string; + htmlFileId?: string; + portUrl?: string; + imageFileId?: string; + viewport?: 'desktop' | 'tablet' | 'mobile'; + }) => void; closePreviewTab: (id: string) => void; setActivePreviewTab: (id: string) => void; updatePreviewTab: (id: string, update: Partial) => void; @@ -142,88 +162,165 @@ interface EditorStore { triggerTimelineRestart: () => void; timelineState: TimelineState; - setTimelineState: (update: Partial | ((prev: TimelineState) => TimelineState)) => void; - resetTimelineState: () => void; + timelineStates: Record; + setTimelineState: (update: Partial | ((prev: TimelineState) => TimelineState), fileId?: string) => void; + resetTimelineState: (fileId?: string) => void; + getTimelineStateForFile: (fileId: string) => TimelineState; pendingFileDialog: { type: 'create' | 'rename'; fileId?: string } | null; setPendingFileDialog: (d: { type: 'create' | 'rename'; fileId?: string } | null) => void; + + resetFiles: (newFiles: FileItem[]) => void; + + /** Terminal bridge — TerminalPane registers these; PreviewPane/others call them */ + terminalWrite: ((text: string) => void) | null; + terminalRunCommand: ((cmd: string) => void) | null; + setTerminalWrite: (fn: ((text: string) => void) | null) => void; + setTerminalRunCommand: (fn: ((cmd: string) => void) | null) => void; + + dbReady: boolean; + initFromDb: () => Promise; } -const DEFAULT_HTML = ` +const DEFAULT_PKG = `{ + "name": "my-react-app", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite --host 0.0.0.0", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@vitejs/plugin-react": "^4.3.1", + "vite": "^5.4.2" + } +}`; + +const DEFAULT_VITE_CONFIG = `import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react()], +}) +`; + +const DEFAULT_INDEX_HTML = ` - - - - My Page - - - -
-

Welcome to HTML Editor

- -
- -
-
-

Build Amazing Websites

-

Switch to Visual mode to design your page like Photoshop — click any element to select, drag to move, use handles to resize and rotate.

- -
- -
-
-

Code Editor

-

Full Monaco editor with syntax highlighting, autocomplete, and formatting for HTML, CSS, and JS.

-
-
-

Visual Editor

-

Click any element to select it, drag to reposition, and use the properties panel to style it.

-
-
-

Live Preview

-

See your changes instantly. Export as ZIP or copy to clipboard when you're done.

-
-
-
- -
-

© 2024 My Website. Built with HTML Editor.

-
- - - -`; - -const DEFAULT_CSS = `* { box-sizing: border-box; margin: 0; padding: 0; } + + + + My React App + + +
+ + + +`; + +const DEFAULT_MAIN_JSX = `import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './App.jsx' +import './App.css' + +ReactDOM.createRoot(document.getElementById('root')).render( + + + , +) +`; + +const DEFAULT_APP_JSX = `import { useState } from 'react' +import './App.css' + +export default function App() { + const [count, setCount] = useState(0) + + return ( +
+
+
⚛ My App
+ +
+ +
+
+

Hello, React! 👋

+

+ Edit src/App.jsx and save to see changes instantly. +

+
+ + {count} + +
+
+ +
+ {[ + { icon: '⚡', title: 'Vite', desc: 'Lightning-fast dev server with instant HMR' }, + { icon: '⚛', title: 'React 18', desc: 'Modern React with hooks and concurrent rendering' }, + { icon: '🎨', title: 'Customizable', desc: 'Edit App.css to style your app your way' }, + ].map(f => ( +
+
{f.icon}
+

{f.title}

+

{f.desc}

+
+ ))} +
+
+ +
+

Built with React + Vite · Docs

+
+
+ ) +} +`; + +const DEFAULT_APP_CSS = `* { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; - color: #333; + background: #0f0f1a; + color: #e0e0e0; line-height: 1.6; } +.app { min-height: 100vh; display: flex; flex-direction: column; } + /* Header */ .header { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; - background: #1a1a2e; - color: white; + background: rgba(255, 255, 255, 0.03); + border-bottom: 1px solid rgba(255, 255, 255, 0.08); + position: sticky; + top: 0; + z-index: 10; } -.header h1 { font-size: 1.4rem; font-weight: 700; } +.logo { font-size: 1.2rem; font-weight: 700; color: #61dafb; } nav a { - color: rgba(255,255,255,0.75); + color: rgba(255, 255, 255, 0.6); text-decoration: none; - margin-left: 24px; + margin-left: 28px; font-size: 0.9rem; transition: color 0.2s; } -nav a:hover { color: #f0a500; } +nav a:hover { color: #61dafb; } /* Hero */ .hero { @@ -231,116 +328,89 @@ nav a:hover { color: #f0a500; } flex-direction: column; align-items: center; text-align: center; - padding: 80px 40px; - background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); - color: white; - min-height: 50vh; - justify-content: center; + padding: 100px 40px 80px; + background: radial-gradient(ellipse at 50% 0%, rgba(97, 218, 251, 0.08) 0%, transparent 70%); } -.hero h2 { +.hero h1 { font-size: 3rem; font-weight: 800; - margin-bottom: 16px; - background: linear-gradient(90deg, #f0a500, #e94560); + background: linear-gradient(135deg, #61dafb, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; + margin-bottom: 16px; } -.hero p { - font-size: 1.1rem; - color: rgba(255,255,255,0.75); - max-width: 560px; - margin-bottom: 36px; +.hero p { font-size: 1.1rem; color: rgba(255, 255, 255, 0.55); margin-bottom: 40px; } +.hero code { + background: rgba(97, 218, 251, 0.12); + color: #61dafb; + padding: 2px 8px; + border-radius: 4px; + font-size: 0.9em; } -.btn { - padding: 14px 36px; - background: #f0a500; - color: #1a1a2e; - border: none; - border-radius: 8px; - font-size: 1rem; - font-weight: 700; + +/* Counter */ +.counter { display: flex; align-items: center; gap: 20px; } +.counter button { + width: 44px; + height: 44px; + border-radius: 50%; + border: 2px solid rgba(97, 218, 251, 0.4); + background: rgba(97, 218, 251, 0.1); + color: #61dafb; + font-size: 1.4rem; cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; + transition: all 0.2s; +} +.counter button:hover { + background: rgba(97, 218, 251, 0.2); + border-color: #61dafb; + transform: scale(1.08); } -.btn:hover { - transform: translateY(-2px); - box-shadow: 0 8px 24px rgba(240,165,0,0.4); +.counter span { + font-size: 2.5rem; + font-weight: 700; + color: #fff; + min-width: 60px; + text-align: center; } /* Features */ .features { display: grid; - grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); - gap: 24px; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 20px; padding: 60px 40px; - background: #f8f9fa; + max-width: 860px; + margin: 0 auto; + width: 100%; } .card { - background: white; + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 28px; - box-shadow: 0 2px 12px rgba(0,0,0,0.08); - transition: transform 0.2s, box-shadow 0.2s; -} -.card:hover { - transform: translateY(-4px); - box-shadow: 0 8px 24px rgba(0,0,0,0.12); -} -.card h3 { - font-size: 1.1rem; - font-weight: 700; - margin-bottom: 10px; - color: #1a1a2e; + transition: border-color 0.2s, background 0.2s; } -.card p { color: #666; font-size: 0.9rem; } +.card:hover { border-color: rgba(97, 218, 251, 0.3); background: rgba(97, 218, 251, 0.04); } +.card-icon { font-size: 2rem; margin-bottom: 12px; } +.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: #fff; } +.card p { color: rgba(255, 255, 255, 0.5); font-size: 0.88rem; } /* Footer */ .footer { + margin-top: auto; text-align: center; padding: 24px; - background: #1a1a2e; - color: rgba(255,255,255,0.5); + color: rgba(255, 255, 255, 0.3); font-size: 0.85rem; + border-top: 1px solid rgba(255, 255, 255, 0.06); } +.footer a { color: #61dafb; text-decoration: none; } +.footer a:hover { text-decoration: underline; } `; -const DEFAULT_JS = `// JavaScript is live — edits here run instantly in preview -document.addEventListener('DOMContentLoaded', () => { - console.log('Page ready!'); - - // Animate cards on scroll - const cards = document.querySelectorAll('.card'); - const observer = new IntersectionObserver((entries) => { - entries.forEach((entry, i) => { - if (entry.isIntersecting) { - setTimeout(() => { - entry.target.style.opacity = '1'; - entry.target.style.transform = 'translateY(0)'; - }, i * 100); - } - }); - }, { threshold: 0.1 }); - - cards.forEach(card => { - card.style.opacity = '0'; - card.style.transform = 'translateY(20px)'; - card.style.transition = 'opacity 0.4s ease, transform 0.4s ease'; - observer.observe(card); - }); -}); -`; - -const FILES_STORAGE_KEY = 'html-editor-files-v1'; -const FOLDERS_STORAGE_KEY = 'html-editor-folders-v1'; -const ACTIVE_FILE_KEY = 'html-editor-active-file-v1'; -const TIMELINE_STORAGE_KEY = 'html-editor-timeline-state-v1'; -const DEFAULT_TIMELINE_TRACKS: TimelineTrack[] = [ - { id: '1', element: '.hero', animation: 'fadeIn', duration: 1.2, delay: 0, color: '#e5a45a', easing: 'ease', iteration: '1' }, - { id: '2', element: 'h2', animation: 'slideUp', duration: 0.8, delay: 0.3, color: '#4ec9b0', easing: 'ease', iteration: '1' }, - { id: '3', element: '.btn', animation: 'zoom', duration: 0.5, delay: 0.8, color: '#9cdcfe', easing: 'ease', iteration: '1' }, - { id: '4', element: '.card', animation: 'fadeIn', duration: 0.6, delay: 1.0, color: '#dcdcaa', easing: 'ease', iteration: '1' }, -]; +const DEFAULT_TIMELINE_TRACKS: TimelineTrack[] = []; const DEFAULT_TIMELINE_STATE: TimelineState = { tracks: DEFAULT_TIMELINE_TRACKS, @@ -349,11 +419,15 @@ const DEFAULT_TIMELINE_STATE: TimelineState = { animationsApplied: false, }; -/* ─── Files persistence ─── */ +const DEFAULT_FOLDERS = ['src']; + const DEFAULT_FILES: FileItem[] = [ - { id: 'index.html', name: 'index.html', type: 'html', content: DEFAULT_HTML }, - { id: 'styles.css', name: 'styles.css', type: 'css', content: DEFAULT_CSS }, - { id: 'script.js', name: 'script.js', type: 'js', content: DEFAULT_JS }, + { id: 'package.json', name: 'package.json', type: 'json', content: DEFAULT_PKG }, + { id: 'vite.config.js', name: 'vite.config.js', type: 'js', content: DEFAULT_VITE_CONFIG }, + { id: 'index.html', name: 'index.html', type: 'html', content: DEFAULT_INDEX_HTML }, + { id: 'src/main.jsx', name: 'main.jsx', type: 'jsx', content: DEFAULT_MAIN_JSX, folder: 'src' }, + { id: 'src/App.jsx', name: 'App.jsx', type: 'jsx', content: DEFAULT_APP_JSX, folder: 'src' }, + { id: 'src/App.css', name: 'App.css', type: 'css', content: DEFAULT_APP_CSS, folder: 'src' }, ]; function serializeFiles(files: FileItem[]): FileItem[] { @@ -365,94 +439,149 @@ function serializeFiles(files: FileItem[]): FileItem[] { }); } -function saveFiles(files: FileItem[]) { - try { - localStorage.setItem(FILES_STORAGE_KEY, JSON.stringify(serializeFiles(files))); - } catch { /* quota exceeded — ignore */ } -} - -function loadFiles(): FileItem[] { - try { - const raw = localStorage.getItem(FILES_STORAGE_KEY); - if (!raw) return DEFAULT_FILES; - const parsed = JSON.parse(raw) as FileItem[]; - if (!Array.isArray(parsed) || parsed.length === 0) return DEFAULT_FILES; - return parsed; - } catch { - return DEFAULT_FILES; - } +function saveFilesAsync(files: FileItem[]) { + dbSaveFiles(serializeFiles(files)).catch(() => {}); } -function saveFolders(folders: string[]) { - try { localStorage.setItem(FOLDERS_STORAGE_KEY, JSON.stringify(folders)); } catch {} +function saveFoldersAsync(folders: string[]) { + dbSaveFolders(folders).catch(() => {}); } -function loadFolders(): string[] { - try { - const raw = localStorage.getItem(FOLDERS_STORAGE_KEY); - return raw ? (JSON.parse(raw) as string[]) : []; - } catch { return []; } +function saveActiveFileAsync(id: string | null) { + dbSaveMeta('activeFileId', id ?? '').catch(() => {}); } -function saveActiveFile(id: string | null) { - try { localStorage.setItem(ACTIVE_FILE_KEY, id ?? ''); } catch {} +function saveEditorOpenIdsAsync(ids: string[]) { + dbSaveMeta('editorOpenIds', ids).catch(() => {}); } -function loadActiveFile(files: FileItem[]): string | null { - try { - const id = localStorage.getItem(ACTIVE_FILE_KEY); - if (id && files.find(f => f.id === id)) return id; - return files[0]?.id ?? null; - } catch { - return files[0]?.id ?? null; - } -} - -function loadTimelineState(): TimelineState { - try { - const raw = localStorage.getItem(TIMELINE_STORAGE_KEY); - if (!raw) return DEFAULT_TIMELINE_STATE; - const parsed = JSON.parse(raw) as Partial; - if (!parsed || !Array.isArray(parsed.tracks)) return DEFAULT_TIMELINE_STATE; - return { - tracks: parsed.tracks, - playing: !!parsed.playing, - currentTime: typeof parsed.currentTime === 'number' ? parsed.currentTime : 0, - animationsApplied: !!parsed.animationsApplied, - }; - } catch { - return DEFAULT_TIMELINE_STATE; - } +function saveTimelineStatesAsync(states: Record) { + dbSaveMeta('timelineStates', states).catch(() => {}); } -function saveTimelineState(state: TimelineState) { - try { - localStorage.setItem(TIMELINE_STORAGE_KEY, JSON.stringify(state)); - } catch { - // ignore quota/storage errors - } +function savePreviewTabsAsync(tabs: PreviewTab[], activeId: string) { + dbSaveMeta('previewTabs', tabs).catch(() => {}); + dbSaveMeta('activePreviewTabId', activeId).catch(() => {}); } -const _initFiles = loadFiles(); -const _initActiveFileId = loadActiveFile(_initFiles); -const _initFolders = loadFolders(); - export const useEditorStore = create((set, get) => ({ - files: _initFiles, - activeFileId: _initActiveFileId, + files: DEFAULT_FILES, + activeFileId: DEFAULT_FILES[0]?.id ?? null, + editorOpenIds: DEFAULT_FILES.map(f => f.id), + dbReady: false, + + initFromDb: async () => { + try { + /* ── Migrate localStorage → IndexedDB on first run ── */ + const migratedFlag = await dbLoadMeta('ls-migrated'); + if (!migratedFlag) { + try { + const lsFiles = localStorage.getItem('html-editor-files-v2') ?? localStorage.getItem('html-editor-files-v1'); + const lsFolders = localStorage.getItem('html-editor-folders-v2') ?? localStorage.getItem('html-editor-folders-v1'); + const lsActive = localStorage.getItem('html-editor-active-file-v2') ?? localStorage.getItem('html-editor-active-file-v1'); + const lsTimeline = localStorage.getItem('html-editor-timeline-state-v2') ?? localStorage.getItem('html-editor-timeline-state-v1'); + if (lsFiles) { + const parsed = JSON.parse(lsFiles); + if (Array.isArray(parsed) && parsed.length > 0) { + await dbSaveFiles(parsed); + if (lsFolders) await dbSaveFolders(JSON.parse(lsFolders)); + if (lsActive) await dbSaveMeta('activeFileId', JSON.parse(lsActive)); + if (lsTimeline) { + const tlState = JSON.parse(lsTimeline); + const activeId = lsActive ? JSON.parse(lsActive) : null; + if (activeId) await dbSaveMeta('timelineStates', { [activeId]: tlState }); + } + } + } + await dbSaveMeta('ls-migrated', true); + ['html-editor-files-v2','html-editor-files-v1','html-editor-folders-v2','html-editor-folders-v1', + 'html-editor-active-file-v2','html-editor-active-file-v1','html-editor-timeline-state-v2','html-editor-timeline-state-v1', + ].forEach(k => { try { localStorage.removeItem(k); } catch {} }); + } catch { await dbSaveMeta('ls-migrated', true); } + } + + const [dbFiles, dbFolders, dbActiveId, dbOpenIds, dbTimelineStates, dbPreviewTabs, dbActivePreviewTabId] = await Promise.all([ + dbLoadFiles(), + dbLoadFolders(), + dbLoadMeta('activeFileId'), + dbLoadMeta('editorOpenIds'), + dbLoadMeta>('timelineStates'), + dbLoadMeta('previewTabs'), + dbLoadMeta('activePreviewTabId'), + ]); + + const files = (dbFiles && dbFiles.length > 0) ? dbFiles as FileItem[] : DEFAULT_FILES; + const folders = (dbFolders && dbFolders.length > 0) ? dbFolders : DEFAULT_FOLDERS; + const activeFileId = (dbActiveId && files.find(f => f.id === dbActiveId)) ? dbActiveId : (files[0]?.id ?? null); + const editorOpenIds = (dbOpenIds && Array.isArray(dbOpenIds) && dbOpenIds.length > 0) + ? dbOpenIds.filter(id => files.find(f => f.id === id)) + : files.map(f => f.id); + const timelineStates = dbTimelineStates ?? {}; + + const DEFAULT_PREVIEW_TABS: PreviewTab[] = [ + { id: 'tab-1', title: 'Preview', favicon: '', active: true, tabType: 'static', viewport: 'desktop' }, + ]; + const restoredTabs: PreviewTab[] = (dbPreviewTabs && dbPreviewTabs.length > 0) + ? dbPreviewTabs.filter(t => t.tabType !== 'devserver') + : DEFAULT_PREVIEW_TABS; + const restoredActiveTabId = (dbActivePreviewTabId && restoredTabs.find(t => t.id === dbActivePreviewTabId)) + ? dbActivePreviewTabId + : restoredTabs[restoredTabs.length - 1]?.id ?? 'tab-1'; + const restoredTabsMarked = restoredTabs.map(t => ({ ...t, active: t.id === restoredActiveTabId })); + + syncFilesToMemFs(files); + + set({ + files, + folders, + activeFileId, + editorOpenIds, + timelineStates, + timelineState: timelineStates[activeFileId ?? ''] ?? DEFAULT_TIMELINE_STATE, + previewTabs: restoredTabsMarked, + activePreviewTabId: restoredActiveTabId, + dbReady: true, + }); + } catch (e) { + console.warn('[EditorStore] initFromDb failed:', e); + syncFilesToMemFs(DEFAULT_FILES); + set({ dbReady: true }); + } + }, addFile: (file) => set((s) => { const next = [...s.files, file]; - saveFiles(next); - return { files: next }; + const nextOpenIds = [...s.editorOpenIds, file.id]; + saveFilesAsync(next); + saveEditorOpenIdsAsync(nextOpenIds); + writeFileToMemFs(file.folder ? `${file.folder}/${file.name}` : file.name, file.content || ''); + return { files: next, editorOpenIds: nextOpenIds, activeFileId: file.id }; }), + removeFile: (id) => set((s) => { const next = s.files.filter(f => f.id !== id); - const nextActive = s.activeFileId === id ? (next.find(f => f.id !== id)?.id ?? next[0]?.id ?? null) : s.activeFileId; - saveFiles(next); - saveActiveFile(nextActive); - return { files: next, activeFileId: nextActive }; + const nextOpenIds = s.editorOpenIds.filter(oid => oid !== id); + const nextActive = s.activeFileId === id + ? (next.find(f => nextOpenIds.includes(f.id))?.id ?? next[0]?.id ?? null) + : s.activeFileId; + saveFilesAsync(next); + saveActiveFileAsync(nextActive); + saveEditorOpenIdsAsync(nextOpenIds); + return { files: next, activeFileId: nextActive, editorOpenIds: nextOpenIds }; }), + + resetFiles: (newFiles) => set(() => { + const firstId = newFiles[0]?.id ?? null; + const folders = [...new Set(newFiles.map(f => f.folder).filter(Boolean) as string[])]; + const openIds = newFiles.map(f => f.id); + saveFilesAsync(newFiles); + saveActiveFileAsync(firstId); + saveFoldersAsync(folders); + saveEditorOpenIdsAsync(openIds); + syncFilesToMemFs(newFiles); + return { files: newFiles, activeFileId: firstId, folders, editorOpenIds: openIds }; + }), + updateFileContent: (id, content) => set((s) => { const file = s.files.find(f => f.id === id); const isHtmlFile = file?.type === 'html'; @@ -460,45 +589,76 @@ export const useEditorStore = create((set, get) => ({ let timelinePatch: Partial = {}; if (isHtmlFile && isBlank) { const clearedTimeline: TimelineState = { ...s.timelineState, animationsApplied: false, tracks: [], playing: false, currentTime: 0 }; - saveTimelineState(clearedTimeline); - timelinePatch = { timelineState: clearedTimeline, timelineAnimationStyle: '' }; + const nextTimelineStates = { ...s.timelineStates, [id]: clearedTimeline }; + saveTimelineStatesAsync(nextTimelineStates); + timelinePatch = { timelineState: clearedTimeline, timelineAnimationStyle: '', timelineStates: nextTimelineStates }; } const next = s.files.map(f => f.id === id ? { ...f, content } : f); - saveFiles(next); + saveFilesAsync(next); + const path = file ? (file.folder ? `${file.folder}/${file.name}` : file.name) : id; + writeFileToMemFs(path, content); return { files: next, previewRefreshKey: s.previewRefreshKey + 1, ...timelinePatch, }; }), + setActiveFile: (id) => { - saveActiveFile(id); - set({ activeFileId: id }); + saveActiveFileAsync(id); + const s = get(); + const timelineForFile = s.timelineStates[id] ?? DEFAULT_TIMELINE_STATE; + set({ activeFileId: id, timelineState: timelineForFile }); + }, + + openInEditor: (id) => { + const s = get(); + const nextOpenIds = s.editorOpenIds.includes(id) ? s.editorOpenIds : [...s.editorOpenIds, id]; + saveActiveFileAsync(id); + saveEditorOpenIdsAsync(nextOpenIds); + const timelineForFile = s.timelineStates[id] ?? DEFAULT_TIMELINE_STATE; + set({ activeFileId: id, editorOpenIds: nextOpenIds, timelineState: timelineForFile }); + }, + + closeInEditor: (id) => { + const s = get(); + const nextOpenIds = s.editorOpenIds.filter(oid => oid !== id); + const finalOpenIds = nextOpenIds.length === 0 ? [s.files[0]?.id ?? id] : nextOpenIds; + const nextActive = s.activeFileId === id + ? (s.files.find(f => finalOpenIds.includes(f.id) && f.id !== id)?.id ?? finalOpenIds[finalOpenIds.length - 1] ?? null) + : s.activeFileId; + saveActiveFileAsync(nextActive); + saveEditorOpenIdsAsync(finalOpenIds); + set({ editorOpenIds: finalOpenIds, activeFileId: nextActive }); }, + moveFileToFolder: (fileId, folder) => set((s) => { const next = s.files.map(f => f.id === fileId ? { ...f, folder } : f); - saveFiles(next); + saveFilesAsync(next); + syncFilesToMemFs(next); return { files: next }; }), - folders: _initFolders, + folders: DEFAULT_FOLDERS, addFolder: (name) => set((s) => { const next = s.folders.includes(name) ? s.folders : [...s.folders, name]; - saveFolders(next); + saveFoldersAsync(next); return { folders: next }; }), removeFolder: (name) => set((s) => { const nextFolders = s.folders.filter(f => f !== name); const nextFiles = s.files.map(f => f.folder === name ? { ...f, folder: undefined } : f); - saveFolders(nextFolders); - saveFiles(nextFiles); + saveFoldersAsync(nextFolders); + saveFilesAsync(nextFiles); + syncFilesToMemFs(nextFiles); return { folders: nextFolders, files: nextFiles }; }), renameFolder: (oldName, newName) => set((s) => { const nextFolders = s.folders.map(f => f === oldName ? newName : f); const nextFiles = s.files.map(f => f.folder === oldName ? { ...f, folder: newName } : f); - saveFolders(nextFolders); - saveFiles(nextFiles); + saveFoldersAsync(nextFolders); + saveFilesAsync(nextFiles); + syncFilesToMemFs(nextFiles); return { folders: nextFolders, files: nextFiles }; }), @@ -559,7 +719,7 @@ export const useEditorStore = create((set, get) => ({ })), clearConsole: () => set({ consoleEntries: [] }), - previewTabs: [{ id: 'tab-1', title: 'My Page', favicon: '', active: true, previewType: 'page' }], + previewTabs: [{ id: 'tab-1', title: 'Preview', favicon: '', active: true, tabType: 'static', viewport: 'desktop' }], activePreviewTabId: 'tab-1', addPreviewTab: (opts) => { const id = `tab-${Date.now()}`; @@ -568,31 +728,37 @@ export const useEditorStore = create((set, get) => ({ title: opts?.title ?? 'New Tab', favicon: '', active: true, - previewType: opts?.previewType ?? 'page', + tabType: opts?.tabType ?? 'static', + htmlFileId: opts?.htmlFileId, + portUrl: opts?.portUrl, imageFileId: opts?.imageFileId, + viewport: opts?.viewport ?? 'desktop', }; - set((s) => ({ - previewTabs: [...s.previewTabs.map(t => ({ ...t, active: false })), newTab], - activePreviewTabId: id, - })); + set((s) => { + const nextTabs = [...s.previewTabs.map(t => ({ ...t, active: false })), newTab]; + savePreviewTabsAsync(nextTabs, id); + return { previewTabs: nextTabs, activePreviewTabId: id }; + }); }, closePreviewTab: (id) => set((s) => { const remaining = s.previewTabs.filter(t => t.id !== id); if (remaining.length === 0) return s; const wasActive = s.activePreviewTabId === id; const newActive = wasActive ? remaining[remaining.length - 1].id : s.activePreviewTabId; - return { - previewTabs: remaining.map(t => ({ ...t, active: t.id === newActive })), - activePreviewTabId: newActive, - }; + const nextTabs = remaining.map(t => ({ ...t, active: t.id === newActive })); + savePreviewTabsAsync(nextTabs, newActive); + return { previewTabs: nextTabs, activePreviewTabId: newActive }; + }), + setActivePreviewTab: (id) => set((s) => { + const nextTabs = s.previewTabs.map(t => ({ ...t, active: t.id === id })); + savePreviewTabsAsync(nextTabs, id); + return { previewTabs: nextTabs, activePreviewTabId: id }; + }), + updatePreviewTab: (id, update) => set((s) => { + const nextTabs = s.previewTabs.map(t => t.id === id ? { ...t, ...update } : t); + savePreviewTabsAsync(nextTabs, s.activePreviewTabId); + return { previewTabs: nextTabs }; }), - setActivePreviewTab: (id) => set((s) => ({ - previewTabs: s.previewTabs.map(t => ({ ...t, active: t.id === id })), - activePreviewTabId: id, - })), - updatePreviewTab: (id, update) => set((s) => ({ - previewTabs: s.previewTabs.map(t => t.id === id ? { ...t, ...update } : t), - })), notification: null, showNotification: (msg) => { @@ -609,17 +775,41 @@ export const useEditorStore = create((set, get) => ({ timelineRestartKey: 0, triggerTimelineRestart: () => set((s) => ({ timelineRestartKey: s.timelineRestartKey + 1 })), - timelineState: loadTimelineState(), - setTimelineState: (update) => set((s) => { - const nextState = typeof update === 'function' ? update(s.timelineState) : { ...s.timelineState, ...update }; - saveTimelineState(nextState); - return { timelineState: nextState }; + timelineState: DEFAULT_TIMELINE_STATE, + timelineStates: {}, + + setTimelineState: (update, fileId) => set((s) => { + const targetId = fileId ?? s.activeFileId ?? ''; + const current = s.timelineStates[targetId] ?? s.timelineState; + const nextState = typeof update === 'function' ? update(current) : { ...current, ...update }; + const nextTimelineStates = { ...s.timelineStates, [targetId]: nextState }; + saveTimelineStatesAsync(nextTimelineStates); + return { + timelineState: targetId === (s.activeFileId ?? '') ? nextState : s.timelineState, + timelineStates: nextTimelineStates, + }; }), - resetTimelineState: () => set(() => { - saveTimelineState(DEFAULT_TIMELINE_STATE); - return { timelineState: DEFAULT_TIMELINE_STATE }; + + resetTimelineState: (fileId) => set((s) => { + const targetId = fileId ?? s.activeFileId ?? ''; + const nextTimelineStates = { ...s.timelineStates, [targetId]: DEFAULT_TIMELINE_STATE }; + saveTimelineStatesAsync(nextTimelineStates); + return { + timelineState: targetId === (s.activeFileId ?? '') ? DEFAULT_TIMELINE_STATE : s.timelineState, + timelineStates: nextTimelineStates, + }; }), + getTimelineStateForFile: (fileId) => { + const s = get(); + return s.timelineStates[fileId] ?? DEFAULT_TIMELINE_STATE; + }, + pendingFileDialog: null, setPendingFileDialog: (d) => set({ pendingFileDialog: d }), + + terminalWrite: null, + terminalRunCommand: null, + setTerminalWrite: (fn) => set({ terminalWrite: fn }), + setTerminalRunCommand: (fn) => set({ terminalRunCommand: fn }), })); diff --git a/src/utils/fileSystemDB.ts b/src/utils/fileSystemDB.ts new file mode 100644 index 0000000..2e36e01 --- /dev/null +++ b/src/utils/fileSystemDB.ts @@ -0,0 +1,201 @@ +import { createFsFromVolume, Volume } from 'memfs'; + +const DB_NAME = 'html-editor-fs-v1'; +const DB_VERSION = 1; +const STORE_FILES = 'files'; +const STORE_FOLDERS = 'folders'; +const STORE_META = 'meta'; + +let _db: IDBDatabase | null = null; + +async function getDb(): Promise { + if (_db) return _db; + return new Promise((resolve, reject) => { + const req = indexedDB.open(DB_NAME, DB_VERSION); + req.onupgradeneeded = (e) => { + const db = (e.target as IDBOpenDBRequest).result; + if (!db.objectStoreNames.contains(STORE_FILES)) { + db.createObjectStore(STORE_FILES, { keyPath: 'id' }); + } + if (!db.objectStoreNames.contains(STORE_FOLDERS)) { + db.createObjectStore(STORE_FOLDERS, { keyPath: 'name' }); + } + if (!db.objectStoreNames.contains(STORE_META)) { + db.createObjectStore(STORE_META); + } + }; + req.onsuccess = () => { _db = req.result; resolve(_db!); }; + req.onerror = () => reject(req.error); + }); +} + +function tx(db: IDBDatabase, stores: string[], mode: IDBTransactionMode) { + return db.transaction(stores, mode); +} + +export async function dbSaveFiles(files: object[]): Promise { + try { + const db = await getDb(); + const t = tx(db, [STORE_FILES], 'readwrite'); + const store = t.objectStore(STORE_FILES); + store.clear(); + for (const f of files) { + store.put(f); + } + await new Promise((resolve, reject) => { + t.oncomplete = () => resolve(); + t.onerror = () => reject(t.error); + }); + } catch (e) { + console.warn('[FileSystemDB] dbSaveFiles failed:', e); + } +} + +export async function dbLoadFiles(): Promise { + try { + const db = await getDb(); + const t = tx(db, [STORE_FILES], 'readonly'); + const store = t.objectStore(STORE_FILES); + const req = store.getAll(); + return new Promise((resolve, reject) => { + req.onsuccess = () => resolve(req.result); + req.onerror = () => reject(req.error); + }); + } catch (e) { + console.warn('[FileSystemDB] dbLoadFiles failed:', e); + return null; + } +} + +export async function dbSaveFolders(folders: string[]): Promise { + try { + const db = await getDb(); + const t = tx(db, [STORE_FOLDERS], 'readwrite'); + const store = t.objectStore(STORE_FOLDERS); + store.clear(); + for (const name of folders) { + store.put({ name }); + } + await new Promise((resolve, reject) => { + t.oncomplete = () => resolve(); + t.onerror = () => reject(t.error); + }); + } catch (e) { + console.warn('[FileSystemDB] dbSaveFolders failed:', e); + } +} + +export async function dbLoadFolders(): Promise { + try { + const db = await getDb(); + const t = tx(db, [STORE_FOLDERS], 'readonly'); + const store = t.objectStore(STORE_FOLDERS); + const req = store.getAll(); + return new Promise((resolve, reject) => { + req.onsuccess = () => resolve((req.result as { name: string }[]).map(r => r.name)); + req.onerror = () => reject(req.error); + }); + } catch (e) { + console.warn('[FileSystemDB] dbLoadFolders failed:', e); + return null; + } +} + +export async function dbSaveMeta(key: string, value: unknown): Promise { + try { + const db = await getDb(); + const t = tx(db, [STORE_META], 'readwrite'); + t.objectStore(STORE_META).put(value, key); + await new Promise((resolve, reject) => { + t.oncomplete = () => resolve(); + t.onerror = () => reject(t.error); + }); + } catch (e) { + console.warn('[FileSystemDB] dbSaveMeta failed:', e); + } +} + +export async function dbLoadMeta(key: string): Promise { + try { + const db = await getDb(); + const t = tx(db, [STORE_META], 'readonly'); + const req = t.objectStore(STORE_META).get(key); + return new Promise((resolve, reject) => { + req.onsuccess = () => resolve(req.result ?? null); + req.onerror = () => reject(req.error); + }); + } catch (e) { + console.warn('[FileSystemDB] dbLoadMeta failed:', e); + return null; + } +} + +export async function dbClear(): Promise { + try { + const db = await getDb(); + const t = tx(db, [STORE_FILES, STORE_FOLDERS, STORE_META], 'readwrite'); + t.objectStore(STORE_FILES).clear(); + t.objectStore(STORE_FOLDERS).clear(); + t.objectStore(STORE_META).clear(); + await new Promise((resolve, reject) => { + t.oncomplete = () => resolve(); + t.onerror = () => reject(t.error); + }); + } catch (e) { + console.warn('[FileSystemDB] dbClear failed:', e); + } +} + +export let memVolume: Volume | null = null; +export let memFs: ReturnType | null = null; + +export function initMemFs(): void { + memVolume = new Volume(); + memFs = createFsFromVolume(memVolume); +} + +export function syncFilesToMemFs(files: { id: string; name: string; folder?: string; content: string; type: string }[]): void { + if (!memFs || !memVolume) return; + try { + memVolume.reset(); + const dirs = new Set(); + for (const f of files) { + const dir = f.folder ? `/${f.folder}` : '/'; + dirs.add(dir); + } + for (const dir of dirs) { + try { memFs!.mkdirSync(dir, { recursive: true }); } catch {} + } + for (const f of files) { + if (f.type === 'image') continue; + const path = f.folder ? `/${f.folder}/${f.name}` : `/${f.name}`; + try { memFs!.writeFileSync(path, f.content || ''); } catch {} + } + } catch (e) { + console.warn('[FileSystemDB] syncFilesToMemFs failed:', e); + } +} + +export function readFileFromMemFs(path: string): string | null { + if (!memFs) return null; + try { + const p = path.startsWith('/') ? path : `/${path}`; + return memFs.readFileSync(p, 'utf8') as string; + } catch { + return null; + } +} + +export function writeFileToMemFs(path: string, content: string): void { + if (!memFs) return; + try { + const p = path.startsWith('/') ? path : `/${path}`; + const dir = p.substring(0, p.lastIndexOf('/')) || '/'; + try { memFs.mkdirSync(dir, { recursive: true }); } catch {} + memFs.writeFileSync(p, content); + } catch (e) { + console.warn('[FileSystemDB] writeFileToMemFs failed:', e); + } +} + +initMemFs(); diff --git a/src/utils/fileTypes.ts b/src/utils/fileTypes.ts new file mode 100644 index 0000000..402b511 --- /dev/null +++ b/src/utils/fileTypes.ts @@ -0,0 +1,89 @@ +import type { FileItem, FileType, ProjectType } from '../store/editorStore'; + +export const TEXT_EXTENSIONS = ['html', 'htm', 'css', 'scss', 'sass', 'less', 'js', 'mjs', 'cjs', 'ts', 'tsx', 'jsx', 'json', 'txt', 'md', 'markdown', 'svg', 'vue', 'svelte'] as const; +export const IMAGE_EXTENSIONS = ['png', 'jpg', 'jpeg', 'gif', 'svg', 'webp', 'ico'] as const; + +export function getExtension(name: string) { + return name.split('.').pop()?.toLowerCase() || ''; +} + +export function getFileTypeForName(name: string): FileType { + const ext = getExtension(name); + if (ext === 'html' || ext === 'htm') return 'html'; + if (ext === 'css' || ext === 'scss' || ext === 'sass' || ext === 'less') return 'css'; + if (ext === 'js' || ext === 'mjs' || ext === 'cjs') return 'js'; + if (ext === 'ts') return 'ts'; + if (ext === 'tsx') return 'tsx'; + if (ext === 'jsx') return 'jsx'; + if (ext === 'json') return 'json'; + if ((IMAGE_EXTENSIONS as readonly string[]).includes(ext)) return 'image'; + return 'other'; +} + +export function isTextExtension(name: string) { + return (TEXT_EXTENSIONS as readonly string[]).includes(getExtension(name)); +} + +export function isImageExtension(name: string) { + return (IMAGE_EXTENSIONS as readonly string[]).includes(getExtension(name)); +} + +export function isScriptFile(file: FileItem) { + return file.type === 'js' || file.type === 'ts' || file.type === 'tsx' || file.type === 'jsx'; +} + +export function isRuntimeSourceFile(file: FileItem) { + return ['html', 'css', 'js', 'ts', 'tsx', 'jsx', 'json'].includes(file.type); +} + +export function getMonacoLanguage(file: { name: string; type: string }) { + const ext = getExtension(file.name); + const byExt: Record = { + html: 'html', htm: 'html', css: 'css', scss: 'scss', sass: 'sass', + less: 'less', js: 'javascript', jsx: 'javascript', mjs: 'javascript', + cjs: 'javascript', ts: 'typescript', tsx: 'typescript', json: 'json', + md: 'markdown', markdown: 'markdown', py: 'python', rb: 'ruby', + php: 'php', java: 'java', c: 'c', h: 'c', cpp: 'cpp', cc: 'cpp', + cxx: 'cpp', cs: 'csharp', go: 'go', rs: 'rust', swift: 'swift', + kt: 'kotlin', kts: 'kotlin', sql: 'sql', sh: 'shell', bash: 'shell', + zsh: 'shell', yml: 'yaml', yaml: 'yaml', xml: 'xml', svg: 'xml', + vue: 'html', svelte: 'html', txt: 'plaintext', + }; + const byType: Record = { + html: 'html', css: 'css', js: 'javascript', ts: 'typescript', + tsx: 'typescript', jsx: 'javascript', json: 'json', other: 'plaintext', + }; + return byExt[ext] || byType[file.type] || 'plaintext'; +} + +export function detectProjectType(files: FileItem[]): ProjectType { + const packageFile = files.find(f => f.name === 'package.json' || f.id.endsWith('/package.json')); + const hasHtml = files.some(f => f.type === 'html'); + const hasReactSource = files.some(f => f.type === 'tsx' || f.type === 'jsx' || /from\s+['"]react['"]|import\s+React/.test(f.content)); + const hasServerSource = files.some(f => /(^|\/)(server|api|index)\.(js|ts)$/.test(f.id) && /(express|fastify|createServer|listen\()/.test(f.content)); + + if (packageFile) { + try { + const pkg = JSON.parse(packageFile.content || '{}'); + const deps = { ...(pkg.dependencies || {}), ...(pkg.devDependencies || {}) }; + const scripts = pkg.scripts || {}; + const hasReact = Boolean(deps.react || deps['@vitejs/plugin-react'] || String(scripts.dev || '').includes('vite')); + const hasNode = Boolean(deps.express || deps.fastify || hasServerSource || String(scripts.start || '').includes('node')); + if (hasReact && hasNode) return 'fullstack'; + if (hasReact || hasReactSource) return 'react'; + if (hasNode) return 'node'; + } catch {} + } + + if (hasReactSource) return 'react'; + if (hasServerSource) return 'node'; + if (hasHtml) return 'static'; + return 'static'; +} + +export function projectTypeLabel(projectType: ProjectType) { + return projectType === 'static' ? 'Static HTML' + : projectType === 'react' ? 'React/Vite' + : projectType === 'node' ? 'Node' + : 'Fullstack'; +} \ No newline at end of file diff --git a/src/utils/gitService.ts b/src/utils/gitService.ts new file mode 100644 index 0000000..04c42a7 --- /dev/null +++ b/src/utils/gitService.ts @@ -0,0 +1,416 @@ +/** + * Git service using isomorphic-git + memfs + * Provides browser-based git operations for the HTML editor + */ + +import * as git from 'isomorphic-git'; +import http from 'isomorphic-git/http/web'; +import { Volume } from 'memfs'; +import type { FileItem } from '../store/editorStore'; + +/* ── Filesystem setup ── */ +const vol = new Volume(); + +// Node-like fs adapter that isomorphic-git expects +const fs = { + promises: { + readFile: (path: string, opts?: any) => vol.promises.readFile(path, opts), + writeFile: (path: string, data: any, opts?: any) => vol.promises.writeFile(path, data, opts), + unlink: (path: string) => vol.promises.unlink(path), + readdir: (path: string, opts?: any) => vol.promises.readdir(path, opts), + mkdir: (path: string, opts?: any) => vol.promises.mkdir(path, opts), + rmdir: (path: string) => vol.promises.rmdir(path), + stat: (path: string, opts?: any) => vol.promises.stat(path, opts), + lstat: (path: string, opts?: any) => vol.promises.lstat(path, opts), + readlink: (path: string, opts?: any) => (vol.promises as any).readlink(path, opts), + symlink: (target: string, path: string) => (vol.promises as any).symlink(target, path), + chmod: (_path: string, _mode: any) => Promise.resolve(), + }, +}; + +/* ── State ── */ +let currentDir = '/repo'; +let isInitialized = false; +let currentBranch = 'main'; +let remoteUrl = ''; + +export interface GitStatus { + staged: GitFileStatus[]; + unstaged: GitFileStatus[]; + untracked: GitFileStatus[]; + branch: string; + remoteUrl: string; + ahead: number; + behind: number; +} + +export interface GitFileStatus { + path: string; + status: 'modified' | 'added' | 'deleted' | 'renamed'; + staged: boolean; +} + +export interface GitCommit { + oid: string; + message: string; + author: string; + email: string; + date: Date; + shortOid: string; +} + +export interface GitDiff { + path: string; + hunks: DiffHunk[]; +} + +export interface DiffHunk { + header: string; + lines: DiffLine[]; +} + +export interface DiffLine { + type: 'added' | 'removed' | 'context'; + content: string; + lineNum: number; +} + +/* ── Helpers ── */ +async function ensureDir(path: string) { + const parts = path.split('/').filter(Boolean); + let current = ''; + for (const part of parts) { + current += '/' + part; + try { await vol.promises.mkdir(current); } catch {} + } +} + +async function writeFilesFromEditor(files: FileItem[]) { + for (const file of files) { + if (file.type === 'image') continue; + const path = file.folder + ? `${currentDir}/${file.folder}/${file.name}` + : `${currentDir}/${file.name}`; + const dir = path.substring(0, path.lastIndexOf('/')); + await ensureDir(dir); + await vol.promises.writeFile(path, file.content || ''); + } +} + +/* ── Initialize ── */ +export async function initGit(files: FileItem[]): Promise { + try { + await ensureDir(currentDir); + await writeFilesFromEditor(files); + + // Check if already a git repo + try { + await vol.promises.stat(`${currentDir}/.git`); + isInitialized = true; + currentBranch = await git.currentBranch({ fs, dir: currentDir }) || 'main'; + return; + } catch {} + + await git.init({ fs, dir: currentDir, defaultBranch: 'main' }); + + // Set user config + await git.setConfig({ fs, dir: currentDir, path: 'user.name', value: 'HTML Editor User' }); + await git.setConfig({ fs, dir: currentDir, path: 'user.email', value: 'user@htmleditor.dev' }); + + isInitialized = true; + currentBranch = 'main'; + } catch (e) { + console.error('Git init failed:', e); + } +} + +/* ── Sync files from editor to git FS ── */ +export async function syncFilesToGit(files: FileItem[]): Promise { + if (!isInitialized) return; + await writeFilesFromEditor(files); +} + +/* ── Get status ── */ +export async function getStatus(): Promise { + if (!isInitialized) { + return { staged: [], unstaged: [], untracked: [], branch: currentBranch, remoteUrl, ahead: 0, behind: 0 }; + } + + try { + const statusMatrix = await git.statusMatrix({ fs, dir: currentDir }); + const staged: GitFileStatus[] = []; + const unstaged: GitFileStatus[] = []; + const untracked: GitFileStatus[] = []; + + for (const [filepath, head, workdir, index] of statusMatrix) { + if (filepath === '.git') continue; + // head=0 workdir=1 index=1 → newly added and staged + // head=0 workdir=2 index=0 → untracked + // head=1 workdir=2 index=1 → modified (unstaged) + // head=1 workdir=2 index=2 → modified (staged) + // head=1 workdir=0 index=1 → deleted (unstaged) + // head=1 workdir=0 index=0 → deleted (staged) + + if (head === 0 && workdir === 2 && index === 0) { + untracked.push({ path: filepath, status: 'added', staged: false }); + } else if (head === 0 && workdir > 0 && index > 0) { + staged.push({ path: filepath, status: 'added', staged: true }); + } else if (head === 1 && workdir === 2 && index === 1) { + unstaged.push({ path: filepath, status: 'modified', staged: false }); + } else if (head === 1 && workdir === 2 && index === 2) { + staged.push({ path: filepath, status: 'modified', staged: true }); + } else if (head === 1 && workdir === 0 && index === 1) { + unstaged.push({ path: filepath, status: 'deleted', staged: false }); + } else if (head === 1 && workdir === 0 && index === 0) { + staged.push({ path: filepath, status: 'deleted', staged: true }); + } + } + + currentBranch = await git.currentBranch({ fs, dir: currentDir }) || 'main'; + return { staged, unstaged, untracked, branch: currentBranch, remoteUrl, ahead: 0, behind: 0 }; + } catch { + return { staged: [], unstaged: [], untracked: [], branch: currentBranch, remoteUrl, ahead: 0, behind: 0 }; + } +} + +/* ── Stage file ── */ +export async function stageFile(filepath: string): Promise { + if (!isInitialized) return; + try { + await git.add({ fs, dir: currentDir, filepath }); + } catch (e) { + console.error('Stage failed:', e); + } +} + +/* ── Unstage file ── */ +export async function unstageFile(filepath: string): Promise { + if (!isInitialized) return; + try { + await git.resetIndex({ fs, dir: currentDir, filepath }); + } catch (e) { + console.error('Unstage failed:', e); + } +} + +/* ── Stage all ── */ +export async function stageAll(files: FileItem[]): Promise { + if (!isInitialized) return; + await writeFilesFromEditor(files); + try { + await git.add({ fs, dir: currentDir, filepath: '.' }); + } catch (e) { + console.error('Stage all failed:', e); + } +} + +/* ── Commit ── */ +export async function commit(message: string): Promise { + if (!isInitialized) throw new Error('Git not initialized'); + const oid = await git.commit({ + fs, + dir: currentDir, + message: message.trim(), + author: { name: 'HTML Editor User', email: 'user@htmleditor.dev' }, + }); + return oid; +} + +/* ── Log ── */ +export async function getLog(depth = 20): Promise { + if (!isInitialized) return []; + try { + const commits = await git.log({ fs, dir: currentDir, depth }); + return commits.map(c => ({ + oid: c.oid, + shortOid: c.oid.slice(0, 7), + message: c.commit.message.trim(), + author: c.commit.author.name, + email: c.commit.author.email, + date: new Date(c.commit.author.timestamp * 1000), + })); + } catch { + return []; + } +} + +/* ── Branch operations ── */ +export async function getBranches(): Promise { + if (!isInitialized) return [currentBranch]; + try { + const branches = await git.listBranches({ fs, dir: currentDir }); + return branches; + } catch { + return [currentBranch]; + } +} + +export async function createBranch(name: string): Promise { + if (!isInitialized) return; + await git.branch({ fs, dir: currentDir, ref: name, checkout: true }); + currentBranch = name; +} + +export async function checkoutBranch(name: string): Promise { + if (!isInitialized) return; + await git.checkout({ fs, dir: currentDir, ref: name }); + currentBranch = name; +} + +/* ── Clone via GitHub API (with rate-limit fix using raw.githubusercontent.com) ── */ +export async function cloneFromGitHub( + owner: string, + repo: string, + onProgress: (msg: string, done: number, total: number) => void +): Promise { + // Step 1: Get repo info & default branch + onProgress('Fetching repository info…', 0, 100); + const infoRes = await fetch(`https://api.github.com/repos/${owner}/${repo}`); + if (!infoRes.ok) { + if (infoRes.status === 404) throw new Error('Repository not found. Make sure it is public.'); + if (infoRes.status === 403) throw new Error('GitHub API rate limit hit. Try again in a minute.'); + throw new Error(`GitHub error: ${infoRes.status}`); + } + const info = await infoRes.json() as { default_branch: string }; + const branch = info.default_branch; + + // Step 2: Get file tree + onProgress(`Fetching file tree (branch: ${branch})…`, 5, 100); + const treeRes = await fetch(`https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}?recursive=1`); + if (!treeRes.ok) throw new Error(`Could not fetch file tree (${treeRes.status})`); + const tree = await treeRes.json() as { tree: { path: string; type: string; size?: number }[]; truncated: boolean }; + + const BINARY_EXTS = new Set(['png','jpg','jpeg','gif','webp','ico','bmp','woff','woff2','ttf','eot','otf','zip','tar','gz','pdf','mp4','mp3','wav']); + const blobs = tree.tree.filter(f => { + if (f.type !== 'blob') return false; + const ext = f.path.split('.').pop()?.toLowerCase() ?? ''; + if (BINARY_EXTS.has(ext)) return false; + if (f.size && f.size > 300_000) return false; + return true; + }).slice(0, 100); + + // Step 3: Fetch file contents via raw.githubusercontent.com (no rate limit!) + const fetchedFiles: FileItem[] = []; + const BATCH = 10; // fetch 10 at a time + + for (let i = 0; i < blobs.length; i += BATCH) { + const batch = blobs.slice(i, i + BATCH); + onProgress(`Downloading files ${i + 1}–${Math.min(i + BATCH, blobs.length)}/${blobs.length}…`, i, blobs.length); + + const results = await Promise.allSettled( + batch.map(async blob => { + // Use raw.githubusercontent.com — no API rate limits! + const rawUrl = `https://raw.githubusercontent.com/${owner}/${repo}/${branch}/${blob.path}`; + const res = await fetch(rawUrl); + if (!res.ok) return null; + const content = await res.text(); + const name = blob.path.split('/').pop() ?? blob.path; + const folder = blob.path.includes('/') ? blob.path.split('/').slice(0, -1).join('/') : undefined; + const ext = name.split('.').pop()?.toLowerCase() ?? ''; + const type = ext === 'html' || ext === 'htm' ? 'html' + : ext === 'css' ? 'css' + : ext === 'js' || ext === 'mjs' ? 'js' + : ext === 'ts' ? 'ts' : ext === 'tsx' ? 'tsx' : ext === 'jsx' ? 'jsx' + : ext === 'json' ? 'json' : 'other'; + return { id: blob.path, name, type, content, folder } as FileItem; + }) + ); + + for (const r of results) { + if (r.status === 'fulfilled' && r.value) fetchedFiles.push(r.value); + } + } + + if (fetchedFiles.length === 0) throw new Error('No readable text files found in this repository.'); + onProgress(`Done! ${fetchedFiles.length} files loaded.`, blobs.length, blobs.length); + + // Initialize git in the cloned project + try { + remoteUrl = `https://github.com/${owner}/${repo}.git`; + await ensureDir(currentDir); + // Reset vol for fresh clone + await git.init({ fs, dir: currentDir, defaultBranch: branch }); + await git.setConfig({ fs, dir: currentDir, path: 'user.name', value: 'HTML Editor User' }); + await git.setConfig({ fs, dir: currentDir, path: 'user.email', value: 'user@htmleditor.dev' }); + await writeFilesFromEditor(fetchedFiles); + await git.add({ fs, dir: currentDir, filepath: '.' }); + await git.commit({ + fs, dir: currentDir, + message: `Initial clone from ${owner}/${repo}`, + author: { name: 'HTML Editor User', email: 'user@htmleditor.dev' }, + }); + currentBranch = branch; + isInitialized = true; + } catch (e) { + console.warn('Git init after clone failed:', e); + } + + return fetchedFiles; +} + +/* ── Get diff for a file ── */ +export async function getFileDiff(filepath: string, content: string): Promise { + if (!isInitialized) return []; + try { + let oldContent = ''; + try { + const oid = await git.resolveRef({ fs, dir: currentDir, ref: 'HEAD' }); + const { blob } = await git.readBlob({ fs, dir: currentDir, oid, filepath }); + oldContent = new TextDecoder().decode(blob); + } catch { + oldContent = ''; + } + + return computeDiff(oldContent, content); + } catch { + return []; + } +} + +function computeDiff(oldText: string, newText: string): DiffHunk[] { + const oldLines = oldText.split('\n'); + const newLines = newText.split('\n'); + + // Simple line-by-line diff + const hunks: DiffHunk[] = []; + let hunkLines: DiffLine[] = []; + let i = 0, j = 0; + let lineNum = 1; + + while (i < oldLines.length || j < newLines.length) { + const o = oldLines[i]; + const n = newLines[j]; + + if (o === n) { + if (hunkLines.length > 0) { + hunkLines.push({ type: 'context', content: n, lineNum }); + } + i++; j++; lineNum++; + } else if (o !== undefined && n === undefined) { + hunkLines.push({ type: 'removed', content: o, lineNum }); + i++; lineNum++; + } else if (o === undefined && n !== undefined) { + hunkLines.push({ type: 'added', content: n, lineNum }); + j++; lineNum++; + } else { + hunkLines.push({ type: 'removed', content: o, lineNum }); + hunkLines.push({ type: 'added', content: n, lineNum }); + i++; j++; lineNum++; + } + + if (hunkLines.length > 200) break; + } + + if (hunkLines.length > 0) { + hunks.push({ header: `@@ Changes @@`, lines: hunkLines }); + } + + return hunks; +} + +/* ── Export state ── */ +export function getGitDir() { return currentDir; } +export function getRemoteUrl() { return remoteUrl; } +export function setRemoteUrl(url: string) { remoteUrl = url; } +export function getIsInitialized() { return isInitialized; } +export function getCurrentBranch() { return currentBranch; } diff --git a/src/utils/previewEngine.ts b/src/utils/previewEngine.ts new file mode 100644 index 0000000..d20b859 --- /dev/null +++ b/src/utils/previewEngine.ts @@ -0,0 +1,278 @@ +import type { FileItem, ProjectType } from '../store/editorStore'; +import { detectProjectType, isScriptFile } from './fileTypes'; + +/** + * Returns true if a file is a build-tool config or lock file that should NEVER + * be injected into a browser preview (they contain Node.js / bundler syntax). + */ +const CONFIG_FILE_RE = /^(vite|webpack|rollup|parcel|esbuild|babel|jest|vitest|karma|mocha|playwright|cypress|postcss|tailwind|stylelint|eslint|prettier|tsup|turbo|nx|svelte\.config|nuxt\.config|next\.config|astro\.config|remix\.config|wrangler)\b.*\.(config|setup)\.(js|ts|mjs|cjs)$/i; +const LOCK_FILE_RE = /^(package-lock\.json|yarn\.lock|pnpm-lock\.yaml|bun\.lockb)$/; + +function isBrowserInjectable(file: FileItem): boolean { + return !CONFIG_FILE_RE.test(file.name) && !LOCK_FILE_RE.test(file.name); +} + +export type PreviewFrame = + | { mode: 'srcdoc'; value: string; projectType: ProjectType; runtimeLabel: string; url: string; error?: string } + | { mode: 'url'; value: string; projectType: ProjectType; runtimeLabel: string; url: string; error?: string }; + +export interface BuildPreviewOptions { + timelineAnimationStyle?: string; + editorCss?: string; + includeBridge?: boolean; + fallbackHtml?: string; + htmlFileId?: string; +} + +function escRe(value: string) { + return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +function injectBefore(html: string, closingTag: 'head' | 'body', injection: string) { + const re = new RegExp(``, 'i'); + if (re.test(html)) return html.replace(re, `${injection}\n`); + return closingTag === 'head' ? `${injection}\n${html}` : `${html}\n${injection}`; +} + +export function buildPreviewBridgeScript() { + return `'); + } + + if ((projectType === 'react' || projectType === 'fullstack') && !firstExisting(files, ['src/main.tsx', 'src/main.jsx', 'src/main.ts', 'src/main.js'])) { + addTreeFile(tree, 'src/main.jsx', createFallbackReactMain(files)); + } + + if (projectType === 'node' && !firstExisting(files, ['index.js', 'index.ts', 'server.js', 'server.ts'])) { + addTreeFile(tree, 'index.js', 'import { createServer } from "node:http";\n\ncreateServer((req, res) => {\n res.setHeader("content-type", "text/html;charset=utf-8");\n res.end("

Node runtime ready

Add index.js or server.js to run your app.

");\n}).listen(3000, "0.0.0.0");\n'); + } + + return tree; +} + +function getCommand(projectType: ProjectType, files: FileItem[]) { + const pkg = readPackage(files) ?? synthesizePackage(projectType, files); + const scripts = pkg?.scripts ?? {}; + if (scripts.dev) return { command: 'npm run dev', cmd: 'npm', args: ['run', 'dev'] }; + if (scripts.start) return { command: 'npm start', cmd: 'npm', args: ['start'] }; + if (projectType === 'node') return { command: 'node index.js', cmd: 'node', args: ['index.js'] }; + return { command: 'npm run dev', cmd: 'npm', args: ['run', 'dev'] }; +} + +function streamProcess(process: WebContainerProcess, callbacks: RuntimeCallbacks) { + process.output.pipeTo(new WritableStream({ + write(data) { + callbacks.onConsole?.('info', String(data)); + }, + })).catch(() => {}); +} + +async function getContainer(callbacks: RuntimeCallbacks) { + if (!('SharedArrayBuffer' in window) || !window.crossOriginIsolated) { + throw new Error('WebContainer needs browser cross-origin isolation. Dev headers are configured, but this preview frame/browser is not isolated yet.'); + } + if (!bootPromise) { + callbacks.onStatus?.('booting', 'Booting WebContainer runtime…'); + bootPromise = import('@webcontainer/api').then(({ WebContainer }) => WebContainer.boot({ coep: 'credentialless' })); + } + container = await bootPromise; + return container; +} + +export async function stopWebContainerRuntime() { + activeRun += 1; + if (runningProcess) { + runningProcess.kill(); + runningProcess = null; + } +} + +/** Get the WebContainer instance (boots if needed) */ +export async function getWebContainer(): Promise { + return getContainer({}); +} + +/** Returns true if a WebContainer is already booted */ +export function isContainerBooted(): boolean { + return container !== null; +} + +/** Spawn an arbitrary command in the WebContainer with xterm PTY support */ +export async function spawnInContainer( + cmd: string, + args: string[], + onData: (data: string) => void, + options?: { cols?: number; rows?: number } +): Promise<{ exit: Promise; kill: () => void; write: (data: string) => void; resize: (dims: { cols: number; rows: number }) => void }> { + const wc = await getContainer({}); + const proc = await wc.spawn(cmd, args, { + terminal: options ? { cols: options.cols || 80, rows: options.rows || 24 } : undefined, + }); + proc.output.pipeTo(new WritableStream({ write(d) { onData(String(d)); } })).catch(() => {}); + + let writer: WritableStreamDefaultWriter | null = null; + const getWriter = () => { + if (!writer && proc.input) { + try { writer = proc.input.getWriter(); } catch {} + } + return writer; + }; + + return { + exit: proc.exit, + kill: () => { try { writer?.releaseLock(); } catch {} writer = null; proc.kill(); }, + write: (data: string) => { + const w = getWriter(); + if (w) w.write(data).catch(() => {}); + }, + resize: (dims: { cols: number; rows: number }) => { + try { (proc as any).resize?.(dims); } catch {} + }, + }; +} + +/** Mount current project files to the container */ +export async function mountFilesToContainer(files: FileItem[], projectType: ProjectType) { + const wc = await getContainer({}); + await wc.mount(createTree(files, projectType)); +} + +/** Write a single file to the container FS */ +export async function writeFileToContainer(path: string, content: string) { + if (!container) return; + try { + await container.fs.writeFile(path, content); + } catch { + // Container may not have the directory yet — try to create it + const parts = path.split('/'); + if (parts.length > 1) { + const dir = parts.slice(0, -1).join('/'); + try { await container.fs.mkdir(dir, { recursive: true }); } catch {} + await container.fs.writeFile(path, content); + } + } +} + +/** Read a file from the container FS */ +export async function readFileFromContainer(path: string): Promise { + if (!container) return null; + try { + const data = await container.fs.readFile(path, 'utf-8'); + return String(data); + } catch { + return null; + } +} + +/** List directory contents from container FS */ +export async function listDirFromContainer(path: string): Promise { + if (!container) return []; + try { + const entries = await container.fs.readdir(path, { withFileTypes: true }); + return entries.map((e: any) => (e.isDirectory ? `${e.name}/` : e.name)); + } catch { + return []; + } +} + +/** Sync container FS files back to the editor store (file content only) */ +export async function syncContainerFilesToStore( + filePaths: string[], + onUpdate: (path: string, content: string) => void +) { + if (!container) return; + for (const path of filePaths) { + try { + const content = await container.fs.readFile(path, 'utf-8'); + if (content !== null && content !== undefined) { + onUpdate(path, String(content)); + } + } catch { + // file may not exist in container + } + } +} + +export interface ScanResult { + /** All folder paths found (relative to root), e.g. "src", "node_modules" */ + folders: string[]; + /** All text files found (excluding contents of blacklisted dirs) */ + files: { path: string; content: string }[]; + /** Heavy/virtual dirs that exist but whose contents were not traversed */ + heavyDirs: string[]; +} + +const HEAVY_DIRS = new Set(['node_modules', '.git', 'dist', '.cache', '.next', 'build', '.vite', '__pycache__']); +const TEXT_EXTS = new Set(['js','jsx','ts','tsx','json','html','css','scss','sass','less','md','txt','env','yaml','yml','sh','py','rb','php','go','rs','toml','xml','svg']); +const MAX_DEPTH = 6; +const MAX_FILES = 300; + +/** + * Recursively scans the WebContainer file system. + * - Skips contents of heavy dirs (node_modules, .git, dist, …) but records they exist + * - Returns flat lists of folder paths and file { path, content } objects + */ +export async function fullScanContainerFS(): Promise { + if (!container) return { folders: [], files: [], heavyDirs: [] }; + + const result: ScanResult = { folders: [], files: [], heavyDirs: [] }; + let fileCount = 0; + + async function walk(dir: string, depth: number) { + if (depth > MAX_DEPTH || fileCount >= MAX_FILES) return; + let entries: any[]; + try { + entries = await container!.fs.readdir(dir, { withFileTypes: true }); + } catch { + return; + } + + for (const entry of entries) { + const rel = dir === '/' ? entry.name : `${dir}/${entry.name}`.replace(/^\/+/, ''); + + if (entry.isDirectory()) { + if (HEAVY_DIRS.has(entry.name)) { + result.heavyDirs.push(rel); + result.folders.push(rel); + } else { + result.folders.push(rel); + await walk(`/${rel}`, depth + 1); + } + } else { + const ext = entry.name.split('.').pop()?.toLowerCase() ?? ''; + if (!TEXT_EXTS.has(ext)) continue; + try { + const content = await container!.fs.readFile(`/${rel}`, 'utf-8'); + result.files.push({ path: rel, content: String(content) }); + fileCount++; + } catch { + // unreadable — skip + } + } + } + } + + await walk('/', 0); + return result; +} + +export async function startWebContainerPreview(files: FileItem[], projectType: ProjectType, callbacks: RuntimeCallbacks = {}): Promise { + const runId = ++activeRun; + const command = getCommand(projectType, files); + + callbacks.onStatus?.('booting', 'Preparing browser runtime…'); + const wc = await getContainer(callbacks); + if (runId !== activeRun) throw new Error('Runtime start was cancelled.'); + + if (runningProcess) { + runningProcess.kill(); + runningProcess = null; + } + + callbacks.onStatus?.('mounting', 'Mounting project files…'); + await wc.mount(createTree(files, projectType)); + if (runId !== activeRun) throw new Error('Runtime start was cancelled.'); + + const pkg = readPackage(files) ?? synthesizePackage(projectType, files); + const signature = JSON.stringify({ + dependencies: pkg?.dependencies ?? {}, + devDependencies: pkg?.devDependencies ?? {}, + }); + + if (signature !== installSignature || !installSignature) { + callbacks.onStatus?.('installing', 'Installing project dependencies…'); + const install = await wc.spawn('npm', ['install']); + streamProcess(install, callbacks); + const installCode = await install.exit; + if (installCode !== 0) throw new Error(`npm install failed with exit code ${installCode}.`); + installSignature = signature; + } + + callbacks.onStatus?.('starting', `Starting ${command.command}…`); + + const readyUrl = new Promise((resolve, reject) => { + const timeout = window.setTimeout(() => reject(new Error('Runtime started, but no preview server became ready within 25 seconds.')), 25000); + const off = wc.on('server-ready', (_port: number, url: string) => { + window.clearTimeout(timeout); + off(); + resolve(url); + }); + }); + + runningProcess = await wc.spawn(command.cmd, command.args); + streamProcess(runningProcess, callbacks); + + const url = await readyUrl; + if (runId !== activeRun) throw new Error('Runtime start was cancelled.'); + callbacks.onStatus?.('ready', `Runtime ready at ${url}`); + return { url, command: command.command, runtimeLabel: 'WebContainer' }; +} diff --git a/vite.config.ts b/vite.config.ts index 1d721bc..6c30af4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,7 +2,8 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import tailwindcss from "@tailwindcss/vite"; import path from "path"; -import runtimeErrorOverlay from "@replit/vite-plugin-runtime-error-modal"; + +import { nodePolyfills } from "vite-plugin-node-polyfills"; const port = Number(process.env.PORT) || 5000; const isProduction = process.env.NODE_ENV === "production"; @@ -21,9 +22,16 @@ export default defineConfig(async () => { return { base: "/", plugins: [ + nodePolyfills({ + include: ["buffer", "path", "stream", "util", "events", "process"], + globals: { + Buffer: true, + global: true, + process: true, + }, + }), react(), tailwindcss(), - runtimeErrorOverlay(), ...extraPlugins, ], resolve: { @@ -42,6 +50,7 @@ export default defineConfig(async () => { reportCompressedSize: true, chunkSizeWarningLimit: 1000, rollupOptions: { + external: (id: string) => id.startsWith("@webcontainer/api"), output: { manualChunks: { "vendor-react": ["react", "react-dom"], @@ -68,6 +77,10 @@ export default defineConfig(async () => { port, host: "0.0.0.0", allowedHosts: true, + headers: { + "Cross-Origin-Opener-Policy": "same-origin", + "Cross-Origin-Embedder-Policy": "credentialless", + }, fs: { strict: true, deny: ["**/.*"], @@ -79,14 +92,16 @@ export default defineConfig(async () => { allowedHosts: true, headers: { "Cache-Control": "public, max-age=31536000, immutable", + "Cross-Origin-Opener-Policy": "same-origin", + "Cross-Origin-Embedder-Policy": "credentialless", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", "Referrer-Policy": "strict-origin-when-cross-origin", }, }, optimizeDeps: { - include: ["react", "react-dom", "zustand", "framer-motion"], - exclude: ["@monaco-editor/react"], + include: ["react", "react-dom", "zustand", "framer-motion", "buffer"], + exclude: ["@monaco-editor/react", "@webcontainer/api"], }, }; });