fix: workover of the monaco update

This commit is contained in:
hugo committed 2026-07-02 14:14:31 +02:00
1 parent ef6c970654
commit c07ba9a4d8
27 files changed
+69080 -245379

No files matched your search

+3 -2
View File
@@ -158,8 +158,9 @@ mix assets.build
## Monaco Editor ## Monaco Editor
Monaco is bundled via esbuild using its ESM entry point (`monaco-editor/esm/vs/editor/editor.api.js`). The Monaco is bundled via esbuild using its ESM entry point (`monaco-editor/esm/vs/editor/editor.main.js`). The
bundle is built as part of `mix assets.build` and lives at `priv/static/assets/monaco.js` and `monaco.css`. main bundle is built as part of `mix assets.build` and lives at `priv/static/assets/monaco.js` and
`monaco.css`; ESM worker bundles live under `priv/static/assets/monaco/`.
```bash ```bash
mix monaco.version # show current monaco-editor version mix monaco.version # show current monaco-editor version
-35
View File
@@ -1,35 +0,0 @@
// App-wide error reporter — catches JS errors and displays them as an overlay.
// Enables debugging in WKWebView where devtools are unavailable.
(function () {
const overlay = document.createElement("div");
overlay.id = "error-reporter";
overlay.style.cssText =
"position:fixed;bottom:0;left:0;right:0;max-height:200px;overflow:auto;background:#1a1a2e;color:#f0f0f0;font:12px monospace;padding:8px 12px;border-top:2px solid #e74c3c;z-index:99999;display:none;";
overlay.innerHTML = '<strong style="color:#e74c3c">⚠ JS Errors</strong><pre id="error-reporter-log"></pre>';
document.body.appendChild(overlay);
const log = document.getElementById("error-reporter-log");
const append = (msg) => {
overlay.style.display = "block";
log.textContent += msg + "\n";
overlay.scrollTop = overlay.scrollHeight;
};
window.addEventListener("error", (e) => {
const src = e.filename || "";
const loc = e.lineno !== undefined ? `:${e.lineno}` : "";
append(`[${new Date().toLocaleTimeString()}] ${e.message || e.error}\n at ${src}${loc}`);
});
window.addEventListener("unhandledrejection", (e) => {
append(`[${new Date().toLocaleTimeString()}] Unhandled rejection: ${e.reason}`);
});
// Also wrap console.error to catch Monaco errors
const origError = console.error;
console.error = (...args) => {
origError.apply(console, args);
append(`[${new Date().toLocaleTimeString()}] ${args.join(" ")}`);
};
})();
+44
View File
@@ -4,7 +4,51 @@ import { registerLiquidLanguage, registerMarkdownWithMacrosLanguage } from "./la
let monacoLoaderPromise; let monacoLoaderPromise;
const monacoEditors = new Map(); const monacoEditors = new Map();
const monacoWorkerUrls = {
editor: "/assets/monaco/editor.worker.js",
css: "/assets/monaco/css.worker.js",
html: "/assets/monaco/html.worker.js",
json: "/assets/monaco/json.worker.js",
ts: "/assets/monaco/ts.worker.js"
};
const workerNameForLanguage = (label) => {
switch (label) {
case "css":
case "scss":
case "less":
return "css";
case "html":
case "handlebars":
case "razor":
return "html";
case "json":
return "json";
case "typescript":
case "javascript":
return "ts";
default:
return "editor";
}
};
const ensureMonacoEnvironment = () => {
if (globalThis.MonacoEnvironment?.getWorker) {
return;
}
globalThis.MonacoEnvironment = {
...globalThis.MonacoEnvironment,
getWorker(_workerId, label) {
const workerName = workerNameForLanguage(label);
return new Worker(monacoWorkerUrls[workerName], { name: label, type: "module" });
}
};
};
export const loadMonaco = () => { export const loadMonaco = () => {
ensureMonacoEnvironment();
if (window.monaco?.editor) { if (window.monaco?.editor) {
ensureMonacoTheme(window.monaco); ensureMonacoTheme(window.monaco);
registerLiquidLanguage(window.monaco); registerLiquidLanguage(window.monaco);
+1
View File
@@ -0,0 +1 @@
import "monaco-editor/esm/vs/language/css/css.worker.js";
@@ -0,0 +1 @@
import "monaco-editor/esm/vs/editor/editor.worker.js";
+1
View File
@@ -0,0 +1 @@
import "monaco-editor/esm/vs/language/html/html.worker.js";
+1
View File
@@ -0,0 +1 @@
import "monaco-editor/esm/vs/language/json/json.worker.js";
+1
View File
@@ -0,0 +1 @@
import "monaco-editor/esm/vs/language/typescript/ts.worker.js";
+16
View File
@@ -67,6 +67,22 @@ config :esbuild,
--loader:.ttf=dataurl --loader:.ttf=dataurl
), ),
env: %{"NODE_PATH" => Path.expand("../node_modules", __DIR__)} env: %{"NODE_PATH" => Path.expand("../node_modules", __DIR__)}
],
monaco_workers: [
cd: Path.expand("../assets", __DIR__),
args: ~w(
js/monaco_workers/editor.worker.js
js/monaco_workers/css.worker.js
js/monaco_workers/html.worker.js
js/monaco_workers/json.worker.js
js/monaco_workers/ts.worker.js
--bundle
--target=es2022
--format=esm
--outdir=../priv/static/assets/monaco
--loader:.ttf=dataurl
),
env: %{"NODE_PATH" => Path.expand("../node_modules", __DIR__)}
] ]
config :bds, :scripting, config :bds, :scripting,
+1 -1
View File
@@ -17,7 +17,7 @@ defmodule BDS.Desktop.Endpoint do
plug(Plug.Static, plug(Plug.Static,
at: "/assets", at: "/assets",
from: {:bds, "priv/static/assets"}, from: {:bds, "priv/static/assets"},
only: ["app.css", "app.js", "monaco.css", "monaco.js"] only: ["app.css", "app.js", "monaco.css", "monaco.js", "monaco"]
) )
plug(BDS.Desktop.Router) plug(BDS.Desktop.Router)
+16 -9
View File
@@ -9,8 +9,8 @@ defmodule Mix.Tasks.Monaco.Update do
This task: This task:
1. Runs `npm install monaco-editor@<version> --save-dev` 1. Runs `npm install monaco-editor@<version> --save-dev`
2. Removes the old `priv/static/assets/monaco.js` and `monaco.css` 2. Removes the old Monaco bundle assets
3. Rebuilds the Monaco bundle via esbuild (both dev and minified) 3. Rebuilds the Monaco main and worker bundles via esbuild (both dev and minified)
Use `mix monaco.version` to check the result. Use `mix monaco.version` to check the result.
@@ -27,14 +27,14 @@ defmodule Mix.Tasks.Monaco.Update do
Mix.shell().error("Missing version argument.") Mix.shell().error("Missing version argument.")
Mix.shell().info("Usage: mix monaco.update <version>") Mix.shell().info("Usage: mix monaco.update <version>")
Mix.shell().info("Example: mix monaco.update 0.55.1") Mix.shell().info("Example: mix monaco.update 0.55.1")
System.at_exit(fn _ -> System.halt(1) end) Mix.raise("missing Monaco version argument")
[version] -> [version] ->
do_update(version) do_update(version)
_ -> _ ->
Mix.shell().error("Too many arguments. Usage: mix monaco.update <version>") Mix.shell().error("Too many arguments. Usage: mix monaco.update <version>")
System.at_exit(fn _ -> System.halt(1) end) Mix.raise("too many arguments for mix monaco.update")
end end
end end
@@ -49,24 +49,31 @@ defmodule Mix.Tasks.Monaco.Update do
# 2. Clean old bundle # 2. Clean old bundle
monaco_js = Path.join(File.cwd!(), "priv/static/assets/monaco.js") monaco_js = Path.join(File.cwd!(), "priv/static/assets/monaco.js")
monaco_css = Path.join(File.cwd!(), "priv/static/assets/monaco.css") monaco_css = Path.join(File.cwd!(), "priv/static/assets/monaco.css")
monaco_workers = Path.join(File.cwd!(), "priv/static/assets/monaco")
for path <- [monaco_js, monaco_css] do for path <- [monaco_js, monaco_css, monaco_workers] do
if File.exists?(path) do if File.exists?(path) do
File.rm!(path) File.rm_rf!(path)
end end
end end
Mix.shell().info("Removed old monaco.js and monaco.css") Mix.shell().info("Removed old Monaco bundle assets")
# 3. Rebuild via esbuild (dev + minified) # 3. Rebuild via esbuild (dev + minified)
Mix.Task.run("esbuild", ["monaco"]) run_esbuild(["monaco"])
Mix.Task.run("esbuild", ["monaco", "--minify"]) run_esbuild(["monaco_workers"])
run_esbuild(["monaco", "--minify"])
run_esbuild(["monaco_workers", "--minify"])
# 4. Verify # 4. Verify
new = current_version() new = current_version()
Mix.shell().info("monaco-editor is now at #{new}") Mix.shell().info("monaco-editor is now at #{new}")
end end
defp run_esbuild(args) do
Mix.Task.run("esbuild", args)
end
defp current_version do defp current_version do
lock = Path.join(File.cwd!(), "package-lock.json") lock = Path.join(File.cwd!(), "package-lock.json")
+5 -4
View File
@@ -6,8 +6,9 @@ defmodule Mix.Tasks.Monaco.Version do
mix monaco.version mix monaco.version
Reads the version from package-lock.json. The Monaco bundle lives at Reads the version from package-lock.json. The Monaco main bundle lives at
`priv/static/assets/monaco.js` and is built via `mix esbuild monaco`. `priv/static/assets/monaco.js`; worker bundles live under
`priv/static/assets/monaco/`.
""" """
use Mix.Task use Mix.Task
@@ -30,12 +31,12 @@ defmodule Mix.Tasks.Monaco.Version do
v when is_binary(v) -> Mix.shell().info("monaco-editor: #{v}") v when is_binary(v) -> Mix.shell().info("monaco-editor: #{v}")
nil -> nil ->
Mix.shell().error("Could not find monaco-editor in package-lock.json") Mix.shell().error("Could not find monaco-editor in package-lock.json")
System.at_exit(fn _ -> System.halt(1) end) Mix.raise("could not find monaco-editor in package-lock.json")
end end
{:error, reason} -> {:error, reason} ->
Mix.shell().error("package-lock.json not found: #{reason}") Mix.shell().error("package-lock.json not found: #{reason}")
System.at_exit(fn _ -> System.halt(1) end) Mix.raise("package-lock.json not found: #{reason}")
end end
end end
end end
+7 -2
View File
@@ -66,8 +66,13 @@ defmodule BDS.MixProject do
"ecto.setup": ["ecto.create", "ecto.migrate"], "ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.reset": ["ecto.drop", "ecto.setup"], "ecto.reset": ["ecto.drop", "ecto.setup"],
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"], "assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
"assets.build": ["tailwind default", "esbuild default", "esbuild monaco"], "assets.build": ["tailwind default", "esbuild default", "esbuild monaco", "esbuild monaco_workers"],
"assets.deploy": ["tailwind default --minify", "esbuild default --minify", "esbuild monaco"], "assets.deploy": [
"tailwind default --minify",
"esbuild default --minify",
"esbuild monaco --minify",
"esbuild monaco_workers --minify"
],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"], test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
validate: ["test", "credo --strict", "deps.audit --ignore-file .mix_audit.ignore", "dialyzer"] validate: ["test", "credo --strict", "deps.audit --ignore-file .mix_audit.ignore", "dialyzer"]
] ]
+39
View File
@@ -8821,7 +8821,46 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
// js/monaco/services.js // js/monaco/services.js
var monacoLoaderPromise; var monacoLoaderPromise;
var monacoEditors = /* @__PURE__ */ new Map(); var monacoEditors = /* @__PURE__ */ new Map();
var monacoWorkerUrls = {
editor: "/assets/monaco/editor.worker.js",
css: "/assets/monaco/css.worker.js",
html: "/assets/monaco/html.worker.js",
json: "/assets/monaco/json.worker.js",
ts: "/assets/monaco/ts.worker.js"
};
var workerNameForLanguage = (label) => {
switch (label) {
case "css":
case "scss":
case "less":
return "css";
case "html":
case "handlebars":
case "razor":
return "html";
case "json":
return "json";
case "typescript":
case "javascript":
return "ts";
default:
return "editor";
}
};
var ensureMonacoEnvironment = () => {
if (globalThis.MonacoEnvironment?.getWorker) {
return;
}
globalThis.MonacoEnvironment = {
...globalThis.MonacoEnvironment,
getWorker(_workerId, label) {
const workerName = workerNameForLanguage(label);
return new Worker(monacoWorkerUrls[workerName], { name: label, type: "module" });
}
};
};
var loadMonaco = () => { var loadMonaco = () => {
ensureMonacoEnvironment();
if (window.monaco?.editor) { if (window.monaco?.editor) {
ensureMonacoTheme(window.monaco); ensureMonacoTheme(window.monaco);
registerLiquidLanguage(window.monaco); registerLiquidLanguage(window.monaco);
File diff suppressed because it is too large. Load diff
+369 -239540
View File
File diff suppressed because it is too large. Load diff
+93
View File
@@ -0,0 +1,93 @@
var ao=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ar.isErrorNoTelemetry(e)?new ar(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)}},Xu=new ao;function Gt(t){Ku(t)||Xu.onUnexpectedError(t)}function ei(t){if(t instanceof Error){let{name:e,message:n,cause:r}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:ar.isErrorNoTelemetry(t),cause:r?ei(r):void 0,code:t.code}}return t}var lo="Canceled";function Ku(t){return t instanceof or?!0:t instanceof Error&&t.name===lo&&t.message===lo}var or=class extends Error{constructor(){super(lo),this.name=this.message}};var ar=class t extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t)return e;let n=new t;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},ce=class t extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}};function Sl(t,e="Unreachable"){throw new Error(e)}function co(t,e="unexpected state"){if(!t)throw typeof e=="string"?new ce(`Assertion Failed: ${e}`):e}function Ct(t){if(!t()){debugger;t(),Gt(new ce("Assertion Failed"))}}function lr(t,e){let n=0;for(;n<t.length-1;){let r=t[n],i=t[n+1];if(!e(r,i))return!1;n++}return!0}function Cl(t){return typeof t=="string"}function _l(t){return!!t&&typeof t[Symbol.iterator]=="function"}var wn;(function(t){function e(N){return!!N&&typeof N=="object"&&typeof N[Symbol.iterator]=="function"}t.is=e;let n=Object.freeze([]);function r(){return n}t.empty=r;function*i(N){yield N}t.single=i;function s(N){return e(N)?N:i(N)}t.wrap=s;function o(N){return N||n}t.from=o;function*a(N){for(let R=N.length-1;R>=0;R--)yield N[R]}t.reverse=a;function l(N){return!N||N[Symbol.iterator]().next().done===!0}t.isEmpty=l;function c(N){return N[Symbol.iterator]().next().value}t.first=c;function d(N,R){let z=0;for(let $ of N)if(R($,z++))return!0;return!1}t.some=d;function u(N,R){let z=0;for(let $ of N)if(!R($,z++))return!1;return!0}t.every=u;function m(N,R){for(let z of N)if(R(z))return z}t.find=m;function*f(N,R){for(let z of N)R(z)&&(yield z)}t.filter=f;function*g(N,R){let z=0;for(let $ of N)yield R($,z++)}t.map=g;function*w(N,R){let z=0;for(let $ of N)yield*R($,z++)}t.flatMap=w;function*_(...N){for(let R of N)_l(R)?yield*R:yield R}t.concat=_;function F(N,R,z){let $=z;for(let L of N)$=R($,L);return $}t.reduce=F;function I(N){let R=0;for(let z of N)R++;return R}t.length=I;function*k(N,R,z=N.length){for(R<-N.length&&(R=0),R<0&&(R+=N.length),z<0?z+=N.length:z>N.length&&(z=N.length);R<z;R++)yield N[R]}t.slice=k;function T(N,R=Number.POSITIVE_INFINITY){let z=[];if(R===0)return[z,N];let $=N[Symbol.iterator]();for(let L=0;L<R;L++){let x=$.next();if(x.done)return[z,t.empty()];z.push(x.value)}return[z,{[Symbol.iterator](){return $}}]}t.consume=T;async function W(N){let R=[];for await(let z of N)R.push(z);return R}t.asyncToArray=W;async function V(N){let R=[];for await(let z of N)R=R.concat(z);return R}t.asyncToArrayFlat=V})(wn||(wn={}));function uo(t){if(wn.is(t)){let e=[];for(let n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function kl(...t){return _t(()=>uo(t))}var ho=class{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 _t(t){return new ho(t)}var Jt=class t{static{this.DISABLE_DISPOSED_WARNING=!1}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{uo(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===Te.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?t.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()}}},Te=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new Jt,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)}};var ae=class t{static{this.Undefined=new t(void 0)}constructor(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}},cr=class{constructor(){this._first=ae.Undefined,this._last=ae.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ae.Undefined}clear(){let e=this._first;f Line truncated
`).slice(2).join(`
`))}},go=class extends Error{constructor(e,n){super(e),this.name="ListenerLeakError",this.stack=n}},bo=class extends Error{constructor(e,n){super(e),this.name="ListenerRefusalError",this.stack=n}},hr=class{constructor(e){this.value=e}},Zu=2,Ce=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new mo(e?.onListenerError??Gt,this._options?.leakWarningThreshold??Yu):void 0,this._perfMon=this._options?._profName?new po(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new bo(`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Gt)(c),Te.None}if(this._disposed)return Te.None;n&&(e=e.bind(n));let i=new hr(e),s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=fo.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof hr?(this._deliveryQueue??=new wo,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++;let o=_t(()=>{s?.(),this._removeListener(i)});return r instanceof Jt?r.add(o):Array.isArray(r)&&r.push(o),o},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}let 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;let i=this._deliveryQueue.current===this;if(this._size*Zu<=n.length){let s=0;for(let o=0;o<n.length;o++)n[o]?n[s++]=n[o]:i&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=s}}_deliver(e,n){if(!e)return;let r=this._options?.onListenerError||Gt;if(!r){e.value(n);return}try{e.value(n)}catch(i){r(i)}}_deliverQueue(e){let n=e.current._listeners;for(;e.i<e.end;)this._deliver(n[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof hr)this._deliver(this._listeners,e);else{let n=this._deliveryQueue;n.enqueue(this,e,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}};var wo=class{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 El(){return globalThis._VSCODE_NLS_MESSAGES}function ni(){return globalThis._VSCODE_NLS_LANGUAGE}var ep=ni()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Fl(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{let s=i[0],o=e[s],a=r;return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(a=String(o)),a}),ep&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function j(t,e,...n){return Fl(typeof t=="number"?tp(t,e):e,n)}function tp(t,e){let n=El()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}var Xt="en",si=!1,oi=!1,ii=!1,np=!1,Il=!1,rp=!1,ip=!1,ri,vo=Xt,Rl=Xt,sp,it,st=globalThis,Fe;typeof st.vscode<"u"&&typeof st.vscode.process<"u"?Fe=st.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Fe=process);var op=typeof Fe?.versions?.electron=="string",ap=op&&Fe?.type==="renderer";if(typeof Fe=="object"){si=Fe.platform==="win32",oi=Fe.platform==="darwin",ii=Fe.platform==="linux",ii&&Fe.env.SNAP&&Fe.env.SNAP_REVISION,Fe.env.CI||Fe.env.BUILD_ARTIFACTSTAGINGDIRECTORY||Fe.env.GITHUB_WORKSPACE,ri=Xt,vo=Xt;let t=Fe.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t);ri=e.userLocale,Rl=e.osLocale,vo=e.resolvedLanguage||Xt,sp=e.languagePack?.translationsConfigFile}catch{}np=!0}else typeof navigator=="object"&&!ap?(it=navigator.userAgent,si=it.indexOf("Windows")>=0,oi=it.indexOf("Macintosh")>=0,rp=(it.indexOf("Macintosh")>=0||it.indexOf("iPad")>=0||it.indexOf("i Line truncated
`||t===" "}var Dt=class{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}},Mi=class{constructor(e,n){this.lineRangeMapping=e,this.changes=n}};function Dh(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;r<i;r++)if(!n(t[r],e[r]))return!1;return!0}function*Lh(t,e){let n,r;for(let i of t)r!==void 0&&e(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function Mh(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function Ah(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function zh(t,e){for(let n of e)t.push(n)}var Xo;(function(t){function e(s){return s<0}t.isLessThan=e;function n(s){return s<=0}t.isLessThanOrEqual=n;function r(s){return s>0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(Xo||(Xo={}));function Lt(t,e){return(n,r)=>e(t(n),t(r))}var en=(t,e)=>t-e;function Ph(t){return(e,n)=>-t(e,n)}var Nh=class t{static{this.empty=new t(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new t(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new t(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||Xo.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}};var ee=class t{static fromTo(e,n){return new t(e,n)}static addRange(e,n){let r=0;for(;r<n.length&&n[r].endExclusive<e.start;)r++;let i=r;for(;i<n.length&&n[i].start<=e.endExclusive;)i++;if(r===i)n.splice(r,0,e);else{let s=Math.min(e.start,n[r].start),o=Math.max(e.endExclusive,n[i-1].endExclusive);n.splice(r,i-r,new t(s,o))}}static tryCreate(e,n){if(!(e>n))return new t(e,n)}static ofLength(e){return new t(0,e)}static ofStartAndLength(e,n){return new t(e,e+n)}static emptyAt(e){return new t(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new ce(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new t(this.start+e,this.endExclusive+e)}deltaStart(e){return new t(this.start+e,this.endExclusive)}deltaEnd(e){return new t(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<this.endExclusive}join(e){return new t(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){let n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);if(n<=r)return new t(n,r)}intersectionLength(e){let n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,r-n)}intersects(e){let n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<r}intersectsOrTouches(e){let n=Math.max(this.start,e.start),r=Math.min(this.endExclusive,e.endExclusive);return n<=r}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=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 ce(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new ce(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;n<this.endExclusive;n++)e(n)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new ce(`Invalid join: ${this.toString()} and ${e.toString()}`);return new t(this.start,e.endExclusive)}};function lt(t,e){let n=ct(t,e);return n===-1?void 0:t[n]}function ct(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){let o=Math.floor((i+s)/2);e(t[o])?i=o+1:s=o}return i-1}function Th(t,e){let n=Ai(t,e);return n===t.length?void 0:t[n]}function Ai(t,e,n=0,r=t.length){let i=n,s=r;for(;i<s;){let o=Math.floor((i+s)/2);e(t[o])?s=o:i=o+1}return i}var vr=class t{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(t.assertInvariants){if(this._prevFindLastPredicate){for(let r of this._array)if(this._prevFindLastPredicate(r)&&!e(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}let n=ct(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};var Z=class t{static ofLength(e,n){return new t(e,e+n)}static fromRange(e){return new t(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new t(e.startLineNumber,e.endLineNumber+1)}static{this.compareByStart=Lt(e=>e.startLineNumber,en)}static joinMany(e){if(e.le Line truncated
`?(n++,r=0):r++;return new t(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 t(this.lineCount,this.columnCount+e.columnCount):new t(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new U(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new U(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new U(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Z.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new Q(e.lineNumber,e.column+this.columnCount):new Q(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};var Ko=class{getOffsetRange(e){return new ee(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return U.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new kn.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new kn.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){let n=e.replacements.map(r=>this.getTextReplacement(r));return new kn.deps.TextEdit(n)}},kn=class{static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};var zi=class extends Ko{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<e.length;n++)e.charAt(n)===`
`&&(this.lineStartOffsetByLineIdx.push(n+1),n>0&&e.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){let n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new Q(1,1);let n=this.textLength.lineCount+1;if(e.lineNumber>n){let i=this.getLineLength(n);return new Q(n,i+1)}if(e.column<1)return new Q(e.lineNumber,1);let r=this.getLineLength(e.lineNumber);return e.column-1>r?new Q(e.lineNumber,r+1):e}getPosition(e){let n=ct(this.lineStartOffsetByLineIdx,s=>s<=e),r=n+1,i=e-this.lineStartOffsetByLineIdx[n]+1;return new Q(r,i)}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new kn.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}};var Qo=class{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new Q(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 U(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new zi(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new U(e,1,e,Number.MAX_SAFE_INTEGER))}},Yo=class extends Qo{constructor(e,n){co(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<e.endLineNumber;r++)n+=`
`+this._getLineContent(r);return n+=`
`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),n}getLineLength(e){return this._getLineContent(e).length}get length(){let e=this._getLineContent(this._lineCount);return new nn(this._lineCount-1,e.length)}},rn=class extends Yo{constructor(e){super(n=>e[n-1],e.length)}};var Pi=class t{static joinReplacements(e,n){if(e.length===0)throw new ce;if(e.length===1)return e[0];let r=e[0].range.getStartPosition(),i=e[e.length-1].range.getEndPosition(),s="";for(let o=0;o<e.length;o++){let a=e[o];if(s+=a.text,o<e.length-1){let l=e[o+1],c=U.fromPositions(a.range.getEndPosition(),l.range.getStartPosition()),d=n.getValueOfRange(c);s+=d}}return new t(U.fromPositions(r,i),s)}static fromStringReplacement(e,n){return new t(n.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new t(e,"")}constructor(e,n){this.range=e,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,n){return e.range.equalsRange(n.range)&&e.text===n.text}equals(e){return t.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){let n=e.getValueOfRange(this.range).replaceAll(`\r
`,`
`),r=this.text.replaceAll(`\r
`,`
`),i=Ol(n,r),s=nn.ofText(n.substring(0,i)).addToPosition(this.range.getStartPosition()),o=r.substring(i),a=U.fromPositions(s,this.range.getEndPosition());return new t(a,o)}removeCommonSuffix(e){let n=e.getValueOfRange(this.range).replaceAll(`\r
`,`
`),r=this.text.replaceAll(`\r
`,`
`),i=Wl(n,r),s=nn.ofText(n.substring(0,n.length-i)).addToPosition(this.range.getStartPosition()),o=r.substring(0,r.length-i),a=U.fromPositions(this.range.getStartPosition(),s);return new t(a,o)}toString(){let e=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}};var He=class t{static inverse(e,n,r){let i=[],s=1,o=1;for(let l of e){let c=new t(new Z(s,l.original.startLineNumber),new Z(o,l.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=l.original.endLineNumberExclusive,o=l.modified.endLineNumberExclusive}let a=new t(new Z(s,n+1),new Z(o,r+1));return a.modified.isEmpty||i.push(a),i}static clip(e,n,r){let i=[];for(let s of e){let o=s.original.intersect(n),a=s.modified.intersect(r);o&&!o.isEmpty&&a&&!a.isEmpty&&i.push(new t(o,a))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new t(this.modified,this.original)}join(e){return new t(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){let e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new Ne(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new ce("not a valid diff");return new Ne(new U(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new U(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ne(new U(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new U(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(Oh(this.original.endLineNumberExclusive,e)&&Oh(this.modified.endLineNumberExclusive,n))return new Ne(new U(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new U(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ne(U.fromPositions(new Q(this.original.startLineNumber,1),En(new Q(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),U.fromPositions(new Q(this.modified.startLineNumber,1),En(new Q(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ne(U.fromPositions(En(new Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),En(new Q(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),U.fromPositions(En(new Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),En(new Q(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new ce}};function En(t,e){if(t.lineNumber<1)return new Q(1,1);if(t.lineNumber>e.length)return new Q(e.length,e[e.length-1].length+1);let n=e[t.lineNumber-1];return t.column>n.length+1?new Q(t.lineNumber,n.length+1):t}function Oh(t,e){return t>=1&&t<=e.length}var ht=class t extends He{static fromRangeMappings(e){let n=Z.join(e.map(i=>Z.fromRangeInclusive(i.originalRange))),r=Z.join(e.map(i=>Z.fromRangeInclusive(i.modifiedRange)));return new t(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new t(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new t(this.original,this.modified,[this.toRangeMapping()])}},Ne=class t{static fromEdit(e){let n=e.getNewRanges();return e.replacements.map((i,s)=>new t(i.range,n[s]))}static assertSorted(e){for(let n=1;n<e.length;n++){let r=e[n-1],i=e[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(i.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition())))throw new ce("Range mappings must be sorted")}}constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new t(this.modifiedRange,this.originalRange)}toTextEdit(e){let n=e.getValueOfRange(this.modifiedRange);return new Pi(this.originalRange,n)}};function Zo(t,e,n,r=!1){let i=[];for(let s of Lh(t.map(o=>jp(o,e,n)),(o,a)=>o.original.intersectsOrTouches(a.original)||o.modified.intersectsOrTouches(a.modified))){let o=s[0],a=s[s.length-1];i.push(new ht(o.original.join(a.original),o.modified.join(a.modified),s.map(l=>l.innerChanges[0])))}return Ct(()=>!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:lr(i,(s,o)=>o.original.startLineNumber-s.original.endLineNumberExclusive===o.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive<o.original.startLineNumber&&s.modifi Line truncated
`);this.histogram[a]=(this.histogram[a]||0)+1}this.totalCount=i}computeSimilarity(e){let n=0,r=Math.max(this.histogram.length,e.histogram.length);for(let i=0;i<r;i++)n+=Math.abs((this.histogram[i]??0)-(e.histogram[i]??0));return 1-n/(this.totalCount+e.totalCount)}};var Ui=class{compute(e,n,r=Mt.instance,i){if(e.length===0||n.length===0)return Je.trivial(e,n);let s=new Rn(e.length,n.length),o=new Rn(e.length,n.length),a=new Rn(e.length,n.length);for(let g=0;g<e.length;g++)for(let w=0;w<n.length;w++){if(!r.isValid())return Je.trivialTimedOut(e,n);let _=g===0?0:s.get(g-1,w),F=w===0?0:s.get(g,w-1),I;e.getElement(g)===n.getElement(w)?(g===0||w===0?I=0:I=s.get(g-1,w-1),g>0&&w>0&&o.get(g-1,w-1)===3&&(I+=a.get(g-1,w-1)),I+=i?i(g,w):1):I=-1;let k=Math.max(_,F,I);if(k===I){let T=g>0&&w>0?a.get(g-1,w-1):0;a.set(g,w,T+1),o.set(g,w,3)}else k===_?(a.set(g,w,0),o.set(g,w,1)):k===F&&(a.set(g,w,0),o.set(g,w,2));s.set(g,w,k)}let l=[],c=e.length,d=n.length;function u(g,w){(g+1!==c||w+1!==d)&&l.push(new de(new ee(g+1,c),new ee(w+1,d))),c=g,d=w}let m=e.length-1,f=n.length-1;for(;m>=0&&f>=0;)o.get(m,f)===3?(u(m,f),m--,f--):o.get(m,f)===1?m--:f--;return u(-1,-1),l.reverse(),new Je(l,!1)}};var In=class{compute(e,n,r=Mt.instance){if(e.length===0||n.length===0)return Je.trivial(e,n);let i=e,s=n;function o(w,_){for(;w<i.length&&_<s.length&&i.getElement(w)===s.getElement(_);)w++,_++;return w}let a=0,l=new ia;l.set(0,o(0,0));let c=new sa;c.set(0,l.get(0)===0?null:new Vi(null,0,0,l.get(0)));let d=0;e:for(;;){if(a++,!r.isValid())return Je.trivialTimedOut(i,s);let w=-Math.min(a,s.length+a%2),_=Math.min(a,i.length+a%2);for(d=w;d<=_;d+=2){let F=d===_?-1:l.get(d+1),I=d===w?-1:l.get(d-1)+1,k=Math.min(Math.max(F,I),i.length),T=k-d;if(k>i.length||T>s.length)continue;let W=o(k,T);l.set(d,W);let V=k===F?c.get(d+1):c.get(d-1);if(c.set(d,W!==k?new Vi(V,k,T,W-k):V),l.get(d)===i.length&&l.get(d)-d===s.length)break e}}let u=c.get(d),m=[],f=i.length,g=s.length;for(;;){let w=u?u.x+u.length:0,_=u?u.y+u.length:0;if((w!==f||_!==g)&&m.push(new de(new ee(w,f),new ee(_,g))),!u)break;f=u.x,g=u.y,u=u.prev}return m.reverse(),new Je(m,!1)}},Vi=class{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}},ia=class{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){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}},sa=class{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}};var At=class{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],o=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,s=s.substring(o)),this.lineStartOffsets.push(o);let a=0;if(!r){let c=s.trimStart();a=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);let l=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-a,s.length):s.length;for(let c=0;c<l;c++)this.elements.push(s.charCodeAt(c));i<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new ee(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let n=Bh(e>0?this.elements[e-1]:-1),r=Bh(e<this.elements.length?this.elements[e]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let i=0;return n!==r&&(i+=10,n===0&&r===1&&(i+=1)),i+=$h(n),i+=$h(r),i}translateOffset(e,n="right"){let r=ct(this.firstElementOffsetByLineIdx,s=>s<=e),i=e-this.firstElementOffsetByLineIdx[r];return new Q(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){let n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?U.fromPositions(r,r):U.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!Nn(this.elements[e]))return;let n=e;for(;n>0&&Nn(this.elements[n-1]);)n--;let r=e;for(;r<this.elements.length&&Nn(this.elements[r]);)r++;return new ee(n,r)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!Nn(this.elements[e]))return;let n=e;for(;n>0&&Nn(this.elements[n-1])&&!Vh(this.elements[n]);)n--;let Line truncated
`).length>=15&&Xp(u,f=>f.length>=2)>=2}),o=Zp(t,o),o}function Xp(t,e){let n=0;for(let r of t)e(r)&&n++;return n}function Kp(t,e,n,r){let i=[],s=t.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new yr(l.original,e,l)),o=new Set(t.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new yr(l.modified,n,l))),a=new Set;for(let l of s){let c=-1,d;for(let u of o){let m=l.computeSimilarity(u);m>c&&(c=m,d=u)}if(c>.9&&d&&(o.delete(d),i.push(new He(l.range,d.range)),a.add(l.source),a.add(d.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}function Qp(t,e,n,r,i,s){let o=[],a=new Ii;for(let m of t)for(let f=m.original.startLineNumber;f<m.original.endLineNumberExclusive-2;f++){let g=`${e[f-1]}:${e[f+1-1]}:${e[f+2-1]}`;a.add(g,{range:new Z(f,f+3)})}let l=[];t.sort(Lt(m=>m.modified.startLineNumber,en));for(let m of t){let f=[];for(let g=m.modified.startLineNumber;g<m.modified.endLineNumberExclusive-2;g++){let w=`${n[g-1]}:${n[g+1-1]}:${n[g+2-1]}`,_=new Z(g,g+3),F=[];a.forEach(w,({range:I})=>{for(let T of f)if(T.originalLineRange.endLineNumberExclusive+1===I.endLineNumberExclusive&&T.modifiedLineRange.endLineNumberExclusive+1===_.endLineNumberExclusive){T.originalLineRange=new Z(T.originalLineRange.startLineNumber,I.endLineNumberExclusive),T.modifiedLineRange=new Z(T.modifiedLineRange.startLineNumber,_.endLineNumberExclusive),F.push(T);return}let k={modifiedLineRange:_,originalLineRange:I};l.push(k),F.push(k)}),f=F}if(!s.isValid())return[]}l.sort(Ph(Lt(m=>m.modifiedLineRange.length,en)));let c=new tn,d=new tn;for(let m of l){let f=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,g=c.subtractFrom(m.modifiedLineRange),w=d.subtractFrom(m.originalLineRange).getWithDelta(f),_=g.getIntersection(w);for(let F of _.ranges){if(F.length<3)continue;let I=F,k=F.delta(-f);o.push(new He(k,I)),c.addRange(I),d.addRange(k)}}o.sort(Lt(m=>m.original.startLineNumber,en));let u=new vr(t);for(let m=0;m<o.length;m++){let f=o[m],g=u.findLastMonotonous(V=>V.original.startLineNumber<=f.original.startLineNumber),w=lt(t,V=>V.modified.startLineNumber<=f.modified.startLineNumber),_=Math.max(f.original.startLineNumber-g.original.startLineNumber,f.modified.startLineNumber-w.modified.startLineNumber),F=u.findLastMonotonous(V=>V.original.startLineNumber<f.original.endLineNumberExclusive),I=lt(t,V=>V.modified.startLineNumber<f.modified.endLineNumberExclusive),k=Math.max(F.original.endLineNumberExclusive-f.original.endLineNumberExclusive,I.modified.endLineNumberExclusive-f.modified.endLineNumberExclusive),T;for(T=0;T<_;T++){let V=f.original.startLineNumber-T-1,N=f.modified.startLineNumber-T-1;if(V>r.length||N>i.length||c.contains(N)||d.contains(V)||!qh(r[V-1],i[N-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 W;for(W=0;W<k;W++){let V=f.original.endLineNumberExclusive+W,N=f.modified.endLineNumberExclusive+W;if(V>r.length||N>i.length||c.contains(N)||d.contains(V)||!qh(r[V-1],i[N-1],s))break}W>0&&(d.addRange(new Z(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+W)),c.addRange(new Z(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+W))),(T>0||W>0)&&(o[m]=new He(new Z(f.original.startLineNumber-T,f.original.endLineNumberExclusive+W),new Z(f.modified.startLineNumber-T,f.modified.endLineNumberExclusive+W)))}return o}function qh(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;let i=new In().compute(new At([t],new U(1,1,1,t.length),!1),new At([e],new U(1,1,1,e.length),!1),n),s=0,o=de.invert(i.diffs,t.length);for(let d of o)d.seq1Range.forEach(u=>{Sr(t.charCodeAt(u))||s++});function a(d){let u=0;for(let m=0;m<t.length;m++)Sr(d.charCodeAt(m))||u++;return u}let l=a(t.length>e.length?t:e);return s/l>.6&&l>10}function Yp(t){if(t.length===0)return t;t.sort(Lt(n=>n.original.startLineNumber,en));let e=[t[0]];for(let n=1;n<t.length;n++){let r=e[e.length-1],i=t[n],s=i.original.startLineNumber-r.original.endLineNumberExclusive,o=i.modified.startLineNumber-r.modified.endLineNumberExclusive;if(s>=0&&o>=0&&s+o<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function Zp(t,e){let n=new vr(t);return e=e.filter(r=>{let i=n.findLastMonotonous(a=>a.original.startLineNumber<r.original.endLineNumberExclusive)||new He(new Z(1,1),new Z(1,1)),s=lt(t,a=>a.modified.startLineNumber<r.modified.endLineNumberExclusive);return i!==s}),e}function oa(t,e,n){let r=n;return r=Hh(t,e,r),r=Hh(t,e,r),r=em(t,e,r),r}function Hh(t,e,n){if(n.length===0)return n;let r=[];r.push(n[0]);for(let s=1;s<n.length;s++){let o=r[r.length-1],a=n[s];if(a.seq1Range.isEmpty||a.seq2Range.isEmpty){let l=a.seq1Range.start-o.seq1Range.endExclusive,c;for(c=1;c<=l&&!(t.getElement(a.seq1Range.start-c)!==t.getElement(a.seq1Range.endExclusive-c)||e.getElement(a.seq2Range.start-c)!==e.getElement(a.seq2Range.endExclusive-c));c++);if(c--,c===l){r[r.length-1] Line truncated
`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}};function Qh(t){let e=0;for(;e<t.length&&(t.charCodeAt(e)===32||t.charCodeAt(e)===9);)e++;return e}var $i=class{constructor(){this.dynamicProgrammingDiffing=new Ui,this.myersDiffingAlgorithm=new In}computeDiff(e,n,r){if(e.length<=1&&Dh(e,n,(N,R)=>N===R))return new Dt([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new Dt([new ht(new Z(1,e.length+1),new Z(1,n.length+1),[new Ne(new U(1,1,e.length,e[e.length-1].length+1),new U(1,1,n.length,n[n.length-1].length+1))])],[],!1);let i=r.maxComputationTimeMs===0?Mt.instance:new Wi(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,o=new Map;function a(N){let R=o.get(N);return R===void 0&&(R=o.size,o.set(N,R)),R}let l=e.map(N=>a(N.trim())),c=n.map(N=>a(N.trim())),d=new Cr(l,e),u=new Cr(c,n),m=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,i,(N,R)=>e[N]===n[R]?n[R].length===0?.1:1+Math.log(1+n[R].length):.99):this.myersDiffingAlgorithm.compute(d,u,i),f=m.diffs,g=m.hitTimeout;f=oa(d,u,f),f=Xh(d,u,f);let w=[],_=N=>{if(s)for(let R=0;R<N;R++){let z=F+R,$=I+R;if(e[z]!==n[$]){let L=this.refineDiff(e,n,new de(new ee(z,z+1),new ee($,$+1)),i,s,r);for(let x of L.mappings)w.push(x);L.hitTimeout&&(g=!0)}}},F=0,I=0;for(let N of f){Ct(()=>N.seq1Range.start-F===N.seq2Range.start-I);let R=N.seq1Range.start-F;_(R),F=N.seq1Range.endExclusive,I=N.seq2Range.endExclusive;let z=this.refineDiff(e,n,N,i,s,r);z.hitTimeout&&(g=!0);for(let $ of z.mappings)w.push($)}_(e.length-F);let k=new rn(e),T=new rn(n),W=Zo(w,k,T),V=[];return r.computeMoves&&(V=this.computeMoves(W,e,n,l,c,i,s,r)),Ct(()=>{function N(z,$){if(z.lineNumber<1||z.lineNumber>$.length)return!1;let 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(let z of W){if(!z.innerChanges)return!1;for(let $ of z.innerChanges)if(!(N($.modifiedRange.getStartPosition(),n)&&N($.modifiedRange.getEndPosition(),n)&&N($.originalRange.getStartPosition(),e)&&N($.originalRange.getEndPosition(),e)))return!1;if(!R(z.modified,n)||!R(z.original,e))return!1}return!0}),new Dt(W,V,g)}computeMoves(e,n,r,i,s,o,a,l){return jh(e,n,r,i,s,o).map(u=>{let m=this.refineDiff(n,r,new de(u.original.toOffsetRange(),u.modified.toOffsetRange()),o,a,l),f=Zo(m.mappings,new rn(n),new rn(r),!0);return new Mi(u,f)})}refineDiff(e,n,r,i,s,o){let l=nm(r).toRangeMapping2(e,n),c=new At(e,l.originalRange,s),d=new At(n,l.modifiedRange,s),u=c.length+d.length<500?this.dynamicProgrammingDiffing.compute(c,d,i):this.myersDiffingAlgorithm.compute(c,d,i),m=u.diffs;return m=oa(c,d,m),m=aa(c,d,m,(g,w)=>g.findWordContaining(w)),o.extendToSubwords&&(m=aa(c,d,m,(g,w)=>g.findSubWordContaining(w),!0)),m=Jh(c,d,m),m=Kh(c,d,m),{mappings:m.map(g=>new Ne(c.translateRange(g.seq1Range),d.translateRange(g.seq2Range))),hitTimeout:u.hitTimeout}}};function nm(t){return new He(new Z(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new Z(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}var la={getLegacy:()=>new Ti,getDefault:()=>new $i};function zt(t,e){let n=Math.pow(10,e);return Math.round(t*n)/n}var y=class{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=zt(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}},Xe=class t{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=zt(Math.max(Math.min(1,n),0),3),this.l=zt(Math.max(Math.min(1,r),0),3),this.a=zt(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){let n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,o=Math.max(n,r,i),a=Math.min(n,r,i),l=0,c=0,d=(a+o)/2,u=o-a;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),o){case n:l=(r-i)/u+(r<i?6:0);break;case r:l=(i-n)/u+2;break;case i:l=(n-r)/u+4;break}l*=60,l=Math.round(l)}return new t(l,c,d,s)}static _hue2rgb(e,n,r){return r<0&&(r+=1),r>1&&(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){let n=e.h/360,{s:r,l:i,a:s}=e,o,a,l;if(r===0)o=a=l=i;else{let c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;o=t._hue2rgb(d,c,n+1/3),a=t._hue2rgb(d,c,n),l=t._hue2rgb(d,c,n-1/3)}return new y(Math.round(o*255),Math.round(a*255),Math.round(l*255),s)}},Dn=class t{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=zt(Math.max(Math.min(1,n),0),3),this.v=zt(Math.max(Math.min(1,r),0),3),this.a=zt(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){let n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=s-o,l=s===0?0:a/s,c;return a===0?c=0:s===n?c=((r-i)/a%6+6)%6:s===r?c=(i-n)/a+2:c=(n-r)/a+4,new t(Math.round(c*60),l,s,e.a)}static toRGBA(e){let{h:n,s:r,v:i,a:s}=e,o=i*r,a=o*(1-Math.abs(n/60%2-1)),l=i-o, Line truncated
`);s.lastIndex=0;let d;for(;(d=s.exec(c))!==null;){let u=c.substring(0,d.index),m=(u.match(/\n/g)||[]).length,f=o+m,g=d[0].split(`
`),w=g.length,_=f+w-1,F=u.lastIndexOf(`
`)+1,I=d.index-F+1,k=g[g.length-1],T=w===1?I+d[0].length:k.length+1,W={startLineNumber:f,startColumn:I,endLineNumber:_,endColumn:T},V=(d.groups??{}).label??"",N=((d.groups??{}).separator??"")!=="",R={range:W,text:V,hasSeparatorLine:N,shouldBeInComments:!0};(R.text||R.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<R.range.startLineNumber)&&n.push(R),s.lastIndex=d.index+d[0].length}}return n}function cm(t){t=t.trim();let e=t.startsWith("-");return t=t.replace(sm,""),{text:t,hasSeparatorLine:e}}var hm=Symbol("MicrotaskDelay");var dm,ha;(function(){let t=globalThis;typeof t.requestIdleCallback!="function"||typeof t.cancelIdleCallback!="function"?ha=(e,n,r)=>{Dl(()=>{if(i)return;let s=Date.now()+15;n(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:ha=(e,n,r)=>{let i=e.requestIdleCallback(n,typeof r=="number"?{timeout:r}:void 0),s=!1;return{dispose(){s||(s=!0,e.cancelIdleCallback(i))}}},dm=(e,n)=>ha(globalThis,e,n)})();var da=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{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 or)}},id;(function(t){async function e(r){let i,s=await Promise.all(r.map(o=>o.then(a=>a,a=>{i||(i=a)})));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(o){s(o)}})}t.withAsyncBody=n})(id||(id={}));var ua=class{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(let n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new ce("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){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{let e=new da;return this._unsatisfiedConsumers.push(e),e.p}}},sd=class t{constructor(e,n){this._onReturn=n,this._producerConsumer=new ua,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()=>{let r=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(let 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 t(n=>{n.emitMany(e)})}static fromPromise(e){return new t(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new t(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new t(async n=>{await Promise.all(e.map(async r=>{for await(let i of r)n.emitOne(i)}))})}static{this.EMPTY=t.fromArray([])}static map(e,n){return new t(async r=>{for await(let i of e)r.emitOne(n(i))})}map(e){return t.map(this,e)}static coalesce(e){return t.filter(e,n=>!!n)}coalesce(){return t.coalesce(this)}static filter(e,n){return new t(async r=>{for await(let i of e)n(i)&&r.emitOne(i)})}filter(e){return t.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}};var Bi=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=Yt(e);let 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<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Yt(e),n=Yt(n),this.values[e]===n?!1:(this.values[e]=n,e-1<this.prefixSumValidIndex[0]& Line truncated
`),!0}return!1}_escape(e,n){let r=this.stream.peekChar();if(r===ga){this.stream.advance(1),r=this.stream.peekChar();let i=0;for(;i<6&&(r>=Er&&r<=Fr||r>=Ji&&r<=ld||r>=Xi&&r<=hd);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{let s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===ba||r===wa?this.stream.advance(1):this._newline([]),!0}if(r!==Mn&&r!==Ir&&r!==Ln)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1}_stringChar(e,n){let r=this.stream.peekChar();return r!==0&&r!==e&&r!==ga&&r!==Mn&&r!==Ir&&r!==Ln?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1}_string(e){if(this.stream.peekChar()===fd||this.stream.peekChar()===md){let 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){let n=this.stream.peekChar();return n!==0&&n!==ga&&n!==fd&&n!==md&&n!==wd&&n!==vd&&n!==ba&&n!==wa&&n!==Ln&&n!==Ir&&n!==Mn?(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===ba||n===wa||n===Ln||n===Ir||n===Mn)>0}_name(e){let n=!1;for(;this._identChar(e)||this._escape(e);)n=!0;return n}ident(e){let 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){let n=this.stream.peekChar();return n===ud||n>=Ji&&n<=cd||n>=Xi&&n<=dd||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_minus(e){let n=this.stream.peekChar();return n===on?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_identChar(e){let n=this.stream.peekChar();return n===ud||n===on||n>=Ji&&n<=cd||n>=Xi&&n<=dd||n>=Er&&n<=Fr||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(Nm)){let e=r=>r>=Er&&r<=Fr||r>=Ji&&r<=ld||r>=Xi&&r<=hd,n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(r=>r===Im);if(n>=1&&n<=6)if(this.stream.advanceIfChar(on)){let r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1}};function le(t,e){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function Qi(t,e){let n=t.length-e.length;return n>0?t.lastIndexOf(e)===n:n===0?t===e:!1}function xd(t,e,n=4){let r=Math.abs(t.length-e.length);if(r>n)return 0;let i=[],s=[],o,a;for(o=0;o<e.length+1;++o)s.push(0);for(o=0;o<t.length+1;++o)i.push(s);for(o=1;o<t.length+1;++o)for(a=1;a<e.length+1;++a)t[o-1]===e[a-1]?i[o][a]=i[o-1][a-1]+1:i[o][a]=Math.max(i[o-1][a],i[o][a-1]);return i[t.length][e.length]-Math.sqrt(r)}function va(t,e=!0){return t?t.length<140?t:t.slice(0,140)+(e?"\u2026":""):""}function yd(t,e){let n=e.exec(t);return n&&n[0].length?t.substr(0,t.length-n[0].length):t}function xa(t,e){let n="";for(;e>0;)(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.SelectorPlaceho Line truncated
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
`&&i++}r&&n.length>0&&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 fe.create(0,e);for(;r<i;){let o=Math.floor((r+i)/2);n[o]>e?i=o:r=o+1}let s=r-1;return fe.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<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}},C;(function(t){let e=Object.prototype.toString;function n(f){return typeof f<"u"}t.defined=n;function r(f){return typeof f>"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 o(f){return e.call(f)==="[object Number]"}t.number=o;function a(f,g,w){return e.call(f)==="[object Number]"&&g<=f&&f<=w}t.numberRange=a;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={}));var zs=class t{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){let 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(t.isIncremental(r)){let i=nu(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);let a=Math.max(i.start.line,0),l=Math.max(i.end.line,0),c=this._lineOffsets,d=tu(r.text,!1,s);if(l-a===d.length)for(let m=0,f=d.length;m<f;m++)c[m+a+1]=d[m];else d.length<1e4?c.splice(a+1,l-a,...d):this._lineOffsets=c=c.slice(0,a+1).concat(d,c.slice(l+1));let u=r.text.length-(o-s);if(u!==0)for(let m=a+1+d.length,f=c.length;m<f;m++)c[m]=c[m]+u}else if(t.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=tu(this._content,!0)),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{line:0,character:e};for(;r<i;){let o=Math.floor((r+i)/2);n[o]>e?i=o:r=o+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<n.length?n[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},Or;(function(t){function e(i,s,o,a){return new zs(i,s,o,a)}t.create=e;function n(i,s,o){if(i instanceof zs)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){let o=i.getText(),a=ja(s.map(Pm),(d,u)=>{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),l=0,c=[];for(let d of a){let u=i.offsetAt(d.range.start);if(u<l)throw new Error("Overlapping edit");u>l&&c.push(o.substring(l,u)),d.newText.length&&c.push(d.newText),l=i.offsetAt(d.range.end)}return c.push(o.substr(l)),c.join("")}t.applyEdits=r})(Or||(Or={}));function ja(t,e){if(t.length<=1)return t;let n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);ja(r,e),ja(i,e);let s=0,o=0,a=0;for(;s<r.length&&o<i.length;)e(r[s],i[o])<=0?t[a++]=r[s++]:t[a++]=i[o++];for(;s<r.length;)t[a++]=r[s++];for(;o<i.length;)t[a++]=i[o++];return t}function tu(t,e,n=0){let r=e?[n]:[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function nu(t){let e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function Pm(t){let e=nu(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Ha;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ie.Markdown,Ie.PlainText]}},hover:{contentFormat:[Ie.Markdown,Ie.PlainText]}}}})(Ha||(Ha={}));var $t;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})($t||($t={}));var Tm=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,ou=[{label:"r Line truncated
`;case"nonstandard":return`\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it.
`;case"obsolete":return`\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it.
`;default:return""}}function tt(t,e,n){let r;if(e?r={kind:"markdown",value:Hm(t,n)}:r={kind:"plaintext",value:jm(t,n)},r.value!=="")return r}function Us(t){return t=t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),t.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function jm(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+=bu(t.status)),n+=t.description;let r=wu(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 Hm(t,e){if(!t.description||t.description==="")return"";let n="";if(e?.documentation!==!1){t.status&&(n+=bu(t.status)),typeof t.description=="string"?n+=Us(t.description):n+=t.description.kind===Ie.Markdown?t.description.value:Us(t.description.value);let r=wu(t.browsers);r&&(n+=`
(`+Us(r)+")"),"syntax"in t&&t.syntax&&(n+=`
Syntax: ${Us(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 wu(t=[]){return t.length===0?null:t.map(e=>{let n="",r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in gu&&(n+=gu[i]),s&&(n+=" "+s),n}).join(", ")}var vu;(()=>{var t={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function o(l,c){for(var d,u="",m=0,f=-1,g=0,w=0;w<=l.length;++w){if(w<l.length)d=l.charCodeAt(w);else{if(d===47)break;d=47}if(d===47){if(!(f===w-1||g===1))if(f!==w-1&&g===2){if(u.length<2||m!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var _=u.lastIndexOf("/");if(_!==u.length-1){_===-1?(u="",m=0):m=(u=u.slice(0,_)).length-1-u.lastIndexOf("/"),f=w,g=0;continue}}else if(u.length===2||u.length===1){u="",m=0,f=w,g=0;continue}}c&&(u.length>0?u+="/..":u="..",m=2)}else u.length>0?u+="/"+l.slice(f+1,w):u=l.slice(f+1,w),m=w-f-1;f=w,g=0}else d===46&&g!==-1?++g:g=-1}return u}var a={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=o(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=o(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;c<arguments.length;++c){var d=arguments[c];s(d),d.length>0&&(l===void 0?l=d:l+="/"+d)}return l===void 0?".":a.normalize(l)},relative:function(l,c){if(s(l),s(c),l===c||(l=a.resolve(l))===(c=a.resolve(c)))return"";for(var d=1;d<l.length&&l.charCodeAt(d)===47;++d);for(var u=l.length,m=u-d,f=1;f<c.length&&c.charCodeAt(f)===47;++f);for(var g=c.length-f,w=m<g?m:g,_=-1,F=0;F<=w;++F){if(F===w){if(g>w){if(c.charCodeAt(f+F)===47)return c.slice(f+F+1);if(F===0)return c.slice(f+F)}else m>w&&(l.charCodeAt(d+F)===47?_=F:F===0&&(_=0));break}var I=l.charCodeAt(d+F);if(I!==c.charCodeAt(f+F))break;I===47&&(_=F)}var k="";for(F=d+_+1;F<=u;++F)F!==u&&l.charCodeAt(F)!==47||(k.length===0?k+="..":k+="/..");return k.length>0?k+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,w=-1;for(d=l.length-1;d>=0;--d){var _=l.charCodeAt(d);if(_===47){if(!f){u=d+1;break}}else w===-1&&(f=!1,w=d+1),g>=0&&(_===c.charCodeAt(g)?--g==-1&&(m=d):(g=-1,m=w))}return u===m?m=w: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 w=l.charCodeAt(g);if(w!==47)u===-1&&(m=!1,u=g+1),w===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,w=-1,_=!0,F=l.length-1,I=0;F>=d;--F)if((u=l.charCodeAt(F))!==47)w===-1&&(_=!1,w=F+1),u===46?f===-1?f=F:I!==1&&(I=1):f!==-1&&(I=-1);else if(!_){g=F+1;break}return f===-1||w===-1||I===0||I===1&&f===w-1&&f===g+1?w!==-1&&(c.base=c.name=g===0&&m?l.slice(1,w):l.slice(g,w)):(g===0&&m?(c.name=l.slice(1,f),c.base=l.slice(1,w)):(c.name=l.slice(g,f),c.base=l.slice(g,w)),c.ext=l.slice(f,w)),g>0?c.dir=l.slice(0,g-1):m&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,i.exports=a}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.d=(i,s)=>{for(var o in s)n.o(s,o)&&!n.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:s[o]})},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);let s=/^\w[\w\d+ Line truncated
\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}var Hr=class t{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(let n of this.attributes)if(n.name===e)return n.value}return null}addChild(e){e instanceof t&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){let n=this.attributes[this.attributes.length-1];n.value=n.value+e}}prepend(e){if(this.attributes){let n=this.attributes[0];n.value=e+n.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof Ht);)e=e.parent;return e}removeChild(e){if(this.children){let 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(let r of this.attributes)if(r.name===e){r.value+=" "+n;return}this.attributes.push({name:e,value:n})}clone(e=!0){let n=new t;if(this.attributes){n.attributes=[];for(let r of this.attributes)n.addAttr(r.name,r.value)}if(e&&this.children){n.children=[];for(let r=0;r<this.children.length;r++)n.addChild(this.children[r].clone())}return n}cloneWithParent(){let e=this.clone(!1);return this.parent&&!(this.parent instanceof Ht)&&this.parent.cloneWithParent().addChild(e),e}},Ht=class extends Hr{},Gr=class extends Hr{constructor(e){super(),this.addAttr("name",e)}},js=class{constructor(e){this.quote=e,this.result=[]}print(e,n){this.result=[],e instanceof Ht?e.children&&this.doPrint(e.children,0):this.doPrint([e],0);let r;return n?r=`${n.text}
\u2026 `+this.result.join(`
`):r=this.result.join(`
`),[{language:"html",value:r}]}doPrint(e,n){for(let r of e)this.doPrintElement(r,n),r.children&&this.doPrint(r.children,n+1)}writeLine(e,n){let r=new Array(e+1).join(" ");this.result.push(r+n)}doPrintElement(e,n){let r=e.findAttribute("name");if(e instanceof Gr||r==="\u2026"){this.writeLine(n,r);return}let i=["<"];if(r?i.push(r):i.push("element"),e.attributes){for(let s of e.attributes)if(s.name!=="name"){i.push(" "),i.push(s.name);let o=s.value;o&&(i.push("="),i.push(bt.ensure(o,this.quote)))}}i.push(">"),this.writeLine(n,i.join(""))}},bt;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){let i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(bt||(bt={}));var jr=class{constructor(){this.id=0,this.attr=0,this.tag=0}};function yu(t,e){let n=new Hr;for(let r of t.getChildren())switch(r.type){case v.SelectorCombinator:if(e){let a=r.getText().split("&");if(a.length===1){n.addAttr("name",a[0]);break}n=e.cloneWithParent(),a[0]&&n.findRoot().prepend(a[0]);for(let l=1;l<a.length;l++){if(l>1){let c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(a[l])}}break;case v.SelectorPlaceholder:if(r.matches("@at-root"))return n;case v.ElementNameSelector:let i=r.getText();n.addAttr("name",i==="*"?"element":Pe(i));break;case v.ClassSelector:n.addAttr("class",Pe(r.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Pe(r.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",r.getName());break;case v.PseudoSelector:n.addAttr(Pe(r.getText()),"");break;case v.AttributeSelector:let s=r,o=s.getIdentifier();if(o){let a=s.getValue(),l=s.getOperator(),c;if(a&&l)switch(Pe(l.getText())){case"|=":c=`${bt.remove(Pe(a.getText()))}-\u2026`;break;case"^=":c=`${bt.remove(Pe(a.getText()))}\u2026`;break;case"$=":c=`\u2026${bt.remove(Pe(a.getText()))}`;break;case"~=":c=` \u2026 ${bt.remove(Pe(a.getText()))} \u2026 `;break;case"*=":c=`\u2026${bt.remove(Pe(a.getText()))}\u2026`;break;default:c=bt.remove(Pe(a.getText()));break}n.addAttr(Pe(o.getText()),c)}break}return n}function Pe(t){let e=new Me;e.setSource(t);let n=e.scanUnquotedString();return n?n.text:t}var Hs=class{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,n){let r=ef(e);if(r){let i=new js('"').print(r,n);return i.push(this.selectorToSpecificityMarkedString(e)),i}else return[]}simpleSelectorToMarkedString(e){let n=yu(e),r=new js('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}isPseudoElementIdentifier(e){let n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1}selectorToSpecificityMarkedString(e){let n=s=>{let o=new jr,a=new jr;for(let l of s)for(let c of l.getChildren()){let d=r(c);if(d.id>a.id){a=d;continue}else if(d.id<a.id)continue;if(d.attr>a.attr){a=d;continue}else if(d.attr<a.attr)continue;if(d.tag>a.tag){a=d;continue}}return o.id+=a.id,o.attr+=a.attr,o.tag+=a.tag,o},r=s=>{let o=new jr;e:for(let a of s.getChildren()){switch(a.type){case v.IdentifierSelector:o.id++;break;case v.ClassSelector:case v.AttributeSelector:o.attr++;break;case v.ElementNameSelector:if(a.matches("*"))break;o.tag++;break;case v.PseudoSelector:let l=a.getText(),c=a.getChildren();if(this.isPseudoElementIdentifier(l)){if(l.match(/^::slotted/i)&&c.length>0){o.tag++;let d=n(c);o.id+=d.id,o.attr+=d.attr,o.tag+=d.tag;continue e}o.tag++;continue e}if(l.match(/^:where/i))continue e;if(l.match(/^:(?:not|has|is)/i)&&c.length>0){let d=n(c);o.id+=d.id,o.attr+=d.attr,o.tag+=d.tag;continue e}if(l.match(/^:(?:host|host-context)/i)&&c.length>0){o.attr++;let d=n(c);o.id+=d.id,o.attr+=d.attr,o.tag+=d.tag;continue e}if(l.match(/^:(?:nth-child|nth-last-child)/i)&&c.length>0){if(o.attr++,c.length===3&&c[1].type===23){let g=n(c[2].getChildren());o.id+=g.id,o.attr+=g.attr,o.tag+=g.tag;continue e}let d=new et,u=c[1].getText();d.scanner.setSource(u);let m=d.scanner.scan(),f=d.scanner.scan();if(m.text==="n"||m.text==="-n"&&f.text==="of"){let g=[],_=u.slice(f.offset+2).split(",");for(let I of _){let k=d.internalParse(I,d._parseSelector);k&&g.push(k)}let F=n(g);o.id+=F.id,o.attr+=F.attr,o.tag+=F.tag;continue e}continue e}o.attr++;continue e}if(a.getChildren().length>0){let l=r(a);o.id+=l.id,o.attr+=l.attr,o.tag+=l.tag}}return o},i=r(e);return`[${b("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}},dl=class{constructor(e){this.prev=null,this.element=e}processSelector(e){let n=null;if(!(this.element instanceof Ht)&&e.getChildren().some(r=>r.hasChildren()&&r.getChild(0).type===v.SelectorCombinator)){let r=this.element.findRoot();r.parent instanceof Ht&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(let r of e.getChildren()){if(r instanceof ze){if(this.prev instanceof ze){let o=new Gr("\u2026");this.element.addChild(o),this.element=o}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&thi Line truncated
$0
}`,insertTextFormat:xe.Snippet,kind:q.Keyword},{label:"@for",documentation:b("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:xe.Snippet,kind:q.Keyword},{label:"@each",documentation:b("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:xe.Snippet,kind:q.Keyword},{label:"@while",documentation:b("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} {
$0
}`,insertTextFormat:xe.Snippet,kind:q.Keyword},{label:"@mixin",documentation:b("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} {
$0
}`,insertTextFormat:xe.Snippet,kind:q.Keyword},{label:"@include",documentation:b("Includes the styles defined by another mixin into the current rule."),kind:q.Keyword},{label:"@function",documentation:b("Defines complex operations that can be re-used throughout stylesheets."),kind:q.Keyword}];qe.scssModuleLoaders=[{label:"@use",documentation:b("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:xt,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:xe.Snippet,kind:q.Keyword},{label:"@forward",documentation:b("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:xt,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:xe.Snippet,kind:q.Keyword}];qe.scssModuleBuiltIns=[{label:"sass:math",documentation:b("Provides functions that operate on numbers."),references:[{name:xt,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:b("Makes it easy to combine, search, or split apart strings."),references:[{name:xt,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:b("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:xt,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:b("Lets you access and modify values in lists."),references:[{name:xt,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:b("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:xt,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:b("Provides access to Sass\u2019s powerful selector engine."),references:[{name:xt,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:b("Exposes the details of Sass\u2019s inner workings."),references:[{name:xt,url:"https://sass-lang.com/documentation/modules/meta"}]}];function Du(t){t.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){let 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}})}var Lu=47,bf=10,wf=13,vf=12,wl=96,vl=46,xf=p.CustomToken,no=xf++,nr=class extends Me{scanNext(e){let n=this.escapedJavaScript();return n!==null?this.finishToken(e,n):this.stream.advanceIfChars([vl,vl,vl])?this.finishToken(e,no):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([Lu,Lu])?(this.stream.advanceWhileChar(e=>{switch(e){case bf:case wf:case vf:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===wl?(this.stream.advance(1),this.stream.advanceWhileChar(n=>n!==wl),this.stream.advanceIfChar(wl)?p.EscapedJavaScript:p.BadEscapedJavaScript):null}};var ro=class extends et{constructor(){super(new nr)}_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;let e=this.create(Tt);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;let 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(){let e=super._parseMediaQuery();if(!e){let n=this.create(On);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=[]){let n=this.create(Ye),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(Ve);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;let n=this.create(ie);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(){let e=this.create(O),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){let r=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!r&&!this.peek(p.AtKeyword))return null;let i=this.create(Ut),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)){let e=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){let e=this.createNode(v.EscapedValue);return this.con Line truncated
`);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 o(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}o.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},o.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},o.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},o.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 a(l,c){this.__indent_cache=new o(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()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(l,c){return this.__indent_cache.get_indent_string(l,c)},a.prototype.get_indent_size=function(l,c){return this.__indent_cache.get_indent_size(l,c)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.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!==`
`&&(d=d.replace(/[\n]/g,l)),d},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(l,c){return l=l||0,c=c||0,this.next_line.set_indent(l,c),this.__lines.length>1?(this.current_line.set_indent(l,c),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(l){for(var c=0;c<l.newlines;c++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},a.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},a.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},a.prototype.remove_indent=function(l){for(var c=this.__lines.length;l<c;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},a.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(l,c){for(var d=this.__lines.length-2;d>=0;){var u=this.__lines[d];if(u.is_empty())break;if(u.item(0).indexOf(l)!==0&&u.item(-1)!==c){this.__lines.splice(d+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}d--}},i.exports.Output=a},,,,function(i){function s(l,c){this.raw_options=o(l,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(l,c){var d=this.raw_options[l],u=c||[];return typeof d=="object"?d!==null&&typeof d.concat=="function"&&(u=d.concat()):typeof d=="string"&&(u=d.split(/[^a-zA-Z0-9_\/\-]+/)),u},s.prototype._get_boolean=function(l,c){var d=this.raw_options[l],u=d===void 0?!!c:!!d;return u},s.prototype._get_characters=function(l,c){var d=this.raw_options[l],u=c||"";return typeof d=="string"&&(u=d.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),u},s.prototype._get_number=function(l,c){var d=this.raw_options[l];c=parseInt(c,10),isNaN(c)&&(c=0);var u=parseInt(d,10);return isNaN(u)&&(u=c),u},s.prototype._get_selection=function(l,c,d){var u=this._get_selection_list(l,c,d);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
`+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 o(l,c){var d={};l=a(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 a(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=a,i.exports.mergeOpts=o},,function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function o(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position<this.__input_length},o.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__input.charAt(this.__position),this.__position+=1),a},o.prototype.peek=function(a){var l=null;return a=a||0,a+=this.__position,a>=0&&a<this.__input_length&&(l=this.__input.charAt(a)),l},o.prototype.__match=function(a,l){a.lastIndex=l;var c=a.exec(this.__input);return c&&!(s&&a.sticky)&&c.index!==l&&(c=null),c},o.prototype.test=function(a,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(a,l):!1},o.prototype.testChar=function(a,l){var c=this.peek(l);return a.lastIndex=0,c!==null&&a.test(c)},o.prototype.match=function(a){var l=this.__match(a,this.__position);return l?this.__position+=l[0].length:l=null,l},o.prototype.read=function(a,l,c){var d="",u;return a&&(u=this.match(a),u&&(d+=u[0])),l&&(u||!a)&&(d+=this.readUntil(l,c)),d},o.prototype.readUntil=function(a,l){var c="",d=this.__position;a.lastIndex=this.__position;var u=a.exec(this.__input);return u?(d=u.index,l&&(d+=u[0].length)):d=this.__input_length,c=this.__input.substring(this.__position,d),this.__position=d,c},o.prototype.readUntilAfter=function(a){return this.readUntil(a,!0)},o.prototype.get_regexp=function(a,l){var c=null,d="g";return l&&s&&(d="y"),typeof a=="string"&&a!==""?c=new RegExp(a,d):a&&(c=new RegExp(a.source,d)),c},o.prototype.get_literal_regexp=function(a){return RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},o.prototype.peekUntilAfter=function(a){var l=this.__position,c=this.readUntilAfter(a);return this.__position=l,c},o.prototype.lookBack=function(a){var l=this.__position-1;return l>=a.length&&this.__input.substring(l-a.length,l).toLowerCase()===a},i.exports.InputScanner=o},,,,,function(i){function s(o,a){o=typeof o=="string"?o:o.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(o+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(o+/\sbeautify\signore:end\s/.source+a,"g")}s.prototype.get_directives=function(o){if(!o.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(o);l;)a[l[1]]=l[2],l=this.__directive_pattern.exec(o);return a},s.prototype.readIgnored=function(o){return o.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s},,function(i,s,o){var a=o(16).Beautifier,l=o(17).Options;function c(d,u){var m=new a(d,u);return m.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new l}},function(i,s,o){var a=o(17).Options,l=o(2).Output,c=o(8).InputScanner,d=o(13).Directives,u=new d(/\/\*/,/\*\//),m=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,g=/\s/,w=/(?:\s|\n)+/g,_=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,F=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function I(k,T){this._source_text=k||"",this._options=new a(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"]}I.prototype.eatString=function(k){var T="";for(this._ch=this._input.next();this._ch;){if(T+=this._ch,this._ch==="\\")T+=this._input.next();else if(k.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return T},I.prototype.eatWhitespace=function(k){for(var T=g.test(this._input.peek()),W=0;g.test(this._input.peek());)this._ch=this._input.next(),k&&this._ch===`
`&&(W===0||W<this._options.max_preserve_newlines)&&(W++,this._output.add_new_line(!0));return T},I.prototype.foundNestedPseudoClass=function(){for(var k=0,T=1,W=this._input.peek(T);W;){if(W==="{")return!0;if(W==="(")k+=1;else if(W===")"){if(k===0)return!1;k-=1}else if(W===";"||W==="}")return!1;T++,W=this._input.peek(T)}return!1},I.prototype.print_string=function(k){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(k)},I.prototype.preserveSingleSpace=function(k){k&&(this._output.space_before_token=!0)},I.prototype.indent=function(){this._indentLevel++},I.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},I.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,T=this._options.eol;T==="auto"&&(T=`
`,k&&m.test(k||"")&&(T=k.match(m)[0])),k=k.replace(f,`
`);var W=k.match(/^[\t ]*/)[0];this._output=new l(this._options,W),this._input=new c(k),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var V=0,N=!1,R=!1,z=!1,$=!1,L=!1,x=this._ch,E=!1,D,M,A;D=this._input.read(w),M=D!=="",A=x,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),x=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var P=this._input.read(_),G=u.get_directives(P);G&&G.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(M),this.print_string(this._ch);var te=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);te.match(/[ :]$/)&&(te=this.eatString(": ").replace(/\s+$/,""),this.print_string(te),this._output.space_before_token=!0),V===0&&te.indexOf(":")!==-1&&(R=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(M),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var K=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);K.match(/[ :]$/)&&(K=this.eatString(": ").replace(/\s+$/,""),this.print_string(K),this._output.space_before_token=!0),V===0&&K.indexOf(":")!==-1?(R=!0,this.indent()):K in this.NESTED_AT_RULE?(this._nestedLevel+=1,K in this.CONDITIONAL_GROUP_RULE&&(z=!0)):V===0&&!R&&($=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(M),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")R&&(R=!1,this.outdent()),$=!1,z?(z=!1,N=this._indentLevel>=this._nestedLevel):N=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&N&&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)):(A==="("?this._output.space_before_token=!1:A!==","&&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(),A==="{"&&this._output.trim(!0),R&&(this.outdent(),R=!1),this.print_string(this._ch),N=!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 Se=0;Se<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Se++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Se])){E=!0;break}(N||z)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!$&&V===0?(this.print_string(":"),R||(R=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var gn=A==='"'||A==="'";this.preserveSingleSpace(gn||M),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")E=!1,V===0?(R&&(this.outdent(),R=!1),$=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),V++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),V&&(V--,this.outdent()));else{var St=!1;this._input.lookBack("with")&&(St=!0),this.preserveSingleSpace(M||St),this.print_string(this._ch),R&&A==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),L=!0):(this.eatWhitespace(),V++,this.indent())}else if(this._ch===")")V&&(V--,this.outdent()),L&&this._input.peek()===";"&&this._options.selector_separator_newline&&(L=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!R||L)&&V===0&&!$?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||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.eatWhites Line truncated
`&&E&&this._output.add_new_line()}var bn=this._output.get_code(T);return bn},i.exports.Beautifier=I},function(i,s,o){var a=o(6).Options;function l(c){a.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;m<u.length;m++)u[m]!=="expand"?this.brace_style="collapse":this.brace_style=u[m]}l.prototype=new a,i.exports.Options=l}],e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}var r=n(15);zu=r})();var Pu=zu;function Uu(t,e,n){let r=t.getText(),i=!0,s=0,o=!1,a=n.tabSize||4;if(e){let d=t.offsetAt(e.start),u=d;for(;u>0&&Wu(r,u-1);)u--;u===0||Ou(r,u-1)?d=u:u<d&&(d=u+1);let m=t.offsetAt(e.end),f=m;for(;f<r.length&&Wu(r,f);)f++;if((f===r.length||Ou(r,f))&&(m=f),e=J.create(t.positionAt(d),t.positionAt(m)),o=kf(r,d),i=m===r.length,r=r.substring(d,m),d!==0){let g=t.offsetAt(fe.create(e.start.line,0));s=Ef(t.getText(),g,n)}o&&(r=`{
${Tu(r)}`)}else e=J.create(fe.create(0,0),t.positionAt(r.length));let l={indent_size:a,indent_char:n.insertSpaces?" ":" ",end_with_newline:i&&yt(n,"insertFinalNewline",!1),selector_separator_newline:yt(n,"newlineBetweenSelectors",!0),newline_between_rules:yt(n,"newlineBetweenRules",!0),space_around_selector_separator:yt(n,"spaceAroundSelectorSeparator",!1),brace_style:yt(n,"braceStyle","collapse"),indent_empty_lines:yt(n,"indentEmptyLines",!1),max_preserve_newlines:yt(n,"maxPreserveNewLines",void 0),preserve_newlines:yt(n,"preserveNewLines",!0),wrap_line_length:yt(n,"wrapLineLength",void 0),eol:`
`},c=Pu(r,l);if(o&&(c=Tu(c.substring(2))),s>0){let d=n.insertSpaces?xa(" ",a*s):xa(" ",s);c=c.split(`
`).join(`
`+d),e.start.character===0&&(c=d+c)}return[{range:e,newText:c}]}function Tu(t){return t.replace(/^\s+/,"")}var Cf=123,_f=125;function kf(t,e){for(;e>=0;){let n=t.charCodeAt(e);if(n===Cf)return!0;if(n===_f)return!1;e--}return!1}function yt(t,e,n){if(t&&t.hasOwnProperty(e)){let r=t[e];if(r!==null)return r}return n}function Ef(t,e,n){let r=e,i=0,s=n.tabSize||4;for(;r<t.length;){let o=t.charAt(r);if(o===" ")i++;else if(o===" ")i+=s;else break;r++}return Math.floor(i/s)}function Ou(t,e){return`\r
`.indexOf(t.charAt(e))!==-1}function Wu(t,e){return" ".indexOf(t.charAt(e))!==-1}var Vu={version:1.1,properties:[{name:"additive-symbols",browsers:["FF33"],atRule:"@counter-style",syntax:"[ <integer> && <symbol> ]#",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 | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",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 | <baseline-position> | [ <overflow-position>? <self-position> ]",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 | <baseline-position> | <overflow-position>? [ <self-position> | 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 t Line truncated
This feature is available since Firefox 55, but is only currently supported with SVG images loaded via chrome:// or resource:// URLs. To experiment with the feature in SVG on the Web it is necessary to set the svg.context-properties.content.enabled pref to true.`},{name:"-moz-float-edge",status:"obsolete",syntax:"border-box | content-box | margin-box | padding-box",values:[{name:"border-box"},{name:"content-box"},{name:"margin-box"},{name:"padding-box"}],relevance:0,browsers:["FF1"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"}],description:"The non-standard -moz-float-edge CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness."},{name:"-moz-force-broken-image-icon",status:"obsolete",syntax:"0 | 1",values:[{name:"0"},{name:"1"}],relevance:0,browsers:["FF1"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"}],description:"The -moz-force-broken-image-icon extended CSS property can be used to force the broken image icon to be shown even when a broken image has an alt attribute."},{name:"-moz-image-region",status:"nonstandard",syntax:"<shape> | auto",relevance:0,browsers:["FF1"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"}],description:"For certain XUL elements and pseudo-elements that use an image from the list-style-image property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance."},{name:"-moz-orient",status:"nonstandard",syntax:"inline | block | horizontal | vertical",values:[{name:"inline"},{name:"block"},{name:"horizontal"},{name:"vertical"}],relevance:0,browsers:["FF6"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-orient"}],description:"The -moz-orient CSS property specifies the orientation of the element to which it's applied."},{name:"-moz-outline-radius",status:"nonstandard",syntax:"<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",relevance:0,description:"In Mozilla applications like Firefox, the -moz-outline-radius CSS property can be used to give an element's outline rounded corners."},{name:"-moz-outline-radius-bottomleft",status:"nonstandard",syntax:"<outline-radius>",relevance:0,description:"In Mozilla applications, the -moz-outline-radius-bottomleft CSS property can be used to round the bottom-left corner of an element's outline."},{name:"-moz-outline-radius-bottomright",status:"nonstandard",syntax:"<outline-radius>",relevance:0,description:"In Mozilla applications, the -moz-outline-radius-bottomright CSS property can be used to round the bottom-right corner of an element's outline."},{name:"-moz-outline-radius-topleft",status:"nonstandard",syntax:"<outline-radius>",relevance:0,description:"In Mozilla applications, the -moz-outline-radius-topleft CSS property can be used to round the top-left corner of an element's outline."},{name:"-moz-outline-radius-topright",status:"nonstandard",syntax:"<outline-radius>",relevance:0,description:"In Mozilla applications, the -moz-outline-radius-topright CSS property can be used to round the top-right corner of an element's outline."},{name:"-moz-stack-sizing",status:"nonstandard",syntax:"ignore | stretch-to-fit",values:[{name:"ignore"},{name:"stretch-to-fit"}],relevance:0,description:"-moz-stack-sizing is an extended CSS property. Normally, a stack will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible."},{name:"-moz-text-blink",status:"nonstandard",syntax:"none | blink",values:[{name:"none"},{name:"blink"}],relevance:0,description:"The -moz-text-blink non-standard Mozilla CSS extension specifies the blink mode."},{name:"-moz-user-input",status:"obsolete",syntax:"auto | none | enabled | disabled",values:[{name:"auto"},{name:"none"},{name:"enabled"},{name:"disabled"}],relevance:0,browsers:["FF1"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"}],description:"In Mozilla applications, -moz-user-input determines if an element will accept user input."},{name:"-moz-user-modify",status:"nonstandard",syntax:"read-only | read-write | write-only",values:[{name:"read-only"},{name:"read-write"},{name:"write-only"}],relevance:0,description:"The -moz-user-modify property has no effect. It was originally planned to determine whether or not the content of an element can be edited by a user."},{name:"-moz-window-dragging",status:"nonstandard",syntax:"drag | no-drag",values:[{name:"drag"},{name:"no-drag"}],relevance:0,description:"The -moz-window-dragging CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X."},{name:"-moz-window-s Line truncated
This property is a shorthand for mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, mask-border-repeat, and mask-border-mode. As with all shorthand properties, any omitted sub-values will be set to their initial value.`},{name:"mask-border-mode",syntax:"luminance | alpha",values:[{name:"luminance"},{name:"alpha"}],relevance:50,description:"The mask-border-mode CSS property specifies the blending mode used in a mask border."},{name:"mask-border-outset",syntax:"[ <length> | <number> ]{1,4}",relevance:50,browsers:["E79","S17.2","C1","O15"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/mask-border-outset"}],description:"The mask-border-outset CSS property specifies the distance by which an element's mask border is set out from its border box."},{name:"mask-border-repeat",syntax:"[ stretch | repeat | round | space ]{1,2}",relevance:50,browsers:["E79","S17.2","C1","O15"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat"}],description:"The mask-border-repeat CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border."},{name:"mask-border-slice",syntax:"<number-percentage>{1,4} fill?",relevance:50,browsers:["E79","S17.2","C1","O15"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/mask-border-slice"}],description:"The mask-border-slice CSS property divides the image specified by mask-border-source into regions. These regions are used to form the components of an element's mask border."},{name:"mask-border-source",syntax:"none | <image>",relevance:50,browsers:["E79","S17.2","C1","O15"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/mask-border-source"}],description:`The mask-border-source CSS property specifies the source image used to create an element's mask border.
The mask-border-slice property is used to divide the source image into regions, which are then dynamically applied to the final mask border.`},{name:"mask-border-width",syntax:"[ <length-percentage> | <number> | auto ]{1,4}",relevance:50,browsers:["E79","S17.2","C1","O15"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/mask-border-width"}],description:"The mask-border-width CSS property specifies the width of an element's mask border."},{name:"mask-clip",syntax:"[ <geometry-box> | no-clip ]#",relevance:50,browsers:["E120","FF53","S15.4","C120","O106"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/mask-clip"}],description:"The mask-clip CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area."},{name:"mask-composite",syntax:"<compositing-operator>#",relevance:50,browsers:["E18","FF53","S15.4","C120","O106"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/mask-composite"}],description:"The mask-composite CSS property represents a compositing operation used on the current mask layer with the mask layers below it."},{name:"masonry-auto-flow",status:"experimental",syntax:"[ pack | next ] || [ definite-first | ordered ]",relevance:50,browsers:["Spreview"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow"}],description:"The masonry-auto-flow CSS property modifies how items are placed when using masonry in CSS Grid Layout."},{name:"math-depth",syntax:"auto-add | add(<integer>) | <integer>",relevance:50,browsers:["E109","FF117","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/math-depth"}],description:'Describe a notion of "depth" for each element of a mathematical formula, with respect to the top-level container of that formula.'},{name:"math-shift",syntax:"normal | compact",values:[{name:"normal"},{name:"compact"}],relevance:50,browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/math-shift"}],description:"Used for positioning superscript during the layout of MathML scripted elements."},{name:"math-style",syntax:"normal | compact",values:[{name:"normal"},{name:"compact"}],relevance:50,browsers:["E109","FF117","S14.1","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/math-style"}],description:"The math-style property indicates whether MathML equations should render with normal or compact height."},{name:"max-lines",status:"experimental",syntax:"none | <integer>",relevance:50,description:"The max-lines property forces a break after a set number of lines"},{name:"offset",syntax:"[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",relevance:50,browsers:["E79","FF72","S16","C55","O42"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/offset"}],description:"The offset CSS property is a shorthand property for animating an element along a defined path."},{name:"offset-anchor",syntax:"auto | <position>",relevance:50,browsers:["E116","FF72","S16","C116","O102"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/offset-anchor"}],description:"Defines an anchor point of the box positioned along the path. The anchor point specifies the point of the box which is to be considered as the point that is moved along the path."},{name:"offset-distance",syntax:"<length-percentage>",relevance:50,browsers:["E79","FF72","S16","C55","O42"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/offset-distance"}],description:"The offset-distance CSS property specifies a position along an offset-path."},{name:"offset-path",syntax:"none | <offset-path> || <coord-box>",relevance:50,browsers:["E79","FF72","S15.4","C55","O45"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/offset-path"}],description:`The offset-path CSS property specifies the offset path where the element gets positioned. The exact element\u2019s position on the offset path is determined by the offset-distance property. An offset path is either a specified path with one or multiple sub-paths or the geometry of a not-styled basic shape. Each shape or path must define an initial position for the computed value of "0" for offset-distance and an initial direction which specifies the rotation of the object to the initial position.
In this specification, a direction (or rotation) of 0 degrees is equivalent to the direction of the positive x-axis in the object\u2019s local coordinate system. In other words, a rotation of 0 degree points to the right side of the UA if the object and its ancestors have no transformation applied.`},{name:"offset-position",syntax:"normal | auto | <position>",relevance:50,browsers:["E116","FF122","S16","C116","O102"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/offset-position"}],description:"Specifies the initial position of the offset path. If position is specified with static, offset-position would be ignored."},{name:"offset-rotate",syntax:"[ auto | reverse ] || <angle>",relevance:50,browsers:["E79","FF72","S16","C56","O43"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/offset-rotate"}],description:"The offset-rotate CSS property defines the direction of the element while positioning along the offset path."},{name:"overflow-anchor",syntax:"auto | none",values:[{name:"auto"},{name:"none"}],relevance:52,browsers:["E79","FF66","Spreview","C56","O43"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/overflow-anchor"}],description:"The overflow-anchor CSS property provides a way to opt out browser scroll anchoring behavior which adjusts scroll position to minimize content shifts."},{name:"overflow-block",syntax:"visible | hidden | clip | scroll | auto",values:[{name:"visible"},{name:"hidden"},{name:"clip"},{name:"scroll"},{name:"auto"}],relevance:50,browsers:["FF69"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/overflow-block"}],description:"The overflow-block CSS media feature can be used to test how the output device handles content that overflows the initial containing block along the block axis."},{name:"overflow-clip-box",status:"nonstandard",syntax:"padding-box | content-box",values:[{name:"padding-box"},{name:"content-box"}],relevance:0,description:"The overflow-clip-box CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the overflow-clip-box-inline and overflow-clip-box-block properties."},{name:"overflow-clip-margin",syntax:"<visual-box> || <length [0,\u221E]>",relevance:50,browsers:["E90","FF102","C90","O76"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin"}],description:"The overflow-clip-margin CSS property determines how far outside its bounds an element with overflow: clip may be painted before being clipped."},{name:"overflow-inline",syntax:"visible | hidden | clip | scroll | auto",values:[{name:"visible"},{name:"hidden"},{name:"clip"},{name:"scroll"},{name:"auto"}],relevance:50,browsers:["FF69"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/overflow-inline"}],description:"The overflow-inline CSS media feature can be used to test how the output device handles content that overflows the initial containing block along the inline axis."},{name:"overlay",status:"experimental",syntax:"none | auto",values:[{name:"none"},{name:"auto"}],relevance:50,browsers:["E117","C117","O103"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/overlay"}],description:'The overlay CSS property specifies whether an element appearing in the top layer (for example, a shown popover or modal {{htmlelement("dialog")}} element) is actually rendered in the top layer. This property is only relevant within a list of transition-property values, and only if allow-discrete is set as the transition-behavior.'},{name:"overscroll-behavior",syntax:"[ contain | none | auto ]{1,2}",relevance:50,browsers:["E18","FF59","S16","C63","O50"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"}],description:"The overscroll-behavior CSS property is shorthand for the overscroll-behavior-x and overscroll-behavior-y properties, which allow you to control the browser's scroll overflow behavior \u2014 what happens when the boundary of a scrolling area is reached."},{name:"overscroll-behavior-block",syntax:"contain | none | auto",values:[{name:"contain"},{name:"none"},{name:"auto"}],relevance:50,browsers:["E79","FF73","S16","C77","O64"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"}],description:"The overscroll-behavior-block CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached."},{name:"overscroll-behavior-inline",syntax:"contain | none | auto",values:[{name:"contain"},{name:"none"},{name:"auto"}],relevance:50,browsers:["E79","FF73","S16","C77","O64"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"}],description:"The overscroll-behavior-inline CSS property sets the browser's behavior when the inline Line truncated
Specifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent.`},{name:"scroll-snap-type-y",status:"obsolete",syntax:"none | mandatory | proximity",values:[{name:"none"},{name:"mandatory"},{name:"proximity"}],relevance:0,description:`The scroll-snap-type-y CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one.
Specifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent.`},{name:"scroll-timeline",status:"experimental",syntax:"[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#",relevance:50,browsers:["E115","FF111","C115","O101"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/scroll-timeline"}],description:"Defines a name that can be used to identify the source element of a scroll timeline, along with the scrollbar axis that should provide the timeline."},{name:"scroll-timeline-axis",status:"experimental",syntax:"[ block | inline | x | y ]#",relevance:50,browsers:["E115","FF111","C115","O101"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis"}],description:"Specifies the scrollbar that will be used to provide the timeline for a scroll-timeline animation"},{name:"scroll-timeline-name",status:"experimental",syntax:"none | <dashed-ident>#",relevance:50,browsers:["E115","FF111","C115","O101"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name"}],description:"Defines a name that can be used to identify an element as the source of a scroll-timeline."},{name:"text-combine-upright",syntax:"none | all | [ digits <integer>? ]",relevance:50,browsers:["E79","FF48","S15.4","C48","IE11","O35"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"}],description:`The text-combine-upright CSS property specifies the combination of multiple characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes.
This is used to produce an effect that is known as tate-ch\u016B-yoko (\u7E26\u4E2D\u6A2A) in Japanese, or as \u76F4\u66F8\u6A6B\u5411 in Chinese.`},{name:"text-decoration-skip",status:"experimental",syntax:"none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",relevance:52,browsers:["S12.1","C57","O44"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"}],description:"The text-decoration-skip CSS property specifies what parts of the element\u2019s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors."},{name:"text-decoration-skip-ink",syntax:"auto | all | none",values:[{name:"auto"},{name:"all"},{name:"none"}],relevance:51,browsers:["E79","FF70","S15.4","C64","O50"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"}],description:"The text-decoration-skip-ink CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders."},{name:"text-decoration-thickness",syntax:"auto | from-font | <length> | <percentage> ",relevance:50,browsers:["E89","FF70","S12.1","C89","O75"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"}],description:"The text-decoration-thickness CSS property sets the thickness, or width, of the decoration line that is used on text in an element, such as a line-through, underline, or overline."},{name:"text-emphasis",syntax:"<'text-emphasis-style'> || <'text-emphasis-color'>",relevance:50,browsers:["E99","FF46","S7","C99","O85"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-emphasis"}],description:"The text-emphasis CSS property is a shorthand property for setting text-emphasis-style and text-emphasis-color in one declaration. This property will apply the specified emphasis mark to each character of the element's text, except separator characters, like spaces, and control characters."},{name:"text-emphasis-color",syntax:"<color>",relevance:50,browsers:["E99","FF46","S7","C99","O85"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"}],description:"The text-emphasis-color CSS property defines the color used to draw emphasis marks on text being rendered in the HTML document. This value can also be set and reset using the text-emphasis shorthand."},{name:"text-emphasis-position",syntax:"[ over | under ] && [ right | left ]",relevance:50,browsers:["E99","FF46","S7","C99","O85"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"}],description:"The text-emphasis-position CSS property describes where emphasis marks are drawn at. The effect of emphasis marks on the line height is the same as for ruby text: if there isn't enough place, the line height is increased."},{name:"text-emphasis-style",syntax:"none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",relevance:50,browsers:["E99","FF46","S7","C99","O85"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"}],description:"The text-emphasis-style CSS property defines the type of emphasis used. It can also be set, and reset, using the text-emphasis shorthand."},{name:"text-size-adjust",status:"experimental",syntax:"none | auto | <percentage>",relevance:57,browsers:["E79","C54","O41"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"}],description:"The text-size-adjust CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property."},{name:"text-underline-offset",syntax:"auto | <length> | <percentage> ",relevance:51,browsers:["E87","FF70","S12.1","C87","O73"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"}],description:"The text-underline-offset CSS property sets the offset distance of an underline text decoration line (applied using text-decoration) from its original position."},{name:"text-wrap",syntax:"wrap | nowrap | balance | stable | pretty",values:[{name:"wrap"},{name:"nowrap"},{name:"balance"},{name:"stable"},{name:"pretty"}],relevance:54,browsers:["E114","FF121","Spreview","C114","O100"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/text-wrap"}],description:"The text-wrap CSS property controls how text inside an element is wrapped."},{name:"timeline-scope",status:"experimental",syntax:"none | <dashed-ident>#",relevance:50,browsers:["E116","C116","O102"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/timeline-scope"}],description:"The timeline-scope CSS property modifies the sc Line truncated
In order to let ::-webkit-progress-value take effect, -webkit-appearance needs to be set to none on the <progress> element.`},{name:"::grammar-error",status:"experimental",browsers:["E121","Spreview","C121"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::grammar-error"}],description:"The ::grammar-error CSS pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect."},{name:"::marker",browsers:["E86","FF68","S11.1","C86","O72"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::marker"}],description:"The ::marker CSS pseudo-element selects the marker box of a list item, which typically contains a bullet or number. It works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements."},{name:"::part",status:"experimental",browsers:["E79","FF72","S13.1","C73","O60"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::part"}],description:"The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute."},{name:"::placeholder",browsers:["E79","FF51","S10.1","C57","O44"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::placeholder"}],description:"The ::placeholder CSS pseudo-element represents the placeholder text of a form element."},{name:"::slotted",browsers:["E79","FF63","S10","C50","O37"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::slotted"}],description:"The :slotted() CSS pseudo-element represents any element that has been placed into a slot inside an HTML template."},{name:"::spelling-error",status:"experimental",browsers:["E121","Spreview","C121"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::spelling-error"}],description:"The ::spelling-error CSS pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled."},{name:"::view-transition",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition"}],description:"The ::view-transition CSS pseudo-element represents the root of the view transitions overlay, which contains all view transitions and sits over the top of all other page content."},{name:"::view-transition-group",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-group"}],description:"The ::view-transition-group CSS pseudo-element represents a single view transition group."},{name:"::view-transition-image-pair",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-image-pair"}],description:`The ::view-transition-image-pair CSS pseudo-element represents a container for a view transition's "old" and "new" view states \u2014 before and after the transition.`},{name:"::view-transition-new",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-new"}],description:'The ::view-transition-new CSS pseudo-element represents the "new" view state of a view transition \u2014 a live representation of the new view, after the transition.'},{name:"::view-transition-old",status:"experimental",browsers:["E109","C109","O95"],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/::view-transition-old"}],description:'The ::view-transition-old CSS pseudo-element represents the "old" view state of a view transition \u2014 a static screenshot of the old view, before the transition.'}]};var ir=class{constructor(e){this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.addData(e)}provideProperties(){return this._properties}provideAtDirectives(){return this._atDirectives}providePseudoClasses(){return this._pseudoClasses}providePseudoElements(){return this._pseudoElements}addData(e){if(Array.isArray(e.properties))for(let n of e.properties)Ff(n)&&this._properties.push(n);if(Array.isArray(e.atDirectives))for(let n of e.atDirectives)Rf(n)&&this._atDirectives.push(n);if(Array.isArray(e.pseudoClasses))for(let n of e.pseudoClasses)If(n)&&this._pseudoClasses.push(n);if(Array.isArray(e.pseudoElements))for(let n of e.pseudoElements)Nf(n)&&this._pseudoElements.push(n)}};function Ff(t){return typeof t.name=="string"}function Rf(t){return typeof t.name=="string"}function If(t){return typeof t.name=="string"}function Nf(t){return typeof t.name=="string"}var sr=class{constructor(e){this.dataProviders=[],this._propertySet={},this._atDirectiveSet={},this._pseudoClassSet={},this._pseudoElementSet={},this._properties=[],this._atDirectives=[],this._pseudoClasses=[],this._pseudoElements=[],this.setDataProviders(e?.useDefaulLine truncated
+26
View File
@@ -0,0 +1,26 @@
var Nn=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?at.isErrorNoTelemetry(t)?new at(t.message+`
`+t.stack):new Error(t.message+`
`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},x1=new Nn;function Pe(e){_1(e)||x1.onUnexpectedError(e)}function Ct(e){if(e instanceof Error){let{name:t,message:n,cause:r}=e,s=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:s,noTelemetry:at.isErrorNoTelemetry(e),cause:r?Ct(r):void 0,code:e.code}}return e}var Sn="Canceled";function _1(e){return e instanceof ot?!0:e instanceof Error&&e.name===Sn&&e.message===Sn}var ot=class extends Error{constructor(){super(Sn),this.name=this.message}};var at=class e extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},G=class e extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,e.prototype)}};function kr(e,t="Unreachable"){throw new Error(t)}function Rn(e,t="unexpected state"){if(!e)throw typeof t=="string"?new G(`Assertion Failed: ${t}`):t}function xe(e){if(!e()){debugger;e(),Pe(new G("Assertion Failed"))}}function lt(e,t){let n=0;for(;n<e.length-1;){let r=e[n],s=e[n+1];if(!t(r,s))return!1;n++}return!0}function Fr(e){return typeof e=="string"}function Pr(e){return!!e&&typeof e[Symbol.iterator]=="function"}var He;(function(e){function t(w){return!!w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*s(w){yield w}e.single=s;function i(w){return t(w)?w:s(w)}e.wrap=i;function a(w){return w||n}e.from=a;function*l(w){for(let _=w.length-1;_>=0;_--)yield w[_]}e.reverse=l;function u(w){return!w||w[Symbol.iterator]().next().done===!0}e.isEmpty=u;function c(w){return w[Symbol.iterator]().next().value}e.first=c;function f(w,_){let y=0;for(let T of w)if(_(T,y++))return!0;return!1}e.some=f;function h(w,_){let y=0;for(let T of w)if(!_(T,y++))return!1;return!0}e.every=h;function d(w,_){for(let y of w)if(_(y))return y}e.find=d;function*b(w,_){for(let y of w)_(y)&&(yield y)}e.filter=b;function*p(w,_){let y=0;for(let T of w)yield _(T,y++)}e.map=p;function*m(w,_){let y=0;for(let T of w)yield*_(T,y++)}e.flatMap=m;function*x(...w){for(let _ of w)Pr(_)?yield*_:yield _}e.concat=x;function S(w,_,y){let T=y;for(let I of w)T=_(T,I);return T}e.reduce=S;function N(w){let _=0;for(let y of w)_++;return _}e.length=N;function*v(w,_,y=w.length){for(_<-w.length&&(_=0),_<0&&(_+=w.length),y<0?y+=w.length:y>w.length&&(y=w.length);_<y;_++)yield w[_]}e.slice=v;function C(w,_=Number.POSITIVE_INFINITY){let y=[];if(_===0)return[y,w];let T=w[Symbol.iterator]();for(let I=0;I<_;I++){let L=T.next();if(L.done)return[y,e.empty()];y.push(L.value)}return[y,{[Symbol.iterator](){return T}}]}e.consume=C;async function D(w){let _=[];for await(let y of w)_.push(y);return _}e.asyncToArray=D;async function q(w){let _=[];for await(let y of w)_=_.concat(y);return _}e.asyncToArrayFlat=q})(He||(He={}));function An(e){if(He.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Dr(...e){return _e(()=>An(e))}var yn=class{constructor(t){this._isDisposed=!1,this._fn=t}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 _e(e){return new yn(e)}var De=class e{static{this.DISABLE_DISPOSED_WARNING=!1}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{An(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t||t===se.None)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?e.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(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}},se=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new De,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};var H=class e{static{this.Undefined=new e(void 0)}constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}},ut=class{constructor(){this._first=H.Undefined,this._last=H.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===H.Undefined}clear(){let t=this._first;for(;t!= Line truncated
`).slice(2).join(`
`))}},kn=class extends Error{constructor(t,n){super(t),this.name="ListenerLeakError",this.stack=n}},Fn=class extends Error{constructor(t,n){super(t),this.name="ListenerRefusalError",this.stack=n}},ct=class{constructor(t){this.value=t}},N1=2,Z=class{constructor(t){this._size=0,this._options=t,this._leakageMon=this._options?.leakWarningThreshold?new En(t?.onListenerError??Pe,this._options?.leakWarningThreshold??v1):void 0,this._perfMon=this._options?._profName?new Cn(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(t,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Fn(`${l}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this._options?.onListenerError||Pe)(c),se.None}if(this._disposed)return se.None;n&&(t=t.bind(n));let s=new ct(t),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=Mn.create(),i=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof ct?(this._deliveryQueue??=new Pn,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let a=_e(()=>{i?.(),this._removeListener(s)});return r instanceof De?r.add(a):Array.isArray(r)&&r.push(a),a},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let n=this._listeners,r=n.indexOf(t);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;let s=this._deliveryQueue.current===this;if(this._size*N1<=n.length){let i=0;for(let a=0;a<n.length;a++)n[a]?n[i++]=n[a]:s&&i<this._deliveryQueue.end&&(this._deliveryQueue.end--,i<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=i}}_deliver(t,n){if(!t)return;let r=this._options?.onListenerError||Pe;if(!r){t.value(n);return}try{t.value(n)}catch(s){r(s)}}_deliverQueue(t){let n=t.current._listeners;for(;t.i<t.end;)this._deliver(n[t.i++],t.value);t.reset()}fire(t){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof ct)this._deliver(this._listeners,t);else{let n=this._deliveryQueue;n.enqueue(this,t,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}};var Pn=class{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function Tr(){return globalThis._VSCODE_NLS_MESSAGES}function Mt(){return globalThis._VSCODE_NLS_LANGUAGE}var S1=Mt()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Ir(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,s)=>{let i=s[0],a=t[i],l=r;return typeof a=="string"?l=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(l=String(a)),l}),S1&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function F(e,t,...n){return Ir(typeof e=="number"?R1(e,t):t,n)}function R1(e,t){let n=Tr()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var Te="en",Pt=!1,Dt=!1,Ft=!1,y1=!1,Vr=!1,A1=!1,C1=!1,kt,Dn=Te,Br=Te,E1,fe,de=globalThis,te;typeof de.vscode<"u"&&typeof de.vscode.process<"u"?te=de.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(te=process);var M1=typeof te?.versions?.electron=="string",k1=M1&&te?.type==="renderer";if(typeof te=="object"){Pt=te.platform==="win32",Dt=te.platform==="darwin",Ft=te.platform==="linux",Ft&&te.env.SNAP&&te.env.SNAP_REVISION,te.env.CI||te.env.BUILD_ARTIFACTSTAGINGDIRECTORY||te.env.GITHUB_WORKSPACE,kt=Te,Dn=Te;let e=te.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);kt=t.userLocale,Br=t.osLocale,Dn=t.resolvedLanguage||Te,E1=t.languagePack?.translationsConfigFile}catch{}y1=!0}else typeof navigator=="object"&&!k1?(fe=navigator.userAgent,Pt=fe.indexOf("Windows")>=0,Dt=fe.indexOf("Macintosh")>=0,A1=(fe.indexOf("Macintosh")>=0||fe.indexOf("iPad")>=0||fe.indexOf("iP Line truncated
`||e===" "}var Ae=class{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}},ln=class{constructor(t,n){this.lineRangeMapping=t,this.changes=n}};function Ui(e,t,n=(r,s)=>r===s){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(!n(e[r],t[r]))return!1;return!0}function*Wi(e,t){let n,r;for(let s of e)r!==void 0&&t(r,s)?n.push(s):(n&&(yield n),n=[s]),r=s;n&&(yield n)}function zi(e,t){for(let n=0;n<=e.length;n++)t(n===0?void 0:e[n-1],n===e.length?void 0:e[n])}function $i(e,t){for(let n=0;n<e.length;n++)t(n===0?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function Oi(e,t){for(let n of t)e.push(n)}var cr;(function(e){function t(i){return i<0}e.isLessThan=t;function n(i){return i<=0}e.isLessThanOrEqual=n;function r(i){return i>0}e.isGreaterThan=r;function s(i){return i===0}e.isNeitherLessOrGreaterThan=s,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(cr||(cr={}));function Ce(e,t){return(n,r)=>t(e(n),e(r))}var Ue=(e,t)=>e-t;function Hi(e){return(t,n)=>-e(t,n)}var qi=class e{static{this.empty=new e(t=>{})}constructor(t){this.iterate=t}toArray(){let t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new e(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new e(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(s=>((r||cr.isGreaterThan(t(s,n)))&&(r=!1,n=s),!0)),n}};var z=class e{static fromTo(t,n){return new e(t,n)}static addRange(t,n){let r=0;for(;r<n.length&&n[r].endExclusive<t.start;)r++;let s=r;for(;s<n.length&&n[s].start<=t.endExclusive;)s++;if(r===s)n.splice(r,0,t);else{let i=Math.min(t.start,n[r].start),a=Math.max(t.endExclusive,n[s-1].endExclusive);n.splice(r,s-r,new e(i,a))}}static tryCreate(t,n){if(!(t>n))return new e(t,n)}static ofLength(t){return new e(0,t)}static ofStartAndLength(t,n){return new e(t,t+n)}static emptyAt(t){return new e(t,t)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new G(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new e(this.start+t,this.endExclusive+t)}deltaStart(t){return new e(this.start+t,this.endExclusive)}deltaEnd(t){return new e(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(t){return this.start===t.start&&this.endExclusive===t.endExclusive}contains(t){return this.start<=t&&t<this.endExclusive}join(t){return new e(Math.min(this.start,t.start),Math.max(this.endExclusive,t.endExclusive))}intersect(t){let n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);if(n<=r)return new e(n,r)}intersectionLength(t){let n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);return Math.max(0,r-n)}intersects(t){let n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);return n<r}intersectsOrTouches(t){let n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);return n<=r}isBefore(t){return this.endExclusive<=t.start}isAfter(t){return this.start>=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new G(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new G(`Invalid clipping range: ${this.toString()}`);return t<this.start?this.endExclusive-(this.start-t)%this.length:t>=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;n<this.endExclusive;n++)t(n)}joinRightTouching(t){if(this.endExclusive!==t.start)throw new G(`Invalid join: ${this.toString()} and ${t.toString()}`);return new e(this.start,t.endExclusive)}};function pe(e,t){let n=be(e,t);return n===-1?void 0:e[n]}function be(e,t,n=0,r=e.length){let s=n,i=r;for(;s<i;){let a=Math.floor((s+i)/2);t(e[a])?s=a+1:i=a}return s-1}function Gi(e,t){let n=un(e,t);return n===e.length?void 0:e[n]}function un(e,t,n=0,r=e.length){let s=n,i=r;for(;s<i;){let a=Math.floor((s+i)/2);t(e[a])?i=a:s=a+1}return s}var xt=class e{static{this.assertInvariants=!1}constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(e.assertInvariants){if(this._prevFindLastPredicate){for(let r of this._array)if(this._prevFindLastPredicate(r)&&!t(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let n=be(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};var W=class e{static ofLength(t,n){return new e(t,t+n)}static fromRange(t){return new e(t.startLineNumber,t.endLineNumber)}static fromRangeInclusive(t){return new e(t.startLineNumber,t.endLineNumber+1)}static{this.compareByStart=Ce(t=>t.startLineNumber,Ue)}static joinMany(t){if(t.length= Line truncated
`?(n++,r=0):r++;return new e(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}add(t){return t.lineCount===0?new e(this.lineCount,this.columnCount+t.columnCount):new e(this.lineCount+t.lineCount,t.columnCount)}createRange(t){return this.lineCount===0?new E(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new E(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new E(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return W.ofLength(1,this.lineCount+1)}addToPosition(t){return this.lineCount===0?new B(t.lineNumber,t.column+this.columnCount):new B(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};var hr=class{getOffsetRange(t){return new z(this.getOffset(t.getStartPosition()),this.getOffset(t.getEndPosition()))}getRange(t){return E.fromPositions(this.getPosition(t.start),this.getPosition(t.endExclusive))}getStringReplacement(t){return new Ze.deps.StringReplacement(this.getOffsetRange(t.range),t.text)}getTextReplacement(t){return new Ze.deps.TextReplacement(this.getRange(t.replaceRange),t.newText)}getTextEdit(t){let n=t.replacements.map(r=>this.getTextReplacement(r));return new Ze.deps.TextEdit(n)}},Ze=class{static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};var cn=class extends hr{constructor(t){super(),this.text=t,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<t.length;n++)t.charAt(n)===`
`&&(this.lineStartOffsetByLineIdx.push(n+1),n>0&&t.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(t.length)}getOffset(t){let n=this._validatePosition(t);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(t){if(t.lineNumber<1)return new B(1,1);let n=this.textLength.lineCount+1;if(t.lineNumber>n){let s=this.getLineLength(n);return new B(n,s+1)}if(t.column<1)return new B(t.lineNumber,1);let r=this.getLineLength(t.lineNumber);return t.column-1>r?new B(t.lineNumber,r+1):t}getPosition(t){let n=be(this.lineStartOffsetByLineIdx,i=>i<=t),r=n+1,s=t-this.lineStartOffsetByLineIdx[n]+1;return new B(r,s)}get textLength(){let t=this.lineStartOffsetByLineIdx.length-1;return new Ze.deps.TextLength(t,this.text.length-this.lineStartOffsetByLineIdx[t])}getLineLength(t){return this.lineEndOffsetByLineIdx[t-1]-this.lineStartOffsetByLineIdx[t-1]}};var fr=class{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new B(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(t){return this.getValueOfRange(this.getTransformer().getRange(t))}getLineLength(t){return this.getValueOfRange(new E(t,1,t,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new cn(this.getValue())),this._transformer}getLineAt(t){return this.getValueOfRange(new E(t,1,t,Number.MAX_SAFE_INTEGER))}},dr=class extends fr{constructor(t,n){Rn(n>=1),super(),this._getLineContent=t,this._lineCount=n}getValueOfRange(t){if(t.startLineNumber===t.endLineNumber)return this._getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);let n=this._getLineContent(t.startLineNumber).substring(t.startColumn-1);for(let r=t.startLineNumber+1;r<t.endLineNumber;r++)n+=`
`+this._getLineContent(r);return n+=`
`+this._getLineContent(t.endLineNumber).substring(0,t.endColumn-1),n}getLineLength(t){return this._getLineContent(t).length}get length(){let t=this._getLineContent(this._lineCount);return new ze(this._lineCount-1,t.length)}},$e=class extends dr{constructor(t){super(n=>t[n-1],t.length)}};var hn=class e{static joinReplacements(t,n){if(t.length===0)throw new G;if(t.length===1)return t[0];let r=t[0].range.getStartPosition(),s=t[t.length-1].range.getEndPosition(),i="";for(let a=0;a<t.length;a++){let l=t[a];if(i+=l.text,a<t.length-1){let u=t[a+1],c=E.fromPositions(l.range.getEndPosition(),u.range.getStartPosition()),f=n.getValueOfRange(c);i+=f}}return new e(E.fromPositions(r,s),i)}static fromStringReplacement(t,n){return new e(n.getTransformer().getRange(t.replaceRange),t.newText)}static delete(t){return new e(t,"")}constructor(t,n){this.range=t,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(t,n){return t.range.equalsRange(n.range)&&t.text===n.text}equals(t){return e.equals(this,t)}removeCommonPrefixAndSuffix(t){return this.removeCommonPrefix(t).removeCommonSuffix(t)}removeCommonPrefix(t){let n=t.getValueOfRange(this.range).replaceAll(`\r
`,`
`),r=this.text.replaceAll(`\r
`,`
`),s=jr(n,r),i=ze.ofText(n.substring(0,s)).addToPosition(this.range.getStartPosition()),a=r.substring(s),l=E.fromPositions(i,this.range.getEndPosition());return new e(l,a)}removeCommonSuffix(t){let n=t.getValueOfRange(this.range).replaceAll(`\r
`,`
`),r=this.text.replaceAll(`\r
`,`
`),s=Xr(n,r),i=ze.ofText(n.substring(0,n.length-s)).addToPosition(this.range.getStartPosition()),a=r.substring(0,r.length-s),l=E.fromPositions(this.range.getStartPosition(),i);return new e(l,a)}toString(){let t=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${t.lineNumber},${t.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}};var le=class e{static inverse(t,n,r){let s=[],i=1,a=1;for(let u of t){let c=new e(new W(i,u.original.startLineNumber),new W(a,u.modified.startLineNumber));c.modified.isEmpty||s.push(c),i=u.original.endLineNumberExclusive,a=u.modified.endLineNumberExclusive}let l=new e(new W(i,n+1),new W(a,r+1));return l.modified.isEmpty||s.push(l),s}static clip(t,n,r){let s=[];for(let i of t){let a=i.original.intersect(n),l=i.modified.intersect(r);a&&!a.isEmpty&&l&&!l.isEmpty&&s.push(new e(a,l))}return s}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new e(this.modified,this.original)}join(t){return new e(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){let t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new re(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new G("not a valid diff");return new re(new E(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new E(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new re(new E(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new E(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(ji(this.original.endLineNumberExclusive,t)&&ji(this.modified.endLineNumberExclusive,n))return new re(new E(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new E(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new re(E.fromPositions(new B(this.original.startLineNumber,1),Ke(new B(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),E.fromPositions(new B(this.modified.startLineNumber,1),Ke(new B(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new re(E.fromPositions(Ke(new B(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Ke(new B(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),E.fromPositions(Ke(new B(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Ke(new B(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new G}};function Ke(e,t){if(e.lineNumber<1)return new B(1,1);if(e.lineNumber>t.length)return new B(t.length,t[t.length-1].length+1);let n=t[e.lineNumber-1];return e.column>n.length+1?new B(e.lineNumber,n.length+1):e}function ji(e,t){return e>=1&&e<=t.length}var we=class e extends le{static fromRangeMappings(t){let n=W.join(t.map(s=>W.fromRangeInclusive(s.originalRange))),r=W.join(t.map(s=>W.fromRangeInclusive(s.modifiedRange)));return new e(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new e(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new e(this.original,this.modified,[this.toRangeMapping()])}},re=class e{static fromEdit(t){let n=t.getNewRanges();return t.replacements.map((s,i)=>new e(s.range,n[i]))}static assertSorted(t){for(let n=1;n<t.length;n++){let r=t[n-1],s=t[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(s.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(s.modifiedRange.getStartPosition())))throw new G("Range mappings must be sorted")}}constructor(t,n){this.originalRange=t,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new e(this.modifiedRange,this.originalRange)}toTextEdit(t){let n=t.getValueOfRange(this.modifiedRange);return new hn(this.originalRange,n)}};function mr(e,t,n,r=!1){let s=[];for(let i of Wi(e.map(a=>po(a,t,n)),(a,l)=>a.original.intersectsOrTouches(l.original)||a.modified.intersectsOrTouches(l.modified))){let a=i[0],l=i[i.length-1];s.push(new we(a.original.join(l.original),a.modified.join(l.modified),i.map(u=>u.innerChanges[0])))}return xe(()=>!r&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||n.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!==t.length.lineCount-s[s.length-1].original.endLineNumberExclusive)?!1:lt(s,(i,a)=>a.original.startLineNumber-i.original.endLineNumberExclusive===a.modified.startLineNumber-i.modified.endLineNumberExclusive&&i.original.endLineNumberExclusive<a.original.startLineNumber&&i.modified. Line truncated
`);this.histogram[l]=(this.histogram[l]||0)+1}this.totalCount=s}computeSimilarity(t){let n=0,r=Math.max(this.histogram.length,t.histogram.length);for(let s=0;s<r;s++)n+=Math.abs((this.histogram[s]??0)-(t.histogram[s]??0));return 1-n/(this.totalCount+t.totalCount)}};var gn=class{compute(t,n,r=Ee.instance,s){if(t.length===0||n.length===0)return ce.trivial(t,n);let i=new tt(t.length,n.length),a=new tt(t.length,n.length),l=new tt(t.length,n.length);for(let p=0;p<t.length;p++)for(let m=0;m<n.length;m++){if(!r.isValid())return ce.trivialTimedOut(t,n);let x=p===0?0:i.get(p-1,m),S=m===0?0:i.get(p,m-1),N;t.getElement(p)===n.getElement(m)?(p===0||m===0?N=0:N=i.get(p-1,m-1),p>0&&m>0&&a.get(p-1,m-1)===3&&(N+=l.get(p-1,m-1)),N+=s?s(p,m):1):N=-1;let v=Math.max(x,S,N);if(v===N){let C=p>0&&m>0?l.get(p-1,m-1):0;l.set(p,m,C+1),a.set(p,m,3)}else v===x?(l.set(p,m,0),a.set(p,m,1)):v===S&&(l.set(p,m,0),a.set(p,m,2));i.set(p,m,v)}let u=[],c=t.length,f=n.length;function h(p,m){(p+1!==c||m+1!==f)&&u.push(new X(new z(p+1,c),new z(m+1,f))),c=p,f=m}let d=t.length-1,b=n.length-1;for(;d>=0&&b>=0;)a.get(d,b)===3?(h(d,b),d--,b--):a.get(d,b)===1?d--:b--;return h(-1,-1),u.reverse(),new ce(u,!1)}};var nt=class{compute(t,n,r=Ee.instance){if(t.length===0||n.length===0)return ce.trivial(t,n);let s=t,i=n;function a(m,x){for(;m<s.length&&x<i.length&&s.getElement(m)===i.getElement(x);)m++,x++;return m}let l=0,u=new xr;u.set(0,a(0,0));let c=new _r;c.set(0,u.get(0)===0?null:new pn(null,0,0,u.get(0)));let f=0;e:for(;;){if(l++,!r.isValid())return ce.trivialTimedOut(s,i);let m=-Math.min(l,i.length+l%2),x=Math.min(l,s.length+l%2);for(f=m;f<=x;f+=2){let S=f===x?-1:u.get(f+1),N=f===m?-1:u.get(f-1)+1,v=Math.min(Math.max(S,N),s.length),C=v-f;if(v>s.length||C>i.length)continue;let D=a(v,C);u.set(f,D);let q=v===S?c.get(f+1):c.get(f-1);if(c.set(f,D!==v?new pn(q,v,C,D-v):q),u.get(f)===s.length&&u.get(f)-f===i.length)break e}}let h=c.get(f),d=[],b=s.length,p=i.length;for(;;){let m=h?h.x+h.length:0,x=h?h.y+h.length:0;if((m!==b||x!==p)&&d.push(new X(new z(m,b),new z(x,p))),!h)break;b=h.x,p=h.y,h=h.prev}return d.reverse(),new ce(d,!1)}},pn=class{constructor(t,n,r,s){this.prev=t,this.x=n,this.y=r,this.length=s}},xr=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}},_r=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}};var Me=class{constructor(t,n,r){this.lines=t,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let i=t[s-1],a=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,i=i.substring(a)),this.lineStartOffsets.push(a);let l=0;if(!r){let c=i.trimStart();l=i.length-c.length,i=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);let u=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-l,i.length):i.length;for(let c=0;c<u;c++)this.elements.push(i.charCodeAt(c));s<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new z(0,this.length))}getText(t){return this.elements.slice(t.start,t.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){let n=Zi(t>0?this.elements[t-1]:-1),r=Zi(t<this.elements.length?this.elements[t]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let s=0;return n!==r&&(s+=10,n===0&&r===1&&(s+=1)),s+=Yi(n),s+=Yi(r),s}translateOffset(t,n="right"){let r=be(this.firstElementOffsetByLineIdx,i=>i<=t),s=t-this.firstElementOffsetByLineIdx[r];return new B(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+s+(s===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(t){let n=this.translateOffset(t.start,"right"),r=this.translateOffset(t.endExclusive,"left");return r.isBefore(n)?E.fromPositions(r,r):E.fromPositions(n,r)}findWordContaining(t){if(t<0||t>=this.elements.length||!rt(this.elements[t]))return;let n=t;for(;n>0&&rt(this.elements[n-1]);)n--;let r=t;for(;r<this.elements.length&&rt(this.elements[r]);)r++;return new z(n,r)}findSubWordContaining(t){if(t<0||t>=this.elements.length||!rt(this.elements[t]))return;let n=t;for(;n>0&&rt(this.elements[n-1])&&!Ji(this.elements[n]);)n--;let r=t;for( Line truncated
`).length>=15&&_o(h,b=>b.length>=2)>=2}),a=So(e,a),a}function _o(e,t){let n=0;for(let r of e)t(r)&&n++;return n}function Lo(e,t,n,r){let s=[],i=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Lt(u.original,t,u)),a=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Lt(u.modified,n,u))),l=new Set;for(let u of i){let c=-1,f;for(let h of a){let d=u.computeSimilarity(h);d>c&&(c=d,f=h)}if(c>.9&&f&&(a.delete(f),s.push(new le(u.range,f.range)),l.add(u.source),l.add(f.source)),!r.isValid())return{moves:s,excludedChanges:l}}return{moves:s,excludedChanges:l}}function vo(e,t,n,r,s,i){let a=[],l=new rn;for(let d of e)for(let b=d.original.startLineNumber;b<d.original.endLineNumberExclusive-2;b++){let p=`${t[b-1]}:${t[b+1-1]}:${t[b+2-1]}`;l.add(p,{range:new W(b,b+3)})}let u=[];e.sort(Ce(d=>d.modified.startLineNumber,Ue));for(let d of e){let b=[];for(let p=d.modified.startLineNumber;p<d.modified.endLineNumberExclusive-2;p++){let m=`${n[p-1]}:${n[p+1-1]}:${n[p+2-1]}`,x=new W(p,p+3),S=[];l.forEach(m,({range:N})=>{for(let C of b)if(C.originalLineRange.endLineNumberExclusive+1===N.endLineNumberExclusive&&C.modifiedLineRange.endLineNumberExclusive+1===x.endLineNumberExclusive){C.originalLineRange=new W(C.originalLineRange.startLineNumber,N.endLineNumberExclusive),C.modifiedLineRange=new W(C.modifiedLineRange.startLineNumber,x.endLineNumberExclusive),S.push(C);return}let v={modifiedLineRange:x,originalLineRange:N};u.push(v),S.push(v)}),b=S}if(!i.isValid())return[]}u.sort(Hi(Ce(d=>d.modifiedLineRange.length,Ue)));let c=new We,f=new We;for(let d of u){let b=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,p=c.subtractFrom(d.modifiedLineRange),m=f.subtractFrom(d.originalLineRange).getWithDelta(b),x=p.getIntersection(m);for(let S of x.ranges){if(S.length<3)continue;let N=S,v=S.delta(-b);a.push(new le(v,N)),c.addRange(N),f.addRange(v)}}a.sort(Ce(d=>d.original.startLineNumber,Ue));let h=new xt(e);for(let d=0;d<a.length;d++){let b=a[d],p=h.findLastMonotonous(q=>q.original.startLineNumber<=b.original.startLineNumber),m=pe(e,q=>q.modified.startLineNumber<=b.modified.startLineNumber),x=Math.max(b.original.startLineNumber-p.original.startLineNumber,b.modified.startLineNumber-m.modified.startLineNumber),S=h.findLastMonotonous(q=>q.original.startLineNumber<b.original.endLineNumberExclusive),N=pe(e,q=>q.modified.startLineNumber<b.modified.endLineNumberExclusive),v=Math.max(S.original.endLineNumberExclusive-b.original.endLineNumberExclusive,N.modified.endLineNumberExclusive-b.modified.endLineNumberExclusive),C;for(C=0;C<x;C++){let q=b.original.startLineNumber-C-1,w=b.modified.startLineNumber-C-1;if(q>r.length||w>s.length||c.contains(w)||f.contains(q)||!Ki(r[q-1],s[w-1],i))break}C>0&&(f.addRange(new W(b.original.startLineNumber-C,b.original.startLineNumber)),c.addRange(new W(b.modified.startLineNumber-C,b.modified.startLineNumber)));let D;for(D=0;D<v;D++){let q=b.original.endLineNumberExclusive+D,w=b.modified.endLineNumberExclusive+D;if(q>r.length||w>s.length||c.contains(w)||f.contains(q)||!Ki(r[q-1],s[w-1],i))break}D>0&&(f.addRange(new W(b.original.endLineNumberExclusive,b.original.endLineNumberExclusive+D)),c.addRange(new W(b.modified.endLineNumberExclusive,b.modified.endLineNumberExclusive+D))),(C>0||D>0)&&(a[d]=new le(new W(b.original.startLineNumber-C,b.original.endLineNumberExclusive+D),new W(b.modified.startLineNumber-C,b.modified.endLineNumberExclusive+D)))}return a}function Ki(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;let s=new nt().compute(new Me([e],new E(1,1,1,e.length),!1),new Me([t],new E(1,1,1,t.length),!1),n),i=0,a=X.invert(s.diffs,e.length);for(let f of a)f.seq1Range.forEach(h=>{vt(e.charCodeAt(h))||i++});function l(f){let h=0;for(let d=0;d<e.length;d++)vt(f.charCodeAt(d))||h++;return h}let u=l(e.length>t.length?e:t);return i/u>.6&&u>10}function No(e){if(e.length===0)return e;e.sort(Ce(n=>n.original.startLineNumber,Ue));let t=[e[0]];for(let n=1;n<e.length;n++){let r=t[t.length-1],s=e[n],i=s.original.startLineNumber-r.original.endLineNumberExclusive,a=s.modified.startLineNumber-r.modified.endLineNumberExclusive;if(i>=0&&a>=0&&i+a<=2){t[t.length-1]=r.join(s);continue}t.push(s)}return t}function So(e,t){let n=new xt(e);return t=t.filter(r=>{let s=n.findLastMonotonous(l=>l.original.startLineNumber<r.original.endLineNumberExclusive)||new le(new W(1,1),new W(1,1)),i=pe(e,l=>l.modified.startLineNumber<r.modified.endLineNumberExclusive);return s!==i}),t}function Lr(e,t,n){let r=n;return r=t1(e,t,r),r=t1(e,t,r),r=Ro(e,t,r),r}function t1(e,t,n){if(n.length===0)return n;let r=[];r.push(n[0]);for(let i=1;i<n.length;i++){let a=r[r.length-1],l=n[i];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){let u=l.seq1Range.start-a.seq1Range.endExclusive,c;for(c=1;c<=u&&!(e.getElement(l.seq1Range.start-c)!==e.getElement(l.seq1Range.endExclusive-c)||t.getElement(l.seq2Range.start-c)!==t.getElement(l.seq2Range.endExclusive-c));c++);if(c--,c===u){r[r.length-1]= Line truncated
`)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}};function o1(e){let t=0;for(;t<e.length&&(e.charCodeAt(t)===32||e.charCodeAt(t)===9);)t++;return t}var bn=class{constructor(){this.dynamicProgrammingDiffing=new gn,this.myersDiffingAlgorithm=new nt}computeDiff(t,n,r){if(t.length<=1&&Ui(t,n,(w,_)=>w===_))return new Ae([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new Ae([new we(new W(1,t.length+1),new W(1,n.length+1),[new re(new E(1,1,t.length,t[t.length-1].length+1),new E(1,1,n.length,n[n.length-1].length+1))])],[],!1);let s=r.maxComputationTimeMs===0?Ee.instance:new mn(r.maxComputationTimeMs),i=!r.ignoreTrimWhitespace,a=new Map;function l(w){let _=a.get(w);return _===void 0&&(_=a.size,a.set(w,_)),_}let u=t.map(w=>l(w.trim())),c=n.map(w=>l(w.trim())),f=new Nt(u,t),h=new Nt(c,n),d=f.length+h.length<1700?this.dynamicProgrammingDiffing.compute(f,h,s,(w,_)=>t[w]===n[_]?n[_].length===0?.1:1+Math.log(1+n[_].length):.99):this.myersDiffingAlgorithm.compute(f,h,s),b=d.diffs,p=d.hitTimeout;b=Lr(f,h,b),b=s1(f,h,b);let m=[],x=w=>{if(i)for(let _=0;_<w;_++){let y=S+_,T=N+_;if(t[y]!==n[T]){let I=this.refineDiff(t,n,new X(new z(y,y+1),new z(T,T+1)),s,i,r);for(let L of I.mappings)m.push(L);I.hitTimeout&&(p=!0)}}},S=0,N=0;for(let w of b){xe(()=>w.seq1Range.start-S===w.seq2Range.start-N);let _=w.seq1Range.start-S;x(_),S=w.seq1Range.endExclusive,N=w.seq2Range.endExclusive;let y=this.refineDiff(t,n,w,s,i,r);y.hitTimeout&&(p=!0);for(let T of y.mappings)m.push(T)}x(t.length-S);let v=new $e(t),C=new $e(n),D=mr(m,v,C),q=[];return r.computeMoves&&(q=this.computeMoves(D,t,n,u,c,s,i,r)),xe(()=>{function w(y,T){if(y.lineNumber<1||y.lineNumber>T.length)return!1;let I=T[y.lineNumber-1];return!(y.column<1||y.column>I.length+1)}function _(y,T){return!(y.startLineNumber<1||y.startLineNumber>T.length+1||y.endLineNumberExclusive<1||y.endLineNumberExclusive>T.length+1)}for(let y of D){if(!y.innerChanges)return!1;for(let T of y.innerChanges)if(!(w(T.modifiedRange.getStartPosition(),n)&&w(T.modifiedRange.getEndPosition(),n)&&w(T.originalRange.getStartPosition(),t)&&w(T.originalRange.getEndPosition(),t)))return!1;if(!_(y.modified,n)||!_(y.original,t))return!1}return!0}),new Ae(D,q,p)}computeMoves(t,n,r,s,i,a,l,u){return e1(t,n,r,s,i,a).map(h=>{let d=this.refineDiff(n,r,new X(h.original.toOffsetRange(),h.modified.toOffsetRange()),a,l,u),b=mr(d.mappings,new $e(n),new $e(r),!0);return new ln(h,b)})}refineDiff(t,n,r,s,i,a){let u=Ao(r).toRangeMapping2(t,n),c=new Me(t,u.originalRange,i),f=new Me(n,u.modifiedRange,i),h=c.length+f.length<500?this.dynamicProgrammingDiffing.compute(c,f,s):this.myersDiffingAlgorithm.compute(c,f,s),d=h.diffs;return d=Lr(c,f,d),d=vr(c,f,d,(p,m)=>p.findWordContaining(m)),a.extendToSubwords&&(d=vr(c,f,d,(p,m)=>p.findSubWordContaining(m),!0)),d=r1(c,f,d),d=i1(c,f,d),{mappings:d.map(p=>new re(c.translateRange(p.seq1Range),f.translateRange(p.seq2Range))),hitTimeout:h.hitTimeout}}};function Ao(e){return new le(new W(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new W(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var Nr={getLegacy:()=>new fn,getDefault:()=>new bn};function ke(e,t){let n=Math.pow(10,t);return Math.round(e*n)/n}var g=class{constructor(t,n,r,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=ke(Math.max(Math.min(1,s),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}},he=class e{constructor(t,n,r,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=ke(Math.max(Math.min(1,n),0),3),this.l=ke(Math.max(Math.min(1,r),0),3),this.a=ke(Math.max(Math.min(1,s),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,s=t.b/255,i=t.a,a=Math.max(n,r,s),l=Math.min(n,r,s),u=0,c=0,f=(l+a)/2,h=a-l;if(h>0){switch(c=Math.min(f<=.5?h/(2*f):h/(2-2*f),1),a){case n:u=(r-s)/h+(r<s?6:0);break;case r:u=(s-n)/h+2;break;case s:u=(n-r)/h+4;break}u*=60,u=Math.round(u)}return new e(u,c,f,i)}static _hue2rgb(t,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){let n=t.h/360,{s:r,l:s,a:i}=t,a,l,u;if(r===0)a=l=u=s;else{let c=s<.5?s*(1+r):s+r-s*r,f=2*s-c;a=e._hue2rgb(f,c,n+1/3),l=e._hue2rgb(f,c,n),u=e._hue2rgb(f,c,n-1/3)}return new g(Math.round(a*255),Math.round(l*255),Math.round(u*255),i)}},st=class e{constructor(t,n,r,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=ke(Math.max(Math.min(1,n),0),3),this.v=ke(Math.max(Math.min(1,r),0),3),this.a=ke(Math.max(Math.min(1,s),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,s=t.b/255,i=Math.max(n,r,s),a=Math.min(n,r,s),l=i-a,u=i===0?0:l/i,c;return l===0?c=0:i===n?c=((r-s)/l%6+6)%6:i===r?c=(s-n)/l+2:c=(n-r)/l+4,new e(Math.round(c*60),u,i,t.a)}static toRGBA(t){let{h:n,s:r,v:s,a:i}=t,a=s*r,l=a*(1-Math.abs(n/60%2-1)),u=s-a,[c,f Line truncated
`);i.lastIndex=0;let f;for(;(f=i.exec(c))!==null;){let h=c.substring(0,f.index),d=(h.match(/\n/g)||[]).length,b=a+d,p=f[0].split(`
`),m=p.length,x=b+m-1,S=h.lastIndexOf(`
`)+1,N=f.index-S+1,v=p[p.length-1],C=m===1?N+f[0].length:v.length+1,D={startLineNumber:b,startColumn:N,endLineNumber:x,endColumn:C},q=(f.groups??{}).label??"",w=((f.groups??{}).separator??"")!=="",_={range:D,text:q,hasSeparatorLine:w,shouldBeInComments:!0};(_.text||_.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<_.range.startLineNumber)&&n.push(_),i.lastIndex=f.index+f[0].length}}return n}function Do(e){e=e.trim();let t=e.startsWith("-");return e=e.replace(Mo,""),{text:e,hasSeparatorLine:t}}var To=Symbol("MicrotaskDelay");var Io,Rr;(function(){let e=globalThis;typeof e.requestIdleCallback!="function"||typeof e.cancelIdleCallback!="function"?Rr=(t,n,r)=>{Ur(()=>{if(s)return;let i=Date.now()+15;n(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,i-Date.now())}}))});let s=!1;return{dispose(){s||(s=!0)}}}:Rr=(t,n,r)=>{let s=t.requestIdleCallback(n,typeof r=="number"?{timeout:r}:void 0),i=!1;return{dispose(){i||(i=!0,t.cancelIdleCallback(s))}}},Io=(t,n)=>Rr(globalThis,t,n)})();var yr=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((t,n)=>{this.completeCallback=t,this.errorCallback=n})}complete(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(t),this.outcome={outcome:0,value:t},n()})}error(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(t),this.outcome={outcome:1,value:t},n()})}cancel(){return this.error(new ot)}},d1;(function(e){async function t(r){let s,i=await Promise.all(r.map(a=>a.then(l=>l,l=>{s||(s=l)})));if(typeof s<"u")throw s;return i}e.settled=t;function n(r){return new Promise(async(s,i)=>{try{await r(s,i)}catch(a){i(a)}})}e.withAsyncBody=n})(d1||(d1={}));var Ar=class{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(t){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,t)}else this._unconsumedValues.push(t)}produceFinal(t){this._ensureNoFinalValue(),this._finalValue=t;for(let n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,t);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new G("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(t,n){n.ok?t.complete(n.value):t.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let t=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return t.ok?Promise.resolve(t.value):Promise.reject(t.error)}else{let t=new yr;return this._unsatisfiedConsumers.push(t),t.p}}},m1=class e{constructor(t,n){this._onReturn=n,this._producerConsumer=new Ar,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()=>{let r=t({emitOne:s=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}}),emitMany:s=>{for(let i of s)this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}})},reject:s=>this._finishError(s)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(s){this._finishError(s)}})}static fromArray(t){return new e(n=>{n.emitMany(t)})}static fromPromise(t){return new e(async n=>{n.emitMany(await t)})}static fromPromisesResolveOrder(t){return new e(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new e(async n=>{await Promise.all(t.map(async r=>{for await(let s of r)n.emitOne(s)}))})}static{this.EMPTY=e.fromArray([])}static map(t,n){return new e(async r=>{for await(let s of t)r.emitOne(n(s))})}map(t){return e.map(this,t)}static coalesce(t){return e.filter(t,n=>!!n)}coalesce(){return e.coalesce(this)}static filter(t,n){return new e(async r=>{for await(let s of t)n(s)&&r.emitOne(s)})}filter(t){return e.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(t){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:t})}[Symbol.asyncIterator](){return this._iterator}};var wn=class{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=Ve(t);let r=this.values,s=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(r.length+i),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+i),this.values.set(n,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=Ve(t),n=Ve(n),this.values[t]===n?!1:(this.values[t]=n,t-1<this.prefixSumValidIndex[0]&& Line truncated
+470
View File
@@ -0,0 +1,470 @@
var xi=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Ft.isErrorNoTelemetry(t)?new Ft(t.message+`
`+t.stack):new Error(t.message+`
`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},au=new xi;function Ze(e){ou(e)||au.onUnexpectedError(e)}function hn(e){if(e instanceof Error){let{name:t,message:n,cause:i}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:Ft.isErrorNoTelemetry(e),cause:i?hn(i):void 0,code:e.code}}return e}var Ti="Canceled";function ou(e){return e instanceof zt?!0:e instanceof Error&&e.name===Ti&&e.message===Ti}var zt=class extends Error{constructor(){super(Ti),this.name=this.message}};var Ft=class e extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},te=class e extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,e.prototype)}};function us(e,t="Unreachable"){throw new Error(t)}function Si(e,t="unexpected state"){if(!e)throw typeof t=="string"?new te(`Assertion Failed: ${t}`):t}function He(e){if(!e()){debugger;e(),Ze(new te("Assertion Failed"))}}function Pt(e,t){let n=0;for(;n<e.length-1;){let i=e[n],r=e[n+1];if(!t(i,r))return!1;n++}return!0}function cs(e){return typeof e=="string"}function hs(e){return!!e&&typeof e[Symbol.iterator]=="function"}var ft;(function(e){function t(b){return!!b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function i(){return n}e.empty=i;function*r(b){yield b}e.single=r;function s(b){return t(b)?b:r(b)}e.wrap=s;function a(b){return b||n}e.from=a;function*l(b){for(let g=b.length-1;g>=0;g--)yield b[g]}e.reverse=l;function o(b){return!b||b[Symbol.iterator]().next().done===!0}e.isEmpty=o;function u(b){return b[Symbol.iterator]().next().value}e.first=u;function c(b,g){let v=0;for(let N of b)if(g(N,v++))return!0;return!1}e.some=c;function d(b,g){let v=0;for(let N of b)if(!g(N,v++))return!1;return!0}e.every=d;function f(b,g){for(let v of b)if(g(v))return v}e.find=f;function*m(b,g){for(let v of b)g(v)&&(yield v)}e.filter=m;function*w(b,g){let v=0;for(let N of b)yield g(N,v++)}e.map=w;function*p(b,g){let v=0;for(let N of b)yield*g(N,v++)}e.flatMap=p;function*T(...b){for(let g of b)hs(g)?yield*g:yield g}e.concat=T;function x(b,g,v){let N=v;for(let k of b)N=g(N,k);return N}e.reduce=x;function y(b){let g=0;for(let v of b)g++;return g}e.length=y;function*L(b,g,v=b.length){for(g<-b.length&&(g=0),g<0&&(g+=b.length),v<0?v+=b.length:v>b.length&&(v=b.length);g<v;g++)yield b[g]}e.slice=L;function z(b,g=Number.POSITIVE_INFINITY){let v=[];if(g===0)return[v,b];let N=b[Symbol.iterator]();for(let k=0;k<g;k++){let _=N.next();if(_.done)return[v,e.empty()];v.push(_.value)}return[v,{[Symbol.iterator](){return N}}]}e.consume=z;async function F(b){let g=[];for await(let v of b)g.push(v);return g}e.asyncToArray=F;async function U(b){let g=[];for await(let v of b)g=g.concat(v);return g}e.asyncToArrayFlat=U})(ft||(ft={}));function Li(e){if(ft.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(i){t.push(i)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function ds(...e){return We(()=>Li(e))}var ki=class{constructor(t){this._isDisposed=!1,this._fn=t}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 We(e){return new ki(e)}var Ke=class e{static{this.DISABLE_DISPOSED_WARNING=!1}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{Li(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t||t===ye.None)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?e.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(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}},ye=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new Ke,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};var ee=class e{static{this.Undefined=new e(void 0)}constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}},Ut=class{constructor(){this._first=ee.Undefined,this._last=ee.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ee.Undefined}clear(){let t=this._first;f Line truncated
`).slice(2).join(`
`))}},Ri=class extends Error{constructor(t,n){super(t),this.name="ListenerLeakError",this.stack=n}},Di=class extends Error{constructor(t,n){super(t),this.name="ListenerRefusalError",this.stack=n}},Ht=class{constructor(t){this.value=t}},cu=2,ue=class{constructor(t){this._size=0,this._options=t,this._leakageMon=this._options?.leakWarningThreshold?new Ci(t?.onListenerError??Ze,this._options?.leakWarningThreshold??uu):void 0,this._perfMon=this._options?._profName?new Ai(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(t,n,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let o=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],u=new Di(`${l}. HINT: Stack shows most frequent listener (${o[1]}-times)`,o[0]);return(this._options?.onListenerError||Ze)(u),ye.None}if(this._disposed)return ye.None;n&&(t=t.bind(n));let r=new Ht(t),s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=Ei.create(),s=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Ht?(this._deliveryQueue??=new Mi,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let a=We(()=>{s?.(),this._removeListener(r)});return i instanceof Ke?i.add(a):Array.isArray(i)&&i.push(a),a},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let n=this._listeners,i=n.indexOf(t);if(i===-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[i]=void 0;let r=this._deliveryQueue.current===this;if(this._size*cu<=n.length){let s=0;for(let a=0;a<n.length;a++)n[a]?n[s++]=n[a]:r&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=s}}_deliver(t,n){if(!t)return;let i=this._options?.onListenerError||Ze;if(!i){t.value(n);return}try{t.value(n)}catch(r){i(r)}}_deliverQueue(t){let n=t.current._listeners;for(;t.i<t.end;)this._deliver(n[t.i++],t.value);t.reset()}fire(t){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Ht)this._deliver(this._listeners,t);else{let n=this._deliveryQueue;n.enqueue(this,t,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}};var Mi=class{constructor(){this.i=-1,this.end=0}enqueue(t,n,i){this.i=0,this.end=i,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function fs(){return globalThis._VSCODE_NLS_MESSAGES}function fn(){return globalThis._VSCODE_NLS_LANGUAGE}var hu=fn()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function ms(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(i,r)=>{let s=r[0],a=t[s],l=i;return typeof a=="string"?l=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(l=String(a)),l}),hu&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function q(e,t,...n){return ms(typeof e=="number"?du(e,t):t,n)}function du(e,t){let n=fs()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var et="en",gn=!1,bn=!1,pn=!1,fu=!1,gs=!1,mu=!1,pu=!1,mn,Ni=et,ps=et,gu,De,Me=globalThis,de;typeof Me.vscode<"u"&&typeof Me.vscode.process<"u"?de=Me.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(de=process);var bu=typeof de?.versions?.electron=="string",wu=bu&&de?.type==="renderer";if(typeof de=="object"){gn=de.platform==="win32",bn=de.platform==="darwin",pn=de.platform==="linux",pn&&de.env.SNAP&&de.env.SNAP_REVISION,de.env.CI||de.env.BUILD_ARTIFACTSTAGINGDIRECTORY||de.env.GITHUB_WORKSPACE,mn=et,Ni=et;let e=de.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);mn=t.userLocale,ps=t.osLocale,Ni=t.resolvedLanguage||et,gu=t.languagePack?.translationsConfigFile}catch{}fu=!0}else typeof navigator=="object"&&!wu?(De=navigator.userAgent,gn=De.indexOf("Windows")>=0,bn=De.indexOf("Macintosh")>=0,mu=(De.indexOf("Macintosh")>=0||De.indexOf("iPad")>=0||De.indexOf("i Line truncated
`||e===" "}var $e=class{constructor(t,n,i){this.changes=t,this.moves=n,this.hitTimeout=i}},Vn=class{constructor(t,n){this.lineRangeMapping=t,this.changes=n}};function _o(e,t,n=(i,r)=>i===r){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let i=0,r=e.length;i<r;i++)if(!n(e[i],t[i]))return!1;return!0}function*vo(e,t){let n,i;for(let r of e)i!==void 0&&t(i,r)?n.push(r):(n&&(yield n),n=[r]),i=r;n&&(yield n)}function yo(e,t){for(let n=0;n<=e.length;n++)t(n===0?void 0:e[n-1],n===e.length?void 0:e[n])}function xo(e,t){for(let n=0;n<e.length;n++)t(n===0?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function To(e,t){for(let n of t)e.push(n)}var ur;(function(e){function t(s){return s<0}e.isLessThan=t;function n(s){return s<=0}e.isLessThanOrEqual=n;function i(s){return s>0}e.isGreaterThan=i;function r(s){return s===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(ur||(ur={}));function Xe(e,t){return(n,i)=>t(e(n),e(i))}var st=(e,t)=>e-t;function So(e){return(t,n)=>-e(t,n)}var wo=class e{static{this.empty=new e(t=>{})}constructor(t){this.iterate=t}toArray(){let t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new e(n=>this.iterate(i=>t(i)?n(i):!0))}map(t){return new e(n=>this.iterate(i=>n(t(i))))}findLast(t){let n;return this.iterate(i=>(t(i)&&(n=i),!0)),n}findLastMaxBy(t){let n,i=!0;return this.iterate(r=>((i||ur.isGreaterThan(t(r,n)))&&(i=!1,n=r),!0)),n}};var J=class e{static fromTo(t,n){return new e(t,n)}static addRange(t,n){let i=0;for(;i<n.length&&n[i].endExclusive<t.start;)i++;let r=i;for(;r<n.length&&n[r].start<=t.endExclusive;)r++;if(i===r)n.splice(i,0,t);else{let s=Math.min(t.start,n[i].start),a=Math.max(t.endExclusive,n[r-1].endExclusive);n.splice(i,r-i,new e(s,a))}}static tryCreate(t,n){if(!(t>n))return new e(t,n)}static ofLength(t){return new e(0,t)}static ofStartAndLength(t,n){return new e(t,t+n)}static emptyAt(t){return new e(t,t)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new te(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new e(this.start+t,this.endExclusive+t)}deltaStart(t){return new e(this.start+t,this.endExclusive)}deltaEnd(t){return new e(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(t){return this.start===t.start&&this.endExclusive===t.endExclusive}contains(t){return this.start<=t&&t<this.endExclusive}join(t){return new e(Math.min(this.start,t.start),Math.max(this.endExclusive,t.endExclusive))}intersect(t){let n=Math.max(this.start,t.start),i=Math.min(this.endExclusive,t.endExclusive);if(n<=i)return new e(n,i)}intersectionLength(t){let n=Math.max(this.start,t.start),i=Math.min(this.endExclusive,t.endExclusive);return Math.max(0,i-n)}intersects(t){let n=Math.max(this.start,t.start),i=Math.min(this.endExclusive,t.endExclusive);return n<i}intersectsOrTouches(t){let n=Math.max(this.start,t.start),i=Math.min(this.endExclusive,t.endExclusive);return n<=i}isBefore(t){return this.endExclusive<=t.start}isAfter(t){return this.start>=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new te(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new te(`Invalid clipping range: ${this.toString()}`);return t<this.start?this.endExclusive-(this.start-t)%this.length:t>=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;n<this.endExclusive;n++)t(n)}joinRightTouching(t){if(this.endExclusive!==t.start)throw new te(`Invalid join: ${this.toString()} and ${t.toString()}`);return new e(this.start,t.endExclusive)}};function ze(e,t){let n=Fe(e,t);return n===-1?void 0:e[n]}function Fe(e,t,n=0,i=e.length){let r=n,s=i;for(;r<s;){let a=Math.floor((r+s)/2);t(e[a])?r=a+1:s=a}return r-1}function ko(e,t){let n=jn(e,t);return n===e.length?void 0:e[n]}function jn(e,t,n=0,i=e.length){let r=n,s=i;for(;r<s;){let a=Math.floor((r+s)/2);t(e[a])?s=a:r=a+1}return r}var Xt=class e{static{this.assertInvariants=!1}constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(e.assertInvariants){if(this._prevFindLastPredicate){for(let i of this._array)if(this._prevFindLastPredicate(i)&&!t(i))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let n=Fe(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};var Q=class e{static ofLength(t,n){return new e(t,t+n)}static fromRange(t){return new e(t.startLineNumber,t.endLineNumber)}static fromRangeInclusive(t){return new e(t.startLineNumber,t.endLineNumber+1)}static{this.compareByStart=Xe(t=>t.startLineNumber,st)}static joinMany(t){if(t.len Line truncated
`?(n++,i=0):i++;return new e(n,i)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}add(t){return t.lineCount===0?new e(this.lineCount,this.columnCount+t.columnCount):new e(this.lineCount+t.lineCount,t.columnCount)}createRange(t){return this.lineCount===0?new W(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new W(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new W(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Q.ofLength(1,this.lineCount+1)}addToPosition(t){return this.lineCount===0?new $(t.lineNumber,t.column+this.columnCount):new $(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};var cr=class{getOffsetRange(t){return new J(this.getOffset(t.getStartPosition()),this.getOffset(t.getEndPosition()))}getRange(t){return W.fromPositions(this.getPosition(t.start),this.getPosition(t.endExclusive))}getStringReplacement(t){return new vt.deps.StringReplacement(this.getOffsetRange(t.range),t.text)}getTextReplacement(t){return new vt.deps.TextReplacement(this.getRange(t.replaceRange),t.newText)}getTextEdit(t){let n=t.replacements.map(i=>this.getTextReplacement(i));return new vt.deps.TextEdit(n)}},vt=class{static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};var Gn=class extends cr{constructor(t){super(),this.text=t,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<t.length;n++)t.charAt(n)===`
`&&(this.lineStartOffsetByLineIdx.push(n+1),n>0&&t.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(t.length)}getOffset(t){let n=this._validatePosition(t);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(t){if(t.lineNumber<1)return new $(1,1);let n=this.textLength.lineCount+1;if(t.lineNumber>n){let r=this.getLineLength(n);return new $(n,r+1)}if(t.column<1)return new $(t.lineNumber,1);let i=this.getLineLength(t.lineNumber);return t.column-1>i?new $(t.lineNumber,i+1):t}getPosition(t){let n=Fe(this.lineStartOffsetByLineIdx,s=>s<=t),i=n+1,r=t-this.lineStartOffsetByLineIdx[n]+1;return new $(i,r)}get textLength(){let t=this.lineStartOffsetByLineIdx.length-1;return new vt.deps.TextLength(t,this.text.length-this.lineStartOffsetByLineIdx[t])}getLineLength(t){return this.lineEndOffsetByLineIdx[t-1]-this.lineStartOffsetByLineIdx[t-1]}};var hr=class{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new $(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(t){return this.getValueOfRange(this.getTransformer().getRange(t))}getLineLength(t){return this.getValueOfRange(new W(t,1,t,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Gn(this.getValue())),this._transformer}getLineAt(t){return this.getValueOfRange(new W(t,1,t,Number.MAX_SAFE_INTEGER))}},dr=class extends hr{constructor(t,n){Si(n>=1),super(),this._getLineContent=t,this._lineCount=n}getValueOfRange(t){if(t.startLineNumber===t.endLineNumber)return this._getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);let n=this._getLineContent(t.startLineNumber).substring(t.startColumn-1);for(let i=t.startLineNumber+1;i<t.endLineNumber;i++)n+=`
`+this._getLineContent(i);return n+=`
`+this._getLineContent(t.endLineNumber).substring(0,t.endColumn-1),n}getLineLength(t){return this._getLineContent(t).length}get length(){let t=this._getLineContent(this._lineCount);return new ot(this._lineCount-1,t.length)}},lt=class extends dr{constructor(t){super(n=>t[n-1],t.length)}};var $n=class e{static joinReplacements(t,n){if(t.length===0)throw new te;if(t.length===1)return t[0];let i=t[0].range.getStartPosition(),r=t[t.length-1].range.getEndPosition(),s="";for(let a=0;a<t.length;a++){let l=t[a];if(s+=l.text,a<t.length-1){let o=t[a+1],u=W.fromPositions(l.range.getEndPosition(),o.range.getStartPosition()),c=n.getValueOfRange(u);s+=c}}return new e(W.fromPositions(i,r),s)}static fromStringReplacement(t,n){return new e(n.getTransformer().getRange(t.replaceRange),t.newText)}static delete(t){return new e(t,"")}constructor(t,n){this.range=t,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(t,n){return t.range.equalsRange(n.range)&&t.text===n.text}equals(t){return e.equals(this,t)}removeCommonPrefixAndSuffix(t){return this.removeCommonPrefix(t).removeCommonSuffix(t)}removeCommonPrefix(t){let n=t.getValueOfRange(this.range).replaceAll(`\r
`,`
`),i=this.text.replaceAll(`\r
`,`
`),r=ks(n,i),s=ot.ofText(n.substring(0,r)).addToPosition(this.range.getStartPosition()),a=i.substring(r),l=W.fromPositions(s,this.range.getEndPosition());return new e(l,a)}removeCommonSuffix(t){let n=t.getValueOfRange(this.range).replaceAll(`\r
`,`
`),i=this.text.replaceAll(`\r
`,`
`),r=Ls(n,i),s=ot.ofText(n.substring(0,n.length-r)).addToPosition(this.range.getStartPosition()),a=i.substring(0,i.length-r),l=W.fromPositions(this.range.getStartPosition(),s);return new e(l,a)}toString(){let t=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${t.lineNumber},${t.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}};var Le=class e{static inverse(t,n,i){let r=[],s=1,a=1;for(let o of t){let u=new e(new Q(s,o.original.startLineNumber),new Q(a,o.modified.startLineNumber));u.modified.isEmpty||r.push(u),s=o.original.endLineNumberExclusive,a=o.modified.endLineNumberExclusive}let l=new e(new Q(s,n+1),new Q(a,i+1));return l.modified.isEmpty||r.push(l),r}static clip(t,n,i){let r=[];for(let s of t){let a=s.original.intersect(n),l=s.modified.intersect(i);a&&!a.isEmpty&&l&&!l.isEmpty&&r.push(new e(a,l))}return r}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new e(this.modified,this.original)}join(t){return new e(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){let t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new pe(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new te("not a valid diff");return new pe(new W(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new W(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new pe(new W(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new W(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(Lo(this.original.endLineNumberExclusive,t)&&Lo(this.modified.endLineNumberExclusive,n))return new pe(new W(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new W(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new pe(W.fromPositions(new $(this.original.startLineNumber,1),yt(new $(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),W.fromPositions(new $(this.modified.startLineNumber,1),yt(new $(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new pe(W.fromPositions(yt(new $(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),yt(new $(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),W.fromPositions(yt(new $(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),yt(new $(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new te}};function yt(e,t){if(e.lineNumber<1)return new $(1,1);if(e.lineNumber>t.length)return new $(t.length,t[t.length-1].length+1);let n=t[e.lineNumber-1];return e.column>n.length+1?new $(e.lineNumber,n.length+1):e}function Lo(e,t){return e>=1&&e<=t.length}var Pe=class e extends Le{static fromRangeMappings(t){let n=Q.join(t.map(r=>Q.fromRangeInclusive(r.originalRange))),i=Q.join(t.map(r=>Q.fromRangeInclusive(r.modifiedRange)));return new e(n,i,t)}constructor(t,n,i){super(t,n),this.innerChanges=i}flip(){return new e(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new e(this.original,this.modified,[this.toRangeMapping()])}},pe=class e{static fromEdit(t){let n=t.getNewRanges();return t.replacements.map((r,s)=>new e(r.range,n[s]))}static assertSorted(t){for(let n=1;n<t.length;n++){let i=t[n-1],r=t[n];if(!(i.originalRange.getEndPosition().isBeforeOrEqual(r.originalRange.getStartPosition())&&i.modifiedRange.getEndPosition().isBeforeOrEqual(r.modifiedRange.getStartPosition())))throw new te("Range mappings must be sorted")}}constructor(t,n){this.originalRange=t,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new e(this.modifiedRange,this.originalRange)}toTextEdit(t){let n=t.getValueOfRange(this.modifiedRange);return new $n(this.originalRange,n)}};function fr(e,t,n,i=!1){let r=[];for(let s of vo(e.map(a=>nc(a,t,n)),(a,l)=>a.original.intersectsOrTouches(l.original)||a.modified.intersectsOrTouches(l.modified))){let a=s[0],l=s[s.length-1];r.push(new Pe(a.original.join(l.original),a.modified.join(l.modified),s.map(o=>o.innerChanges[0])))}return He(()=>!i&&r.length>0&&(r[0].modified.startLineNumber!==r[0].original.startLineNumber||n.length.lineCount-r[r.length-1].modified.endLineNumberExclusive!==t.length.lineCount-r[r.length-1].original.endLineNumberExclusive)?!1:Pt(r,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive<a.original.startLineNumber&&s.modifi Line truncated
`);this.histogram[l]=(this.histogram[l]||0)+1}this.totalCount=r}computeSimilarity(t){let n=0,i=Math.max(this.histogram.length,t.histogram.length);for(let r=0;r<i;r++)n+=Math.abs((this.histogram[r]??0)-(t.histogram[r]??0));return 1-n/(this.totalCount+t.totalCount)}};var Yn=class{compute(t,n,i=Qe.instance,r){if(t.length===0||n.length===0)return Ce.trivial(t,n);let s=new Tt(t.length,n.length),a=new Tt(t.length,n.length),l=new Tt(t.length,n.length);for(let w=0;w<t.length;w++)for(let p=0;p<n.length;p++){if(!i.isValid())return Ce.trivialTimedOut(t,n);let T=w===0?0:s.get(w-1,p),x=p===0?0:s.get(w,p-1),y;t.getElement(w)===n.getElement(p)?(w===0||p===0?y=0:y=s.get(w-1,p-1),w>0&&p>0&&a.get(w-1,p-1)===3&&(y+=l.get(w-1,p-1)),y+=r?r(w,p):1):y=-1;let L=Math.max(T,x,y);if(L===y){let z=w>0&&p>0?l.get(w-1,p-1):0;l.set(w,p,z+1),a.set(w,p,3)}else L===T?(l.set(w,p,0),a.set(w,p,1)):L===x&&(l.set(w,p,0),a.set(w,p,2));s.set(w,p,L)}let o=[],u=t.length,c=n.length;function d(w,p){(w+1!==u||p+1!==c)&&o.push(new re(new J(w+1,u),new J(p+1,c))),u=w,c=p}let f=t.length-1,m=n.length-1;for(;f>=0&&m>=0;)a.get(f,m)===3?(d(f,m),f--,m--):a.get(f,m)===1?f--:m--;return d(-1,-1),o.reverse(),new Ce(o,!1)}};var St=class{compute(t,n,i=Qe.instance){if(t.length===0||n.length===0)return Ce.trivial(t,n);let r=t,s=n;function a(p,T){for(;p<r.length&&T<s.length&&r.getElement(p)===s.getElement(T);)p++,T++;return p}let l=0,o=new wr;o.set(0,a(0,0));let u=new _r;u.set(0,o.get(0)===0?null:new Zn(null,0,0,o.get(0)));let c=0;e:for(;;){if(l++,!i.isValid())return Ce.trivialTimedOut(r,s);let p=-Math.min(l,s.length+l%2),T=Math.min(l,r.length+l%2);for(c=p;c<=T;c+=2){let x=c===T?-1:o.get(c+1),y=c===p?-1:o.get(c-1)+1,L=Math.min(Math.max(x,y),r.length),z=L-c;if(L>r.length||z>s.length)continue;let F=a(L,z);o.set(c,F);let U=L===x?u.get(c+1):u.get(c-1);if(u.set(c,F!==L?new Zn(U,L,z,F-L):U),o.get(c)===r.length&&o.get(c)-c===s.length)break e}}let d=u.get(c),f=[],m=r.length,w=s.length;for(;;){let p=d?d.x+d.length:0,T=d?d.y+d.length:0;if((p!==m||T!==w)&&f.push(new re(new J(p,m),new J(T,w))),!d)break;m=d.x,w=d.y,d=d.prev}return f.reverse(),new Ce(f,!1)}},Zn=class{constructor(t,n,i,r){this.prev=t,this.x=n,this.y=i,this.length=r}},wr=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){let i=this.negativeArr;this.negativeArr=new Int32Array(i.length*2),this.negativeArr.set(i)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){let i=this.positiveArr;this.positiveArr=new Int32Array(i.length*2),this.positiveArr.set(i)}this.positiveArr[t]=n}}},_r=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}};var Je=class{constructor(t,n,i){this.lines=t,this.range=n,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){let s=t[r-1],a=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let l=0;if(!i){let u=s.trimStart();l=s.length-u.length,s=u.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);let o=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-l,s.length):s.length;for(let u=0;u<o;u++)this.elements.push(s.charCodeAt(u));r<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new J(0,this.length))}getText(t){return this.elements.slice(t.start,t.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){let n=Do(t>0?this.elements[t-1]:-1),i=Do(t<this.elements.length?this.elements[t]:-1);if(n===7&&i===8)return 0;if(n===8)return 150;let r=0;return n!==i&&(r+=10,n===0&&i===1&&(r+=1)),r+=Ro(n),r+=Ro(i),r}translateOffset(t,n="right"){let i=Fe(this.firstElementOffsetByLineIdx,s=>s<=t),r=t-this.firstElementOffsetByLineIdx[i];return new $(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+r+(r===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(t){let n=this.translateOffset(t.start,"right"),i=this.translateOffset(t.endExclusive,"left");return i.isBefore(n)?W.fromPositions(i,i):W.fromPositions(n,i)}findWordContaining(t){if(t<0||t>=this.elements.length||!kt(this.elements[t]))return;let n=t;for(;n>0&&kt(this.elements[n-1]);)n--;let i=t;for(;i<this.elements.length&&kt(this.elements[i]);)i++;return new J(n,i)}findSubWordContaining(t){if(t<0||t>=this.elements.length||!kt(this.elements[t]))return;let n=t;for(;n>0&&kt(this.elements[n-1])&&!Eo(this.elements[n]);)n--;let i=t;fo Line truncated
`).length>=15&&ac(d,m=>m.length>=2)>=2}),a=cc(e,a),a}function ac(e,t){let n=0;for(let i of e)t(i)&&n++;return n}function oc(e,t,n,i){let r=[],s=e.filter(o=>o.modified.isEmpty&&o.original.length>=3).map(o=>new Jt(o.original,t,o)),a=new Set(e.filter(o=>o.original.isEmpty&&o.modified.length>=3).map(o=>new Jt(o.modified,n,o))),l=new Set;for(let o of s){let u=-1,c;for(let d of a){let f=o.computeSimilarity(d);f>u&&(u=f,c=d)}if(u>.9&&c&&(a.delete(c),r.push(new Le(o.range,c.range)),l.add(o.source),l.add(c.source)),!i.isValid())return{moves:r,excludedChanges:l}}return{moves:r,excludedChanges:l}}function lc(e,t,n,i,r,s){let a=[],l=new Wn;for(let f of e)for(let m=f.original.startLineNumber;m<f.original.endLineNumberExclusive-2;m++){let w=`${t[m-1]}:${t[m+1-1]}:${t[m+2-1]}`;l.add(w,{range:new Q(m,m+3)})}let o=[];e.sort(Xe(f=>f.modified.startLineNumber,st));for(let f of e){let m=[];for(let w=f.modified.startLineNumber;w<f.modified.endLineNumberExclusive-2;w++){let p=`${n[w-1]}:${n[w+1-1]}:${n[w+2-1]}`,T=new Q(w,w+3),x=[];l.forEach(p,({range:y})=>{for(let z of m)if(z.originalLineRange.endLineNumberExclusive+1===y.endLineNumberExclusive&&z.modifiedLineRange.endLineNumberExclusive+1===T.endLineNumberExclusive){z.originalLineRange=new Q(z.originalLineRange.startLineNumber,y.endLineNumberExclusive),z.modifiedLineRange=new Q(z.modifiedLineRange.startLineNumber,T.endLineNumberExclusive),x.push(z);return}let L={modifiedLineRange:T,originalLineRange:y};o.push(L),x.push(L)}),m=x}if(!s.isValid())return[]}o.sort(So(Xe(f=>f.modifiedLineRange.length,st)));let u=new at,c=new at;for(let f of o){let m=f.modifiedLineRange.startLineNumber-f.originalLineRange.startLineNumber,w=u.subtractFrom(f.modifiedLineRange),p=c.subtractFrom(f.originalLineRange).getWithDelta(m),T=w.getIntersection(p);for(let x of T.ranges){if(x.length<3)continue;let y=x,L=x.delta(-m);a.push(new Le(L,y)),u.addRange(y),c.addRange(L)}}a.sort(Xe(f=>f.original.startLineNumber,st));let d=new Xt(e);for(let f=0;f<a.length;f++){let m=a[f],w=d.findLastMonotonous(U=>U.original.startLineNumber<=m.original.startLineNumber),p=ze(e,U=>U.modified.startLineNumber<=m.modified.startLineNumber),T=Math.max(m.original.startLineNumber-w.original.startLineNumber,m.modified.startLineNumber-p.modified.startLineNumber),x=d.findLastMonotonous(U=>U.original.startLineNumber<m.original.endLineNumberExclusive),y=ze(e,U=>U.modified.startLineNumber<m.modified.endLineNumberExclusive),L=Math.max(x.original.endLineNumberExclusive-m.original.endLineNumberExclusive,y.modified.endLineNumberExclusive-m.modified.endLineNumberExclusive),z;for(z=0;z<T;z++){let U=m.original.startLineNumber-z-1,b=m.modified.startLineNumber-z-1;if(U>i.length||b>r.length||u.contains(b)||c.contains(U)||!Mo(i[U-1],r[b-1],s))break}z>0&&(c.addRange(new Q(m.original.startLineNumber-z,m.original.startLineNumber)),u.addRange(new Q(m.modified.startLineNumber-z,m.modified.startLineNumber)));let F;for(F=0;F<L;F++){let U=m.original.endLineNumberExclusive+F,b=m.modified.endLineNumberExclusive+F;if(U>i.length||b>r.length||u.contains(b)||c.contains(U)||!Mo(i[U-1],r[b-1],s))break}F>0&&(c.addRange(new Q(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+F)),u.addRange(new Q(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+F))),(z>0||F>0)&&(a[f]=new Le(new Q(m.original.startLineNumber-z,m.original.endLineNumberExclusive+F),new Q(m.modified.startLineNumber-z,m.modified.endLineNumberExclusive+F)))}return a}function Mo(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;let r=new St().compute(new Je([e],new W(1,1,1,e.length),!1),new Je([t],new W(1,1,1,t.length),!1),n),s=0,a=re.invert(r.diffs,e.length);for(let c of a)c.seq1Range.forEach(d=>{Yt(e.charCodeAt(d))||s++});function l(c){let d=0;for(let f=0;f<e.length;f++)Yt(c.charCodeAt(f))||d++;return d}let o=l(e.length>t.length?e:t);return s/o>.6&&o>10}function uc(e){if(e.length===0)return e;e.sort(Xe(n=>n.original.startLineNumber,st));let t=[e[0]];for(let n=1;n<e.length;n++){let i=t[t.length-1],r=e[n],s=r.original.startLineNumber-i.original.endLineNumberExclusive,a=r.modified.startLineNumber-i.modified.endLineNumberExclusive;if(s>=0&&a>=0&&s+a<=2){t[t.length-1]=i.join(r);continue}t.push(r)}return t}function cc(e,t){let n=new Xt(e);return t=t.filter(i=>{let r=n.findLastMonotonous(l=>l.original.startLineNumber<i.original.endLineNumberExclusive)||new Le(new Q(1,1),new Q(1,1)),s=ze(e,l=>l.modified.startLineNumber<i.modified.endLineNumberExclusive);return r!==s}),t}function vr(e,t,n){let i=n;return i=Io(e,t,i),i=Io(e,t,i),i=hc(e,t,i),i}function Io(e,t,n){if(n.length===0)return n;let i=[];i.push(n[0]);for(let s=1;s<n.length;s++){let a=i[i.length-1],l=n[s];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){let o=l.seq1Range.start-a.seq1Range.endExclusive,u;for(u=1;u<=o&&!(e.getElement(l.seq1Range.start-u)!==e.getElement(l.seq1Range.endExclusive-u)||t.getElement(l.seq2Range.start-u)!==t.getElement(l.seq2Range.endExclusive-u));u++);if(u--,u===o){i[i.length-1] Line truncated
`)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}};function Ho(e){let t=0;for(;t<e.length&&(e.charCodeAt(t)===32||e.charCodeAt(t)===9);)t++;return t}var Kn=class{constructor(){this.dynamicProgrammingDiffing=new Yn,this.myersDiffingAlgorithm=new St}computeDiff(t,n,i){if(t.length<=1&&_o(t,n,(b,g)=>b===g))return new $e([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new $e([new Pe(new Q(1,t.length+1),new Q(1,n.length+1),[new pe(new W(1,1,t.length,t[t.length-1].length+1),new W(1,1,n.length,n[n.length-1].length+1))])],[],!1);let r=i.maxComputationTimeMs===0?Qe.instance:new Jn(i.maxComputationTimeMs),s=!i.ignoreTrimWhitespace,a=new Map;function l(b){let g=a.get(b);return g===void 0&&(g=a.size,a.set(b,g)),g}let o=t.map(b=>l(b.trim())),u=n.map(b=>l(b.trim())),c=new Zt(o,t),d=new Zt(u,n),f=c.length+d.length<1700?this.dynamicProgrammingDiffing.compute(c,d,r,(b,g)=>t[b]===n[g]?n[g].length===0?.1:1+Math.log(1+n[g].length):.99):this.myersDiffingAlgorithm.compute(c,d,r),m=f.diffs,w=f.hitTimeout;m=vr(c,d,m),m=Po(c,d,m);let p=[],T=b=>{if(s)for(let g=0;g<b;g++){let v=x+g,N=y+g;if(t[v]!==n[N]){let k=this.refineDiff(t,n,new re(new J(v,v+1),new J(N,N+1)),r,s,i);for(let _ of k.mappings)p.push(_);k.hitTimeout&&(w=!0)}}},x=0,y=0;for(let b of m){He(()=>b.seq1Range.start-x===b.seq2Range.start-y);let g=b.seq1Range.start-x;T(g),x=b.seq1Range.endExclusive,y=b.seq2Range.endExclusive;let v=this.refineDiff(t,n,b,r,s,i);v.hitTimeout&&(w=!0);for(let N of v.mappings)p.push(N)}T(t.length-x);let L=new lt(t),z=new lt(n),F=fr(p,L,z),U=[];return i.computeMoves&&(U=this.computeMoves(F,t,n,o,u,r,s,i)),He(()=>{function b(v,N){if(v.lineNumber<1||v.lineNumber>N.length)return!1;let k=N[v.lineNumber-1];return!(v.column<1||v.column>k.length+1)}function g(v,N){return!(v.startLineNumber<1||v.startLineNumber>N.length+1||v.endLineNumberExclusive<1||v.endLineNumberExclusive>N.length+1)}for(let v of F){if(!v.innerChanges)return!1;for(let N of v.innerChanges)if(!(b(N.modifiedRange.getStartPosition(),n)&&b(N.modifiedRange.getEndPosition(),n)&&b(N.originalRange.getStartPosition(),t)&&b(N.originalRange.getEndPosition(),t)))return!1;if(!g(v.modified,n)||!g(v.original,t))return!1}return!0}),new $e(F,U,w)}computeMoves(t,n,i,r,s,a,l,o){return No(t,n,i,r,s,a).map(d=>{let f=this.refineDiff(n,i,new re(d.original.toOffsetRange(),d.modified.toOffsetRange()),a,l,o),m=fr(f.mappings,new lt(n),new lt(i),!0);return new Vn(d,m)})}refineDiff(t,n,i,r,s,a){let o=fc(i).toRangeMapping2(t,n),u=new Je(t,o.originalRange,s),c=new Je(n,o.modifiedRange,s),d=u.length+c.length<500?this.dynamicProgrammingDiffing.compute(u,c,r):this.myersDiffingAlgorithm.compute(u,c,r),f=d.diffs;return f=vr(u,c,f),f=yr(u,c,f,(w,p)=>w.findWordContaining(p)),a.extendToSubwords&&(f=yr(u,c,f,(w,p)=>w.findSubWordContaining(p),!0)),f=Fo(u,c,f),f=Uo(u,c,f),{mappings:f.map(w=>new pe(u.translateRange(w.seq1Range),c.translateRange(w.seq2Range))),hitTimeout:d.hitTimeout}}};function fc(e){return new Le(new Q(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new Q(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var xr={getLegacy:()=>new Xn,getDefault:()=>new Kn};function Ye(e,t){let n=Math.pow(10,t);return Math.round(e*n)/n}var C=class{constructor(t,n,i,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=Ye(Math.max(Math.min(1,r),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}},Ee=class e{constructor(t,n,i,r){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=Ye(Math.max(Math.min(1,n),0),3),this.l=Ye(Math.max(Math.min(1,i),0),3),this.a=Ye(Math.max(Math.min(1,r),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){let n=t.r/255,i=t.g/255,r=t.b/255,s=t.a,a=Math.max(n,i,r),l=Math.min(n,i,r),o=0,u=0,c=(l+a)/2,d=a-l;if(d>0){switch(u=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),a){case n:o=(i-r)/d+(i<r?6:0);break;case i:o=(r-n)/d+2;break;case r:o=(n-i)/d+4;break}o*=60,o=Math.round(o)}return new e(o,u,c,s)}static _hue2rgb(t,n,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+(n-t)*6*i:i<1/2?n:i<2/3?t+(n-t)*(2/3-i)*6:t}static toRGBA(t){let n=t.h/360,{s:i,l:r,a:s}=t,a,l,o;if(i===0)a=l=o=r;else{let u=r<.5?r*(1+i):r+i-r*i,c=2*r-u;a=e._hue2rgb(c,u,n+1/3),l=e._hue2rgb(c,u,n),o=e._hue2rgb(c,u,n-1/3)}return new C(Math.round(a*255),Math.round(l*255),Math.round(o*255),s)}},Lt=class e{constructor(t,n,i,r){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=Ye(Math.max(Math.min(1,n),0),3),this.v=Ye(Math.max(Math.min(1,i),0),3),this.a=Ye(Math.max(Math.min(1,r),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){let n=t.r/255,i=t.g/255,r=t.b/255,s=Math.max(n,i,r),a=Math.min(n,i,r),l=s-a,o=s===0?0:l/s,u;return l===0?u=0:s===n?u=((i-r)/l%6+6)%6:s===i?u=(r-n)/l+2:u=(n-i)/l+4,new e(Math.round(u*60),o,s,t.a)}static toRGBA(t){let{h:n,s:i,v:r,a:s}=t,a=r*i,l=a*(1-Math.abs(n/60%2-1)),o=r-a,[u Line truncated
`);s.lastIndex=0;let c;for(;(c=s.exec(u))!==null;){let d=u.substring(0,c.index),f=(d.match(/\n/g)||[]).length,m=a+f,w=c[0].split(`
`),p=w.length,T=m+p-1,x=d.lastIndexOf(`
`)+1,y=c.index-x+1,L=w[w.length-1],z=p===1?y+c[0].length:L.length+1,F={startLineNumber:m,startColumn:y,endLineNumber:T,endColumn:z},U=(c.groups??{}).label??"",b=((c.groups??{}).separator??"")!=="",g={range:F,text:U,hasSeparatorLine:b,shouldBeInComments:!0};(g.text||g.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<g.range.startLineNumber)&&n.push(g),s.lastIndex=c.index+c[0].length}}return n}function vc(e){e=e.trim();let t=e.startsWith("-");return e=e.replace(gc,""),{text:e,hasSeparatorLine:t}}var yc=Symbol("MicrotaskDelay");var xc,Sr;(function(){let e=globalThis;typeof e.requestIdleCallback!="function"||typeof e.cancelIdleCallback!="function"?Sr=(t,n,i)=>{ws(()=>{if(r)return;let s=Date.now()+15;n(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:Sr=(t,n,i)=>{let r=t.requestIdleCallback(n,typeof i=="number"?{timeout:i}:void 0),s=!1;return{dispose(){s||(s=!0,t.cancelIdleCallback(r))}}},xc=(t,n)=>Sr(globalThis,t,n)})();var kr=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((t,n)=>{this.completeCallback=t,this.errorCallback=n})}complete(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(t),this.outcome={outcome:0,value:t},n()})}error(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(t),this.outcome={outcome:1,value:t},n()})}cancel(){return this.error(new zt)}},Go;(function(e){async function t(i){let r,s=await Promise.all(i.map(a=>a.then(l=>l,l=>{r||(r=l)})));if(typeof r<"u")throw r;return s}e.settled=t;function n(i){return new Promise(async(r,s)=>{try{await i(r,s)}catch(a){s(a)}})}e.withAsyncBody=n})(Go||(Go={}));var Lr=class{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(t){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,t)}else this._unconsumedValues.push(t)}produceFinal(t){this._ensureNoFinalValue(),this._finalValue=t;for(let n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,t);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new te("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(t,n){n.ok?t.complete(n.value):t.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let t=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return t.ok?Promise.resolve(t.value):Promise.reject(t.error)}else{let t=new kr;return this._unsatisfiedConsumers.push(t),t.p}}},$o=class e{constructor(t,n){this._onReturn=n,this._producerConsumer=new Lr,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async i=>(this._finishError(i),{done:!0,value:void 0})},queueMicrotask(async()=>{let i=t({emitOne:r=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:r}}),emitMany:r=>{for(let s of r)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:r=>this._finishError(r)});if(!this._producerConsumer.hasFinalValue)try{await i,this._finishOk()}catch(r){this._finishError(r)}})}static fromArray(t){return new e(n=>{n.emitMany(t)})}static fromPromise(t){return new e(async n=>{n.emitMany(await t)})}static fromPromisesResolveOrder(t){return new e(async n=>{await Promise.all(t.map(async i=>n.emitOne(await i)))})}static merge(t){return new e(async n=>{await Promise.all(t.map(async i=>{for await(let r of i)n.emitOne(r)}))})}static{this.EMPTY=e.fromArray([])}static map(t,n){return new e(async i=>{for await(let r of t)i.emitOne(n(r))})}map(t){return e.map(this,t)}static coalesce(t){return e.filter(t,n=>!!n)}coalesce(){return e.coalesce(this)}static filter(t,n){return new e(async i=>{for await(let r of t)n(r)&&i.emitOne(r)})}filter(t){return e.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(t){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:t})}[Symbol.asyncIterator](){return this._iterator}};var ei=class{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=it(t);let i=this.values,r=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,t),0),this.values.set(i.subarray(t),t+s),this.values.set(n,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=it(t),n=it(n),this.values[t]===n?!1:(this.values[t]=n,t-1<this.prefixSumValidIndex[0]& Line truncated
`,s==="\r"&&r+1<n.length&&n.charAt(r+1)===`
`&&r++}i&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return ne.create(0,t);for(;i<r;){let a=Math.floor((i+r)/2);n[a]>t?r=a:i=a+1}let s=i-1;return ne.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let i=n[t.line],r=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(i+t.character,r),i)}get lineCount(){return this.getLineOffsets().length}},E;(function(e){let t=Object.prototype.toString;function n(m){return typeof m<"u"}e.defined=n;function i(m){return typeof m>"u"}e.undefined=i;function r(m){return m===!0||m===!1}e.boolean=r;function s(m){return t.call(m)==="[object String]"}e.string=s;function a(m){return t.call(m)==="[object Number]"}e.number=a;function l(m,w,p){return t.call(m)==="[object Number]"&&w<=m&&m<=p}e.numberRange=l;function o(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}e.integer=o;function u(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}e.uinteger=u;function c(m){return t.call(m)==="[object Function]"}e.func=c;function d(m){return m!==null&&typeof m=="object"}e.objectLiteral=d;function f(m,w){return Array.isArray(m)&&m.every(w)}e.typedArray=f})(E||(E={}));var ui=class e{constructor(t,n,i,r){this._uri=t,this._languageId=n,this._version=i,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),i=this.offsetAt(t.end);return this._content.substring(n,i)}return this._content}update(t,n){for(let i of t)if(e.isIncremental(i)){let r=Dl(i.range),s=this.offsetAt(r.start),a=this.offsetAt(r.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(a,this._content.length);let l=Math.max(r.start.line,0),o=Math.max(r.end.line,0),u=this._lineOffsets,c=Rl(i.text,!1,s);if(o-l===c.length)for(let f=0,m=c.length;f<m;f++)u[f+l+1]=c[f];else c.length<1e4?u.splice(l+1,o-l,...c):this._lineOffsets=u=u.slice(0,l+1).concat(c,u.slice(o+1));let d=i.text.length-(a-s);if(d!==0)for(let f=l+1+c.length,m=u.length;f<m;f++)u[f]=u[f]+d}else if(e.isFull(i))this._content=i.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Rl(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return{line:0,character:t};for(;i<r;){let a=Math.floor((i+r)/2);n[a]>t?r=a:i=a+1}let s=i-1;return{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let i=n[t.line],r=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(i+t.character,r),i)}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},ln;(function(e){function t(r,s,a,l){return new ui(r,s,a,l)}e.create=t;function n(r,s,a){if(r instanceof ui)return r.update(s,a),r;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function i(r,s){let a=r.getText(),l=Kr(s.map(Lc),(c,d)=>{let f=c.range.start.line-d.range.start.line;return f===0?c.range.start.character-d.range.start.character:f}),o=0,u=[];for(let c of l){let d=r.offsetAt(c.range.start);if(d<o)throw new Error("Overlapping edit");d>o&&u.push(a.substring(o,d)),c.newText.length&&u.push(c.newText),o=r.offsetAt(c.range.end)}return u.push(a.substr(o)),u.join("")}e.applyEdits=i})(ln||(ln={}));function Kr(e,t){if(e.length<=1)return e;let n=e.length/2|0,i=e.slice(0,n),r=e.slice(n);Kr(i,t),Kr(r,t);let s=0,a=0,l=0;for(;s<i.length&&a<r.length;)t(i[s],r[a])<=0?e[l++]=i[s++]:e[l++]=r[a++];for(;s<i.length;)e[l++]=i[s++];for(;a<r.length;)e[l++]=r[a++];return e}function Rl(e,t,n=0){let i=t?[n]:[];for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);(s===13||s===10)&&(s===13&&r+1<e.length&&e.charCodeAt(r+1)===10&&r++,i.push(n+r+1))}return i}function Dl(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Lc(e){let t=Dl(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var I;(function(e){e[e.StartCommentTag=0]="StartCommentTag",e[e.Comment=1]="Comment",e[e.EndCommentTag=2]="EndCommentTag",e[e.StartTagOpen=3]="StartTagOpen",e[e.StartTagClose=4]="StartTagClose",e[e.StartTagSelfClose=5]="StartTagSelfClose",e[e.StartTag=6]="StartTag",e[e.EndTagOpen=7]="EndTagOpen",e[e.EndTagClose=8]="EndTagClose",e[e.EndTag=9]="EndTag",e[e.DelimiterAssign=10]="DelimiterAssign",e[e.Att Line truncated
`,"nexist;":"\u2204","nexists;":"\u2204","Nfr;":"\u{1D511}","nfr;":"\u{1D52B}","ngE;":"\u2267\u0338","nge;":"\u2271","ngeq;":"\u2271","ngeqq;":"\u2267\u0338","ngeqslant;":"\u2A7E\u0338","nges;":"\u2A7E\u0338","nGg;":"\u22D9\u0338","ngsim;":"\u2275","nGt;":"\u226B\u20D2","ngt;":"\u226F","ngtr;":"\u226F","nGtv;":"\u226B\u0338","nhArr;":"\u21CE","nharr;":"\u21AE","nhpar;":"\u2AF2","ni;":"\u220B","nis;":"\u22FC","nisd;":"\u22FA","niv;":"\u220B","NJcy;":"\u040A","njcy;":"\u045A","nlArr;":"\u21CD","nlarr;":"\u219A","nldr;":"\u2025","nlE;":"\u2266\u0338","nle;":"\u2270","nLeftarrow;":"\u21CD","nleftarrow;":"\u219A","nLeftrightarrow;":"\u21CE","nleftrightarrow;":"\u21AE","nleq;":"\u2270","nleqq;":"\u2266\u0338","nleqslant;":"\u2A7D\u0338","nles;":"\u2A7D\u0338","nless;":"\u226E","nLl;":"\u22D8\u0338","nlsim;":"\u2274","nLt;":"\u226A\u20D2","nlt;":"\u226E","nltri;":"\u22EA","nltrie;":"\u22EC","nLtv;":"\u226A\u0338","nmid;":"\u2224","NoBreak;":"\u2060","NonBreakingSpace;":"\xA0","Nopf;":"\u2115","nopf;":"\u{1D55F}","Not;":"\u2AEC","not;":"\xAC",not:"\xAC","NotCongruent;":"\u2262","NotCupCap;":"\u226D","NotDoubleVerticalBar;":"\u2226","NotElement;":"\u2209","NotEqual;":"\u2260","NotEqualTilde;":"\u2242\u0338","NotExists;":"\u2204","NotGreater;":"\u226F","NotGreaterEqual;":"\u2271","NotGreaterFullEqual;":"\u2267\u0338","NotGreaterGreater;":"\u226B\u0338","NotGreaterLess;":"\u2279","NotGreaterSlantEqual;":"\u2A7E\u0338","NotGreaterTilde;":"\u2275","NotHumpDownHump;":"\u224E\u0338","NotHumpEqual;":"\u224F\u0338","notin;":"\u2209","notindot;":"\u22F5\u0338","notinE;":"\u22F9\u0338","notinva;":"\u2209","notinvb;":"\u22F7","notinvc;":"\u22F6","NotLeftTriangle;":"\u22EA","NotLeftTriangleBar;":"\u29CF\u0338","NotLeftTriangleEqual;":"\u22EC","NotLess;":"\u226E","NotLessEqual;":"\u2270","NotLessGreater;":"\u2278","NotLessLess;":"\u226A\u0338","NotLessSlantEqual;":"\u2A7D\u0338","NotLessTilde;":"\u2274","NotNestedGreaterGreater;":"\u2AA2\u0338","NotNestedLessLess;":"\u2AA1\u0338","notni;":"\u220C","notniva;":"\u220C","notnivb;":"\u22FE","notnivc;":"\u22FD","NotPrecedes;":"\u2280","NotPrecedesEqual;":"\u2AAF\u0338","NotPrecedesSlantEqual;":"\u22E0","NotReverseElement;":"\u220C","NotRightTriangle;":"\u22EB","NotRightTriangleBar;":"\u29D0\u0338","NotRightTriangleEqual;":"\u22ED","NotSquareSubset;":"\u228F\u0338","NotSquareSubsetEqual;":"\u22E2","NotSquareSuperset;":"\u2290\u0338","NotSquareSupersetEqual;":"\u22E3","NotSubset;":"\u2282\u20D2","NotSubsetEqual;":"\u2288","NotSucceeds;":"\u2281","NotSucceedsEqual;":"\u2AB0\u0338","NotSucceedsSlantEqual;":"\u22E1","NotSucceedsTilde;":"\u227F\u0338","NotSuperset;":"\u2283\u20D2","NotSupersetEqual;":"\u2289","NotTilde;":"\u2241","NotTildeEqual;":"\u2244","NotTildeFullEqual;":"\u2247","NotTildeTilde;":"\u2249","NotVerticalBar;":"\u2224","npar;":"\u2226","nparallel;":"\u2226","nparsl;":"\u2AFD\u20E5","npart;":"\u2202\u0338","npolint;":"\u2A14","npr;":"\u2280","nprcue;":"\u22E0","npre;":"\u2AAF\u0338","nprec;":"\u2280","npreceq;":"\u2AAF\u0338","nrArr;":"\u21CF","nrarr;":"\u219B","nrarrc;":"\u2933\u0338","nrarrw;":"\u219D\u0338","nRightarrow;":"\u21CF","nrightarrow;":"\u219B","nrtri;":"\u22EB","nrtrie;":"\u22ED","nsc;":"\u2281","nsccue;":"\u22E1","nsce;":"\u2AB0\u0338","Nscr;":"\u{1D4A9}","nscr;":"\u{1D4C3}","nshortmid;":"\u2224","nshortparallel;":"\u2226","nsim;":"\u2241","nsime;":"\u2244","nsimeq;":"\u2244","nsmid;":"\u2224","nspar;":"\u2226","nsqsube;":"\u22E2","nsqsupe;":"\u22E3","nsub;":"\u2284","nsubE;":"\u2AC5\u0338","nsube;":"\u2288","nsubset;":"\u2282\u20D2","nsubseteq;":"\u2288","nsubseteqq;":"\u2AC5\u0338","nsucc;":"\u2281","nsucceq;":"\u2AB0\u0338","nsup;":"\u2285","nsupE;":"\u2AC6\u0338","nsupe;":"\u2289","nsupset;":"\u2283\u20D2","nsupseteq;":"\u2289","nsupseteqq;":"\u2AC6\u0338","ntgl;":"\u2279","Ntilde;":"\xD1",Ntilde:"\xD1","ntilde;":"\xF1",ntilde:"\xF1","ntlg;":"\u2278","ntriangleleft;":"\u22EA","ntrianglelefteq;":"\u22EC","ntriangleright;":"\u22EB","ntrianglerighteq;":"\u22ED","Nu;":"\u039D","nu;":"\u03BD","num;":"#","numero;":"\u2116","numsp;":"\u2007","nvap;":"\u224D\u20D2","nVDash;":"\u22AF","nVdash;":"\u22AE","nvDash;":"\u22AD","nvdash;":"\u22AC","nvge;":"\u2265\u20D2","nvgt;":">\u20D2","nvHarr;":"\u2904","nvinfin;":"\u29DE","nvlArr;":"\u2902","nvle;":"\u2264\u20D2","nvlt;":"<\u20D2","nvltrie;":"\u22B4\u20D2","nvrArr;":"\u2903","nvrtrie;":"\u22B5\u20D2","nvsim;":"\u223C\u20D2","nwarhk;":"\u2923","nwArr;":"\u21D6","nwarr;":"\u2196","nwarrow;":"\u2196","nwnear;":"\u2927","Oacute;":"\xD3",Oacute:"\xD3","oacute;":"\xF3",oacute:"\xF3","oast;":"\u229B","ocir;":"\u229A","Ocirc;":"\xD4",Ocirc:"\xD4","ocirc;":"\xF4",ocirc:"\xF4","Ocy;":"\u041E","ocy;":"\u043E","odash;":"\u229D","Odblac;":"\u0150","odblac;":"\u0151","odiv;":"\u2A38","odot;":"\u2299","odsold;":"\u29BC","OElig;":"\u0152","oelig;":"\u0153","ofcir;":"\u29BF","Ofr;":"\u{1D512}","ofr;":"\u{1D52C}","ogon;":"\u02DB","Ograve;":"\xD2",Ograve:"\xD2","ograve;":"\xF2",ograve:"\xF2","ogt;":"\u29C1","ohbar;":"\u29B5","ohm;":" Line truncated
`),n?i.value+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | "):i.value+=e.references.map(r=>`${r.name}: ${r.url}`).join(`
`)),i.value!=="")return i}var fi=class{constructor(t,n){this.dataManager=t,this.readDirectory=n,this.atributeCompletions=[]}onHtmlAttributeValue(t){this.dataManager.isPathAttribute(t.tag,t.attribute)&&this.atributeCompletions.push(t)}async computeCompletions(t,n){let i={items:[],isIncomplete:!1};for(let r of this.atributeCompletions){let s=qc(t.getText(r.range));if(Vc(s))if(s==="."||s==="..")i.isIncomplete=!0;else{let a=jc(r.value,s,r.range),l=await this.providePathSuggestions(r.value,a,t,n);for(let o of l)i.items.push(o)}}return i}async providePathSuggestions(t,n,i,r){let s=t.substring(0,t.lastIndexOf("/")+1),a=r.resolveReference(s||".",i.uri);if(a)try{let l=[],o=await this.readDirectory(a);for(let[u,c]of o)u.charCodeAt(0)!==Oc&&l.push(Gc(u,c===un.Directory,n));return l}catch{}return[]}},Oc=46;function qc(e){return Se(e,"'")||Se(e,'"')?e.slice(1,-1):e}function Vc(e){return!(Se(e,"http")||Se(e,"https")||Se(e,"//"))}function jc(e,t,n){let i,r=e.lastIndexOf("/");if(r===-1)i=$c(n,1,-1);else{let s=t.slice(r+1),a=cn(n.end,-1-s.length),l=s.indexOf(" "),o;l!==-1?o=cn(a,l):o=cn(n.end,-1),i=G.create(a,o)}return i}function Gc(e,t,n){return t?(e=e+"/",{label:e,kind:le.Folder,textEdit:se.replace(n,e),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:e,kind:le.File,textEdit:se.replace(n,e)}}function cn(e,t){return ne.create(e.line,e.character+t)}function $c(e,t,n){let i=cn(e.start,t),r=cn(e.end,n);return G.create(i,r)}var mi=class{constructor(t,n){this.lsOptions=t,this.dataManager=n,this.completionParticipants=[]}setCompletionParticipants(t){this.completionParticipants=t||[]}async doComplete2(t,n,i,r,s){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(t,n,i,s);let a=new fi(this.dataManager,this.lsOptions.fileSystemProvider.readDirectory),l=this.completionParticipants;this.completionParticipants=[a].concat(l);let o=this.doComplete(t,n,i,s);try{let u=await a.computeCompletions(t,r);return{isIncomplete:o.isIncomplete||u.isIncomplete,items:u.items.concat(o.items)}}finally{this.completionParticipants=l}}doComplete(t,n,i,r){let s=this._doComplete(t,n,i,r);return this.convertCompletionList(s)}_doComplete(t,n,i,r){let s={isIncomplete:!1,items:[]},a=this.completionParticipants,l=this.dataManager.getDataProviders().filter(S=>S.isApplicable(t.languageId)&&(!r||r[S.getId()]!==!1)),o=this.dataManager.getVoidElements(l),u=this.doesSupportMarkdown(),c=t.getText(),d=t.offsetAt(n),f=i.findNodeBefore(d);if(!f)return s;let m=ae(c,f.start),w="",p;function T(S,R=d){return S>d&&(S=d),{start:t.positionAt(S),end:t.positionAt(R)}}function x(S,R){let M=T(S,R);return l.forEach(H=>{H.provideTags().forEach(B=>{s.items.push({label:B.name,kind:le.Property,documentation:Ue(B,void 0,u),textEdit:se.replace(M,B.name),insertTextFormat:ge.PlainText})})}),s}function y(S){let R=S;for(;R>0;){let M=c.charAt(R-1);if(`
\r`.indexOf(M)>=0)return c.substring(R,S);if(!pi(M))return null;R--}return c.substring(0,S)}function L(S,R,M=d){let H=T(S,M),B=Fl(c,M,V.WithinEndTag,I.EndTagClose)?"":">",P=f;for(R&&(P=P.parent);P;){let j=P.tag;if(j&&(!P.closed||P.endTagStart&&P.endTagStart>d)){let Y={label:"/"+j,kind:le.Property,filterText:"/"+j,textEdit:se.replace(H,"/"+j+B),insertTextFormat:ge.PlainText},Z=y(P.start),we=y(S-1);if(Z!==null&&we!==null&&Z!==we){let ve=Z+"</"+j+B;Y.textEdit=se.replace(T(S-1-we.length),ve),Y.filterText=we+"</"+j}return s.items.push(Y),s}P=P.parent}return R||l.forEach(j=>{j.provideTags().forEach(Y=>{s.items.push({label:"/"+Y.name,kind:le.Property,documentation:Ue(Y,void 0,u),filterText:"/"+Y.name+B,textEdit:se.replace(H,"/"+Y.name+B),insertTextFormat:ge.PlainText})})}),s}let z=(S,R)=>{if(r&&r.hideAutoCompleteProposals)return s;if(!this.dataManager.isVoidElement(R,o)){let M=t.positionAt(S);s.items.push({label:"</"+R+">",kind:le.Property,filterText:"</"+R+">",textEdit:se.insert(M,"$0</"+R+">"),insertTextFormat:ge.Snippet})}return s};function F(S,R){return x(S,R),L(S,!0,R),s}function U(){let S=Object.create(null);return f.attributeNames.forEach(R=>{S[R]=!0}),S}function b(S,R=d){let M=d;for(;M<R&&c[M]!=="<";)M++;let H=c.substring(S,R),B=T(S,M),P="";if(!Fl(c,R,V.AfterAttributeName,I.DelimiterAssign)){let Y=r?.attributeDefaultValue??"doublequotes";Y==="empty"?P="=$1":Y==="singlequotes"?P="='$1'":P='="$1"'}let j=U();return j[H]=!1,l.forEach(Y=>{Y.provideAttributes(w).forEach(Z=>{if(j[Z.name])return;j[Z.name]=!0;let we=Z.name,ve;Z.valueSet!=="v"&&P.length&&(we=we+P,(Z.valueSet||Z.name==="style")&&(ve={title:"Suggest",command:"editor.action.triggerSuggest"})),s.items.push({label:Z.name,kind:Z.valueSet==="handler"?le.Function:le.Value,documentation:Ue(Z,void 0,u),textEdit:se.replace(B,we),insertTextFormat:ge.Snippet,command:ve})})}),g(B,j),s}function g(S,R){let M="data-",H={};H[M]=`${M}$1="$2"`;function B(P){P.attributeNames.forEach(j=>{Se(j,M)&&!H[j]&&!R[j]&&(H[j]=j+'="$1"')}),P.children.forEach(j=>B(j))}i&&i.roots.forEach(P=>B(P)),Object.keys(H).forEach(P=>s.items.push({label:P,kind:le.Value,textEdit:se.replace(S,H[P]),insertTextFormat:ge.Snippet}))}function v(S,R=d){let M,H,B;if(d>S&&d<=R&&Xc(c[S])){let P=S+1,j=R;R>S&&c[R-1]===c[S]&&j--;let Y=Qc(c,d,P),Z=Jc(c,d,j);M=T(Y,Z),B=d>=P&&d<=j?c.substring(P,d):"",H=!1}else M=T(S,R),B=c.substring(S,d),H=!0;if(a.length>0){let P=w.toLowerCase(),j=p.toLowerCase(),Y=T(S,R);for(let Z of a)Z.onHtmlAttributeValue&&Z.onHtmlAttributeValue({document:t,position:n,tag:P,attribute:j,value:B,range:Y})}return l.forEach(P=>{P.provideValues(w,p).forEach(j=>{let Y=H?'"'+j.name+'"':j.name;s.items.push({label:j.name,filterText:Y,kind:le.Unit,documentation:Ue(j,void 0,u),textEdit:se.replace(M,Y),insertTextFormat:ge.PlainText})})}),_(),s}function N(S){return d===m.getTokenEnd()&&(D=m.scan(),D===S&&m.getTokenOffset()===d)?m.getTokenEnd():d}function k(){for(let S of a)S.onHtmlContent&&S.onHtmlContent({document:t,position:n});return _()}function _(){let S=d-1,R=n.character;for(;S>=0&&dt(c,S);)S--,R--;if(S>=0&&c[S]==="&"){let M=G.create(ne.create(n.line,R-1),n);for(let H in ht)if(Il(H,";")){let B="&"+H;s.items.push({label:B,kind:le.Keyword,documentation:me("Character entity representing '{0}'",ht[H]),textEdit:se.replace(M,B),insertTextFormat:ge.PlainText})}}return s}function A(S,R){let M=T(S,R);s.items.push({label:"!DOCTYPE",kind:le.Property,documentation:"A preamble for an HTML document.",textEdit:se.replace(M,"!DOCTYPE html>"),insertTextFormat:ge.PlainText})}let D=m.scan();for(;D!==I.EOS&&m.getTokenOffset()<=d;){switch(D){case I.StartTagOpen:if(m.getTokenEnd()===d){let S=N(I.StartTag);return n.line===0&&A(d,S),F(d,S)}break;case I.StartTag:if(m.getTokenOffset()<=d&&d<=m.getTokenEnd())return x(m.getTokenOffset(),m.getTokenEnd());w=m.getTokenText();break;case I.AttributeName:if(m.getTokenOffset()<=d&&d<=m.getTokenEnd())return b(m.getTokenOffset(),m.getTokenEnd());p=m.getTokenText();break;case I.DelimiterAssign:if(m.getTokenEnd()===d){let S=N(I.AttributeValue);return v(d,S)}break;case I.AttributeValue:if(m.getTokenOffset()<=d&&d<=m.getTokenEnd())return v(m.getTokenOffset(),m.getTokenEnd());break;case I.Whitespace:if(d<=m.getTokenEnd())switch(m.getScannerState()){case V.AfterOpeningStartTag:let S=m.getTokenOffset(),R=N(I.StartTag);return F(S,R);case V.WithinTag:case V.AfterAttributeName:return b(m.getTokenEnd());case V.BeforeAttributeValue:return v(m.getTokenEnd());case V.AfterOpeningEndTag:return L(m.getTokenOffset()-1,!1);case V.WithinContent:return k()}break;case I.EndTagOpen:if(d<=m.getTokenEnd()){let S=m.getTokenOffset()+1,R=N(I.EndTag);return L(S,!1,R)}break;case I.EndTag:if(d<=m.getTokenEnd()){let S=m.getTokenOffset()-1;for(;S>=0;){let R=c.charAt(S);if(R==="/")return L(S,!1,m.getTokenEnd());if(!pi(R))break;S--}}break;case I.StartTagClose:if(d<=m.getTokenEnd()&&w)return z(m.getTokenEnd(),w);break;case I.Content:if(d<=m.getTokenEnd())return k();break;default:if(d<=m.getTokenEnd())return s;break}D=m Line truncated
`);u!==-1?this.__character_count=o.length-u:this.__character_count+=o.length},s.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},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 o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,u){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),u=u||"",o.indent_level>0&&(u=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}a.prototype.get_indent_size=function(o,u){var c=this.__base_string_length;return u=u||0,o<0&&(c=0),c+=o*this.__indent_size,c+=u,c},a.prototype.get_indent_string=function(o,u){var c=this.__base_string;return u=u||0,o<0&&(o=0,c=""),u+=o*this.__indent_size,this.__ensure_cache(u),c+=this.__cache[u],c},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,u=0,c="";this.__indent_size&&o>=this.__indent_size&&(u=Math.floor(o/this.__indent_size),o-=u*this.__indent_size,c=new Array(u+1).join(this.__indent_string)),o&&(c+=new Array(o+1).join(" ")),this.__cache.push(c)};function l(o,u){this.__indent_cache=new a(o,u),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.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()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(o,u){return this.__indent_cache.get_indent_string(o,u)},l.prototype.get_indent_size=function(o,u){return this.__indent_cache.get_indent_size(o,u)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(o){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
`);return o!==`
`&&(c=c.replace(/[\n]/g,o)),c},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(o,u){return o=o||0,u=u||0,this.next_line.set_indent(o,u),this.__lines.length>1?(this.current_line.set_indent(o,u),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(o){for(var u=0;u<o.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},l.prototype.remove_indent=function(o){for(var u=this.__lines.length;o<u;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(o,u){for(var c=this.__lines.length-2;c>=0;){var d=this.__lines[c];if(d.is_empty())break;if(d.item(0).indexOf(o)!==0&&d.item(-1)!==u){this.__lines.splice(c+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},r.exports.Output=l},,,,function(r){function s(o,u){this.raw_options=a(o,u),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(o,u){var c=this.raw_options[o],d=u||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(d=c.concat()):typeof c=="string"&&(d=c.split(/[^a-zA-Z0-9_\/\-]+/)),d},s.prototype._get_boolean=function(o,u){var c=this.raw_options[o],d=c===void 0?!!u:!!c;return d},s.prototype._get_characters=function(o,u){var c=this.raw_options[o],d=u||"";return typeof c=="string"&&(d=c.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},s.prototype._get_number=function(o,u){var c=this.raw_options[o];u=parseInt(u,10),isNaN(u)&&(u=0);var d=parseInt(c,10);return isNaN(d)&&(d=u),d},s.prototype._get_selection=function(o,u,c){var d=this._get_selection_list(o,u,c);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
`+u+`
You passed in: '`+this.raw_options[o]+"'");return d[0]},s.prototype._get_selection_list=function(o,u,c){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[u[0]],!this._is_valid_selection(c,u))throw new Error("Invalid Default Value!");var d=this._get_array(o,c);if(!this._is_valid_selection(d,u))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
`+u+`
You passed in: '`+this.raw_options[o]+"'");return d},s.prototype._is_valid_selection=function(o,u){return o.length&&u.length&&!o.some(function(c){return u.indexOf(c)===-1})};function a(o,u){var c={};o=l(o);var d;for(d in o)d!==u&&(c[d]=o[d]);if(u&&o[u])for(d in o[u])c[d]=o[u][d];return c}function l(o){var u={},c;for(c in o){var d=c.replace(/-/g,"_");u[d]=o[c]}return u}r.exports.Options=s,r.exports.normalizeOpts=l,r.exports.mergeOpts=a},,function(r){var s=RegExp.prototype.hasOwnProperty("sticky");function a(l){this.__input=l||"",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<this.__input_length},a.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},a.prototype.peek=function(l){var o=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(o=this.__input.charAt(l)),o},a.prototype.__match=function(l,o){l.lastIndex=o;var u=l.exec(this.__input);return u&&!(s&&l.sticky)&&u.index!==o&&(u=null),u},a.prototype.test=function(l,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(l,o):!1},a.prototype.testChar=function(l,o){var u=this.peek(o);return l.lastIndex=0,u!==null&&l.test(u)},a.prototype.match=function(l){var o=this.__match(l,this.__position);return o?this.__position+=o[0].length:o=null,o},a.prototype.read=function(l,o,u){var c="",d;return l&&(d=this.match(l),d&&(c+=d[0])),o&&(d||!l)&&(c+=this.readUntil(o,u)),c},a.prototype.readUntil=function(l,o){var u="",c=this.__position;l.lastIndex=this.__position;var d=l.exec(this.__input);return d?(c=d.index,o&&(c+=d[0].length)):c=this.__input_length,u=this.__input.substring(this.__position,c),this.__position=c,u},a.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},a.prototype.get_regexp=function(l,o){var u=null,c="g";return o&&s&&(c="y"),typeof l=="string"&&l!==""?u=new RegExp(l,c):l&&(u=new RegExp(l.source,c)),u},a.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(l){var o=this.__position,u=this.readUntilAfter(l);return this.__position=o,u},a.prototype.lookBack=function(l){var o=this.__position-1;return o>=l.length&&this.__input.substring(o-l.length,o).toLowerCase()===l},r.exports.InputScanner=a},,,,,function(r){function s(a,l){a=typeof a=="string"?a:a.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+l,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(a);o;)l[o[1]]=o[2],o=this.__directive_pattern.exec(a);return l},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},r.exports.Directives=s},,function(r,s,a){var l=a(16).Beautifier,o=a(17).Options;function u(c,d){var f=new l(c,d);return f.beautify()}r.exports=u,r.exports.defaultOptions=function(){return new o}},function(r,s,a){var l=a(17).Options,o=a(2).Output,u=a(8).InputScanner,c=a(13).Directives,d=new c(/\/\*/,/\*\//),f=/\r\n|[\r\n]/,m=/\r\n|[\r\n]/g,w=/\s/,p=/(?:\s|\n)+/g,T=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,x=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function y(L,z){this._source_text=L||"",this._options=new l(z),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"]}y.prototype.eatString=function(L){var z="";for(this._ch=this._input.next();this._ch;){if(z+=this._ch,this._ch==="\\")z+=this._input.next();else if(L.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return z},y.prototype.eatWhitespace=function(L){for(var z=w.test(this._input.peek()),F=0;w.test(this._input.peek());)this._ch=this._input.next(),L&&this._ch===`
`&&(F===0||F<this._options.max_preserve_newlines)&&(F++,this._output.add_new_line(!0));return z},y.prototype.foundNestedPseudoClass=function(){for(var L=0,z=1,F=this._input.peek(z);F;){if(F==="{")return!0;if(F==="(")L+=1;else if(F===")"){if(L===0)return!1;L-=1}else if(F===";"||F==="}")return!1;z++,F=this._input.peek(z)}return!1},y.prototype.print_string=function(L){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(L)},y.prototype.preserveSingleSpace=function(L){L&&(this._output.space_before_token=!0)},y.prototype.indent=function(){this._indentLevel++},y.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L=this._source_text,z=this._options.eol;z==="auto"&&(z=`
`,L&&f.test(L||"")&&(z=L.match(f)[0])),L=L.replace(m,`
`);var F=L.match(/^[\t ]*/)[0];this._output=new o(this._options,F),this._input=new u(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var U=0,b=!1,g=!1,v=!1,N=!1,k=!1,_=this._ch,A=!1,D,S,R;D=this._input.read(p),S=D!=="",R=_,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),_=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var M=this._input.read(T),H=d.get_directives(M);H&&H.ignore==="start"&&(M+=d.readIgnored(this._input)),this.print_string(M),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(x)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(S),this.print_string(this._ch);var B=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);B.match(/[ :]$/)&&(B=this.eatString(": ").replace(/\s+$/,""),this.print_string(B),this._output.space_before_token=!0),U===0&&B.indexOf(":")!==-1&&(g=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(S),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var P=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);P.match(/[ :]$/)&&(P=this.eatString(": ").replace(/\s+$/,""),this.print_string(P),this._output.space_before_token=!0),U===0&&P.indexOf(":")!==-1?(g=!0,this.indent()):P in this.NESTED_AT_RULE?(this._nestedLevel+=1,P in this.CONDITIONAL_GROUP_RULE&&(v=!0)):U===0&&!g&&(N=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(S),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")g&&(g=!1,this.outdent()),N=!1,v?(v=!1,b=this._indentLevel>=this._nestedLevel):b=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&b&&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)):(R==="("?this._output.space_before_token=!1:R!==","&&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(),R==="{"&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),b=!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 j=0;j<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;j++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[j])){A=!0;break}(b||v)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!N&&U===0?(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Y=R==='"'||R==="'";this.preserveSingleSpace(Y||S),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")A=!1,U===0?(g&&(this.outdent(),g=!1),N=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),U++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),U&&(U--,this.outdent()));else{var Z=!1;this._input.lookBack("with")&&(Z=!0),this.preserveSingleSpace(S||Z),this.print_string(this._ch),g&&R==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),k=!0):(this.eatWhitespace(),U++,this.indent())}else if(this._ch===")")U&&(U--,this.outdent()),k&&this._input.peek()===";"&&this._options.selector_separator_newline&&(k=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!g||k)&&U===0&&!N?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!g&&U===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._c Line truncated
`&&A&&this._output.add_new_line()}var ve=this._output.get_code(z);return ve},r.exports.Beautifier=y},function(r,s,a){var l=a(6).Options;function o(u){l.call(this,u,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var c=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||c;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var f=0;f<d.length;f++)d[f]!=="expand"?this.brace_style="collapse":this.brace_style=d[f]}o.prototype=new l,r.exports.Options=o}],t={};function n(r){var s=t[r];if(s!==void 0)return s.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}var i=n(15);Ul=i})();var Hl=Ul;var Wl;(function(){var e=[,,function(r){function s(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}s.prototype.clone_empty=function(){var o=new s(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},s.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},s.prototype.has_match=function(o){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(o))return!0;return!1},s.prototype.set_indent=function(o,u){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=u||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 o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__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(o){this.__items.push(o);var u=o.lastIndexOf(`
`);u!==-1?this.__character_count=o.length-u:this.__character_count+=o.length},s.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},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 o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function a(o,u){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),u=u||"",o.indent_level>0&&(u=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}a.prototype.get_indent_size=function(o,u){var c=this.__base_string_length;return u=u||0,o<0&&(c=0),c+=o*this.__indent_size,c+=u,c},a.prototype.get_indent_string=function(o,u){var c=this.__base_string;return u=u||0,o<0&&(o=0,c=""),u+=o*this.__indent_size,this.__ensure_cache(u),c+=this.__cache[u],c},a.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var o=this.__cache.length,u=0,c="";this.__indent_size&&o>=this.__indent_size&&(u=Math.floor(o/this.__indent_size),o-=u*this.__indent_size,c=new Array(u+1).join(this.__indent_string)),o&&(c+=new Array(o+1).join(" ")),this.__cache.push(c)};function l(o,u){this.__indent_cache=new a(o,u),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.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()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(o,u){return this.__indent_cache.get_indent_string(o,u)},l.prototype.get_indent_size=function(o,u){return this.__indent_cache.get_indent_size(o,u)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(o){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
`);return o!==`
`&&(c=c.replace(/[\n]/g,o)),c},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(o,u){return o=o||0,u=u||0,this.next_line.set_indent(o,u),this.__lines.length>1?(this.current_line.set_indent(o,u),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(o){for(var u=0;u<o.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},l.prototype.remove_indent=function(o){for(var u=this.__lines.length;o<u;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(o,u){for(var c=this.__lines.length-2;c>=0;){var d=this.__lines[c];if(d.is_empty())break;if(d.item(0).indexOf(o)!==0&&d.item(-1)!==u){this.__lines.splice(c+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},r.exports.Output=l},function(r){function s(a,l,o,u){this.type=a,this.text=l,this.comments_before=null,this.newlines=o||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}r.exports.Token=s},,,function(r){function s(o,u){this.raw_options=a(o,u),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(o,u){var c=this.raw_options[o],d=u||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(d=c.concat()):typeof c=="string"&&(d=c.split(/[^a-zA-Z0-9_\/\-]+/)),d},s.prototype._get_boolean=function(o,u){var c=this.raw_options[o],d=c===void 0?!!u:!!c;return d},s.prototype._get_characters=function(o,u){var c=this.raw_options[o],d=u||"";return typeof c=="string"&&(d=c.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},s.prototype._get_number=function(o,u){var c=this.raw_options[o];u=parseInt(u,10),isNaN(u)&&(u=0);var d=parseInt(c,10);return isNaN(d)&&(d=u),d},s.prototype._get_selection=function(o,u,c){var d=this._get_selection_list(o,u,c);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
`+u+`
You passed in: '`+this.raw_options[o]+"'");return d[0]},s.prototype._get_selection_list=function(o,u,c){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[u[0]],!this._is_valid_selection(c,u))throw new Error("Invalid Default Value!");var d=this._get_array(o,c);if(!this._is_valid_selection(d,u))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
`+u+`
You passed in: '`+this.raw_options[o]+"'");return d},s.prototype._is_valid_selection=function(o,u){return o.length&&u.length&&!o.some(function(c){return u.indexOf(c)===-1})};function a(o,u){var c={};o=l(o);var d;for(d in o)d!==u&&(c[d]=o[d]);if(u&&o[u])for(d in o[u])c[d]=o[u][d];return c}function l(o){var u={},c;for(c in o){var d=c.replace(/-/g,"_");u[d]=o[c]}return u}r.exports.Options=s,r.exports.normalizeOpts=l,r.exports.mergeOpts=a},,function(r){var s=RegExp.prototype.hasOwnProperty("sticky");function a(l){this.__input=l||"",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<this.__input_length},a.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},a.prototype.peek=function(l){var o=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(o=this.__input.charAt(l)),o},a.prototype.__match=function(l,o){l.lastIndex=o;var u=l.exec(this.__input);return u&&!(s&&l.sticky)&&u.index!==o&&(u=null),u},a.prototype.test=function(l,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(l,o):!1},a.prototype.testChar=function(l,o){var u=this.peek(o);return l.lastIndex=0,u!==null&&l.test(u)},a.prototype.match=function(l){var o=this.__match(l,this.__position);return o?this.__position+=o[0].length:o=null,o},a.prototype.read=function(l,o,u){var c="",d;return l&&(d=this.match(l),d&&(c+=d[0])),o&&(d||!l)&&(c+=this.readUntil(o,u)),c},a.prototype.readUntil=function(l,o){var u="",c=this.__position;l.lastIndex=this.__position;var d=l.exec(this.__input);return d?(c=d.index,o&&(c+=d[0].length)):c=this.__input_length,u=this.__input.substring(this.__position,c),this.__position=c,u},a.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},a.prototype.get_regexp=function(l,o){var u=null,c="g";return o&&s&&(c="y"),typeof l=="string"&&l!==""?u=new RegExp(l,c):l&&(u=new RegExp(l.source,c)),u},a.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(l){var o=this.__position,u=this.readUntilAfter(l);return this.__position=o,u},a.prototype.lookBack=function(l){var o=this.__position-1;return o>=l.length&&this.__input.substring(o-l.length,o).toLowerCase()===l},r.exports.InputScanner=a},function(r,s,a){var l=a(8).InputScanner,o=a(3).Token,u=a(10).TokenStream,c=a(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},f=function(m,w){this._input=new l(m),this._options=w||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};f.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var m,w=new o(d.START,""),p=null,T=[],x=new u;w.type!==d.EOF;){for(m=this._get_next_token(w,p);this._is_comment(m);)x.add(m),m=this._get_next_token(w,p);x.isEmpty()||(m.comments_before=x,x=new u),m.parent=p,this._is_opening(m)?(T.push(p),p=m):p&&this._is_closing(m,p)&&(m.opened=p,p.closed=m,p=T.pop(),m.parent=p),m.previous=w,w.next=m,this.__tokens.add(m),w=m}return this.__tokens},f.prototype._is_first_token=function(){return this.__tokens.isEmpty()},f.prototype._reset=function(){},f.prototype._get_next_token=function(m,w){this._readWhitespace();var p=this._input.read(/.+/g);return p?this._create_token(d.RAW,p):this._create_token(d.EOF,"")},f.prototype._is_comment=function(m){return!1},f.prototype._is_opening=function(m){return!1},f.prototype._is_closing=function(m,w){return!1},f.prototype._create_token=function(m,w){var p=new o(m,w,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return p},f.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=f,r.exports.TOKEN=d},function(r){function s(a){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=a}s.prototype.restart=function(){this.__position=0},s.prototype.isEmpty=function(){return this.__tokens_length===0},s.prototype.hasNext=function(){return this.__position<this.__tokens_length},s.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__tokens[this.__position],this.__position+=1),a},s.prototype.peek=function(a){var l=null;return a=a||0,a+=this.__position,a>=0&&a<this.__tokens_length&&(l=this.__tokens[a]),l},s.prototype.add=function(a){this.__parent_token&&(a.parent=this.__parent_token),this.__tokens.push(a),this.__tokens_length+=1},r.exports.TokenStream=s},function(r,s,a){var l=a(12).Pattern;function o(u,c){l.call(this,u,c),c?this._line_regexp=this._input.get_regexp(c._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new l,o.prototype.__set_whitespace_patterns=function(u,c){u+="\\t ",c+="\\n\\r",this._match_pattern=this._input.get_regexp("["+u+c+"]+",!0),this._nLine truncated
`,b&&d.test(b)&&(g=b.match(d)[0])),b=b.replace(f,`
`);var v=b.match(/^[\t ]*/)[0],N={text:"",type:""},k=new z,_=new m(this._options,v),A=new u(b,this._options).tokenize();this._tag_stack=new y(_);for(var D=null,S=A.next();S.type!==c.EOF;)S.type===c.TAG_OPEN||S.type===c.COMMENT?(D=this._handle_tag_open(_,S,k,N,A),k=D):S.type===c.ATTRIBUTE||S.type===c.EQUALS||S.type===c.VALUE||S.type===c.TEXT&&!k.tag_complete?D=this._handle_inside_tag(_,S,k,N):S.type===c.TAG_CLOSE?D=this._handle_tag_close(_,S,k):S.type===c.TEXT?D=this._handle_text(_,S,k):S.type===c.CONTROL_FLOW_OPEN?D=this._handle_control_flow_open(_,S):S.type===c.CONTROL_FLOW_CLOSE?D=this._handle_control_flow_close(_,S):_.add_raw_token(S),N=D,S=A.next();var R=_._output.get_code(g);return R},L.prototype._handle_control_flow_open=function(b,g){var v={text:g.text,type:g.type};return b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),g.newlines?b.print_preserved_newlines(g):b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.print_token(g),b.indent(),v},L.prototype._handle_control_flow_close=function(b,g){var v={text:g.text,type:g.type};return b.deindent(),g.newlines?b.print_preserved_newlines(g):b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.print_token(g),v},L.prototype._handle_tag_close=function(b,g,v){var N={text:g.text,type:g.type};return b.alignment_size=0,v.tag_complete=!0,b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),v.is_unformatted?b.add_raw_token(g):(v.tag_start_char==="<"&&(b.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&v.has_wrapped_attrs&&b.print_newline(!1)),b.print_token(g)),v.indent_content&&!(v.is_unformatted||v.is_content_unformatted)&&(b.indent(),v.indent_content=!1),!v.is_inline_element&&!(v.is_unformatted||v.is_content_unformatted)&&b.set_wrap_point(),N},L.prototype._handle_inside_tag=function(b,g,v,N){var k=v.has_wrapped_attrs,_={text:g.text,type:g.type};return b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),v.is_unformatted?b.add_raw_token(g):v.tag_start_char==="{"&&g.type===c.TEXT?b.print_preserved_newlines(g)?(g.newlines=0,b.add_raw_token(g)):b.print_token(g):(g.type===c.ATTRIBUTE?b.set_space_before_token(!0):(g.type===c.EQUALS||g.type===c.VALUE&&g.previous.type===c.EQUALS)&&b.set_space_before_token(!1),g.type===c.ATTRIBUTE&&v.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(b.traverse_whitespace(g),k=k||g.newlines!==0),this._is_wrap_attributes_force&&v.attr_count>=this._options.wrap_attributes_min_attrs&&(N.type!==c.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(b.print_newline(!1),k=!0)),b.print_token(g),k=k||b.previous_token_wrapped(),v.has_wrapped_attrs=k),_},L.prototype._handle_text=function(b,g,v){var N={text:g.text,type:"TK_CONTENT"};return v.custom_beautifier_name?this._print_custom_beatifier_text(b,g,v):v.is_unformatted||v.is_content_unformatted?b.add_raw_token(g):(b.traverse_whitespace(g),b.print_token(g)),N},L.prototype._print_custom_beatifier_text=function(b,g,v){var N=this;if(g.text!==""){var k=g.text,_,A=1,D="",S="";v.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?_=this._js_beautify:v.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?_=this._css_beautify:v.custom_beautifier_name==="html"&&(_=function(j,Y){var Z=new L(j,Y,N._js_beautify,N._css_beautify);return Z.beautify()}),this._options.indent_scripts==="keep"?A=0:this._options.indent_scripts==="separate"&&(A=-b.indent_level);var R=b.get_full_indent(A);if(k=k.replace(/\n[ \t]*$/,""),v.custom_beautifier_name!=="html"&&k[0]==="<"&&k.match(/^(<!--|<!\[CDATA\[)/)){var M=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(k);if(!M){b.add_raw_token(g);return}D=R+M[1]+`
`,k=M[4],M[5]&&(S=R+M[5]),k=k.replace(/\n[ \t]*$/,""),(M[2]||M[3].indexOf(`
`)!==-1)&&(M=M[3].match(/[ \t]+$/),M&&(g.whitespace_before=M[0]))}if(k)if(_){var H=function(){this.eol=`
`};H.prototype=this._options.raw_options;var B=new H;k=_(R+k,B)}else{var P=g.whitespace_before;P&&(k=k.replace(new RegExp(`
(`+P+")?","g"),`
`)),k=R+k.replace(/\n/g,`
`+R)}D&&(k?k=D+k+`
`+S:k=D+S),b.print_newline(!1),k&&(g.text=k,g.whitespace_before="",g.newlines=0,b.add_raw_token(g),b.print_newline(!0))}},L.prototype._handle_tag_open=function(b,g,v,N,k){var _=this._get_tag_open_token(g);if((v.is_unformatted||v.is_content_unformatted)&&!v.is_empty_element&&g.type===c.TAG_OPEN&&!_.is_start_tag?(b.add_raw_token(g),_.start_tag_token=this._tag_stack.try_pop(_.tag_name)):(b.traverse_whitespace(g),this._set_tag_position(b,g,_,v,N),_.is_inline_element||b.set_wrap_point(),b.print_token(g)),_.is_start_tag&&this._is_wrap_attributes_force){var A=0,D;do D=k.peek(A),D.type===c.ATTRIBUTE&&(_.attr_count+=1),A+=1;while(D.type!==c.EOF&&D.type!==c.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(_.alignment_size=g.text.length+1),!_.tag_complete&&!_.is_unformatted&&(b.alignment_size=_.alignment_size),_};var z=function(b,g){if(this.parent=b||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!g)this.tag_complete=!0;else{var v;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(v=g.text.match(/^<([^\s>]*)/),this.tag_check=v?v[1]:""):(v=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=v?v[1]:"",(g.text.startsWith("{{#>")||g.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&g.next!==null?this.tag_check=g.next.text.split(" ")[0]:this.tag_check=g.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),g.type===c.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||g.closed&&g.closed.text==="/>";var N=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(N=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(N)))}};L.prototype._get_tag_open_token=function(b){var g=new z(this._tag_stack.get_parser_token(),b);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||T(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&T(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&T(g.tag_check,this._options.content_unformatted),g.is_inline_element=T(g.tag_name,this._options.inline)||this._options.inline_custom_elements&&g.tag_name.includes("-")||g.tag_start_char==="{",g},L.prototype._set_tag_position=function(b,g,v,N,k){if(v.is_empty_element||(v.is_end_tag?v.start_tag_token=this._tag_stack.try_pop(v.tag_name):(this._do_optional_end_element(v)&&(v.is_inline_element||b.print_newline(!1)),this._tag_stack.record_tag(v),(v.tag_name==="script"||v.tag_name==="style")&&!(v.is_unformatted||v.is_content_unformatted)&&(v.custom_beautifier_name=p(v.tag_check,g)))),T(v.tag_check,this._options.extra_liners)&&(b.print_newline(!1),b._output.just_added_blankline()||b.print_newline(!0)),v.is_empty_element){if(v.tag_start_char==="{"&&v.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),v.indent_content=!0;var _=b.current_line_has_match(/{{#if/);_||b.print_newline(!1)}v.tag_name==="!--"&&k.type===c.TAG_CLOSE&&N.is_end_tag&&v.text.indexOf(`
`)===-1||(v.is_inline_element||v.is_unformatted||b.print_newline(!1),this._calcluate_parent_multiline(b,v))}else if(v.is_end_tag){var A=!1;A=v.start_tag_token&&v.start_tag_token.multiline_content,A=A||!v.is_inline_element&&!(N.is_inline_element||N.is_unformatted)&&!(k.type===c.TAG_CLOSE&&v.start_tag_token===N)&&k.type!=="TK_CONTENT",(v.is_content_unformatted||v.is_unformatted)&&(A=!1),A&&b.print_newline(!1)}else v.indent_content=!v.custom_beautifier_name,v.tag_start_char==="<"&&(v.tag_name==="html"?v.indent_content=this._options.indent_inner_html:v.tag_name==="head"?v.indent_content=this._options.indent_head_inner_html:v.tag_name==="body"&&(v.indent_content=this._options.indent_body_inner_html)),!(v.is_inline_element||v.is_unformatted)&&(k.type!=="TK_CONTENT"||v.is_content_unformatted)&&b.print_newline(!1),this._calcluate_parent_multiline(b,v)},L.prototype._calcluate_parent_multiline=function(b,g){g.parent&&b._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var F=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],U=["a","audio","del","ins","map","noscript","video"];L.prototype._do_optional_end_element=function(b){var g=null;if(!(b.is_empty_element||!b.is_start_tag||!b.parent)){if(b.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(b.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(b.tag_name==="dd"||b.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(b.parent.tag_name==="p"&&F.indexOf(b.tag_name)!==-1){var v=b.parent.parent;(!v||U.indexOf(v.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else b.tag_name==="rp"||b.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):b.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):b.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):b.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):b.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):b.tag_name==="tbody"||b.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):b.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(b.tag_name==="th"||b.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return b.parent=this._tag_stack.get_parser_token(),g}},r.exports.Beautifier=L},function(r,s,a){var l=a(6).Options;function o(u){l.call(this,u,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate" Line truncated
`,indent_scripts:be(n,"indentScripts","normal"),templating:Kc(n,"all"),unformatted_content_delimiter:be(n,"unformattedContentDelimiter","")},o=Bl(Zc(i),l);if(s>0){let u=n.insertSpaces?rs(" ",a*s):rs(" ",s);o=o.split(`
`).join(`
`+u),t.start.character===0&&(o=u+o)}return[{range:t,newText:o}]}function Zc(e){return e.replace(/^\s+/,"")}function be(e,t,n){if(e&&e.hasOwnProperty(t)){let i=e[t];if(i!==null)return i}return n}function ss(e,t,n){let i=be(e,t,null);return typeof i=="string"?i.length>0?i.split(",").map(r=>r.trim().toLowerCase()):[]:n}function Kc(e,t){let n=be(e,"templating",t);return n===!0?["auto"]:n===!1||n===t||Array.isArray(n)===!1?["none"]:n}function eh(e,t,n){let i=t,r=0,s=n.tabSize||4;for(;i<e.length;){let a=e.charAt(i);if(a===" ")r++;else if(a===" ")r+=s;else break;i++}return Math.floor(r/s)}function Ol(e,t){return`\r
`.indexOf(e.charAt(t))!==-1}function ql(e,t){return" ".indexOf(e.charAt(t))!==-1}var jl;(()=>{var e={470:r=>{function s(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function a(o,u){for(var c,d="",f=0,m=-1,w=0,p=0;p<=o.length;++p){if(p<o.length)c=o.charCodeAt(p);else{if(c===47)break;c=47}if(c===47){if(!(m===p-1||w===1))if(m!==p-1&&w===2){if(d.length<2||f!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var T=d.lastIndexOf("/");if(T!==d.length-1){T===-1?(d="",f=0):f=(d=d.slice(0,T)).length-1-d.lastIndexOf("/"),m=p,w=0;continue}}else if(d.length===2||d.length===1){d="",f=0,m=p,w=0;continue}}u&&(d.length>0?d+="/..":d="..",f=2)}else d.length>0?d+="/"+o.slice(m+1,p):d=o.slice(m+1,p),f=p-m-1;m=p,w=0}else c===46&&w!==-1?++w:w=-1}return d}var l={resolve:function(){for(var o,u="",c=!1,d=arguments.length-1;d>=-1&&!c;d--){var f;d>=0?f=arguments[d]:(o===void 0&&(o=process.cwd()),f=o),s(f),f.length!==0&&(u=f+"/"+u,c=f.charCodeAt(0)===47)}return u=a(u,!c),c?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(o){if(s(o),o.length===0)return".";var u=o.charCodeAt(0)===47,c=o.charCodeAt(o.length-1)===47;return(o=a(o,!u)).length!==0||u||(o="."),o.length>0&&c&&(o+="/"),u?"/"+o:o},isAbsolute:function(o){return s(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,u=0;u<arguments.length;++u){var c=arguments[u];s(c),c.length>0&&(o===void 0?o=c:o+="/"+c)}return o===void 0?".":l.normalize(o)},relative:function(o,u){if(s(o),s(u),o===u||(o=l.resolve(o))===(u=l.resolve(u)))return"";for(var c=1;c<o.length&&o.charCodeAt(c)===47;++c);for(var d=o.length,f=d-c,m=1;m<u.length&&u.charCodeAt(m)===47;++m);for(var w=u.length-m,p=f<w?f:w,T=-1,x=0;x<=p;++x){if(x===p){if(w>p){if(u.charCodeAt(m+x)===47)return u.slice(m+x+1);if(x===0)return u.slice(m+x)}else f>p&&(o.charCodeAt(c+x)===47?T=x:x===0&&(T=0));break}var y=o.charCodeAt(c+x);if(y!==u.charCodeAt(m+x))break;y===47&&(T=x)}var L="";for(x=c+T+1;x<=d;++x)x!==d&&o.charCodeAt(x)!==47||(L.length===0?L+="..":L+="/..");return L.length>0?L+u.slice(m+T):(m+=T,u.charCodeAt(m)===47&&++m,u.slice(m))},_makeLong:function(o){return o},dirname:function(o){if(s(o),o.length===0)return".";for(var u=o.charCodeAt(0),c=u===47,d=-1,f=!0,m=o.length-1;m>=1;--m)if((u=o.charCodeAt(m))===47){if(!f){d=m;break}}else f=!1;return d===-1?c?"/":".":c&&d===1?"//":o.slice(0,d)},basename:function(o,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');s(o);var c,d=0,f=-1,m=!0;if(u!==void 0&&u.length>0&&u.length<=o.length){if(u.length===o.length&&u===o)return"";var w=u.length-1,p=-1;for(c=o.length-1;c>=0;--c){var T=o.charCodeAt(c);if(T===47){if(!m){d=c+1;break}}else p===-1&&(m=!1,p=c+1),w>=0&&(T===u.charCodeAt(w)?--w==-1&&(f=c):(w=-1,f=p))}return d===f?f=p:f===-1&&(f=o.length),o.slice(d,f)}for(c=o.length-1;c>=0;--c)if(o.charCodeAt(c)===47){if(!m){d=c+1;break}}else f===-1&&(m=!1,f=c+1);return f===-1?"":o.slice(d,f)},extname:function(o){s(o);for(var u=-1,c=0,d=-1,f=!0,m=0,w=o.length-1;w>=0;--w){var p=o.charCodeAt(w);if(p!==47)d===-1&&(f=!1,d=w+1),p===46?u===-1?u=w:m!==1&&(m=1):u!==-1&&(m=-1);else if(!f){c=w+1;break}}return u===-1||d===-1||m===0||m===1&&u===d-1&&u===c+1?"":o.slice(u,d)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(u,c){var d=c.dir||c.root,f=c.base||(c.name||"")+(c.ext||"");return d?d===c.root?d+f:d+"/"+f:f}(0,o)},parse:function(o){s(o);var u={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return u;var c,d=o.charCodeAt(0),f=d===47;f?(u.root="/",c=1):c=0;for(var m=-1,w=0,p=-1,T=!0,x=o.length-1,y=0;x>=c;--x)if((d=o.charCodeAt(x))!==47)p===-1&&(T=!1,p=x+1),d===46?m===-1?m=x:y!==1&&(y=1):m!==-1&&(y=-1);else if(!T){w=x+1;break}return m===-1||p===-1||y===0||y===1&&m===p-1&&m===w+1?p!==-1&&(u.base=u.name=w===0&&f?o.slice(1,p):o.slice(w,p)):(w===0&&f?(u.name=o.slice(1,m),u.base=o.slice(1,p)):(u.name=o.slice(w,m),u.base=o.slice(w,p)),u.ext=o.slice(m,p)),w>0?u.dir=o.slice(0,w-1):f&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,r.exports=l}},t={};function n(r){var s=t[r];if(s!==void 0)return s.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(r,s)=>{for(var a in s)n.o(s,a)&&!n.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:s[a]})},n.o=(r,s)=>Object.prototype.hasOwnProperty.call(r,s),n.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var i={};(()=>{let r;n.r(i),n.d(i,{URI:()=>f,Utils:()=>N}),typeof process=="object"?r=process.platform==="win32":typeof navigator=="object"&&(r=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,a=/^\//,l=/^\/\//;function o(k,_){if(!k.scheme&&_)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${k.authority}Line truncated
This metadata name is associated with the value contained by the [\`content\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute. The possible values for the name attribute are:
* \`application-name\` which defines the name of the application running in the web page.
**Note:**
* Browsers may use this to identify the application. It is different from the [\`<title>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title "The HTML Title element (<title>) defines the document's title that is shown in a browser's title bar or a page's tab.") element, which usually contain the application name, but may also contain information like the document name or a status.
* Simple web pages shouldn't define an application-name.
* \`author\` which defines the name of the document's author.
* \`description\` which contains a short and accurate summary of the content of the page. Several browsers, like Firefox and Opera, use this as the default description of bookmarked pages.
* \`generator\` which contains the identifier of the software that generated the page.
* \`keywords\` which contains words relevant to the page's content separated by commas.
* \`referrer\` which controls the [\`Referer\` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) attached to requests sent from the document:
Values for the \`content\` attribute of \`<meta name="referrer">\`
\`no-referrer\`
Do not send a HTTP \`Referrer\` header.
\`origin\`
Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the document.
\`no-referrer-when-downgrade\`
Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) as a referrer to URLs as secure as the current page, (https\u2192https), but does not send a referrer to less secure URLs (https\u2192http). This is the default behaviour.
\`origin-when-cross-origin\`
Send the full URL (stripped of parameters) for same-origin requests, but only send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) for other cases.
\`same-origin\`
A referrer will be sent for [same-site origins](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy), but cross-origin requests will contain no referrer information.
\`strict-origin\`
Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but don't send it to a less secure destination (HTTPS->HTTP).
\`strict-origin-when-cross-origin\`
Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP).
\`unsafe-URL\`
Send the full URL (stripped of parameters) for same-origin or cross-origin requests.
**Notes:**
* Some browsers support the deprecated values of \`always\`, \`default\`, and \`never\` for referrer.
* Dynamically inserting \`<meta name="referrer">\` (with [\`document.write\`](https://developer.mozilla.org/en-US/docs/Web/API/Document/write) or [\`appendChild\`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)) makes the referrer behaviour unpredictable.
* When several conflicting policies are defined, the no-referrer policy is applied.
This attribute may also have a value taken from the extended list defined on [WHATWG Wiki MetaExtensions page](https://wiki.whatwg.org/wiki/MetaExtensions). Although none have been formally accepted yet, a few commonly used names are:
* \`creator\` which defines the name of the creator of the document, such as an organization or institution. If there are more than one, several [\`<meta>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.") elements should be used.
* \`googlebot\`, a synonym of \`robots\`, is only followed by Googlebot (the indexing crawler for Google).
* \`publisher\` which defines the name of the document's publisher.
* \`robots\` which defines the behaviour that cooperative crawlers, or "robots", should use with the page. It is a comma-separated list of the values below:
Values for the content of \`<meta name="robots">\`
Value
Description
Used by
\`index\`
Allows the robot to index the page (default).
All
\`noindex\`
Requests the robot to not index the page.
All
\`follow\`
Allows the robot to follow the links on the page (default).
All
\`nofollow\`
Requests the robot to not follow the links on the page.
All
\`none\`
Equivalent to \`noindex, nofollow\`
[Google](https://support.google.com/webmasters/answer/79812)
\`noodp\`
Prevents using the [Open Directory Project](https://www.dmoz.org/) description, if any, as the page description in search engine results.
[Google](https://support.google.com/webmasters/answer/35624#nodmoz), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/meta-tags-robotstxt-yahoo-search-sln2213.html#cont5), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)
\`noarchive\`
Requests the search engine not to cache the page content.
[Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/SLN2213.html), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)
\`nosnippet\`
Prevents displaying any description of the page in search engine results.
[Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)
\`noimageindex\`
Requests this page not to appear as the referring page of an indexed image.
[Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives)
\`nocache\`
Synonym of \`noarchive\`.
[Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)
**Notes:**
* Only cooperative robots follow these rules. Do not expect to prevent e-mail harvesters with them.
* The robot still needs to access the page in order to read these rules. To prevent bandwidth consumption, use a _[robots.txt](https://developer.mozilla.org/en-US/docs/Glossary/robots.txt "robots.txt: Robots.txt is a file which is usually placed in the root of any website. It decides whether\xA0crawlers are permitted or forbidden access to the web site.")_ file.
* If you want to remove a page, \`noindex\` will work, but only after the robot visits the page again. Ensure that the \`robots.txt\` file is not preventing revisits.
* Some values are mutually exclusive, like \`index\` and \`noindex\`, or \`follow\` and \`nofollow\`. In these cases the robot's behaviour is undefined and may vary between them.
* Some crawler robots, like Google, Yahoo and Bing, support the same values for the HTTP header \`X-Robots-Tag\`; this allows non-HTML documents like images to use these rules.
* \`slurp\`, is a synonym of \`robots\`, but only for Slurp - the crawler for Yahoo Search.
* \`viewport\`, which gives hints about the size of the initial size of the [viewport](https://developer.mozilla.org/en-US/docs/Glossary/viewport "viewport: A viewport represents a polygonal (normally rectangular) area in computer graphics that is currently being viewed. In web browser terms, it refers to the part of the document you're viewing which is currently visible in its window (or the screen, if the document is being viewed in full screen mode). Content outside the viewport is not visible onscreen until scrolled into view."). Used by mobile devices only.
Values for the content of \`<meta name="viewport">\`
Value
Possible subvalues
Description
\`width\`
A positive integer number, or the text \`device-width\`
Defines the pixel width of the viewport that you want the web site to be rendered at.
\`height\`
A positive integer, or the text \`device-height\`
Defines the height of the viewport. Not used by any browser.
\`initial-scale\`
A positive number between \`0.0\` and \`10.0\`
Defines the ratio between the device width (\`device-width\` in portrait mode or \`device-height\` in landscape mode) and the viewport size.
\`maximum-scale\`
A positive number between \`0.0\` and \`10.0\`
Defines the maximum amount to zoom in. It must be greater or equal to the \`minimum-scale\` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.
\`minimum-scale\`
A positive number between \`0.0\` and \`10.0\`
Defines the minimum zoom level. It must be smaller or equal to the \`maximum-scale\` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.
\`user-scalable\`
\`yes\` or \`no\`
If set to \`no\`, the user is not able to zoom in the webpage. The default is \`yes\`. Browser settings can ignore this rule, and iOS10+ ignores it by default.
Specification
Status
Comment
[CSS Device Adaptation
The definition of '<meta name="viewport">' in that specification.](https://drafts.csswg.org/css-device-adapt/#viewport-meta)
Working Draft
Non-normatively describes the Viewport META element
See also: [\`@viewport\`](https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport "The @viewport CSS at-rule lets you configure the viewport through which the document is viewed. It's primarily used for mobile devices, but is also used by desktop browsers that support features like "snap to edge" (such as Microsoft Edge).")
**Notes:**
* Though unstandardized, this declaration is respected by most mobile browsers due to de-facto dominance.
* The default values may vary between devices and browsers.
* To learn about this declaration in Firefox for Mobile, see [this article](https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag "Mobile/Viewport meta tag").`}},{name:"http-equiv",description:{kind:"markdown",value:'Defines a pragma directive. The attribute is named `**http-equiv**(alent)` because all the allowed values are names of particular HTTP headers:\n\n* `"content-language"` \n Defines the default language of the page. It can be overridden by the [lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) attribute on any element.\n \n **Warning:** Do not use this value, as it is obsolete. Prefer the `lang` attribute on the [`<html>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html "The HTML <html> element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.") element.\n \n* `"content-security-policy"` \n Allows page authors to define a [content policy](https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives) for the current page. Content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks.\n* `"content-type"` \n Defines the [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type) of the document, followed by its character encoding. It follows the same syntax as the HTTP `content-type` entity-header field, but as it is inside a HTML page, most values other than `text/html` are impossible. Therefore the valid syntax for its `content` is the string \'`text/html`\' followed by a character set with the following syntax: \'`; charset=_IANAcharset_`\', where `IANAcharset` is the _preferred MIME name_ for a character set as [defined by the IANA.](https://www.iana.org/assignments/character-sets)\n \n **Warning:** Do not use this value, as it is obsolete. Use the [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute on the [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.") element.\n \n **Note:** As [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.") can\'t change documents\' types in XHTML or HTML5\'s XHTML serialization, never set the MIME type to an XHTML MIME type with `<meta>`.\n \n* `"refresh"` \n This instruction specifies:\n * The number of seconds until the page should be reloaded - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer.\n * The number of seconds until the page should redirect to another - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer followed by the string \'`;url=`\', and a valid URL.\n* `"set-cookie"` \n Defines a [cookie](https://developer.mozilla.org/en-US/docs/cookie) for the page. Its content must follow the syntax defined in the [IETF HTTP Cookie Specification](https://tools.ietf.org/html/draft-ietf-httpstate-cookie-14).\n \n **Warning:** Do not use this instruction, as it is obsolete. Use the HTTP header [`Set-Cookie`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) instead.'}},{name:"content",description:{kind:"markdown",value:"This attribute contains the value for the [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-name) attribute, depending on which is used."}},{name:"charset",description:{kind:"markdown",value:'This attribute declares the page\'s character encoding. It must contain a [standard IANA MIME name for character encodings](https://www.iana.org/assignments/character-sets). Although the standard doesn\'t request a specific encoding, it suggests:\n\n* Authors are encouraged to use [`UTF-8`](https://developer.mozilla.org/en-US/docs/Glossary/UTF-8).\n* Authors should not use ASCII-incompatible encodings to avoid security risk: browsers not supporting them may interpret harmful content as HTML. This happens with the `JIS_C6226-1983`, `JIS_X0212-1990`, `HZ-GB-2312`, `JOHAB`, the ISO-2022 family and the EBCDIC family.\n\n**Note:** ASCII-incompatible encodings are those that don\'t map the 8-bit code points `0x20` to `0x7E` to the `0x0020` to `0x007E` Unicode code points)\n\n* Authors **must not** use `CESU-8`, `UTF-7`, `BOCU-1` and/or `SCSU` as [cross-site scripting](https://developer.mozilla.org Line truncated
\`sync\`
Decode the image synchronously for atomic presentation with other content.
\`async\`
Decode the image asynchronously to reduce delay in presenting other content.
\`auto\`
Default mode, which indicates no preference for the decoding mode. The browser decides what is best for the user.`}},{name:"loading",valueSet:"loading",description:{kind:"markdown",value:"Indicates how the browser should load the image."}},{name:"referrerpolicy",valueSet:"referrerpolicy",description:{kind:"markdown",value:"A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer:` The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade:` No `Referer` header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent\u2019s default behavior if no policy is otherwise specified.\n* `origin:` The `Referer` header will include the page of origin's scheme, the host, and the port.\n* `origin-when-cross-origin:` Navigating to other origins will limit the included referral data to the scheme, the host and the port, while navigating from the same origin will include the referrer's full path.\n* `unsafe-url:` The `Referer` header will include the origin and the path, but not the fragment, password, or username. This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins."}},{name:"sizes",description:{kind:"markdown",value:"A list of one or more strings separated by commas indicating a set of source sizes. Each source size consists of:\n\n1. a media condition. This must be omitted for the last item.\n2. a source size value.\n\nSource size values specify the intended display size of the image. User agents use the current source size to select one of the sources supplied by the `srcset` attribute, when those sources are described using width ('`w`') descriptors. The selected source size affects the intrinsic size of the image (the image\u2019s display size if no CSS styling is applied). If the `srcset` attribute is absent, or contains no values with a width (`w`) descriptor, then the `sizes` attribute has no effect."}},{name:"importance",description:"Indicates the relative importance of the resource. Priority hints are delegated using the values:"},{name:"importance",description:"`auto`: Indicates\xA0**no\xA0preference**. The browser may use its own heuristics to decide the priority of the image.\n\n`high`: Indicates to the\xA0browser\xA0that the image is of\xA0**high** priority.\n\n`low`:\xA0Indicates to the\xA0browser\xA0that the image is of\xA0**low** priority."},{name:"intrinsicsize",description:"This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it\u2019s the size specified in the attribute. Specifically, the image would raster at these dimensions and `naturalWidth`/`naturalHeight` on images would return the values specified in this attribute. [Explainer](https://github.com/ojanvafai/intrinsicsize-attribute), [examples](https://googlechrome.github.io/samples/intrinsic-size/index.html)"}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/img"}]},{name:"iframe",description:{kind:"markdown",value:"The iframe element represents a nested browsing context."},attributes:[{name:"src",description:{kind:"markdown",value:'The URL of the page to embed. Use a value of `about:blank` to embed an empty page that conforms to the [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Inherited_origins). Also note that programatically removing an `<iframe>`\'s src attribute (e.g. via [`Element.removeAttribute()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute "The Element method removeAttribute() removes the attribute with the specified name from the element.")) causes `about:blank` to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS.'}},{name:"srcdoc",description:{kind:"markdown",value:"Inline HTML to embed, overriding the `src` attribute. If a browser does not support the `srcdoc` attribute, it will fall back to the URL in the `src` attribute."}},{name:"name",description:{kind:"markdown",value:'A targetable name for the embedded browsing context. This can be used in the `target` attribute of the [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a "The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL."), [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server."), or [`<base>`](https://deve Line truncated
\`auto\` (default)
No preference. The browser uses its own heuristics to decide the priority of the resource.
\`high\`
The resource should be downloaded before other lower-priority page resources.
\`low\`
The resource should be downloaded after other higher-priority page resources.`},{name:"referrerpolicy",description:'Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the frame\'s resource:\n\n* `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent.\n* `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin "origin: Web content\'s origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS "TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS "HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.")).\n* `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host "host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails."), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port "port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.").\n* `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n* `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy "same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin."), but cross-origin requests will contain no referrer information.\n* `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS\u2192HTTPS), but don\'t send it to a less secure destination (HTTPS\u2192HTTP).\n* `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS\u2192HTTPS), and send no header to a less secure destination (HTTPS\u2192HTTP).\n* `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/iframe"}]},{name:"embed",description:{kind:"markdown",value:"The embed element provides an integration point for an external (typically non-HTML) application or interactive content."},void:!0,attributes:[{name:"src",description:{kind:"markdown",value:"The URL\xA0of the resource being embedded."}},{name:"type",description:{kind:"markdown",value:"The MIME\xA0type to use to select the plug-in to instantiate."}},{name:"width",description:{kind:"markdown",value:"The displayed width of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute v Line truncated
* data: Default value. The value is passed to the object's implementation as a string.
* ref: The value is a URI to a resource where run-time values are stored.
* object: An ID of another [\`<object>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object "The HTML <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.") in the same document.`}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/param"}]},{name:"video",description:{kind:"markdown",value:"A video element is used for playing videos or movies, and audio files with captions."},attributes:[{name:"src"},{name:"crossorigin",valueSet:"xo"},{name:"poster"},{name:"preload",valueSet:"pl"},{name:"autoplay",valueSet:"v",description:{kind:"markdown",value:'A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.\n**Note**: Sites that automatically play audio (or video with an audio track) can be an unpleasant experience for users, so it should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control.\n\nTo disable video autoplay, `autoplay="false"` will not work; the video will autoplay if the attribute is there in the `<video>` tag at all. To remove autoplay the attribute needs to be removed altogether.\n\nIn some browsers (e.g. Chrome 70.0) autoplay is not working if no `muted` attribute is present.'}},{name:"mediagroup"},{name:"loop",valueSet:"v"},{name:"muted",valueSet:"v"},{name:"controls",valueSet:"v"},{name:"width"},{name:"height"}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/video"}]},{name:"audio",description:{kind:"markdown",value:"An audio element represents a sound or audio stream."},attributes:[{name:"src",description:{kind:"markdown",value:'The URL of the audio to embed. This is subject to [HTTP access controls](https://developer.mozilla.org/en-US/docs/HTTP_access_control). This is optional; you may instead use the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source "The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.") element within the audio block to specify the audio to embed.'}},{name:"crossorigin",valueSet:"xo",description:{kind:"markdown",value:'This enumerated attribute indicates whether to use CORS to fetch the related image. [CORS-enabled resources](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.") element without being _tainted_. The allowed values are:\n\nanonymous\n\nSends a cross-origin request without a credential. In other words, it sends the `Origin:` HTTP header without a cookie, X.509 certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (by not setting the `Access-Control-Allow-Origin:` HTTP header), the image will be _tainted_, and its usage restricted.\n\nuse-credentials\n\nSends a cross-origin request with a credential. In other words, it sends the `Origin:` HTTP header with a cookie, a certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (through `Access-Control-Allow-Credentials:` HTTP header), the image will be _tainted_ and its usage restricted.\n\nWhen not present, the resource is fetched without a CORS request (i.e. without sending the `Origin:` HTTP header), preventing its non-tainted used in [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.") elements. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes) for additional information.'}},{name:"preload",valueSet:"pl",description:{kind:"markdown",value:"This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:\n\n* `none`: Indicates that the audio should not be preloaded.\n* `metadata`: Indicates that only audio metadata (e.g. length) is fetched.\n* `auto`: Indicates that the whole audio file can be downloaded, even if the user is not expected to use it.\n* _empty string_: A synonym of the `auto` value.\n\nIf not set, `preload`'s default value is browser-defined (i.e. each browser may have its own default value). The spec advises it to be set to `metadata`.\n\n**Usage notes:**\n\n* The `autoplay` attriLine truncated
**Note**: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control.`}},{name:"mediagroup"},{name:"loop",valueSet:"v",description:{kind:"markdown",value:"A Boolean attribute:\xA0if specified, the audio player will\xA0automatically seek back to the start\xA0upon reaching the end of the audio."}},{name:"muted",valueSet:"v",description:{kind:"markdown",value:"A Boolean attribute that indicates whether the audio will be initially silenced. Its default value is `false`."}},{name:"controls",valueSet:"v",description:{kind:"markdown",value:"If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/audio"}]},{name:"source",description:{kind:"markdown",value:"The source element allows authors to specify multiple alternative media resources for media elements. It does not represent anything on its own."},void:!0,attributes:[{name:"src",description:{kind:"markdown",value:'Required for [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio "The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element:\xA0the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.") and [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video "The HTML Video element (<video>) embeds a media player which supports video playback into the document."), address of the media resource. The value of this attribute is ignored when the `<source>` element is placed inside a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture "The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.") element.'}},{name:"type",description:{kind:"markdown",value:"The MIME-type of the resource, optionally with a `codecs` parameter. See [RFC 4281](https://tools.ietf.org/html/rfc4281) for information about how to specify codecs."}},{name:"sizes",description:'Is a list of source sizes that describes the final rendered width of the image represented by the source. Each source size consists of a comma-separated list of media condition-length pairs. This information is used by the browser to determine, before laying the page out, which image defined in [`srcset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset) to use. \nThe `sizes` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source "The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture "The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.") element.'},{name:"srcset",description:"A list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use. Each string is composed of:\n\n1. one URL to an image,\n2. a width descriptor, that is a positive integer directly followed by `'w'`. The default value, if missing, is the infinity.\n3. a pixel density descriptor, that is a positive floating number directly followed by `'x'`. The default value, if missing, is `1x`.\n\nEach string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor. \nThe browser chooses the most adequate image to display at a given point of time. \nThe `srcset` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."},{name:"media",description:'[Media query](https://developer.mozilla.org/en-US/docs/CSS/Media_queries) of the resource\'s inte Line truncated
\`left\`
The caption is displayed to the left of the table.
\`top\`
The caption is displayed above the table.
\`right\`
The caption is displayed to the right of the table.
\`bottom\`
The caption is displayed below the table.
**Usage note:** Do not use this attribute, as it has been deprecated. The [\`<caption>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption "The HTML Table Caption element (<caption>) specifies the caption (or title) of a table, and if used is always the first child of a <table>.") element should be styled using the [CSS](https://developer.mozilla.org/en-US/docs/CSS) properties [\`caption-side\`](https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side "The caption-side CSS property puts the content of a table's <caption> on the specified side. The values are relative to the writing-mode of the table.") and [\`text-align\`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.").`}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/caption"}]},{name:"colgroup",description:{kind:"markdown",value:"The colgroup element represents a group of one or more columns in the table that is its parent, if it has a parent and that is a table element."},attributes:[{name:"span"},{name:"align",description:'This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug\xA02212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 "character alignment not implemented (align=char, charoff=, text-align:<string>)")).\n\nIf this attribute is not set, the `left` value is assumed. The descendant [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col "The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.") elements may override this value using their own [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-align) attribute.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n * Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property on a selector giving a [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup "The HTML <colgroup> element defines a group of columns within a table.") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td "The HTML <td> element defines a cell of a table that contains data. It participates in the table model.") elements are not descendant of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup "The HTML <colgroup> element defines a group of columns within a table.") element, they won\'t inherit it.\n * If the table doesn\'t use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use one `td:nth-child(an+b)` CSS selector per column, where a is the total number of the columns in the table and b is the ordinal position of this column in the table. Only after this selector the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property can be used.\n * If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property Unimplemented.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla Line truncated
**Note:** Do not use this attribute as it is obsolete in the latest standard. Alternatively, you can put the abbreviated description inside the cell and place the long content in the **title** attribute.`},{name:"align",description:'This enumerated attribute specifies how the cell content\'s horizontal alignment will be handled. Possible values are:\n\n* `left`: The content is aligned to the left of the cell.\n* `center`: The content is centered in the cell.\n* `right`: The content is aligned to the right of the cell.\n* `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n* `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-charoff) attributes Unimplemented (see [bug\xA02212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 "character alignment not implemented (align=char, charoff=, text-align:<string>)")).\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property to the element.\n* To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char). Unimplemented in CSS3.'},{name:"axis",description:"This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard."},{name:"bgcolor",description:`This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:
\xA0
\`black\` = "#000000"
\xA0
\`green\` = "#008000"
\xA0
\`silver\` = "#C0C0C0"
\xA0
\`lime\` = "#00FF00"
\xA0
\`gray\` = "#808080"
\xA0
\`olive\` = "#808000"
\xA0
\`white\` = "#FFFFFF"
\xA0
\`yellow\` = "#FFFF00"
\xA0
\`maroon\` = "#800000"
\xA0
\`navy\` = "#000080"
\xA0
\`red\` = "#FF0000"
\xA0
\`blue\` = "#0000FF"
\xA0
\`purple\` = "#800080"
\xA0
\`teal\` = "#008080"
\xA0
\`fuchsia\` = "#FF00FF"
\xA0
\`aqua\` = "#00FFFF"
**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [\`<td>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td "The HTML <td> element defines a cell of a table that contains data. It participates in the table model.") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To create a similar effect use the [\`background-color\`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color "The background-color CSS property sets the background color of an element.") property in [CSS](https://developer.mozilla.org/en-US/docs/CSS) instead.`}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/td"}]},{name:"th",description:{kind:"markdown",value:"The th element represents a header cell in a table."},attributes:[{name:"colspan"},{name:"rowspan"},{name:"headers"},{name:"scope",valueSet:"s"},{name:"sorted"},{name:"abbr",description:{kind:"markdown",value:"This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself."}},{name:"align",description:'This enumerated attribute specifies how the cell content\'s horizontal alignment will be handled. Possible values are:\n\n* `left`: The content is aligned to the left of the cell.\n* `center`: The content is centered in the cell.\n* `right`: The content is aligned to the right of the cell.\n* `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n* `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-charoff) attributes.\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property to the element.\n* To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char). Unimplemented in CSS3.'},{name:"axis",description:"This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard: use the [`scope`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-scope) attribute instead."},{name:"bgcolor",description:`This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:
\xA0
\`black\` = "#000000"
\xA0
\`green\` = "#008000"
\xA0
\`silver\` = "#C0C0C0"
\xA0
\`lime\` = "#00FF00"
\xA0
\`gray\` = "#808080"
\xA0
\`olive\` = "#808000"
\xA0
\`white\` = "#FFFFFF"
\xA0
\`yellow\` = "#FFFF00"
\xA0
\`maroon\` = "#800000"
\xA0
\`navy\` = "#000080"
\xA0
\`red\` = "#FF0000"
\xA0
\`blue\` = "#0000FF"
\xA0
\`purple\` = "#800080"
\xA0
\`teal\` = "#008080"
\xA0
\`fuchsia\` = "#FF00FF"
\xA0
\`aqua\` = "#00FFFF"
**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [\`<th>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th "The HTML <th> element defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes.") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS). To create a similar effect use the [\`background-color\`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color "The background-color CSS property sets the background color of an element.") property in [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) instead.`}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/th"}]},{name:"form",description:{kind:"markdown",value:"The form element represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing."},attributes:[{name:"accept-charset",description:{kind:"markdown",value:'A space- or comma-delimited list of character encodings that the server accepts. The browser uses them in the order in which they are listed. The default value, the reserved string `"UNKNOWN"`, indicates the same encoding as that of the document containing the form element. \nIn previous versions of HTML, the different character encodings could be delimited by spaces or commas. In HTML5, only spaces are allowed as delimiters.'}},{name:"action",description:{kind:"markdown",value:'The URI of a program that processes the form information. This value can be overridden by a [`formaction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formaction) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element.'}},{name:"autocomplete",valueSet:"o",description:{kind:"markdown",value:"Indicates whether input elements can by default have their values automatically completed by the browser. This setting can be overridden by an `autocomplete` attribute on an element belonging to the form. Possible values are:\n\n* `off`: The user must explicitly enter a value into each field for every use, or the document provides its own auto-completion method; the browser does not automatically complete entries.\n* `on`: The browser can automatically complete values based on values that the user has previously entered in the form.\n\nFor most modern browsers (including Firefox 38+, Google Chrome 34+, IE 11+) setting the autocomplete attribute will not prevent a browser's password manager from asking the user if they want to store login fields (username and password), if the user permits the storage the browser will autofill the login the next time the user visits the page. See [The autocomplete attribute and login fields](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#The_autocomplete_attribute_and_login_fields).\n**Note:** If you set `autocomplete` to `off` in a form because the document provides its own auto-completion, then you should also set `autocomplete` to `off` for each of the form's `input` elements that the document can auto-complete. For details, see the note regarding Google Chrome in the [Browser Compatibility chart](#compatChart)."}},{name:"enctype",valueSet:"et",description:{kind:"markdown",value:'When the value of the `method` attribute is `post`, enctype is the [MIME type](https://en.wikipedia.org/wiki/Mime_type) of content that is used to submit the form to the server. Possible values are:\n\n* `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n* `multipart/form-data`: The value used for an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element with the `type` attribute set to "file".\n* `text/plain`: (HTML5)\n\nThis value can be overridden by a [`formenctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formenctype) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or Line truncated
This attribute must not be used if the \`src\` attribute is absent (i.e. for inline scripts). If it is included in this case it will have no effect.
Browsers usually assume the worst case scenario and load scripts synchronously, (i.e. \`async="false"\`) during HTML parsing.
Dynamically inserted scripts (using [\`document.createElement()\`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement "In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.")) load asynchronously by default, so to turn on synchronous loading (i.e. scripts load in the order they were inserted) set \`async="false"\`.
See [Browser compatibility](#Browser_compatibility) for notes on browser support. See also [Async scripts for asm.js](https://developer.mozilla.org/en-US/docs/Games/Techniques/Async_scripts).`}},{name:"defer",valueSet:"v",description:{kind:"markdown",value:'This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded "/en-US/docs/Web/Events/DOMContentLoaded").\n\nScripts with the `defer` attribute will prevent the `DOMContentLoaded` event from firing until the script has loaded and finished evaluating.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts), in this case it would have no effect.\n\nTo achieve a similar effect for dynamically inserted scripts use `async="false"` instead. Scripts with the `defer` attribute will execute in the order in which they appear in the document.'}},{name:"crossorigin",valueSet:"xo",description:{kind:"markdown",value:'Normal `script` elements pass minimal information to the [`window.onerror`](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror "The onerror property of the GlobalEventHandlers mixin is an EventHandler that processes error events.") for scripts which do not pass the standard [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") checks. To allow error logging for sites which use a separate domain for static media, use this attribute. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for a more descriptive explanation of its valid arguments.'}},{name:"nonce",description:{kind:"markdown",value:"A cryptographic nonce (number used once) to list the allowed inline scripts in a [script-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial."}},{name:"integrity",description:"This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)."},{name:"nomodule",description:"This Boolean attribute is set to indicate that the script should not be executed in browsers that support [ES2015 modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/) \u2014 in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code."},{name:"referrerpolicy",description:'Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the script, or resources fetched by the script:\n\n* `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent.\n* `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin "origin: Web content\'s origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS "TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS "HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchang Line truncated
* a _negative value_ means that the element should be focusable, but should not be reachable via sequential keyboard navigation;
* \`0\` means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;
* a _positive value_ means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the [**tabindex**](#attr-tabindex). If several elements share the same tabindex, their relative order follows their relative positions in the document.`},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/tabindex"}]},{name:"title",description:{kind:"markdown",value:"Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/title"}]},{name:"translate",description:{kind:"markdown",value:"An enumerated attribute that is used to specify whether an element's attribute values and the values of its [`Text`](https://developer.mozilla.org/docs/Web/API/Text \"The Text interface represents the textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.\") node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:\n\n* empty string and `yes`, which indicates that the element will be translated.\n* `no`, which indicates that the element will not be translated."},valueSet:"y",references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/translate"}]},{name:"onabort",description:{kind:"markdown",value:"The loading of a resource has been aborted."}},{name:"onblur",description:{kind:"markdown",value:"An element has lost focus (does not bubble)."}},{name:"oncanplay",description:{kind:"markdown",value:"The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content."}},{name:"oncanplaythrough",description:{kind:"markdown",value:"The user agent can play the media up to its end without having to stop for further buffering of content."}},{name:"onchange",description:{kind:"markdown",value:"The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user."}},{name:"onclick",description:{kind:"markdown",value:"A pointing device button has been pressed and released on an element."}},{name:"oncontextmenu",description:{kind:"markdown",value:"The right button of the mouse is clicked (before the context menu is displayed)."}},{name:"ondblclick",description:{kind:"markdown",value:"A pointing device button is clicked twice on an element."}},{name:"ondrag",description:{kind:"markdown",value:"An element or text selection is being dragged (every 350ms)."}},{name:"ondragend",description:{kind:"markdown",value:"A drag operation is being ended (by releasing a mouse button or hitting the escape key)."}},{name:"ondragenter",description:{kind:"markdown",value:"A dragged element or text selection enters a valid drop target."}},{name:"ondragleave",description:{kind:"markdown",value:"A dragged element or text selection leaves a valid drop target."}},{name:"ondragover",description:{kind:"markdown",value:"An element or text selection is being dragged over a valid drop target (every 350ms)."}},{name:"ondragstart",description:{kind:"markdown",value:"The user starts dragging an element or text selection."}},{name:"ondrop",description:{kind:"markdown",value:"An element is dropped on a valid drop target."}},{name:"ondurationchange",description:{kind:"markdown",value:"The duration attribute has been updated."}},{name:"onemptied",description:{kind:"markdown",value:"The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it."}},{name:"onended",description:{kind:"markdown",value:"Playback has stopped because the end of the media was reached."}},{name:"onerror",description:{kind:"markdown",value:"A resource failed to load."}},{name:"onfocus",description:{kind:"markdown",value:"An element has received focus (does not bubble)."}},{name:"onformchange"},{name:"onforminput"},{name:"oninput",description:{kind:"markdown",value:"The value of an element changes or the content of an element with the attribute contenteditable is modified."}},{name:"oninvalid",description:{kind:"markdown",value:"A submittable element has been checked and doesn't satisfy its constraints."}},{name:"onkeydown",description:{kind:"markdown",value:"A key is pressed down."}},{name:"onkeypress",description:{kind:"markdown",value:"A key is pressed down and that key normally produces a character value (use input instead)."}},{name:"onkeyup Line truncated
+58
View File
@@ -0,0 +1,58 @@
var Hr=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Kt.isErrorNoTelemetry(t)?new Kt(t.message+`
`+t.stack):new Error(t.message+`
`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},Hl=new Hr;function ft(e){Gl(e)||Hl.onUnexpectedError(e)}function En(e){if(e instanceof Error){let{name:t,message:n,cause:r}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i,noTelemetry:Kt.isErrorNoTelemetry(e),cause:r?En(r):void 0,code:e.code}}return e}var Gr="Canceled";function Gl(e){return e instanceof Yt?!0:e instanceof Error&&e.name===Gr&&e.message===Gr}var Yt=class extends Error{constructor(){super(Gr),this.name=this.message}};var Kt=class e extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},K=class e extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,e.prototype)}};function js(e,t="Unreachable"){throw new Error(t)}function Jr(e,t="unexpected state"){if(!e)throw typeof t=="string"?new K(`Assertion Failed: ${t}`):t}function Ge(e){if(!e()){debugger;e(),ft(new K("Assertion Failed"))}}function en(e,t){let n=0;for(;n<e.length-1;){let r=e[n],i=e[n+1];if(!t(r,i))return!1;n++}return!0}function Ws(e){return typeof e=="string"}function zs(e){return!!e&&typeof e[Symbol.iterator]=="function"}var Mt;(function(e){function t(y){return!!y&&typeof y=="object"&&typeof y[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(y){yield y}e.single=i;function s(y){return t(y)?y:i(y)}e.wrap=s;function o(y){return y||n}e.from=o;function*a(y){for(let N=y.length-1;N>=0;N--)yield y[N]}e.reverse=a;function u(y){return!y||y[Symbol.iterator]().next().done===!0}e.isEmpty=u;function l(y){return y[Symbol.iterator]().next().value}e.first=l;function h(y,N){let C=0;for(let V of y)if(N(V,C++))return!0;return!1}e.some=h;function f(y,N){let C=0;for(let V of y)if(!N(V,C++))return!1;return!0}e.every=f;function d(y,N){for(let C of y)if(N(C))return C}e.find=d;function*g(y,N){for(let C of y)N(C)&&(yield C)}e.filter=g;function*m(y,N){let C=0;for(let V of y)yield N(V,C++)}e.map=m;function*p(y,N){let C=0;for(let V of y)yield*N(V,C++)}e.flatMap=p;function*w(...y){for(let N of y)zs(N)?yield*N:yield N}e.concat=w;function _(y,N,C){let V=C;for(let T of y)V=N(V,T);return V}e.reduce=_;function v(y){let N=0;for(let C of y)N++;return N}e.length=v;function*b(y,N,C=y.length){for(N<-y.length&&(N=0),N<0&&(N+=y.length),C<0?C+=y.length:C>y.length&&(C=y.length);N<C;N++)yield y[N]}e.slice=b;function S(y,N=Number.POSITIVE_INFINITY){let C=[];if(N===0)return[C,y];let V=y[Symbol.iterator]();for(let T=0;T<N;T++){let x=V.next();if(x.done)return[C,e.empty()];C.push(x.value)}return[C,{[Symbol.iterator](){return V}}]}e.consume=S;async function L(y){let N=[];for await(let C of y)N.push(C);return N}e.asyncToArray=L;async function E(y){let N=[];for await(let C of y)N=N.concat(C);return N}e.asyncToArrayFlat=E})(Mt||(Mt={}));function Qr(e){if(Mt.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Hs(...e){return Je(()=>Qr(e))}var Xr=class{constructor(t){this._isDisposed=!1,this._fn=t}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 Je(e){return new Xr(e)}var ht=class e{static{this.DISABLE_DISPOSED_WARNING=!1}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{Qr(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t||t===Re.None)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?e.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(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}},Re=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new ht,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};var Y=class e{static{this.Undefined=new e(void 0)}constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}},tn=class{constructor(){this._first=Y.Undefined,this._last=Y.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Y.Undefined}clear(){let t=this._first;for(;t!= Line truncated
`).slice(2).join(`
`))}},ei=class extends Error{constructor(t,n){super(t),this.name="ListenerLeakError",this.stack=n}},ti=class extends Error{constructor(t,n){super(t),this.name="ListenerRefusalError",this.stack=n}},nn=class{constructor(t){this.value=t}},Ql=2,ue=class{constructor(t){this._size=0,this._options=t,this._leakageMon=this._options?.leakWarningThreshold?new Yr(t?.onListenerError??ft,this._options?.leakWarningThreshold??Xl):void 0,this._perfMon=this._options?._profName?new Zr(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(t,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],l=new ti(`${a}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this._options?.onListenerError||ft)(l),Re.None}if(this._disposed)return Re.None;n&&(t=t.bind(n));let i=new nn(t),s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Kr.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof nn?(this._deliveryQueue??=new ni,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++;let o=Je(()=>{s?.(),this._removeListener(i)});return r instanceof ht?r.add(o):Array.isArray(r)&&r.push(o),o},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let n=this._listeners,r=n.indexOf(t);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;let i=this._deliveryQueue.current===this;if(this._size*Ql<=n.length){let s=0;for(let o=0;o<n.length;o++)n[o]?n[s++]=n[o]:i&&s<this._deliveryQueue.end&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=s}}_deliver(t,n){if(!t)return;let r=this._options?.onListenerError||ft;if(!r){t.value(n);return}try{t.value(n)}catch(i){r(i)}}_deliverQueue(t){let n=t.current._listeners;for(;t.i<t.end;)this._deliver(n[t.i++],t.value);t.reset()}fire(t){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof nn)this._deliver(this._listeners,t);else{let n=this._deliveryQueue;n.enqueue(this,t,this._listeners.length),this._deliverQueue(n)}this._perfMon?.stop()}hasListeners(){return this._size>0}};var ni=class{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function Gs(){return globalThis._VSCODE_NLS_MESSAGES}function Tn(){return globalThis._VSCODE_NLS_LANGUAGE}var Zl=Tn()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Js(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{let s=i[0],o=t[s],a=r;return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(a=String(o)),a}),Zl&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function U(e,t,...n){return Js(typeof e=="number"?Yl(e,t):t,n)}function Yl(e,t){let n=Gs()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var dt="en",In=!1,Fn=!1,Pn=!1,Kl=!1,Qs=!1,eu=!1,tu=!1,Cn,ri=dt,Xs=dt,nu,Oe,Be=globalThis,ge;typeof Be.vscode<"u"&&typeof Be.vscode.process<"u"?ge=Be.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(ge=process);var ru=typeof ge?.versions?.electron=="string",iu=ru&&ge?.type==="renderer";if(typeof ge=="object"){In=ge.platform==="win32",Fn=ge.platform==="darwin",Pn=ge.platform==="linux",Pn&&ge.env.SNAP&&ge.env.SNAP_REVISION,ge.env.CI||ge.env.BUILD_ARTIFACTSTAGINGDIRECTORY||ge.env.GITHUB_WORKSPACE,Cn=dt,ri=dt;let e=ge.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Cn=t.userLocale,Xs=t.osLocale,ri=t.resolvedLanguage||dt,nu=t.languagePack?.translationsConfigFile}catch{}Kl=!0}else typeof navigator=="object"&&!iu?(Oe=navigator.userAgent,In=Oe.indexOf("Windows")>=0,Fn=Oe.indexOf("Macintosh")>=0,eu=(Oe.indexOf("Macintosh")>=0||Oe.indexOf("iPad")>=0||Oe.indexOf("i Line truncated
`||e===" "}var tt=class{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}},lr=class{constructor(t,n){this.lineRangeMapping=t,this.changes=n}};function Ka(e,t,n=(r,i)=>r===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0}function*e1(e,t){let n,r;for(let i of e)r!==void 0&&t(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function t1(e,t){for(let n=0;n<=e.length;n++)t(n===0?void 0:e[n-1],n===e.length?void 0:e[n])}function n1(e,t){for(let n=0;n<e.length;n++)t(n===0?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function r1(e,t){for(let n of t)e.push(n)}var Pi;(function(e){function t(s){return s<0}e.isLessThan=t;function n(s){return s<=0}e.isLessThanOrEqual=n;function r(s){return s>0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Pi||(Pi={}));function nt(e,t){return(n,r)=>t(e(n),e(r))}var wt=(e,t)=>e-t;function i1(e){return(t,n)=>-e(t,n)}var Ya=class e{static{this.empty=new e(t=>{})}constructor(t){this.iterate=t}toArray(){let t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new e(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new e(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||Pi.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}};var H=class e{static fromTo(t,n){return new e(t,n)}static addRange(t,n){let r=0;for(;r<n.length&&n[r].endExclusive<t.start;)r++;let i=r;for(;i<n.length&&n[i].start<=t.endExclusive;)i++;if(r===i)n.splice(r,0,t);else{let s=Math.min(t.start,n[r].start),o=Math.max(t.endExclusive,n[i-1].endExclusive);n.splice(r,i-r,new e(s,o))}}static tryCreate(t,n){if(!(t>n))return new e(t,n)}static ofLength(t){return new e(0,t)}static ofStartAndLength(t,n){return new e(t,t+n)}static emptyAt(t){return new e(t,t)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new K(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new e(this.start+t,this.endExclusive+t)}deltaStart(t){return new e(this.start+t,this.endExclusive)}deltaEnd(t){return new e(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(t){return this.start===t.start&&this.endExclusive===t.endExclusive}contains(t){return this.start<=t&&t<this.endExclusive}join(t){return new e(Math.min(this.start,t.start),Math.max(this.endExclusive,t.endExclusive))}intersect(t){let n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);if(n<=r)return new e(n,r)}intersectionLength(t){let n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);return Math.max(0,r-n)}intersects(t){let n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);return n<r}intersectsOrTouches(t){let n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);return n<=r}isBefore(t){return this.endExclusive<=t.start}isAfter(t){return this.start>=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new K(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new K(`Invalid clipping range: ${this.toString()}`);return t<this.start?this.endExclusive-(this.start-t)%this.length:t>=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;n<this.endExclusive;n++)t(n)}joinRightTouching(t){if(this.endExclusive!==t.start)throw new K(`Invalid join: ${this.toString()} and ${t.toString()}`);return new e(this.start,t.endExclusive)}};function qe(e,t){let n=je(e,t);return n===-1?void 0:e[n]}function je(e,t,n=0,r=e.length){let i=n,s=r;for(;i<s;){let o=Math.floor((i+s)/2);t(e[o])?i=o+1:s=o}return i-1}function s1(e,t){let n=ur(e,t);return n===e.length?void 0:e[n]}function ur(e,t,n=0,r=e.length){let i=n,s=r;for(;i<s;){let o=Math.floor((i+s)/2);t(e[o])?s=o:i=o+1}return i}var hn=class e{static{this.assertInvariants=!1}constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(e.assertInvariants){if(this._prevFindLastPredicate){for(let r of this._array)if(this._prevFindLastPredicate(r)&&!t(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let n=je(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};var z=class e{static ofLength(t,n){return new e(t,t+n)}static fromRange(t){return new e(t.startLineNumber,t.endLineNumber)}static fromRangeInclusive(t){return new e(t.startLineNumber,t.endLineNumber+1)}static{this.compareByStart=nt(t=>t.startLineNumber,wt)}static joinMany(t){if(t.length= Line truncated
`?(n++,r=0):r++;return new e(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}add(t){return t.lineCount===0?new e(this.lineCount,this.columnCount+t.columnCount):new e(this.lineCount+t.lineCount,t.columnCount)}createRange(t){return this.lineCount===0?new O(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new O(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new O(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return z.ofLength(1,this.lineCount+1)}addToPosition(t){return this.lineCount===0?new j(t.lineNumber,t.column+this.columnCount):new j(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};var Ii=class{getOffsetRange(t){return new H(this.getOffset(t.getStartPosition()),this.getOffset(t.getEndPosition()))}getRange(t){return O.fromPositions(this.getPosition(t.start),this.getPosition(t.endExclusive))}getStringReplacement(t){return new Vt.deps.StringReplacement(this.getOffsetRange(t.range),t.text)}getTextReplacement(t){return new Vt.deps.TextReplacement(this.getRange(t.replaceRange),t.newText)}getTextEdit(t){let n=t.replacements.map(r=>this.getTextReplacement(r));return new Vt.deps.TextEdit(n)}},Vt=class{static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};var cr=class extends Ii{constructor(t){super(),this.text=t,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<t.length;n++)t.charAt(n)===`
`&&(this.lineStartOffsetByLineIdx.push(n+1),n>0&&t.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(t.length)}getOffset(t){let n=this._validatePosition(t);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(t){if(t.lineNumber<1)return new j(1,1);let n=this.textLength.lineCount+1;if(t.lineNumber>n){let i=this.getLineLength(n);return new j(n,i+1)}if(t.column<1)return new j(t.lineNumber,1);let r=this.getLineLength(t.lineNumber);return t.column-1>r?new j(t.lineNumber,r+1):t}getPosition(t){let n=je(this.lineStartOffsetByLineIdx,s=>s<=t),r=n+1,i=t-this.lineStartOffsetByLineIdx[n]+1;return new j(r,i)}get textLength(){let t=this.lineStartOffsetByLineIdx.length-1;return new Vt.deps.TextLength(t,this.text.length-this.lineStartOffsetByLineIdx[t])}getLineLength(t){return this.lineEndOffsetByLineIdx[t-1]-this.lineStartOffsetByLineIdx[t-1]}};var Fi=class{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new j(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(t){return this.getValueOfRange(this.getTransformer().getRange(t))}getLineLength(t){return this.getValueOfRange(new O(t,1,t,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new cr(this.getValue())),this._transformer}getLineAt(t){return this.getValueOfRange(new O(t,1,t,Number.MAX_SAFE_INTEGER))}},Di=class extends Fi{constructor(t,n){Jr(n>=1),super(),this._getLineContent=t,this._lineCount=n}getValueOfRange(t){if(t.startLineNumber===t.endLineNumber)return this._getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);let n=this._getLineContent(t.startLineNumber).substring(t.startColumn-1);for(let r=t.startLineNumber+1;r<t.endLineNumber;r++)n+=`
`+this._getLineContent(r);return n+=`
`+this._getLineContent(t.endLineNumber).substring(0,t.endColumn-1),n}getLineLength(t){return this._getLineContent(t).length}get length(){let t=this._getLineContent(this._lineCount);return new _t(this._lineCount-1,t.length)}},vt=class extends Di{constructor(t){super(n=>t[n-1],t.length)}};var fr=class e{static joinReplacements(t,n){if(t.length===0)throw new K;if(t.length===1)return t[0];let r=t[0].range.getStartPosition(),i=t[t.length-1].range.getEndPosition(),s="";for(let o=0;o<t.length;o++){let a=t[o];if(s+=a.text,o<t.length-1){let u=t[o+1],l=O.fromPositions(a.range.getEndPosition(),u.range.getStartPosition()),h=n.getValueOfRange(l);s+=h}}return new e(O.fromPositions(r,i),s)}static fromStringReplacement(t,n){return new e(n.getTransformer().getRange(t.replaceRange),t.newText)}static delete(t){return new e(t,"")}constructor(t,n){this.range=t,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(t,n){return t.range.equalsRange(n.range)&&t.text===n.text}equals(t){return e.equals(this,t)}removeCommonPrefixAndSuffix(t){return this.removeCommonPrefix(t).removeCommonSuffix(t)}removeCommonPrefix(t){let n=t.getValueOfRange(this.range).replaceAll(`\r
`,`
`),r=this.text.replaceAll(`\r
`,`
`),i=so(n,r),s=_t.ofText(n.substring(0,i)).addToPosition(this.range.getStartPosition()),o=r.substring(i),a=O.fromPositions(s,this.range.getEndPosition());return new e(a,o)}removeCommonSuffix(t){let n=t.getValueOfRange(this.range).replaceAll(`\r
`,`
`),r=this.text.replaceAll(`\r
`,`
`),i=oo(n,r),s=_t.ofText(n.substring(0,n.length-i)).addToPosition(this.range.getStartPosition()),o=r.substring(0,r.length-i),a=O.fromPositions(this.range.getStartPosition(),s);return new e(a,o)}toString(){let t=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${t.lineNumber},${t.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}};var Ce=class e{static inverse(t,n,r){let i=[],s=1,o=1;for(let u of t){let l=new e(new z(s,u.original.startLineNumber),new z(o,u.modified.startLineNumber));l.modified.isEmpty||i.push(l),s=u.original.endLineNumberExclusive,o=u.modified.endLineNumberExclusive}let a=new e(new z(s,n+1),new z(o,r+1));return a.modified.isEmpty||i.push(a),i}static clip(t,n,r){let i=[];for(let s of t){let o=s.original.intersect(n),a=s.modified.intersect(r);o&&!o.isEmpty&&a&&!a.isEmpty&&i.push(new e(o,a))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new e(this.modified,this.original)}join(t){return new e(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){let t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new xe(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new K("not a valid diff");return new xe(new O(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new O(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new xe(new O(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new O(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(o1(this.original.endLineNumberExclusive,t)&&o1(this.modified.endLineNumberExclusive,n))return new xe(new O(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new O(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new xe(O.fromPositions(new j(this.original.startLineNumber,1),Ot(new j(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),O.fromPositions(new j(this.modified.startLineNumber,1),Ot(new j(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new xe(O.fromPositions(Ot(new j(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Ot(new j(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),O.fromPositions(Ot(new j(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Ot(new j(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new K}};function Ot(e,t){if(e.lineNumber<1)return new j(1,1);if(e.lineNumber>t.length)return new j(t.length,t[t.length-1].length+1);let n=t[e.lineNumber-1];return e.column>n.length+1?new j(e.lineNumber,n.length+1):e}function o1(e,t){return e>=1&&e<=t.length}var We=class e extends Ce{static fromRangeMappings(t){let n=z.join(t.map(i=>z.fromRangeInclusive(i.originalRange))),r=z.join(t.map(i=>z.fromRangeInclusive(i.modifiedRange)));return new e(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new e(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new e(this.original,this.modified,[this.toRangeMapping()])}},xe=class e{static fromEdit(t){let n=t.getNewRanges();return t.replacements.map((i,s)=>new e(i.range,n[s]))}static assertSorted(t){for(let n=1;n<t.length;n++){let r=t[n-1],i=t[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(i.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition())))throw new K("Range mappings must be sorted")}}constructor(t,n){this.originalRange=t,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new e(this.modifiedRange,this.originalRange)}toTextEdit(t){let n=t.getValueOfRange(this.modifiedRange);return new fr(this.originalRange,n)}};function Vi(e,t,n,r=!1){let i=[];for(let s of e1(e.map(o=>qu(o,t,n)),(o,a)=>o.original.intersectsOrTouches(a.original)||o.modified.intersectsOrTouches(a.modified))){let o=s[0],a=s[s.length-1];i.push(new We(o.original.join(a.original),o.modified.join(a.modified),s.map(u=>u.innerChanges[0])))}return Ge(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==t.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:en(i,(s,o)=>o.original.startLineNumber-s.original.endLineNumberExclusive===o.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive<o.original.startLineNumber&&s.modified. Line truncated
`);this.histogram[a]=(this.histogram[a]||0)+1}this.totalCount=i}computeSimilarity(t){let n=0,r=Math.max(this.histogram.length,t.histogram.length);for(let i=0;i<r;i++)n+=Math.abs((this.histogram[i]??0)-(t.histogram[i]??0));return 1-n/(this.totalCount+t.totalCount)}};var gr=class{compute(t,n,r=rt.instance,i){if(t.length===0||n.length===0)return Ie.trivial(t,n);let s=new Ut(t.length,n.length),o=new Ut(t.length,n.length),a=new Ut(t.length,n.length);for(let m=0;m<t.length;m++)for(let p=0;p<n.length;p++){if(!r.isValid())return Ie.trivialTimedOut(t,n);let w=m===0?0:s.get(m-1,p),_=p===0?0:s.get(m,p-1),v;t.getElement(m)===n.getElement(p)?(m===0||p===0?v=0:v=s.get(m-1,p-1),m>0&&p>0&&o.get(m-1,p-1)===3&&(v+=a.get(m-1,p-1)),v+=i?i(m,p):1):v=-1;let b=Math.max(w,_,v);if(b===v){let S=m>0&&p>0?a.get(m-1,p-1):0;a.set(m,p,S+1),o.set(m,p,3)}else b===w?(a.set(m,p,0),o.set(m,p,1)):b===_&&(a.set(m,p,0),o.set(m,p,2));s.set(m,p,b)}let u=[],l=t.length,h=n.length;function f(m,p){(m+1!==l||p+1!==h)&&u.push(new ne(new H(m+1,l),new H(p+1,h))),l=m,h=p}let d=t.length-1,g=n.length-1;for(;d>=0&&g>=0;)o.get(d,g)===3?(f(d,g),d--,g--):o.get(d,g)===1?d--:g--;return f(-1,-1),u.reverse(),new Ie(u,!1)}};var $t=class{compute(t,n,r=rt.instance){if(t.length===0||n.length===0)return Ie.trivial(t,n);let i=t,s=n;function o(p,w){for(;p<i.length&&w<s.length&&i.getElement(p)===s.getElement(w);)p++,w++;return p}let a=0,u=new qi;u.set(0,o(0,0));let l=new ji;l.set(0,u.get(0)===0?null:new pr(null,0,0,u.get(0)));let h=0;e:for(;;){if(a++,!r.isValid())return Ie.trivialTimedOut(i,s);let p=-Math.min(a,s.length+a%2),w=Math.min(a,i.length+a%2);for(h=p;h<=w;h+=2){let _=h===w?-1:u.get(h+1),v=h===p?-1:u.get(h-1)+1,b=Math.min(Math.max(_,v),i.length),S=b-h;if(b>i.length||S>s.length)continue;let L=o(b,S);u.set(h,L);let E=b===_?l.get(h+1):l.get(h-1);if(l.set(h,L!==b?new pr(E,b,S,L-b):E),u.get(h)===i.length&&u.get(h)-h===s.length)break e}}let f=l.get(h),d=[],g=i.length,m=s.length;for(;;){let p=f?f.x+f.length:0,w=f?f.y+f.length:0;if((p!==g||w!==m)&&d.push(new ne(new H(p,g),new H(w,m))),!f)break;g=f.x,m=f.y,f=f.prev}return d.reverse(),new Ie(d,!1)}},pr=class{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}},qi=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}},ji=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}};var it=class{constructor(t,n,r){this.lines=t,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=t[i-1],o=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,s=s.substring(o)),this.lineStartOffsets.push(o);let a=0;if(!r){let l=s.trimStart();a=s.length-l.length,s=l.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);let u=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-a,s.length):s.length;for(let l=0;l<u;l++)this.elements.push(s.charCodeAt(l));i<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new H(0,this.length))}getText(t){return this.elements.slice(t.start,t.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){let n=f1(t>0?this.elements[t-1]:-1),r=f1(t<this.elements.length?this.elements[t]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let i=0;return n!==r&&(i+=10,n===0&&r===1&&(i+=1)),i+=c1(n),i+=c1(r),i}translateOffset(t,n="right"){let r=je(this.firstElementOffsetByLineIdx,s=>s<=t),i=t-this.firstElementOffsetByLineIdx[r];return new j(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(t){let n=this.translateOffset(t.start,"right"),r=this.translateOffset(t.endExclusive,"left");return r.isBefore(n)?O.fromPositions(r,r):O.fromPositions(n,r)}findWordContaining(t){if(t<0||t>=this.elements.length||!qt(this.elements[t]))return;let n=t;for(;n>0&&qt(this.elements[n-1]);)n--;let r=t;for(;r<this.elements.length&&qt(this.elements[r]);)r++;return new H(n,r)}findSubWordContaining(t){if(t<0||t>=this.elements.length||!qt(this.elements[t]))return;let n=t;for(;n>0&&qt(this.elements[n-1])&&!u1(this.elements[n]);)n--;let r=t;fo Line truncated
`).length>=15&&Hu(f,g=>g.length>=2)>=2}),o=Qu(e,o),o}function Hu(e,t){let n=0;for(let r of e)t(r)&&n++;return n}function Gu(e,t,n,r){let i=[],s=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new mn(u.original,t,u)),o=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new mn(u.modified,n,u))),a=new Set;for(let u of s){let l=-1,h;for(let f of o){let d=u.computeSimilarity(f);d>l&&(l=d,h=f)}if(l>.9&&h&&(o.delete(h),i.push(new Ce(u.range,h.range)),a.add(u.source),a.add(h.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}function Ju(e,t,n,r,i,s){let o=[],a=new ir;for(let d of e)for(let g=d.original.startLineNumber;g<d.original.endLineNumberExclusive-2;g++){let m=`${t[g-1]}:${t[g+1-1]}:${t[g+2-1]}`;a.add(m,{range:new z(g,g+3)})}let u=[];e.sort(nt(d=>d.modified.startLineNumber,wt));for(let d of e){let g=[];for(let m=d.modified.startLineNumber;m<d.modified.endLineNumberExclusive-2;m++){let p=`${n[m-1]}:${n[m+1-1]}:${n[m+2-1]}`,w=new z(m,m+3),_=[];a.forEach(p,({range:v})=>{for(let S of g)if(S.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&S.modifiedLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive){S.originalLineRange=new z(S.originalLineRange.startLineNumber,v.endLineNumberExclusive),S.modifiedLineRange=new z(S.modifiedLineRange.startLineNumber,w.endLineNumberExclusive),_.push(S);return}let b={modifiedLineRange:w,originalLineRange:v};u.push(b),_.push(b)}),g=_}if(!s.isValid())return[]}u.sort(i1(nt(d=>d.modifiedLineRange.length,wt)));let l=new xt,h=new xt;for(let d of u){let g=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,m=l.subtractFrom(d.modifiedLineRange),p=h.subtractFrom(d.originalLineRange).getWithDelta(g),w=m.getIntersection(p);for(let _ of w.ranges){if(_.length<3)continue;let v=_,b=_.delta(-g);o.push(new Ce(b,v)),l.addRange(v),h.addRange(b)}}o.sort(nt(d=>d.original.startLineNumber,wt));let f=new hn(e);for(let d=0;d<o.length;d++){let g=o[d],m=f.findLastMonotonous(E=>E.original.startLineNumber<=g.original.startLineNumber),p=qe(e,E=>E.modified.startLineNumber<=g.modified.startLineNumber),w=Math.max(g.original.startLineNumber-m.original.startLineNumber,g.modified.startLineNumber-p.modified.startLineNumber),_=f.findLastMonotonous(E=>E.original.startLineNumber<g.original.endLineNumberExclusive),v=qe(e,E=>E.modified.startLineNumber<g.modified.endLineNumberExclusive),b=Math.max(_.original.endLineNumberExclusive-g.original.endLineNumberExclusive,v.modified.endLineNumberExclusive-g.modified.endLineNumberExclusive),S;for(S=0;S<w;S++){let E=g.original.startLineNumber-S-1,y=g.modified.startLineNumber-S-1;if(E>r.length||y>i.length||l.contains(y)||h.contains(E)||!h1(r[E-1],i[y-1],s))break}S>0&&(h.addRange(new z(g.original.startLineNumber-S,g.original.startLineNumber)),l.addRange(new z(g.modified.startLineNumber-S,g.modified.startLineNumber)));let L;for(L=0;L<b;L++){let E=g.original.endLineNumberExclusive+L,y=g.modified.endLineNumberExclusive+L;if(E>r.length||y>i.length||l.contains(y)||h.contains(E)||!h1(r[E-1],i[y-1],s))break}L>0&&(h.addRange(new z(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+L)),l.addRange(new z(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+L))),(S>0||L>0)&&(o[d]=new Ce(new z(g.original.startLineNumber-S,g.original.endLineNumberExclusive+L),new z(g.modified.startLineNumber-S,g.modified.endLineNumberExclusive+L)))}return o}function h1(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;let i=new $t().compute(new it([e],new O(1,1,1,e.length),!1),new it([t],new O(1,1,1,t.length),!1),n),s=0,o=ne.invert(i.diffs,e.length);for(let h of o)h.seq1Range.forEach(f=>{gn(e.charCodeAt(f))||s++});function a(h){let f=0;for(let d=0;d<e.length;d++)gn(h.charCodeAt(d))||f++;return f}let u=a(e.length>t.length?e:t);return s/u>.6&&u>10}function Xu(e){if(e.length===0)return e;e.sort(nt(n=>n.original.startLineNumber,wt));let t=[e[0]];for(let n=1;n<e.length;n++){let r=t[t.length-1],i=e[n],s=i.original.startLineNumber-r.original.endLineNumberExclusive,o=i.modified.startLineNumber-r.modified.endLineNumberExclusive;if(s>=0&&o>=0&&s+o<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function Qu(e,t){let n=new hn(e);return t=t.filter(r=>{let i=n.findLastMonotonous(a=>a.original.startLineNumber<r.original.endLineNumberExclusive)||new Ce(new z(1,1),new z(1,1)),s=qe(e,a=>a.modified.startLineNumber<r.modified.endLineNumberExclusive);return i!==s}),t}function Wi(e,t,n){let r=n;return r=m1(e,t,r),r=m1(e,t,r),r=Zu(e,t,r),r}function m1(e,t,n){if(n.length===0)return n;let r=[];r.push(n[0]);for(let s=1;s<n.length;s++){let o=r[r.length-1],a=n[s];if(a.seq1Range.isEmpty||a.seq2Range.isEmpty){let u=a.seq1Range.start-o.seq1Range.endExclusive,l;for(l=1;l<=u&&!(e.getElement(a.seq1Range.start-l)!==e.getElement(a.seq1Range.endExclusive-l)||t.getElement(a.seq2Range.start-l)!==t.getElement(a.seq2Range.endExclusive-l));l++);if(l--,l===u){r[r.length-1] Line truncated
`)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}};function x1(e){let t=0;for(;t<e.length&&(e.charCodeAt(t)===32||e.charCodeAt(t)===9);)t++;return t}var br=class{constructor(){this.dynamicProgrammingDiffing=new gr,this.myersDiffingAlgorithm=new $t}computeDiff(t,n,r){if(t.length<=1&&Ka(t,n,(y,N)=>y===N))return new tt([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new tt([new We(new z(1,t.length+1),new z(1,n.length+1),[new xe(new O(1,1,t.length,t[t.length-1].length+1),new O(1,1,n.length,n[n.length-1].length+1))])],[],!1);let i=r.maxComputationTimeMs===0?rt.instance:new mr(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,o=new Map;function a(y){let N=o.get(y);return N===void 0&&(N=o.size,o.set(y,N)),N}let u=t.map(y=>a(y.trim())),l=n.map(y=>a(y.trim())),h=new pn(u,t),f=new pn(l,n),d=h.length+f.length<1700?this.dynamicProgrammingDiffing.compute(h,f,i,(y,N)=>t[y]===n[N]?n[N].length===0?.1:1+Math.log(1+n[N].length):.99):this.myersDiffingAlgorithm.compute(h,f,i),g=d.diffs,m=d.hitTimeout;g=Wi(h,f,g),g=b1(h,f,g);let p=[],w=y=>{if(s)for(let N=0;N<y;N++){let C=_+N,V=v+N;if(t[C]!==n[V]){let T=this.refineDiff(t,n,new ne(new H(C,C+1),new H(V,V+1)),i,s,r);for(let x of T.mappings)p.push(x);T.hitTimeout&&(m=!0)}}},_=0,v=0;for(let y of g){Ge(()=>y.seq1Range.start-_===y.seq2Range.start-v);let N=y.seq1Range.start-_;w(N),_=y.seq1Range.endExclusive,v=y.seq2Range.endExclusive;let C=this.refineDiff(t,n,y,i,s,r);C.hitTimeout&&(m=!0);for(let V of C.mappings)p.push(V)}w(t.length-_);let b=new vt(t),S=new vt(n),L=Vi(p,b,S),E=[];return r.computeMoves&&(E=this.computeMoves(L,t,n,u,l,i,s,r)),Ge(()=>{function y(C,V){if(C.lineNumber<1||C.lineNumber>V.length)return!1;let T=V[C.lineNumber-1];return!(C.column<1||C.column>T.length+1)}function N(C,V){return!(C.startLineNumber<1||C.startLineNumber>V.length+1||C.endLineNumberExclusive<1||C.endLineNumberExclusive>V.length+1)}for(let C of L){if(!C.innerChanges)return!1;for(let V of C.innerChanges)if(!(y(V.modifiedRange.getStartPosition(),n)&&y(V.modifiedRange.getEndPosition(),n)&&y(V.originalRange.getStartPosition(),t)&&y(V.originalRange.getEndPosition(),t)))return!1;if(!N(C.modified,n)||!N(C.original,t))return!1}return!0}),new tt(L,E,m)}computeMoves(t,n,r,i,s,o,a,u){return d1(t,n,r,i,s,o).map(f=>{let d=this.refineDiff(n,r,new ne(f.original.toOffsetRange(),f.modified.toOffsetRange()),o,a,u),g=Vi(d.mappings,new vt(n),new vt(r),!0);return new lr(f,g)})}refineDiff(t,n,r,i,s,o){let u=Ku(r).toRangeMapping2(t,n),l=new it(t,u.originalRange,s),h=new it(n,u.modifiedRange,s),f=l.length+h.length<500?this.dynamicProgrammingDiffing.compute(l,h,i):this.myersDiffingAlgorithm.compute(l,h,i),d=f.diffs;return d=Wi(l,h,d),d=zi(l,h,d,(m,p)=>m.findWordContaining(p)),o.extendToSubwords&&(d=zi(l,h,d,(m,p)=>m.findSubWordContaining(p),!0)),d=p1(l,h,d),d=w1(l,h,d),{mappings:d.map(m=>new xe(l.translateRange(m.seq1Range),h.translateRange(m.seq2Range))),hitTimeout:f.hitTimeout}}};function Ku(e){return new Ce(new z(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new z(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var Hi={getLegacy:()=>new hr,getDefault:()=>new br};function st(e,t){let n=Math.pow(10,t);return Math.round(e*n)/n}var A=class{constructor(t,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=st(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}},Fe=class e{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=st(Math.max(Math.min(1,n),0),3),this.l=st(Math.max(Math.min(1,r),0),3),this.a=st(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,o=Math.max(n,r,i),a=Math.min(n,r,i),u=0,l=0,h=(a+o)/2,f=o-a;if(f>0){switch(l=Math.min(h<=.5?f/(2*h):f/(2-2*h),1),o){case n:u=(r-i)/f+(r<i?6:0);break;case r:u=(i-n)/f+2;break;case i:u=(n-r)/f+4;break}u*=60,u=Math.round(u)}return new e(u,l,h,s)}static _hue2rgb(t,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){let n=t.h/360,{s:r,l:i,a:s}=t,o,a,u;if(r===0)o=a=u=i;else{let l=i<.5?i*(1+r):i+r-i*r,h=2*i-l;o=e._hue2rgb(h,l,n+1/3),a=e._hue2rgb(h,l,n),u=e._hue2rgb(h,l,n-1/3)}return new A(Math.round(o*255),Math.round(a*255),Math.round(u*255),s)}},jt=class e{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=st(Math.max(Math.min(1,n),0),3),this.v=st(Math.max(Math.min(1,r),0),3),this.a=st(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=s-o,u=s===0?0:a/s,l;return a===0?l=0:s===n?l=((r-i)/a%6+6)%6:s===r?l=(i-n)/a+2:l=(n-r)/a+4,new e(Math.round(l*60),u,s,t.a)}static toRGBA(t){let{h:n,s:r,v:i,a:s}=t,o=i*r,a=o*(1-Math.abs(n/60%2-1)),u=i-o,[l Line truncated
`);s.lastIndex=0;let h;for(;(h=s.exec(l))!==null;){let f=l.substring(0,h.index),d=(f.match(/\n/g)||[]).length,g=o+d,m=h[0].split(`
`),p=m.length,w=g+p-1,_=f.lastIndexOf(`
`)+1,v=h.index-_+1,b=m[m.length-1],S=p===1?v+h[0].length:b.length+1,L={startLineNumber:g,startColumn:v,endLineNumber:w,endColumn:S},E=(h.groups??{}).label??"",y=((h.groups??{}).separator??"")!=="",N={range:L,text:E,hasSeparatorLine:y,shouldBeInComments:!0};(N.text||N.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<N.range.startLineNumber)&&n.push(N),s.lastIndex=h.index+h[0].length}}return n}function oc(e){e=e.trim();let t=e.startsWith("-");return e=e.replace(nc,""),{text:e,hasSeparatorLine:t}}var ac=Symbol("MicrotaskDelay");var lc,Ji;(function(){let e=globalThis;typeof e.requestIdleCallback!="function"||typeof e.cancelIdleCallback!="function"?Ji=(t,n,r)=>{Ys(()=>{if(i)return;let s=Date.now()+15;n(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:Ji=(t,n,r)=>{let i=t.requestIdleCallback(n,typeof r=="number"?{timeout:r}:void 0),s=!1;return{dispose(){s||(s=!0,t.cancelIdleCallback(i))}}},lc=(t,n)=>Ji(globalThis,t,n)})();var Xi=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((t,n)=>{this.completeCallback=t,this.errorCallback=n})}complete(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(t),this.outcome={outcome:0,value:t},n()})}error(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(t),this.outcome={outcome:1,value:t},n()})}cancel(){return this.error(new Yt)}},A1;(function(e){async function t(r){let i,s=await Promise.all(r.map(o=>o.then(a=>a,a=>{i||(i=a)})));if(typeof i<"u")throw i;return s}e.settled=t;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(o){s(o)}})}e.withAsyncBody=n})(A1||(A1={}));var Qi=class{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(t){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,t)}else this._unconsumedValues.push(t)}produceFinal(t){this._ensureNoFinalValue(),this._finalValue=t;for(let n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,t);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new K("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(t,n){n.ok?t.complete(n.value):t.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let t=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return t.ok?Promise.resolve(t.value):Promise.reject(t.error)}else{let t=new Xi;return this._unsatisfiedConsumers.push(t),t.p}}},k1=class e{constructor(t,n){this._onReturn=n,this._producerConsumer=new Qi,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()=>{let r=t({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(let 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(t){return new e(n=>{n.emitMany(t)})}static fromPromise(t){return new e(async n=>{n.emitMany(await t)})}static fromPromisesResolveOrder(t){return new e(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new e(async n=>{await Promise.all(t.map(async r=>{for await(let i of r)n.emitOne(i)}))})}static{this.EMPTY=e.fromArray([])}static map(t,n){return new e(async r=>{for await(let i of t)r.emitOne(n(i))})}map(t){return e.map(this,t)}static coalesce(t){return e.filter(t,n=>!!n)}coalesce(){return e.coalesce(this)}static filter(t,n){return new e(async r=>{for await(let i of t)n(i)&&r.emitOne(i)})}filter(t){return e.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(t){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:t})}[Symbol.asyncIterator](){return this._iterator}};var wr=class{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=pt(t);let 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,t),0),this.values.set(r.subarray(t),t+s),this.values.set(n,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=pt(t),n=pt(n),this.values[t]===n?!1:(this.values[t]=n,t-1<this.prefixSumValidIndex[0]&& Line truncated
`;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:let y=d(4);y>=0?b+=String.fromCharCode(y):f=4;break;default:f=5}S=r;continue}if(L>=0&&L<=31)if(xn(L)){b+=e.substring(S,r),f=2;break}else f=6;r++}return b}function w(){if(i="",f=0,s=r,u=a,h=l,r>=n)return s=n,o=17;let b=e.charCodeAt(r);if(Ki(b)){do r++,i+=String.fromCharCode(b),b=e.charCodeAt(r);while(Ki(b));return o=15}if(xn(b))return r++,i+=String.fromCharCode(b),b===13&&e.charCodeAt(r)===10&&(r++,i+=`
`),a++,l=r,o=14;switch(b){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=p(),o=10;case 47:let S=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!xn(e.charCodeAt(r));)r++;return i=e.substring(S,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let L=n-1,E=!1;for(;r<L;){let y=e.charCodeAt(r);if(y===42&&e.charCodeAt(r+1)===47){r+=2,E=!0;break}r++,xn(y)&&(y===13&&e.charCodeAt(r)===10&&r++,a++,l=r)}return E||(r++,f=1),i=e.substring(S,r),o=13}return i+=String.fromCharCode(b),r++,o=16;case 45:if(i+=String.fromCharCode(b),r++,r===n||!Wt(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(b);)r++,b=e.charCodeAt(r);if(s!==r){switch(i=e.substring(s,r),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(b),r++,o=16}}function _(b){if(Ki(b)||xn(b))return!1;switch(b){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let b;do b=w();while(b>=12&&b<=15);return b}return{setPosition:g,getPosition:()=>r,scan:t?v:w,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>u,getTokenStartCharacter:()=>s-h,getTokenError:()=>f}}function Ki(e){return e===32||e===9}function xn(e){return e===10||e===13}function Wt(e){return e>=48&&e<=57}var M1;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(M1||(M1={}));var _e=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),Ht=200,es={" ":{"\n":new Array(Ht).fill(0).map((e,t)=>`
`+" ".repeat(t)),"\r":new Array(Ht).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Ht).fill(0).map((e,t)=>`\r
`+" ".repeat(t))}," ":{"\n":new Array(Ht).fill(0).map((e,t)=>`
`+" ".repeat(t)),"\r":new Array(Ht).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Ht).fill(0).map((e,t)=>`\r
`+" ".repeat(t))}},T1=[`
`,"\r",`\r
`];function P1(e,t,n){let r,i,s,o,a;if(t){for(o=t.offset,a=o+t.length,s=o;s>0&&!C1(e,s-1);)s--;let L=a;for(;L<e.length&&!C1(e,L);)L++;i=e.substring(s,L),r=cc(i,n)}else i=e,r=0,s=0,o=0,a=e.length;let u=fc(n,e),l=T1.includes(u),h=0,f=0,d;n.insertSpaces?d=_e[n.tabSize||4]??Gt(_e[1],n.tabSize||4):d=" ";let g=d===" "?" ":" ",m=zt(i,!1),p=!1;function w(){if(h>1)return Gt(u,h)+Gt(d,r+f);let L=d.length*(r+f);return!l||L>es[g][u].length?u+Gt(d,r+f):L<=0?u:es[g][u][L]}function _(){let L=m.scan();for(h=0;L===15||L===14;)L===14&&n.keepLines?h+=1:L===14&&(h=1),L=m.scan();return p=L===16||m.getTokenError()!==0,L}let v=[];function b(L,E,y){!p&&(!t||E<a&&y>o)&&e.substring(E,y)!==L&&v.push({offset:E,length:y-E,content:L})}let S=_();if(n.keepLines&&h>0&&b(Gt(u,h),0,0),S!==17){let L=m.getTokenOffset()+s,E=d.length*r<20&&n.insertSpaces?_e[d.length*r]:Gt(d,r);b(E,s,L)}for(;S!==17;){let L=m.getTokenOffset()+m.getTokenLength()+s,E=_(),y="",N=!1;for(;h===0&&(E===12||E===13);){let V=m.getTokenOffset()+s;b(_e[1],L,V),L=m.getTokenOffset()+m.getTokenLength()+s,N=E===12,y=N?w():"",E=_()}if(E===2)S!==1&&f--,n.keepLines&&h>0||!n.keepLines&&S!==1?y=w():n.keepLines&&(y=_e[1]);else if(E===4)S!==3&&f--,n.keepLines&&h>0||!n.keepLines&&S!==3?y=w():n.keepLines&&(y=_e[1]);else{switch(S){case 3:case 1:f++,n.keepLines&&h>0||!n.keepLines?y=w():y=_e[1];break;case 5:n.keepLines&&h>0||!n.keepLines?y=w():y=_e[1];break;case 12:y=w();break;case 13:h>0?y=w():N||(y=_e[1]);break;case 6:n.keepLines&&h>0?y=w():N||(y=_e[1]);break;case 10:n.keepLines&&h>0?y=w():E===6&&!N&&(y="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&h>0?y=w():(E===12||E===13)&&!N?y=_e[1]:E!==5&&E!==17&&(p=!0);break;case 16:p=!0;break}h>0&&(E===12||E===13)&&(y=w())}E===17&&(n.keepLines&&h>0?y=w():y=n.insertFinalNewline?u:"");let C=m.getTokenOffset()+s;b(y,L,C),S=E}return v}function Gt(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function cc(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let s=e.charAt(n);if(s===_e[1])r++;else if(s===" ")r+=i;else break;n++}return Math.floor(r/i)}function fc(e,t){for(let n=0;n<t.length;n++){let r=t.charAt(n);if(r==="\r")return n+1<t.length&&t.charAt(n+1)===`
`?`\r
`:"\r";if(r===`
`)return`
`}return e&&e.eol||`
`}function C1(e,t){return`\r
`.indexOf(e.charAt(t))!==-1}var Lr;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Lr||(Lr={}));function I1(e,t=[],n=Lr.DEFAULT){let r=null,i=[],s=[];function o(u){Array.isArray(i)?i.push(u):r!==null&&(i[r]=u)}return dc(e,{onObjectBegin:()=>{let u={};o(u),s.push(i),i=u,r=null},onObjectProperty:u=>{r=u},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let u=[];o(u),s.push(i),i=u,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:o,onError:(u,l,h)=>{t.push({error:u,offset:l,length:h})}},n),i[0]}function ts(e){if(!e.parent||!e.parent.children)return[];let t=ts(e.parent);if(e.parent.type==="property"){let n=e.parent.children[0].value;t.push(n)}else if(e.parent.type==="array"){let n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function Sr(e){switch(e.type){case"array":return e.children.map(Sr);case"object":let t=Object.create(null);for(let n of e.children){let r=n.children[1];r&&(t[n.children[0].value]=Sr(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function hc(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function ns(e,t,n=!1){if(hc(e,t,n)){let r=e.children;if(Array.isArray(r))for(let i=0;i<r.length&&r[i].offset<=t;i++){let s=ns(r[i],t,n);if(s)return s}return e}}function dc(e,t,n=Lr.DEFAULT){let r=zt(e,!1),i=[];function s(x){return x?()=>x(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function o(x){return x?()=>x(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function a(x){return x?k=>x(k,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function u(x){return x?k=>x(k,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}let l=o(t.onObjectBegin),h=u(t.onObjectProperty),f=s(t.onObjectEnd),d=o(t.onArrayBegin),g=s(t.onArrayEnd),m=u(t.onLiteralValue),p=a(t.onSeparator),w=s(t.onComment),_=a(t.onError),v=n&&n.disallowComments,b=n&&n.allowTrailingComma;function S(){for(;;){let x=r.scan();switch(r.getTokenError()){case 4:L(14);break;case 5:L(15);break;case 3:L(13);break;case 1:v||L(11);break;case 2:L(12);break;case 6:L(16);break}switch(x){case 12:case 13:v?L(10):w();break;case 16:L(1);break;case 15:case 14:break;default:return x}}}function L(x,k=[],P=[]){if(_(x),k.length+P.length>0){let I=r.getToken();for(;I!==17;){if(k.indexOf(I)!==-1){S();break}else if(P.indexOf(I)!==-1)break;I=S()}}}function E(x){let k=r.getTokenValue();return x?m(k):(h(k),i.push(k)),S(),!0}function y(){switch(r.getToken()){case 11:let x=r.getTokenValue(),k=Number(x);isNaN(k)&&(L(2),k=0),m(k);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return S(),!0}function N(){return r.getToken()!==10?(L(3,[],[2,5]),!1):(E(!1),r.getToken()===6?(p(":"),S(),T()||L(4,[],[2,5])):L(5,[],[2,5]),i.pop(),!0)}function C(){l(),S();let x=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(x||L(4,[],[]),p(","),S(),r.getToken()===2&&b)break}else x&&L(6,[],[]);N()||L(4,[],[2,5]),x=!0}return f(),r.getToken()!==2?L(7,[2],[]):S(),!0}function V(){d(),S();let x=!0,k=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(k||L(4,[],[]),p(","),S(),r.getToken()===4&&b)break}else k&&L(6,[],[]);x?(i.push(0),x=!1):i[i.length-1]++,T()||L(4,[],[4,5]),k=!0}return g(),x||i.pop(),r.getToken()!==4?L(8,[4],[]):S(),!0}function T(){switch(r.getToken()){case 3:return V();case 1:return C();case 10:return E(!0);default:return y()}}return S(),r.getToken()===17?n.allowEmptyContent?!0:(L(4,[],[]),!1):T()?(r.getToken()!==17&&L(9,[],[]),!0):(L(4,[],[]),!1)}var Se=zt,F1;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(F1||(F1={}));var D1;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(D1||(D1={}));var O1=I1,B1=ns,U1=ts,$1=Sr,V1;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBrace Line truncated
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
`&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Z.create(0,t);for(;r<i;){let o=Math.floor((r+i)/2);n[o]>t?i=o:r=o+1}let s=r-1;return Z.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}},R;(function(e){let t=Object.prototype.toString;function n(g){return typeof g<"u"}e.defined=n;function r(g){return typeof g>"u"}e.undefined=r;function i(g){return g===!0||g===!1}e.boolean=i;function s(g){return t.call(g)==="[object String]"}e.string=s;function o(g){return t.call(g)==="[object Number]"}e.number=o;function a(g,m,p){return t.call(g)==="[object Number]"&&m<=g&&g<=p}e.numberRange=a;function u(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=u;function l(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=l;function h(g){return t.call(g)==="[object Function]"}e.func=h;function f(g){return g!==null&&typeof g=="object"}e.objectLiteral=f;function d(g,m){return Array.isArray(g)&&g.every(m)}e.typedArray=d})(R||(R={}));var Tr=class e{constructor(t,n,r,i){this._uri=t,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(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let i=yl(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);let a=Math.max(i.start.line,0),u=Math.max(i.end.line,0),l=this._lineOffsets,h=vl(r.text,!1,s);if(u-a===h.length)for(let d=0,g=h.length;d<g;d++)l[d+a+1]=h[d];else h.length<1e4?l.splice(a+1,u-a,...h):this._lineOffsets=l=l.slice(0,a+1).concat(h,l.slice(u+1));let f=r.text.length-(o-s);if(f!==0)for(let d=a+1+h.length,g=l.length;d<g;d++)l[d]=l[d]+f}else if(e.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=vl(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:t};for(;r<i;){let o=Math.floor((r+i)/2);n[o]>t?i=o:r=o+1}let s=r-1;return{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},be;(function(e){function t(i,s,o,a){return new Tr(i,s,o,a)}e.create=t;function n(i,s,o){if(i instanceof Tr)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(i,s){let o=i.getText(),a=Ms(s.map(gc),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=0,l=[];for(let h of a){let f=i.offsetAt(h.range.start);if(f<u)throw new Error("Overlapping edit");f>u&&l.push(o.substring(u,f)),h.newText.length&&l.push(h.newText),u=i.offsetAt(h.range.end)}return l.push(o.substr(u)),l.join("")}e.applyEdits=r})(be||(be={}));function Ms(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Ms(r,t),Ms(i,t);let s=0,o=0,a=0;for(;s<r.length&&o<i.length;)t(r[s],i[o])<=0?e[a++]=r[s++]:e[a++]=i[o++];for(;s<r.length;)e[a++]=r[s++];for(;o<i.length;)e[a++]=i[o++];return e}function vl(e,t,n=0){let r=t?[n]:[];for(let i=0;i<e.length;i++){let s=e.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function yl(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function gc(e){let t=yl(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var G;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidChar Line truncated
`;for(let s=0;s<e.length;s++)i+=r+Fr(e[s],r,n),s<e.length-1&&(i+=","),i+=`
`;return i+=t+"]",i}else{let i=Object.keys(e);if(i.length===0)return"{}";let s=`{
`;for(let o=0;o<i.length;o++){let a=i[o];s+=r+JSON.stringify(a)+": "+Fr(e[a],r,n),o<i.length-1&&(s+=","),s+=`
`}return s+=t+"}",s}}return n(e)}var Dr=class{constructor(t,n=[],r=Promise,i={}){this.schemaService=t,this.contributions=n,this.promiseConstructor=r,this.clientCapabilities=i}doResolve(t){for(let n=this.contributions.length-1;n>=0;n--){let r=this.contributions[n].resolveCompletion;if(r){let i=r(t);if(i)return i}}return this.promiseConstructor.resolve(t)}doComplete(t,n,r){let i={items:[],isIncomplete:!1},s=t.getText(),o=t.offsetAt(n),a=r.getNodeFromOffset(o,!0);if(this.isInComment(t,a?a.offset:0,o))return Promise.resolve(i);if(a&&o===a.offset+a.length&&o>0){let d=s[o-1];(a.type==="object"&&d==="}"||a.type==="array"&&d==="]")&&(a=a.parent)}let u=this.getCurrentWord(t,o),l;if(a&&(a.type==="string"||a.type==="number"||a.type==="boolean"||a.type==="null"))l=$.create(t.positionAt(a.offset),t.positionAt(a.offset+a.length));else{let d=o-u.length;d>0&&s[d-1]==='"'&&d--,l=$.create(t.positionAt(d),n)}let h=new Map,f={add:d=>{let g=d.label,m=h.get(g);if(m)m.documentation||(m.documentation=d.documentation),m.detail||(m.detail=d.detail),m.labelDetails||(m.labelDetails=d.labelDetails);else{if(g=g.replace(/[\n]/g,"\u21B5"),g.length>60){let p=g.substr(0,57).trim()+"...";h.has(p)||(g=p)}d.textEdit=de.replace(l,d.insertText),d.label=g,h.set(g,d),i.items.push(d)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:d=>{console.error(d)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(t.uri,r).then(d=>{let g=[],m=!0,p="",w;if(a&&a.type==="string"){let v=a.parent;v&&v.type==="property"&&v.keyNode===a&&(m=!v.valueNode,w=v,p=s.substr(a.offset+1,a.length-2),v&&(a=v.parent))}if(a&&a.type==="object"){if(a.offset===o)return i;a.properties.forEach(L=>{(!w||w!==L)&&h.set(L.keyNode.value,_n.create("__"))});let b="";m&&(b=this.evaluateSeparatorAfter(t,t.offsetAt(l.end))),d?this.getPropertyCompletions(d,r,a,m,b,f):this.getSchemaLessPropertyCompletions(r,a,p,f);let S=Sn(a);this.contributions.forEach(L=>{let E=L.collectPropertyCompletions(t.uri,S,u,m,b==="",f);E&&g.push(E)}),!d&&u.length>0&&s.charAt(o-u.length-1)!=='"'&&(f.add({kind:me.Property,label:this.getLabelForValue(u),insertText:this.getInsertTextForProperty(u,void 0,!1,b),insertTextFormat:te.Snippet,documentation:""}),f.setAsIncomplete())}let _={};return d?this.getValueCompletions(d,r,a,o,t,f,_):this.getSchemaLessValueCompletions(r,a,o,t,f),this.contributions.length>0&&this.getContributedValueCompletions(r,a,o,t,f,g),this.promiseConstructor.all(g).then(()=>{if(f.getNumberOfProposals()===0){let v=o;a&&(a.type==="string"||a.type==="number"||a.type==="boolean"||a.type==="null")&&(v=a.offset+a.length);let b=this.evaluateSeparatorAfter(t,v);this.addFillerValueCompletions(_,b,f)}return i})})}getPropertyCompletions(t,n,r,i,s,o){n.getMatchingSchemas(t.schema,r.offset).forEach(u=>{if(u.node===r&&!u.inverted){let l=u.schema.properties;l&&Object.keys(l).forEach(f=>{let d=l[f];if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){let g={kind:me.Property,label:f,insertText:this.getInsertTextForProperty(f,d,i,s),insertTextFormat:te.Snippet,filterText:this.getFilterTextForValue(f),documentation:this.fromMarkup(d.markdownDescription)||d.description||""};d.suggestSortText!==void 0&&(g.sortText=d.suggestSortText),g.insertText&&ot(g.insertText,`$1${s}`)&&(g.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(g)}});let h=u.schema.propertyNames;if(typeof h=="object"&&!h.deprecationMessage&&!h.doNotSuggest){let f=(d,g=void 0)=>{let m={kind:me.Property,label:d,insertText:this.getInsertTextForProperty(d,void 0,i,s),insertTextFormat:te.Snippet,filterText:this.getFilterTextForValue(d),documentation:g||this.fromMarkup(h.markdownDescription)||h.description||""};h.suggestSortText!==void 0&&(m.sortText=h.suggestSortText),m.insertText&&ot(m.insertText,`$1${s}`)&&(m.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(m)};if(h.enum)for(let d=0;d<h.enum.length;d++){let g;h.markdownEnumDescriptions&&d<h.markdownEnumDescriptions.length?g=this.fromMarkup(h.markdownEnumDescriptions[d]):h.enumDescriptions&&d<h.enumDescriptions.length&&(g=h.enumDescriptions[d]),f(h.enum[d],g)}h.const&&f(h.const)}}})}getSchemaLessPropertyCompletions(t,n,r,i){let s=o=>{o.properties.forEach(a=>{let u=a.keyNode.value;i.add({kind:me.Property,label:u,insertText:this.getInsertTextForValue(u,""),insertTextFormat:te.Snippet,filterText:this.getFilterTextForValue(u),documentation:""})})};if(n.parent)if(n.parent.type==="property"){let o=n.parent.keyNode.value;t.visit(a=>(a.type==="property"&&a!==n.parent&&a.keyNode.value===o&&a.valueNode&&a.valueNode.type==="object"&&s(a.valueNode),!0))}else n.parent.type==="array"&&n.parent.items.forEach(o=>{o.type==="object"&&o!==n&&s(o)});else n.type==="object"&&i.add({kind:me.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:te.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(t,n,r,i,s){let o=r;if(n&&(n.type==="string"| Line truncated
`,g=g+`
`+m+"]",m+=" ",a="array";h=d+m+o.bodyText.split(`
`).join(`
`+m)+g+n,l=l||h,f=h.replace(/[\n]/g,"")}else return;r.add({kind:this.getSuggestionKind(a),label:l,documentation:this.fromMarkup(o.markdownDescription)||o.description,insertText:h,insertTextFormat:te.Snippet,filterText:f}),s=!0}),!s&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,n,r,i+1)}addEnumValueCompletions(t,n,r){if(ve(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,n),insertTextFormat:te.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(let i=0,s=t.enum.length;i<s;i++){let o=t.enum[i],a=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?a=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(a=t.enumDescriptions[i]),r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,n),insertTextFormat:te.Snippet,documentation:a})}}collectTypes(t,n){if(Array.isArray(t.enum)||ve(t.const))return;let r=t.type;Array.isArray(r)?r.forEach(i=>n[i]=!0):r&&(n[r]=!0)}addFillerValueCompletions(t,n,r){t.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:te.Snippet,detail:M("New object"),documentation:""}),t.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:te.Snippet,detail:M("New array"),documentation:""})}addBooleanValueCompletion(t,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,n),insertTextFormat:te.Snippet,documentation:""})}addNullValueCompletion(t,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:te.Snippet,documentation:""})}addDollarSchemaCompletions(t,n){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("http://json-schema.org/draft-")&&(i=i+"#"),n.add({kind:me.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:te.Snippet,documentation:""})})}getLabelForValue(t){return JSON.stringify(t)}getValueFromLabel(t){return JSON.parse(t)}getFilterTextForValue(t){return JSON.stringify(t)}getFilterTextForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(t){return t.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(t,n){let r=JSON.stringify(t,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)}getInsertTextForSnippetValue(t,n){return Fr(t,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+n}getInsertTextForGuessedValue(t,n){switch(typeof t){case"object":return t===null?"${1:null}"+n:this.getInsertTextForValue(t,n);case"string":let r=JSON.stringify(t);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+n}return this.getInsertTextForValue(t,n)}getSuggestionKind(t){if(Array.isArray(t)){let n=t;t=n.length>0?n[0]:void 0}if(!t)return me.Value;switch(t){case"string":return me.Value;case"object":return me.Module;case"property":return me.Property;default:return me.Value}}getLabelTextForMatchingNode(t,n){switch(t.type){case"array":return"[]";case"object":return"{}";default:return n.getText().substr(t.offset,t.length)}}getInsertTextForMatchingNode(t,n,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:let i=n.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(t,n,r,i){let s=this.getInsertTextForValue(t,"");if(!r)return s;let o=s+": ",a,u=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){let l=n.defaultSnippets[0].body;ve(l)&&(a=this.getInsertTextForSnippetValue(l,""))}u+=n.defaultSnippets.length}if(n.enum&&(!a&&n.enum.length===1&&(a=this.getInsertTextForGuessedValue(n.enum[0],"")),u+=n.enum.length),ve(n.const)&&(a||(a=this.getInsertTextForGuessedValue(n.const,"")),u++),ve(n.default)&&(a||(a=this.getInsertTextForGuessedValue(n.default,"")),u++),Array.isArray(n.examples)&&n.examples.length&&(a||(a=this.getInsertTextForGuessedValue(n.examples[0],"")),u+=n.examples.length),u===0){let l=Array.isArray(n.type)?n.type[0]:n.type;switch(l||(n.properties?l="object":n.items&&(l="array")),l){case"boolean":a="$1";break;case"string":a='"$1"';break;case"object":a="{$1}";break;case"array":a="[$1]";break;case"number":case"integer":a="${1:0}";break;case"null":a="${1:null}";break;default:return s}}}return(!a||u>1)&&(a="$1"),o Line truncated
\r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}evaluateSeparatorAfter(t,n){let r=Se(t.getText(),!0);switch(r.setPosition(n),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(t,n,r){let i=Se(n.getText(),!0),s=t.items;for(let o=s.length-1;o>=0;o--){let a=s[o];if(r>a.offset+a.length)return i.setPosition(a.offset+a.length),i.scan()===5&&r>=i.getTokenOffset()+i.getTokenLength()?o+1:o;if(r>=a.offset)return o}return 0}isInComment(t,n,r){let i=Se(t.getText(),!1);i.setPosition(n);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()<r;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=r}fromMarkup(t){if(t&&this.doesSupportMarkdown())return{kind:ze.Markdown,value:t}}doesSupportMarkdown(){if(!ve(this.supportsMarkdown)){let t=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(t)&&t.indexOf(ze.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return ve(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return ve(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}};var Vr=class{constructor(t,n=[],r){this.schemaService=t,this.contributions=n,this.promise=r||Promise}doHover(t,n,r){let i=t.offsetAt(n),s=r.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<s.offset+s.length-1)return this.promise.resolve(null);let o=s;if(s.type==="string"){let h=s.parent;if(h&&h.type==="property"&&h.keyNode===s&&(s=h.valueNode,!s))return this.promise.resolve(null)}let a=$.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length)),u=h=>({contents:h,range:a}),l=Sn(s);for(let h=this.contributions.length-1;h>=0;h--){let d=this.contributions[h].getInfoContribution(t.uri,l);if(d)return d.then(g=>u(g))}return this.schemaService.getSchemaForResource(t.uri,r).then(h=>{if(h&&s){let f=r.getMatchingSchemas(h.schema,s.offset),d,g,m,p;f.every(_=>{if(_.node===s&&!_.inverted&&_.schema&&(d=d||_.schema.title,g=g||_.schema.markdownDescription||Os(_.schema.description),_.schema.enum)){let v=_.schema.enum.indexOf(Ve(s));_.schema.markdownEnumDescriptions?m=_.schema.markdownEnumDescriptions[v]:_.schema.enumDescriptions&&(m=Os(_.schema.enumDescriptions[v])),m&&(p=_.schema.enum[v],typeof p!="string"&&(p=JSON.stringify(p)))}return!0});let w="";return d&&(w=Os(d)),g&&(w.length>0&&(w+=`
`),w+=g),m&&(w.length>0&&(w+=`
`),w+=`\`${_c(p)}\`: ${m}`),u([w])}return null})}};function Os(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
$3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function _c(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Br=class{constructor(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}configure(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:fe.Error)}doValidation(t,n,r,i){if(!this.validationEnabled)return this.promise.resolve([]);let s=[],o={},a=l=>{let h=l.range.start.line+" "+l.range.start.character+" "+l.message;o[h]||(o[h]=!0,s.push(l))},u=l=>{let h=r?.trailingCommas?Or(r.trailingCommas):fe.Error,f=r?.comments?Or(r.comments):this.commentSeverity,d=r?.schemaValidation?Or(r.schemaValidation):fe.Warning,g=r?.schemaRequest?Or(r.schemaRequest):fe.Warning;if(l){let m=(p,w)=>{if(n.root&&g){let _=n.root,v=_.type==="object"?_.properties[0]:void 0;if(v&&v.keyNode.value==="$schema"){let b=v.valueNode||v,S=$.create(t.positionAt(b.offset),t.positionAt(b.offset+b.length));a(Ae.create(S,p,g,w))}else{let b=$.create(t.positionAt(_.offset),t.positionAt(_.offset+1));a(Ae.create(b,p,g,w))}}};if(l.errors.length)m(l.errors[0],G.SchemaResolveError);else if(d){for(let w of l.warnings)m(w,G.SchemaUnsupportedFeature);let p=n.validate(t,l.schema,d,r?.schemaDraft);p&&p.forEach(a)}kl(l.schema)&&(f=void 0),Rl(l.schema)&&(h=void 0)}for(let m of n.syntaxErrors){if(m.code===G.TrailingComma){if(typeof h!="number")continue;m.severity=h}a(m)}if(typeof f=="number"){let m=M("Comments are not permitted in JSON.");n.comments.forEach(p=>{a(Ae.create(p,m,f,G.CommentNotPermitted))})}return s};if(i){let l=i.id||"schemaservice://untitled/"+vc++;return this.jsonSchemaService.registerExternalSchema({uri:l,schema:i}).getResolvedSchema().then(f=>u(f))}return this.jsonSchemaService.getSchemaForResource(t.uri,n).then(l=>u(l))}getLanguageStatus(t,n){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(t.uri,n)}}},vc=0;function kl(e){if(e&&typeof e=="object"){if(Ne(e.allowComments))return e.allowComments;if(e.allOf)for(let t of e.allOf){let n=kl(t);if(Ne(n))return n}}}function Rl(e){if(e&&typeof e=="object"){if(Ne(e.allowTrailingCommas))return e.allowTrailingCommas;let t=e;if(Ne(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(let n of e.allOf){let r=Rl(n);if(Ne(r))return r}}}function Or(e){switch(e){case"error":return fe.Error;case"warning":return fe.Warning;case"ignore":return}}function re(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function El(e){if(e[0]==="#")switch(e.length){case 4:return{red:re(e.charCodeAt(1))*17/255,green:re(e.charCodeAt(2))*17/255,blue:re(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:re(e.charCodeAt(1))*17/255,green:re(e.charCodeAt(2))*17/255,blue:re(e.charCodeAt(3))*17/255,alpha:re(e.charCodeAt(4))*17/255};case 7:return{red:(re(e.charCodeAt(1))*16+re(e.charCodeAt(2)))/255,green:(re(e.charCodeAt(3))*16+re(e.charCodeAt(4)))/255,blue:(re(e.charCodeAt(5))*16+re(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(re(e.charCodeAt(1))*16+re(e.charCodeAt(2)))/255,green:(re(e.charCodeAt(3))*16+re(e.charCodeAt(4)))/255,blue:(re(e.charCodeAt(5))*16+re(e.charCodeAt(6)))/255,alpha:(re(e.charCodeAt(7))*16+re(e.charCodeAt(8)))/255}}}var Ur=class{constructor(t){this.schemaService=t}findDocumentSymbols(t,n,r={resultLimit:Number.MAX_VALUE}){let i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||ot(o.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let d=[];for(let g of i.items)if(g.type==="object"){for(let m of g.properties)if(m.keyNode.value==="key"&&m.valueNode){let p=at.create(t.uri,lt(t,g));if(d.push({name:Ml(m.valueNode),kind:ke.Function,location:p}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),d}}return d}let a=[{node:i,containerName:""}],u=0,l=!1,h=[],f=(d,g)=>{d.type==="array"?d.items.forEach(m=>{m&&a.push({node:m,containerName:g})}):d.type==="object"&&d.properties.forEach(m=>{let p=m.valueNode;if(p)if(s>0){s--;let w=at.create(t.uri,lt(t,m)),_=g?g+"."+m.keyNode.value:m.keyNode.value;h.push({name:this.getKeyLabel(m),kind:this.getSymbolKind(p.type),location:w,containerName:g}),a.push({node:p,containerName:_})}else l=!0})};for(;u<a.length;){let d=a[u++];f(d.node,d.containerName)}return l&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),h}findDocumentSymbols2(t,n,r={resultLimit:Number.MAX_VALUE}){let i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||ot(o.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let d=[];for(let g of i.items)if(g.type==="object"){for(let m of g.properties)if(m.keyNode.value==="key"&&m.valueNode){let p=lt(t,g),w=lt(t,m.keyNode);if(d.push({name:Ml(m.valueNode),kind:ke.Function,range:p,selectionRange:w}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),d}}return d}let a=[],u=[{node:i,result:a}],l=0,h=!1,f=(d,g)=>{d.type==="array"?d.items.forEach((m,p)=>{if(m)if(s>0){s--;let w=lt(t,m),_=w,b=Line truncated
`,keepLines:t?.keepLines===!0};return q1(e.getText(),r,i).map(s=>de.replace($.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),s.content))}var ie;(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(ie||(ie={}));var Et=class{constructor(t,n){this.propertyName=t??"",this.beginningLineNumber=n,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(t){if(t.parent=this,this.childrenProperties.length>0){let n=0;t.noKeyName?n=this.childrenProperties.length:n=kc(this.childrenProperties,t,Ac),n<0&&(n=n*-1-1),this.childrenProperties.splice(n,0,t)}else this.childrenProperties.push(t);return t}};function Ac(e,t){let n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function kc(e,t,n){let r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(r<i)return 0;if(r>s)return e.length;let o=0,a=e.length-1;for(;o<=a;){let u=a+o>>1,l=n(t,e[u]);if(l>0)o=u+1;else if(l<0)a=u-1;else return u}return-o-1}function Vl(e,t){let n={...t,keepLines:!1},r=be.applyEdits(e,An(e,n,void 0)),i=be.create("test://test.json","json",0,r),s=Rc(i),o=Ec(i,s),a=An(o,n,void 0),u=be.applyEdits(o,a);return[de.replace($.create(Z.create(0,0),e.positionAt(e.getText().length)),u)]}function Rc(e){let t=e.getText(),n=Se(t,!1),r=new Et,i=r,s=r,o=r,a,u=0,l=0,h,f,d=-1,g=-1,m=0,p=0,w=[],_=!1,v=!1;for(;(a=n.scan())!==17;){if(_===!0&&a!==14&&a!==15&&a!==12&&a!==13&&s.endLineNumber===void 0){let b=n.getTokenStartLine();f===2||f===4?o.endLineNumber=b-1:s.endLineNumber=b-1,m=b,_=!1}if(v===!0&&a!==14&&a!==15&&a!==12&&a!==13&&(m=n.getTokenStartLine(),v=!1),n.getTokenStartLine()!==u){for(let b=u;b<n.getTokenStartLine();b++){let S=e.getText($.create(Z.create(b,0),Z.create(b+1,0))).length;l=l+S}u=n.getTokenStartLine()}switch(a){case 10:{if(h===void 0||h===1||h===5&&w[w.length-1]===ie.Object){let b=new Et(n.getTokenValue(),m);o=s,s=i.addChildProperty(b)}break}case 3:{if(r.beginningLineNumber===void 0&&(r.beginningLineNumber=n.getTokenStartLine()),w[w.length-1]===ie.Object)i=s;else if(w[w.length-1]===ie.Array){let b=new Et(n.getTokenValue(),m);b.noKeyName=!0,o=s,s=i.addChildProperty(b),i=s}w.push(ie.Array),s.type=ie.Array,m=n.getTokenStartLine(),m++;break}case 1:{if(r.beginningLineNumber===void 0)r.beginningLineNumber=n.getTokenStartLine();else if(w[w.length-1]===ie.Array){let b=new Et(n.getTokenValue(),m);b.noKeyName=!0,o=s,s=i.addChildProperty(b)}s.type=ie.Object,w.push(ie.Object),i=s,m=n.getTokenStartLine(),m++;break}case 4:{p=n.getTokenStartLine(),w.pop(),s.endLineNumber===void 0&&(h===2||h===4)&&(s.endLineNumber=p-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=g,o=s,s=s?s.parent:void 0,i=s),r.endLineNumber=p,m=p+1;break}case 2:{p=n.getTokenStartLine(),w.pop(),h!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=p-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=g),o=s,s=s?s.parent:void 0,i=s),r.endLineNumber=n.getTokenStartLine(),m=p+1;break}case 5:{p=n.getTokenStartLine(),s.endLineNumber===void 0&&(w[w.length-1]===ie.Object||w[w.length-1]===ie.Array&&(h===2||h===4))&&(s.endLineNumber=p,s.commaIndex=n.getTokenOffset()-l,s.commaLine=p),(h===2||h===4)&&(o=s,s=s?s.parent:void 0,i=s),m=p+1;break}case 13:{h===5&&d===n.getTokenStartLine()&&(w[w.length-1]===ie.Array&&(f===2||f===4)||w[w.length-1]===ie.Object)&&(w[w.length-1]===ie.Array&&(f===2||f===4)||w[w.length-1]===ie.Object)&&(s.endLineNumber=void 0,_=!0),(h===1||h===3)&&d===n.getTokenStartLine()&&(v=!0);break}}a!==14&&a!==13&&a!==12&&a!==15&&(f=h,h=a,d=n.getTokenStartLine(),g=n.getTokenOffset()+n.getTokenLength()-l)}return r}function Ec(e,t){if(t.childrenProperties.length===0)return e;let n=be.create("test://test.json","json",0,e.getText()),r=[];for(Dl(r,t,t.beginningLineNumber);r.length>0;){let i=r.shift(),s=i.propertyTreeArray,o=i.beginningLineNumber;for(let a=0;a<s.length;a++){let u=s[a],l=$.create(Z.create(u.beginningLineNumber,0),Z.create(u.endLineNumber+1,0)),h=e.getText(l),f=be.create("test://test.json","json",0,h);if(u.lastProperty===!0&&a!==s.length-1){let m=u.lineWhereToAddComma-u.beginningLineNumber,p=u.indexWhereToAddComa,w={range:$.create(Z.create(m,p),Z.create(m,p)),text:","};be.update(f,[w],1)}else if(u.lastProperty===!1&&a===s.length-1){let m=u.commaIndex,w=u.commaLine-u.beginningLineNumber,_={range:$.create(Z.create(w,m),Z.create(w,m+1)),text:""};be.update(f,[_],1)}let d=u.endLineNumber-u.beginningLineNumber+1,g={range:$.create(Z.create(o,0),Z.create(o+d,0)),text:f.getText()};be.update(n,[g],1),Dl(r,u,o),o=o+d}}return n}function Dl(e,t,n){if(t.childrenProperties.length!==0)if(t.type===ie.Object){let r=1/0;for(let s of t.childrenProperties)s.beginningLineNumber<r&&(r=s.beginningLineNumber);let i=r-t.beginningLineNumber;n=n+i,e.push(new Wr(n,t.childrenProperties))}else t.type===ie.Array&&Ol(e,t,n)}function Ol(e,t,n){for(let r of t.childrenProperties){if(r.type===ie.Object){let i=1/0;for(let o of r.childrenProperties)o.beginningLineNumber<i& Line truncated
File diff suppressed because it is too large. Load diff
+7
View File
@@ -0,0 +1,7 @@
Enum.reduce_while(IO.stream(:stdio, :line), :ok, fn line, _acc ->
if String.trim(line) == "stop" do
{:halt, :ok}
else
{:cont, :ok}
end
end)
+138
View File
@@ -0,0 +1,138 @@
import { chromium } from "playwright";
import readline from "node:readline";
const [url, screenshotDir] = process.argv.slice(2);
if (!url) {
console.log(JSON.stringify({ status: "error", message: "missing automation url" }));
process.exit(1);
}
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
try {
await page.goto(url, { waitUntil: "networkidle" });
await page.locator("#bds-shell-app").waitFor({ state: "visible" });
await page.emulateMedia({ reducedMotion: "reduce" });
console.log(JSON.stringify({ status: "ready", screenshotDir }));
} catch (error) {
console.log(JSON.stringify({ status: "error", message: error.message }));
await browser.close();
process.exit(1);
}
const rl = readline.createInterface({ input: process.stdin, crlfDelay: Infinity });
for await (const line of rl) {
if (!line.trim()) {
continue;
}
const message = JSON.parse(line);
const ref = message.ref;
try {
if (message.command === "snapshot") {
const result = await page.evaluate(() => {
const text = (selector) => document.querySelector(selector)?.textContent?.trim() ?? null;
const texts = (selector, mapper) => Array.from(document.querySelectorAll(selector)).map(mapper);
const hasClass = (selector, className) => document.querySelector(selector)?.classList.contains(className) ?? false;
return {
window_title: text("[data-testid='window-title']"),
active_view: document.querySelector("[data-testid='activity-button'][data-active='true']")?.dataset.view ?? null,
sidebar_visible: !hasClass("[data-testid='sidebar-shell']", "is-hidden"),
sidebar_width: document.querySelector("[data-testid='sidebar-shell']")?.getBoundingClientRect().width ?? 0,
assistant_visible: !hasClass("[data-testid='assistant-shell']", "is-hidden"),
assistant_width: document.querySelector("[data-testid='assistant-shell']")?.getBoundingClientRect().width ?? 0,
panel_visible: !hasClass(".panel-shell", "is-hidden"),
editor_title: text("[data-testid='editor-title']"),
activity_labels: texts("[data-testid='activity-button']", (node) => node.getAttribute("aria-label")),
sidebar_sections: texts("[data-testid='sidebar-section-title']", (node) => node.textContent.trim()),
editor_meta_labels: texts("[data-testid='editor-meta-label']", (node) => node.textContent.trim())
};
});
console.log(JSON.stringify({ ref, status: "ok", result }));
continue;
}
if (message.command === "click") {
await page.locator(message.selector).click();
await page.waitForTimeout(50);
console.log(JSON.stringify({ ref, status: "ok", result: "ok" }));
continue;
}
if (message.command === "press") {
await page.keyboard.press(message.shortcut);
await page.waitForTimeout(50);
console.log(JSON.stringify({ ref, status: "ok", result: "ok" }));
continue;
}
if (message.command === "native_menu_action") {
await page.evaluate((action) => {
return new Promise((resolve) => {
const ackId = `ack-${Date.now()}-${Math.random().toString(36).slice(2)}`;
const handler = (event) => {
if (event.detail?.ackId === ackId) {
window.removeEventListener("bds:native-menu-action-ack", handler);
resolve();
}
};
window.addEventListener("bds:native-menu-action-ack", handler);
window.dispatchEvent(
new CustomEvent("bds:native-menu-action", { detail: { action, ackId } })
);
});
}, message.action);
console.log(JSON.stringify({ ref, status: "ok", result: "ok" }));
continue;
}
if (message.command === "drag") {
const locator = page.locator(message.selector);
const box = await locator.boundingBox();
if (!box) {
throw new Error(`unable to drag missing element: ${message.selector}`);
}
const startX = box.x + box.width / 2;
const startY = box.y + box.height / 2;
await page.mouse.move(startX, startY);
await page.mouse.down();
await page.mouse.move(startX + message.deltaX, startY, { steps: 10 });
await page.mouse.up();
await page.waitForTimeout(50);
console.log(JSON.stringify({ ref, status: "ok", result: "ok" }));
continue;
}
if (message.command === "reload") {
await page.reload({ waitUntil: "networkidle" });
await page.locator("#bds-shell-app").waitFor({ state: "visible" });
await page.waitForTimeout(100);
console.log(JSON.stringify({ ref, status: "ok", result: "ok" }));
continue;
}
if (message.command === "screenshot") {
await page.screenshot({ path: message.path, fullPage: false });
console.log(JSON.stringify({ ref, status: "ok", result: message.path }));
continue;
}
if (message.command === "close") {
await browser.close();
console.log(JSON.stringify({ ref, status: "ok", result: "closed" }));
process.exit(0);
}
console.log(JSON.stringify({ ref, status: "error", message: `unknown command: ${message.command}` }));
} catch (error) {
console.log(JSON.stringify({ ref, status: "error", message: error.message }));
}
}
+2
View File
@@ -88,6 +88,7 @@ defmodule BDS.AI.ChatStreamingTest do
setup do setup do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(BDS.Repo) :ok = Ecto.Adapters.SQL.Sandbox.checkout(BDS.Repo)
Ecto.Adapters.SQL.Sandbox.mode(BDS.Repo, {:shared, self()})
Application.put_env(:bds, :chat_stream_test_pid, self()) Application.put_env(:bds, :chat_stream_test_pid, self())
Application.put_env(:bds, :chat_stream_scenario, :short) Application.put_env(:bds, :chat_stream_scenario, :short)
@@ -101,6 +102,7 @@ defmodule BDS.AI.ChatStreamingTest do
) )
on_exit(fn -> on_exit(fn ->
Ecto.Adapters.SQL.Sandbox.mode(BDS.Repo, :manual)
Application.delete_env(:bds, :chat_stream_scenario) Application.delete_env(:bds, :chat_stream_scenario)
case original_chat do case original_chat do
+2
View File
@@ -325,6 +325,8 @@ defmodule BDS.AITest do
setup do setup do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(BDS.Repo) :ok = Ecto.Adapters.SQL.Sandbox.checkout(BDS.Repo)
Ecto.Adapters.SQL.Sandbox.mode(BDS.Repo, {:shared, self()})
on_exit(fn -> Ecto.Adapters.SQL.Sandbox.mode(BDS.Repo, :manual) end)
:ok :ok
end end
+26
View File
@@ -352,6 +352,7 @@ defmodule BDS.DesktopTest do
assert conn.resp_body =~ ~s(data-phx-main) assert conn.resp_body =~ ~s(data-phx-main)
assert conn.resp_body =~ ~s(href="/assets/app.css") assert conn.resp_body =~ ~s(href="/assets/app.css")
assert conn.resp_body =~ ~s(href="/assets/monaco.css")
assert conn.resp_body =~ ~s(src="/assets/app.js") assert conn.resp_body =~ ~s(src="/assets/app.js")
refute conn.resp_body =~ ~s(src="/assets/live.js") refute conn.resp_body =~ ~s(src="/assets/live.js")
refute conn.resp_body =~ ~s(src="/vendor/phoenix/phoenix.min.js") refute conn.resp_body =~ ~s(src="/vendor/phoenix/phoenix.min.js")
@@ -371,6 +372,31 @@ defmodule BDS.DesktopTest do
assert byte_size(js_conn.resp_body) > 0 assert byte_size(js_conn.resp_body) > 0
end end
test "desktop endpoint serves Monaco ESM bundle and worker assets" do
paths = [
"/assets/monaco.css",
"/assets/monaco.js",
"/assets/monaco/editor.worker.js",
"/assets/monaco/css.worker.js",
"/assets/monaco/html.worker.js",
"/assets/monaco/json.worker.js",
"/assets/monaco/ts.worker.js"
]
for path <- paths do
asset_conn = conn(:get, "#{path}?k=#{Desktop.Auth.login_key()}")
asset_conn = BDS.Desktop.Endpoint.call(asset_conn, BDS.Desktop.Endpoint.init([]))
assert asset_conn.status == 200
assert byte_size(asset_conn.resp_body) > 0
end
end
test "desktop automation launch scripts exist at the paths used by automation" do
assert File.regular?("/Users/gb/Projects/bDS2/scripts/desktop_automation_app.exs")
assert File.regular?("/Users/gb/Projects/bDS2/scripts/desktop_automation_runner.mjs")
end
test "desktop endpoint serves the live shell without extra router-side secret injection" do test "desktop endpoint serves the live shell without extra router-side secret injection" do
conn = conn(:get, "/?k=#{Desktop.Auth.login_key()}") conn = conn(:get, "/?k=#{Desktop.Auth.login_key()}")
conn = BDS.Desktop.Endpoint.call(conn, BDS.Desktop.Endpoint.init([])) conn = BDS.Desktop.Endpoint.call(conn, BDS.Desktop.Endpoint.init([]))
+16
View File
@@ -358,6 +358,22 @@ defmodule BDS.UI.ShellTest do
assert File.exists?("/Users/gb/Projects/bDS2/assets/js/monaco/languages.js") assert File.exists?("/Users/gb/Projects/bDS2/assets/js/monaco/languages.js")
end end
test "monaco ESM build config emits served worker bundles" do
mix_exs = File.read!("/Users/gb/Projects/bDS2/mix.exs")
config = File.read!("/Users/gb/Projects/bDS2/config/config.exs")
services = File.read!("/Users/gb/Projects/bDS2/assets/js/monaco/services.js")
update_task = File.read!("/Users/gb/Projects/bDS2/lib/mix/tasks/monaco.update.ex")
assert mix_exs =~ ~s("esbuild monaco --minify")
assert mix_exs =~ ~s("esbuild monaco_workers --minify")
assert config =~ "monaco_workers:"
assert config =~ "js/monaco_workers/editor.worker.js"
assert services =~ "globalThis.MonacoEnvironment"
assert services =~ "/assets/monaco/editor.worker.js"
assert update_task =~ ~S|run_esbuild(["monaco_workers", "--minify"])|
refute File.exists?("/Users/gb/Projects/bDS2/assets/js/error_reporter.js")
end
test "top level shell render uses utility classes for common layout" do test "top level shell render uses utility classes for common layout" do
template = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live/index.html.heex") template = File.read!("/Users/gb/Projects/bDS2/lib/bds/desktop/shell_live/index.html.heex")